/* ==========================================================================
   Fynro premium theme — navy & gold. Loaded after the compiled Tailwind CSS,
   so these plain rules win over the utility layer without a rebuild.
   ========================================================================== */
:root {
  --fx-navy: #0a1a33;
  --fx-navy-2: #0f2546;
  --fx-navy-3: #17345f;
  --fx-gold: #c9a34a;
  --fx-gold-2: #e2c47f;
  --fx-gold-ink: #8a6a1f;
  --fx-gold-soft: #f8f1df;
  --fx-bg: #f5f3ee;
  --fx-panel: #ffffff;
  --fx-line: #e8e2d4;
  --fx-line-2: #d9d1bf;
  --fx-ink: #0d1a2e;
  --fx-ink-2: #3a4558;
  --fx-muted: #6d7586;
  --fx-radius: 16px;
  --fx-shadow: 0 1px 2px rgba(10, 26, 51, .04), 0 10px 30px -18px rgba(10, 26, 51, .22);
  --fx-shadow-lg: 0 2px 4px rgba(10, 26, 51, .05), 0 22px 48px -24px rgba(10, 26, 51, .35);
  --fx-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ---------- base ---------- */
body { background: var(--fx-bg) !important; color: var(--fx-ink-2); }
::selection { background: var(--fx-gold-2); color: var(--fx-navy); }
.text-ink { color: var(--fx-ink) !important; }
.bg-navy { background-color: var(--fx-navy) !important; }
.text-gold { color: var(--fx-gold) !important; }
.text-brand { color: var(--fx-navy-3) !important; }
a.text-brand:hover, .hover\:text-brand:hover { color: var(--fx-gold-ink) !important; }
.bg-slate-50 { background-color: #faf8f3 !important; }
:focus-visible { outline: 2px solid var(--fx-gold); outline-offset: 2px; }

/* ---------- typography ---------- */
.fx-serif, main h1 { font-family: var(--fx-serif); letter-spacing: -.01em; }
main h1 { color: var(--fx-ink); font-weight: 700; }

/* ---------- components (override the Tailwind utilities) ---------- */
.card {
  background: var(--fx-panel) !important;
  border-radius: var(--fx-radius) !important;
  box-shadow: var(--fx-shadow) !important;
  --tw-ring-color: var(--fx-line) !important;
  border: 0;
}
a.card:hover { box-shadow: var(--fx-shadow-lg) !important; --tw-ring-color: var(--fx-gold-2) !important; }

.btn-primary {
  background: linear-gradient(180deg, var(--fx-navy-3), var(--fx-navy-2)) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 14px -8px rgba(10, 26, 51, .8) !important;
  border: 1px solid var(--fx-navy-2);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--fx-navy-2), var(--fx-navy)) !important; border-color: var(--fx-gold); }
.btn-primary svg { color: var(--fx-gold-2); }
.btn-secondary { background: #fff !important; --tw-ring-color: var(--fx-line-2) !important; color: var(--fx-ink) !important; }
.btn-secondary:hover { --tw-ring-color: var(--fx-gold) !important; background: #fffdf8 !important; }
.btn-ghost:hover { background: var(--fx-gold-soft) !important; }

.input { --tw-ring-color: var(--fx-line-2) !important; border-radius: 10px !important; }
.input:focus { --tw-ring-color: var(--fx-gold) !important; box-shadow: 0 0 0 3px rgba(201, 163, 74, .22), inset 0 0 0 1px var(--fx-gold) !important; }
.label { color: var(--fx-ink) !important; font-weight: 600 !important; }

.table-head { background: #faf8f3; color: var(--fx-muted) !important; letter-spacing: .08em !important; font-size: 11px !important; border-bottom: 1px solid var(--fx-line); }
table tbody tr { transition: background .15s; }
table tbody tr:hover { background: #fdfbf6; }
.divide-slate-100 > :not(:last-child) { border-color: #f0ece2 !important; }

.badge { font-weight: 600 !important; }

/* progress bars and avatars that used the bright blue */
.bg-brand { background-color: var(--fx-navy-3) !important; }
.ring-brand { --tw-ring-color: var(--fx-gold) !important; }
.h-1\.5.rounded-full > .bg-brand, .h-2 > .bg-brand, [role="progressbar"] > .bg-brand {
  background: linear-gradient(90deg, var(--fx-navy-3), var(--fx-gold)) !important;
}

/* ==========================================================================
   App shell: sidebar + top bar
   ========================================================================== */
.fx-side {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: 17.5rem; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(201, 163, 74, .10), transparent 55%),
    linear-gradient(180deg, var(--fx-navy-2) 0%, var(--fx-navy) 60%);
  color: #c5cede; border-right: 1px solid rgba(201, 163, 74, .18);
  transform: translateX(-100%); transition: transform .25s ease;
}
.fx-side.open { transform: none; }
@media (min-width: 1024px) { .fx-side { transform: none; } }
.fx-side::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, transparent, var(--fx-gold), transparent); }
.fx-brand { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 14px; }
.fx-brand img { height: 46px; width: auto; }
.fx-pill { margin: 0 20px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fx-gold-2); border: 1px solid rgba(201, 163, 74, .35); background: rgba(201, 163, 74, .08); border-radius: 999px; padding: 5px 10px; }
.fx-pill::before, .fx-pill::after { content: "◆"; font-size: 7px; color: var(--fx-gold); }
.fx-search { margin: 4px 16px 10px; position: relative; }
.fx-search input { width: 100%; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #fff; padding: 10px 12px 10px 36px; font-size: 13px; outline: none; }
.fx-search input::placeholder { color: #8d99b0; }
.fx-search input:focus { border-color: var(--fx-gold); background: rgba(255, 255, 255, .09); }
.fx-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #8d99b0; }
.fx-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.fx-group { margin-top: 14px; }
.fx-group-label { padding: 0 12px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #7e8aa3; }
.fx-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0; border-radius: 11px; font-size: 14px; font-weight: 500; color: #c5cede; text-decoration: none; transition: background .15s, color .15s; }
.fx-link svg { width: 19px; height: 19px; flex: none; color: #8d99b0; transition: color .15s; }
.fx-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.fx-link:hover svg { color: var(--fx-gold-2); }
.fx-link.active { background: linear-gradient(90deg, rgba(201, 163, 74, .18), rgba(201, 163, 74, .04)); color: #fff; font-weight: 600; }
.fx-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fx-gold); }
.fx-link.active svg { color: var(--fx-gold); }
.fx-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fx-gold); color: var(--fx-navy); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fx-count.soft { background: rgba(255, 255, 255, .12); color: #dfe5ef; }
.fx-side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: 12px 14px 16px; }
.fx-help { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: #dfe5ef; font-size: 13px; text-decoration: none; margin-bottom: 10px; }
.fx-help:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.fx-help svg { width: 18px; height: 18px; color: var(--fx-gold-2); }
.fx-me { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.fx-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--fx-navy); background: linear-gradient(135deg, var(--fx-gold-2), var(--fx-gold)); flex: none; box-shadow: 0 0 0 2px rgba(201, 163, 74, .25); }
.fx-me-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-me-mail { color: #8d99b0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #8d99b0; background: none; border: 0; cursor: pointer; }
.fx-icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.fx-icon-btn svg { width: 18px; height: 18px; }
.fx-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(6, 14, 28, .6); backdrop-filter: blur(2px); }

.fx-body { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .fx-body { padding-left: 17.5rem; } }
.fx-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px; background: rgba(245, 243, 238, .86); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--fx-line); }
@media (min-width: 640px) { .fx-top { padding: 0 24px; } }
@media (min-width: 1024px) { .fx-top { padding: 0 40px; } }
.fx-top .fx-menu { display: inline-grid; color: var(--fx-ink); }
.fx-top .fx-menu:hover { background: var(--fx-gold-soft); color: var(--fx-ink); }
@media (min-width: 1024px) { .fx-top .fx-menu { display: none; } }
.fx-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--fx-muted); }
.fx-crumbs b { color: var(--fx-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-crumbs .sep { color: var(--fx-line-2); }
.fx-crumbs .area { display: none; }
@media (min-width: 640px) { .fx-crumbs .area { display: inline; } }
.fx-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fx-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--fx-line); background: #fff; color: var(--fx-ink); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.fx-chip:hover { border-color: var(--fx-gold); color: var(--fx-ink); }
.fx-chip svg { width: 16px; height: 16px; color: var(--fx-gold-ink); }
.fx-chip.dark { background: linear-gradient(180deg, var(--fx-navy-3), var(--fx-navy-2)); color: #fff; border-color: var(--fx-navy-2); }
.fx-chip.dark svg { color: var(--fx-gold-2); }
.fx-chip .hide-sm { display: none; }
@media (min-width: 640px) { .fx-chip .hide-sm { display: inline; } }
.fx-menu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: #fff; border: 1px solid var(--fx-line); border-radius: 14px; box-shadow: var(--fx-shadow-lg); padding: 6px; z-index: 60; }
.fx-menu-pop a, .fx-menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--fx-ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.fx-menu-pop a:hover, .fx-menu-pop button:hover { background: var(--fx-gold-soft); color: var(--fx-ink); }
.fx-menu-pop svg { width: 16px; height: 16px; color: var(--fx-gold-ink); }
.fx-menu-pop .head { padding: 8px 10px 10px; border-bottom: 1px solid var(--fx-line); margin-bottom: 6px; }
.fx-menu-pop .head b { display: block; color: var(--fx-ink); font-size: 13.5px; }
.fx-menu-pop .head span { color: var(--fx-muted); font-size: 12px; }
.fx-footer { margin-top: auto; padding: 18px 40px 24px; font-size: 12px; color: var(--fx-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; border-top: 1px solid var(--fx-line); }
.fx-footer a { color: var(--fx-muted); }
.fx-footer a:hover { color: var(--fx-gold-ink); }

/* Page header */
.fx-page-head { margin-bottom: 28px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.fx-page-head h1 { font-family: var(--fx-serif); font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--fx-ink); }
@media (min-width: 640px) { .fx-page-head h1 { font-size: 34px; } }
.fx-page-head .rule { width: 44px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--fx-gold), var(--fx-gold-2)); margin-bottom: 12px; }
.fx-page-head .subtitle { margin-top: 6px; font-size: 14px; color: var(--fx-muted); }
.fx-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--fx-muted); text-decoration: none; }
.fx-back:hover { color: var(--fx-gold-ink); }
.fx-back svg { width: 16px; height: 16px; }

/* Hero banner (dashboards) */
.fx-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 28px; color: #fff; margin-bottom: 28px;
  background: radial-gradient(80% 120% at 100% 0%, rgba(201, 163, 74, .28), transparent 55%), linear-gradient(135deg, var(--fx-navy-3), var(--fx-navy) 70%);
  box-shadow: var(--fx-shadow-lg); }
@media (min-width: 640px) { .fx-hero { padding: 34px 38px; } }
.fx-hero::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(201, 163, 74, .35); box-shadow: 0 0 0 26px rgba(201, 163, 74, .06), 0 0 0 60px rgba(201, 163, 74, .04); }
.fx-hero h1, .fx-hero .fx-serif { font-family: var(--fx-serif); color: #fff; }
.fx-hero .eyebrow { color: var(--fx-gold-2); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.fx-hero .btn-primary { background: linear-gradient(180deg, var(--fx-gold-2), var(--fx-gold)) !important; color: var(--fx-navy) !important; border-color: var(--fx-gold); }
.fx-hero .btn-primary svg { color: var(--fx-navy); }

/* Stats */
.fx-stat-ico { background: var(--fx-gold-soft) !important; color: var(--fx-gold-ink) !important; }

/* ==========================================================================
   Sign-in pages
   ========================================================================== */
.fx-auth-art {
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(201, 163, 74, .22), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(23, 52, 95, .9), transparent 70%),
    linear-gradient(160deg, var(--fx-navy-2), var(--fx-navy));
}
.fx-auth-art .lines { position: absolute; inset: 0; opacity: .5; background-image: repeating-linear-gradient(135deg, rgba(201, 163, 74, .07) 0 1px, transparent 1px 22px); }
.fx-auth-art h2 { font-family: var(--fx-serif); }
.fx-auth-card { background: #fff; border: 1px solid var(--fx-line); border-radius: 22px; box-shadow: var(--fx-shadow-lg); padding: 32px 28px; }
.fx-auth-card h1 { font-family: var(--fx-serif); }
.fx-check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(201, 163, 74, .16); color: var(--fx-gold-2); }
.fx-check svg { width: 15px; height: 15px; }
.fx-trust { display: flex; flex-wrap: wrap; gap: 10px; }
.fx-trust span { font-size: 12px; color: #c5cede; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 12px; }

/* Utilities used by the theme that the compiled Tailwind file does not contain */
.leading-\[1\.15\] { line-height: 1.15; }
.max-w-lg { max-width: 32rem; }
.mt-9 { margin-top: 2.25rem; }
.text-\[2\.6rem\] { font-size: 2.6rem; }
.text-\[1\.7rem\] { font-size: 1.7rem; line-height: 1.2; }
.tracking-\[\.2em\] { letter-spacing: .2em; }
@media (min-width: 640px) { .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; } }
@media (min-width: 1024px) {
  .lg\:grid-cols-\[1\.05fr_1fr\] { grid-template-columns: 1.05fr 1fr; }
  .lg\:p-14 { padding: 3.5rem; }
}
@media (min-width: 1024px) { .fx-brand .fx-icon-btn { display: none; } }
.bg-slate-100, .bg-slate-100\/80 { background-color: #f0ece3 !important; }
.ring-slate-200, .ring-slate-200\/80 { --tw-ring-color: var(--fx-line) !important; }
.border-slate-100, .border-slate-200 { border-color: var(--fx-line) !important; }
.fx-chip.is-on { background: #fff8e6; border-color: var(--fx-gold); color: var(--fx-ink); }

/* "Approved · ready to fax" order status */
.bg-teal-50 { background-color: #f0fdfa; }
.text-teal-700 { color: #0f766e; }
.ring-teal-600\/20 { --tw-ring-color: rgba(13, 148, 136, .2); }

/* ---- Responsive hardening (portals) ---- */
.grid > * { min-width: 0; }
.fx-body, .fx-body > main { min-width: 0; }
.fx-body { overflow-x: clip; }
.card table { min-width: 100%; }
@media (max-width: 640px) {
  .fx-page-head h1 { font-size: 1.6rem; }
  .fx-page-head { flex-wrap: wrap; gap: .75rem; }
  .card.p-6 { padding: 1rem; }
}
/* Absolutely positioned bits (e.g. sr-only labels) must stay inside scrolling tables on phones. */
.overflow-x-auto, .overflow-hidden, .card { position: relative; }

/* Progress steps on phones: numbers only (the current step is named above the bar). */
@media (max-width: 640px) {
  .fx-steps { gap: 4px !important; }
  .fx-steps .fx-step-label { display: none; }
  .fx-steps li > span:first-child { width: 1.75rem; height: 1.75rem; }
}
/* Signing page: phones open the PDF in a new tab instead of the frame. */
.fx-pdf-open-mobile { display: none; }
@media (max-width: 640px) {
  .fx-pdf-frame { display: none !important; }
  .fx-pdf-open-mobile { display: flex; }
}
