/* ==========================================================================
   OrnaMatrix — shared design system
   Loaded on every page (public site, customer portal, admin panel, auth,
   error pages). Area-specific styles live in site.css and panel.css.
   Every colour, radius and shadow comes from these tokens so the whole
   brand can be retuned from one place.
   ========================================================================== */
:root {
  --primary: #c9a227;
  --primary-dark: #8f6f12;
  --primary-light: #e3c15a;
  --primary-soft: rgba(201, 162, 39, 0.12);
  --primary-ring: rgba(201, 162, 39, 0.22);

  --ink: #14110f;
  --dark: #14110f;
  --charcoal: #221d1a;
  --cream: #fbf8f1;
  --light: #f6f3ec;
  --white: #ffffff;
  --text: #2c2824;
  --text-muted: #6d665d;
  --border: #e9e3d6;

  --success: #1f8a4c;
  --warning: #a8740a;
  --danger: #c0392b;
  --info: #2c5f8a;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 17, 15, 0.06);
  --shadow: 0 10px 30px rgba(20, 17, 15, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 17, 15, 0.14);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
}
h5, h6 { color: var(--ink); }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--white); }

.text-primary-gold { color: var(--primary-dark) !important; }
.bg-dark-charcoal { background-color: var(--ink) !important; }
.bg-light-soft { background-color: var(--light) !important; }
.bg-cream { background-color: var(--cream) !important; }

/* ---- Logo ---- */
.om-logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); line-height: 1; }
.om-logo:hover { color: var(--ink); }
.om-logo-mark { width: 30px; height: 30px; flex-shrink: 0; color: var(--ink); }
.om-logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.om-logo-word span { color: var(--primary); }
.om-logo-sm .om-logo-mark { width: 24px; height: 24px; }
.om-logo-sm .om-logo-word { font-size: 1.2rem; }
.om-logo-lg .om-logo-mark { width: 38px; height: 38px; }
.om-logo-lg .om-logo-word { font-size: 1.75rem; }
.om-logo-light, .om-logo-light:hover { color: var(--white); }
.om-logo-light .om-logo-mark { color: var(--ink); }

/* ---- Buttons ---- */
.btn { border-radius: var(--radius-sm); font-weight: 600; padding: .7rem 1.5rem; transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .45rem 1rem; font-size: .875rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1.02rem; }
.btn-gold { background: var(--primary); border: 1px solid var(--primary); color: var(--ink); box-shadow: 0 6px 18px rgba(201, 162, 39, .28); }
.btn-gold:hover, .btn-gold:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-dark { background: var(--ink); border: 1px solid var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.btn-outline-dark-soft { border: 1px solid rgba(20, 17, 15, .22); color: var(--ink); background: transparent; }
.btn-outline-dark-soft:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-outline-gold { border: 1px solid var(--primary); color: var(--primary-dark); background: transparent; }
.btn-outline-gold:hover { background: var(--primary); color: var(--ink); }
.btn-ghost-light { border: 1px solid rgba(255, 255, 255, .28); color: var(--white); background: transparent; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.btn[aria-busy="true"] { pointer-events: none; opacity: .8; }
.btn .om-spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; vertical-align: -0.15em; animation: om-spin .7s linear infinite; margin-right: .45rem; }
@keyframes om-spin { to { transform: rotate(360deg); } }

/* ---- Forms ---- */
.form-label { font-weight: 600; font-size: .875rem; color: var(--ink); margin-bottom: .35rem; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control, .form-select { border-color: var(--border); border-radius: var(--radius-sm); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem var(--primary-ring); }
.form-text { color: var(--text-muted); font-size: .8rem; }
.invalid-feedback { font-size: .8rem; }
.input-group-text { border-color: var(--border); background: var(--light); color: var(--text-muted); }

/* ---- Cards ---- */
.kf-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  height: 100%;
}
.kf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(201, 162, 39, .45); }
.kf-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}
.kf-card h5, .kf-card h3.h5 { font-weight: 700; color: var(--ink); font-family: var(--font-body); letter-spacing: 0; }
.kf-card p { color: var(--text-muted); margin-bottom: 0; font-size: .95rem; }

/* ---- Status badges ---- */
.status-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; white-space: nowrap;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active, .status-approved, .status-paid, .status-resolved { background: rgba(31, 138, 76, .12); color: var(--success); }
.status-pending, .status-changes_requested, .status-open, .status-investigating { background: rgba(168, 116, 10, .12); color: var(--warning); }
.status-expired, .status-rejected, .status-revoked, .status-failed { background: rgba(192, 57, 43, .12); color: var(--danger); }
.status-suspended, .status-inactive, .status-cancelled { background: rgba(109, 102, 93, .14); color: var(--text-muted); }
.status-upcoming { background: rgba(44, 95, 138, .12); color: var(--info); }

/* ---- Alerts / flash ---- */
.om-alert { display: flex; align-items: flex-start; gap: .75rem; border-radius: var(--radius); border-width: 1px; padding: .9rem 3rem .9rem 1rem; font-size: .93rem; }
.om-alert > i { margin-top: .2rem; }
.om-alert ul { font-size: .9rem; }
.alert-success { background: #edf7f1; border-color: #cbe8d6; color: #17633a; }
.alert-danger { background: #fcefed; border-color: #f2cdc8; color: #8e2a1f; }
.alert-warning { background: #fdf6e7; border-color: #f1dfb4; color: #7a5507; }
.alert-info { background: #eef4f9; border-color: #cfdfec; color: #23496a; }

.om-flash-floating {
  position: fixed; top: 88px; right: 1rem; z-index: 1080;
  width: min(420px, calc(100vw - 2rem));
}
.om-flash-floating .om-alert { box-shadow: var(--shadow-lg); }

/* ---- Utilities ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary-dark); background: var(--primary-soft);
  padding: .42rem .95rem; border-radius: 999px;
}
.eyebrow-light { color: var(--primary-light); background: rgba(227, 193, 90, .12); }
.copy-field { display: flex; align-items: center; gap: .5rem; background: var(--light); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: .55rem .75rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; letter-spacing: .04em; }
.copy-field code { color: var(--ink); background: none; flex: 1; word-break: break-all; }

/* ---- Check list (marketing pages, auth aside, activation card) ---- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .35rem 0 .35rem 1.9rem; position: relative; }
.check-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: .42rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: .65rem; display: flex; align-items: center; justify-content: center; }
