/* ============================================================
   Fulvox — central account screens (sign in, sign up, OTP,
   password reset, workspaces, onboarding, billing, statement)
   Shares the design tokens of fulvox-ui.css / saas-panel.css.
   ============================================================ */
:root {
  --fx-primary: #00ab9e;
  --fx-primary-600: #009488;
  --fx-primary-700: #00766d;
  --fx-primary-50: #e6f7f5;
  --fx-ink: #0f172a;
  --fx-ink-2: #334155;
  --fx-muted: #64748b;
  --fx-subtle: #94a3b8;
  --fx-line: #e2e8f0;
  --fx-line-2: #f1f5f9;
  --fx-surface: #ffffff;
  --fx-canvas: #f6f8fb;
  --fx-danger: #dc2626;
  --fx-danger-50: #fef2f2;
  --fx-success: #059669;
  --fx-success-50: #ecfdf5;
  --fx-warning: #d97706;
  --fx-warning-50: #fffbeb;
  --fx-radius-xs: 6px;
  --fx-radius-sm: 8px;
  --fx-radius: 12px;
  --fx-radius-lg: 16px;
  --fx-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --fx-shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --fx-focus: 0 0 0 3px rgba(0, 171, 158, .22);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.fx-account {
  font-family: "Inter", "Nunito", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fx-ink);
  background: var(--fx-canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fx-primary-600); text-decoration: none; }
a:hover { color: var(--fx-primary-700); text-decoration: underline; }

/* ---------- Shell ---------- */
.fx-shell { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(460px, 1fr); min-height: 100vh; }
.fx-shell.fx-wide { grid-template-columns: minmax(360px, .8fr) minmax(560px, 1.4fr); }

/* Brand side: Fulvox navy with the logo's teal as light. */
.fx-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 48px 64px;
  color: #fff;
  background:
    radial-gradient(720px 520px at 100% 0%, rgba(0, 171, 158, .34) 0%, transparent 62%),
    radial-gradient(640px 480px at 0% 100%, rgba(0, 171, 158, .22) 0%, transparent 60%),
    linear-gradient(160deg, #00205e 0%, #00184a 46%, #000f30 100%);
}
.fx-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .15));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .15));
}
.fx-brand > * { position: relative; z-index: 1; }
.fx-brand-logo img { display: block; height: 40px; width: auto; }
.fx-brand-copy { max-width: 460px; }
.fx-brand-kicker { display: inline-block; margin-bottom: 16px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5fe0d4; }
.fx-brand-copy h2 { margin: 0 0 16px; font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.fx-brand-copy p { margin: 0 0 32px; font-size: 15px; line-height: 1.7; color: rgba(226, 232, 240, .82); }
.fx-brand-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.fx-brand-list li { display: flex; align-items: center; gap: 14px; font-size: 14px; color: rgba(255, 255, 255, .92); }
.fx-brand-list li div { display: flex; flex-direction: column; gap: 2px; }
.fx-brand-list li strong { font-size: 14px; font-weight: 700; color: #fff; }
.fx-brand-list li small { font-size: 13px; color: rgba(226, 232, 240, .7); }
.fx-brand-list .fx-dot {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: var(--fx-radius); font-size: 17px; color: #5fe0d4;
  background: rgba(0, 171, 158, .16); border: 1px solid rgba(95, 224, 212, .22);
}
.fx-brand-list .fx-dot i { line-height: 1; display: flex; }

/* Decorative product preview. */
.fx-preview { position: relative; max-width: 380px; padding-bottom: 28px; }
.fx-preview-card {
  padding: 20px 22px; border-radius: var(--fx-radius-lg);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.fx-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(226, 232, 240, .75); }
.fx-preview-up { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 171, 158, .2); color: #5fe0d4; font-weight: 700; }
.fx-preview-value { margin: 6px 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.fx-preview-bars { display: flex; align-items: flex-end; gap: 8px; height: 56px; }
.fx-preview-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: rgba(255, 255, 255, .16); }
.fx-preview-bars i.on { background: linear-gradient(180deg, #2fd1c3, #00ab9e); }
.fx-preview-chip {
  position: absolute; right: -24px; bottom: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  border-radius: var(--fx-radius); background: #fff; color: var(--fx-ink);
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .5);
}
.fx-preview-chip div { display: flex; flex-direction: column; line-height: 1.25; }
.fx-preview-chip strong { font-size: 13px; }
.fx-preview-chip small { font-size: 11.5px; color: var(--fx-muted); }
.fx-preview-tick { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--fx-radius-sm); background: var(--fx-primary-50); color: var(--fx-primary-700); }
.fx-preview-tick i { display: flex; line-height: 1; }

.fx-brand-foot { font-size: 12px; color: rgba(226, 232, 240, .6); }
.fx-brand-foot a { color: #fff; font-weight: 700; }

/* Form side. */
.fx-main { display: flex; flex-direction: column; min-height: 100vh; background: var(--fx-surface); }
.fx-main-top { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-height: 72px; padding: 16px 40px; }
.fx-main-logo { display: none; margin-right: auto; }
.fx-main-logo img { display: block; height: 32px; width: auto; }
.fx-main-nav { display: flex; align-items: center; gap: 12px; }
.fx-muted-sm { font-size: 13px; color: var(--fx-muted); }
.fx-main-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 40px 40px; }
.fx-main-foot { display: flex; justify-content: space-between; gap: 16px; padding: 20px 40px; font-size: 12px; color: var(--fx-subtle); border-top: 1px solid var(--fx-line-2); }
.fx-main-foot i { vertical-align: -1px; margin-right: 4px; }
.fx-card { width: 100%; max-width: 400px; }
.fx-wide .fx-card { max-width: 640px; }

.fx-head { margin-bottom: 32px; }
.fx-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 4px 10px; border-radius: 999px; background: var(--fx-primary-50); color: var(--fx-primary-700); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fx-eyebrow i { display: flex; line-height: 1; }
.fx-title { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; color: var(--fx-ink); }
.fx-sub { margin: 0 0 28px; color: var(--fx-muted); font-size: 14.5px; }
.fx-head .fx-sub { margin-bottom: 0; }

/* ---------- Forms ---------- */
.fx-field { margin-bottom: 18px; }
.fx-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--fx-ink-2); }
.fx-label a { font-weight: 600; font-size: 12px; }
.fx-input {
  display: block; width: 100%; height: 48px; padding: 0 14px;
  font: inherit; font-size: 14px; color: var(--fx-ink);
  background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-sm);
  box-shadow: var(--fx-shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-input::placeholder { color: var(--fx-subtle); }
.fx-input:focus { outline: none; border-color: var(--fx-primary); box-shadow: var(--fx-focus); }
.fx-input.is-invalid { border-color: var(--fx-danger); }
.fx-input-code { height: 54px; text-align: center; font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 24px; font-weight: 700; letter-spacing: .5em; padding-left: .5em; }
.fx-hint { margin-top: 6px; font-size: 12px; color: var(--fx-muted); }
.fx-error { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--fx-danger); }
.fx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fx-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fx-ink-2); }
.fx-check input { width: 16px; height: 16px; accent-color: var(--fx-primary); }
.fx-prefix { display: flex; align-items: stretch; }
.fx-prefix .fx-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fx-prefix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--fx-line); border-left: 0; border-radius: 0 var(--fx-radius-sm) var(--fx-radius-sm) 0; background: var(--fx-line-2); color: var(--fx-muted); font-size: 13px; white-space: nowrap; }

/* ---------- Buttons ---------- */
.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  border: 1px solid transparent; border-radius: var(--fx-radius-sm); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  text-decoration: none !important;
}
.fx-btn:focus-visible { outline: none; box-shadow: var(--fx-focus); }
.fx-btn-primary { background: var(--fx-primary); color: #fff; }
.fx-btn-primary:hover { background: var(--fx-primary-600); color: #fff; }
.fx-btn-secondary { background: var(--fx-surface); color: var(--fx-ink-2); border-color: var(--fx-line); box-shadow: var(--fx-shadow-sm); }
.fx-btn-secondary:hover { background: var(--fx-line-2); color: var(--fx-ink); }
.fx-btn-link { background: none; border: 0; height: auto; padding: 0; color: var(--fx-primary-600); font-weight: 600; }
.fx-btn-link:disabled { color: var(--fx-subtle); cursor: not-allowed; }
.fx-btn-block { display: flex; width: 100%; height: 48px; font-size: 15px; }
.fx-btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

/* ---------- Alerts ---------- */
.fx-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--fx-radius); border: 1px solid; font-size: 13px; line-height: 1.5; }
.fx-alert-danger { background: var(--fx-danger-50); border-color: #fecaca; color: #991b1b; }
.fx-alert-success { background: var(--fx-success-50); border-color: #a7f3d0; color: #065f46; }
.fx-alert-info { background: var(--fx-primary-50); border-color: #b5e6e1; color: #0b5c56; }
.fx-alert-warning { background: var(--fx-warning-50); border-color: #fde68a; color: #92400e; }

.fx-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--fx-subtle); font-size: 12px; }
.fx-divider::before, .fx-divider::after { content: ""; flex: 1; height: 1px; background: var(--fx-line); }
.fx-foot { margin-top: 24px; text-align: center; font-size: 13px; color: var(--fx-muted); }
.fx-legal { margin-top: 32px; text-align: center; font-size: 12px; color: var(--fx-subtle); }

/* ---------- Steps / OTP ---------- */
.fx-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.fx-steps span { flex: 1; height: 4px; border-radius: 999px; background: var(--fx-line); }
.fx-steps span.on { background: var(--fx-primary); }
.fx-otp-block { padding: 18px; margin-bottom: 16px; border: 1px solid var(--fx-line); border-radius: var(--fx-radius-lg); background: var(--fx-surface); }
.fx-otp-block.done { border-color: #a7f3d0; background: var(--fx-success-50); }
.fx-otp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.fx-otp-head strong { font-size: 14px; }
.fx-otp-head small { display: block; color: var(--fx-muted); font-size: 12px; font-weight: 400; }
.fx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.fx-badge-success { background: var(--fx-success-50); color: var(--fx-success); }
.fx-badge-warning { background: var(--fx-warning-50); color: var(--fx-warning); }
.fx-badge-danger { background: var(--fx-danger-50); color: var(--fx-danger); }
.fx-badge-muted { background: var(--fx-line-2); color: var(--fx-muted); }
.fx-badge-primary { background: var(--fx-primary-50); color: var(--fx-primary-700); }


/* ---------- Account app pages (workspaces, billing, statement) ---------- */
.fx-app { min-height: 100vh; display: flex; flex-direction: column; }

/* Top bar: logo, section nav, account menu. */
.fx-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--fx-line);
  -webkit-backdrop-filter: saturate(160%) blur(8px); backdrop-filter: saturate(160%) blur(8px);
}
.fx-topbar-inner { display: flex; align-items: center; gap: 32px; max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 24px; }
.fx-topbar-logo { display: flex; align-items: center; flex: 0 0 auto; }
.fx-topbar-logo img { display: block; height: 28px; width: auto; }
.fx-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; flex: 1; min-width: 0; }
.fx-nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: -1px;
  font-size: 13.5px; font-weight: 600; color: var(--fx-muted); white-space: nowrap;
  border-bottom: 2px solid transparent; text-decoration: none !important;
  transition: color .15s ease, border-color .15s ease;
}
.fx-nav a i { display: flex; font-size: 15px; line-height: 1; }
.fx-nav a:hover { color: var(--fx-ink); }
.fx-nav a.on { color: var(--fx-ink); border-bottom-color: var(--fx-primary); }

.fx-menu { position: relative; flex: 0 0 auto; }
.fx-menu > summary {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; list-style: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px; transition: background .15s ease, border-color .15s ease;
}
.fx-menu > summary::-webkit-details-marker { display: none; }
.fx-menu > summary:hover, .fx-menu[open] > summary { background: var(--fx-line-2); border-color: var(--fx-line); }
.fx-menu > summary:focus-visible { outline: none; box-shadow: var(--fx-focus); }
.fx-menu-name { font-size: 13px; font-weight: 600; color: var(--fx-ink-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-menu-caret { display: flex; font-size: 11px; color: var(--fx-subtle); }
.fx-menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 264px; padding: 6px;
  background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow);
}
.fx-menu-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--fx-line-2); }
.fx-menu-head strong { font-size: 14px; color: var(--fx-ink); }
.fx-menu-head small { font-size: 12px; color: var(--fx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  font: inherit; font-size: 13px; color: var(--fx-ink-2); text-align: left; text-decoration: none !important;
  background: none; border: 0; border-radius: var(--fx-radius-xs); cursor: pointer;
}
.fx-menu-item i { display: flex; font-size: 15px; color: var(--fx-subtle); }
.fx-menu-item:hover { background: var(--fx-line-2); color: var(--fx-ink); }
.fx-menu-item.danger, .fx-menu-item.danger i { color: var(--fx-danger); }
.fx-menu-sep { height: 1px; margin: 6px 0; background: var(--fx-line-2); }
.fx-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #00ab9e, #00766d); color: #fff; font-weight: 800; font-size: 12px; }

/* Page frame. */
.fx-page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 24px 72px; }
.fx-page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.fx-page-kicker { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-primary-700); }
.fx-page-title { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; color: var(--fx-ink); }
.fx-page-sub { margin: 6px 0 0; max-width: 640px; font-size: 14px; color: var(--fx-muted); }
.fx-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-section-title { display: flex; align-items: center; gap: 8px; margin: 28px 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fx-muted); }
.fx-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fx-line-2); color: var(--fx-muted); font-size: 11px; font-weight: 700; letter-spacing: 0; }

/* KPI strip. */
.fx-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; overflow: hidden;
  background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow-sm);
}
.fx-kpi { padding: 18px 20px; border-left: 1px solid var(--fx-line-2); min-width: 0; }
.fx-kpi:first-child { border-left: 0; }
.fx-kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--fx-muted); }
.fx-kpi-label i { display: flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: var(--fx-radius-xs); background: var(--fx-line-2); color: var(--fx-ink-2); font-size: 13px; }
.fx-kpi-value { margin-top: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--fx-ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-kpi-sub { margin-top: 2px; font-size: 12px; color: var(--fx-subtle); }
.fx-kpi.danger .fx-kpi-value { color: var(--fx-danger); }
.fx-kpi.danger .fx-kpi-label i { background: var(--fx-danger-50); color: var(--fx-danger); }
.fx-kpi.success .fx-kpi-label i { background: var(--fx-success-50); color: var(--fx-success); }
.fx-kpi.primary .fx-kpi-label i { background: var(--fx-primary-50); color: var(--fx-primary-700); }
.fx-kpi.warning .fx-kpi-label i { background: var(--fx-warning-50); color: var(--fx-warning); }

/* Content card. */
.fx-box { background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow-sm); overflow: hidden; }
.fx-box + .fx-box { margin-top: 20px; }
.fx-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--fx-line-2); }
.fx-box-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--fx-ink); }
.fx-box-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--fx-muted); }
.fx-box-body { padding: 20px; }
.fx-box-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--fx-line-2); font-size: 12.5px; color: var(--fx-muted); }

/* Tabs and filter bar. */
.fx-tabs { display: flex; gap: 24px; padding: 0 20px; border-bottom: 1px solid var(--fx-line); overflow-x: auto; }
.fx-tab { display: inline-flex; align-items: center; gap: 8px; padding: 14px 2px; margin-bottom: -1px; font-size: 13.5px; font-weight: 600; color: var(--fx-muted); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none !important; }
.fx-tab:hover { color: var(--fx-ink); }
.fx-tab.on { color: var(--fx-ink); border-bottom-color: var(--fx-primary); }
.fx-tab.on .fx-count { background: var(--fx-primary-50); color: var(--fx-primary-700); }
.fx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--fx-line-2); background: #fbfcfd; }
.fx-toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fx-toolbar .fx-input, .fx-input-sm { height: 38px; padding: 0 12px; font-size: 13px; box-shadow: none; }
.fx-toolbar .fx-input { display: inline-block; width: auto; }
.fx-toolbar input[type=date].fx-input { min-width: 150px; }
.fx-toolbar select.fx-input { padding-right: 32px; min-width: 190px; }
.fx-toolbar .fx-btn { height: 38px; }
.fx-field-sm { display: flex; flex-direction: column; gap: 4px; }
.fx-field-sm label { font-size: 11.5px; font-weight: 600; color: var(--fx-muted); }
.fx-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--fx-line-2); border: 1px solid var(--fx-line); border-radius: var(--fx-radius-sm); }
.fx-seg a, .fx-seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fx-muted); text-decoration: none !important;
  background: none; border: 0; border-radius: var(--fx-radius-xs); cursor: pointer;
}
.fx-seg a:hover, .fx-seg button:hover { color: var(--fx-ink); }
.fx-seg a.on, .fx-seg button.on { background: var(--fx-surface); color: var(--fx-ink); box-shadow: var(--fx-shadow-sm); }

/* Tables. */
.fx-table-wrap { overflow-x: auto; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fx-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fx-muted); background: #f8fafc; border-bottom: 1px solid var(--fx-line); white-space: nowrap; }
.fx-table td { padding: 14px 16px; border-bottom: 1px solid var(--fx-line-2); vertical-align: middle; color: var(--fx-ink-2); }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-table tbody tr:hover td { background: #fafbfc; }
.fx-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-table .actions { text-align: right; white-space: nowrap; width: 1%; }
.fx-table .nowrap { white-space: nowrap; }
.fx-table .strong { font-weight: 700; color: var(--fx-ink); }
.fx-table .muted { color: var(--fx-subtle); }
.fx-table .sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--fx-muted); }
.fx-table tr.fx-row-total td { background: #f8fafc; font-weight: 700; color: var(--fx-ink); }
.fx-table tfoot td { padding: 14px 16px; background: #f8fafc; border-top: 1px solid var(--fx-line); font-weight: 700; color: var(--fx-ink); }
.fx-mono { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 12.5px; }

/* Workspace chip (avatar + name), used in tables. */
.fx-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; font-weight: 600; color: var(--fx-ink); }
.fx-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-chip-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: var(--fx-radius-xs); color: #fff; font-size: 11px; font-weight: 800; }
.fx-chip.is-deleted { color: var(--fx-muted); }
.fx-chip.is-deleted .fx-chip-mark { background: #cbd5e1 !important; }

/* Status badge with a dot. */
.fx-badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Empty state. */
.fx-empty { padding: 56px 24px; text-align: center; color: var(--fx-muted); }
.fx-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: var(--fx-line-2); color: var(--fx-subtle); font-size: 20px; }
.fx-empty-icon i { display: flex; }
.fx-empty strong { display: block; margin-bottom: 4px; font-size: 15px; color: var(--fx-ink); }
.fx-empty p { margin: 0 auto; max-width: 420px; font-size: 13px; }

/* Pagination (Laravel default markup). */
.fx-pager { padding: 12px 20px; border-top: 1px solid var(--fx-line-2); }
.fx-pager nav > div:first-child { display: none; }
.fx-pager nav { display: flex; justify-content: flex-end; }
.fx-pager nav > div:last-child { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; font-size: 12.5px; color: var(--fx-muted); }
.fx-pager p { margin: 0; }
.fx-pager span[aria-current] > span, .fx-pager a[href], .fx-pager span[aria-disabled] > span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; margin-left: 4px;
  border: 1px solid var(--fx-line); border-radius: var(--fx-radius-sm); background: var(--fx-surface); color: var(--fx-ink-2); font-size: 12.5px; text-decoration: none !important;
}
.fx-pager span[aria-current] > span { background: var(--fx-primary); border-color: var(--fx-primary); color: #fff; font-weight: 700; }
.fx-pager span[aria-disabled] > span { color: var(--fx-subtle); background: var(--fx-line-2); }
.fx-pager svg { width: 14px; height: 14px; }
.fx-pager .hidden { display: none; }
@media (min-width: 640px) { .fx-pager .sm\:hidden { display: none; } .fx-pager .sm\:flex-1 { flex: 1; } .fx-pager .sm\:flex { display: flex; } }

/* Workspace cards. */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fx-wsc {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px;
  background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: var(--fx-shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-wsc:hover { border-color: #cbd5e1; box-shadow: var(--fx-shadow); }
.fx-wsc.is-current { border-color: var(--fx-primary); box-shadow: 0 0 0 3px rgba(0, 171, 158, .12); }
.fx-wsc-head { display: flex; align-items: flex-start; gap: 12px; }
.fx-wsc-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--fx-radius); color: #fff; font-size: 17px; font-weight: 800; }
.fx-wsc-title { flex: 1; min-width: 0; }
.fx-wsc-name { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--fx-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-wsc-meta { margin-top: 2px; font-size: 12.5px; color: var(--fx-muted); }
.fx-wsc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--fx-radius-sm); background: #f8fafc; }
.fx-wsc-facts div { min-width: 0; }
.fx-wsc-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--fx-subtle); }
.fx-wsc-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--fx-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-wsc-note { margin: 0; font-size: 12.5px; color: var(--fx-muted); }
.fx-wsc-note.warning { color: #92400e; }
.fx-wsc-foot { display: flex; gap: 8px; margin-top: auto; }
.fx-wsc-foot form { flex: 1; display: flex; }
.fx-wsc-foot .fx-btn { flex: 1; }
.fx-wsc-new {
  align-items: center; justify-content: center; min-height: 236px; text-align: center; color: var(--fx-ink-2); text-decoration: none !important;
  border-style: dashed; border-width: 1.5px; background: transparent; box-shadow: none;
}
.fx-wsc-new:hover { border-color: var(--fx-primary); background: var(--fx-primary-50); color: var(--fx-primary-700); box-shadow: none; }
.fx-wsc-new-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fx-primary-50); color: var(--fx-primary-700); font-size: 20px; }
.fx-wsc-new-icon i { display: flex; }
.fx-wsc-new strong { font-size: 15px; }
.fx-wsc-new small { font-size: 12.5px; color: var(--fx-muted); }

/* Invitations list. */
.fx-invite { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--fx-line-2); }
.fx-invite:first-child { border-top: 0; }
.fx-invite-actions { display: flex; gap: 8px; }

/* Plan picker (create workspace). */
.fx-plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.fx-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; cursor: pointer; background: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.fx-plan:hover { border-color: #cbd5e1; }
.fx-plan input { position: absolute; opacity: 0; pointer-events: none; }
.fx-plan:has(input:checked) { border-color: var(--fx-primary); background: #f5fcfb; box-shadow: 0 0 0 3px rgba(0, 171, 158, .14); }
.fx-plan:has(input:focus-visible) { box-shadow: var(--fx-focus); }
.fx-plan.is-trial { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; background: linear-gradient(135deg, #f0fbfa, #fff 70%); }
.fx-plan-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--fx-radius-sm); background: var(--fx-primary-50); color: var(--fx-primary-700); font-size: 18px; }
.fx-plan-icon i { display: flex; }
.fx-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fx-plan-name { font-size: 14px; font-weight: 700; color: var(--fx-ink); }
.fx-plan-price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--fx-ink); font-variant-numeric: tabular-nums; }
.fx-plan-price small { font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--fx-muted); }
.fx-plan-desc { font-size: 12.5px; color: var(--fx-muted); }
.fx-plan-features { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--fx-ink-2); }
.fx-plan-features li { display: flex; gap: 6px; }
.fx-plan-features li::before { content: "✓"; color: var(--fx-primary); font-weight: 800; }
.fx-plan-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fx-line); color: transparent; font-size: 11px; flex: 0 0 20px; }
.fx-plan:has(input:checked) .fx-plan-check { background: var(--fx-primary); border-color: var(--fx-primary); color: #fff; }
.fx-plan[hidden] { display: none; }

@media (max-width: 900px) {
  .fx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-kpi:nth-child(3) { border-left: 0; }
  .fx-kpi:nth-child(n+3) { border-top: 1px solid var(--fx-line-2); }
}
@media (max-width: 720px) {
  .fx-topbar-inner { gap: 12px; padding: 0 14px; }
  .fx-nav a { padding: 0 8px; }
  .fx-nav a span, .fx-menu-name { display: none; }
  .fx-page { padding: 24px 14px 56px; }
  .fx-page-title { font-size: 22px; }
  .fx-plans { grid-template-columns: 1fr; }
  .fx-toolbar-end { margin-left: 0; }
}
@media (max-width: 480px) {
  .fx-kpis { grid-template-columns: 1fr; }
  .fx-kpi { border-left: 0 !important; }
  .fx-kpi + .fx-kpi { border-top: 1px solid var(--fx-line-2); }
}
@media print {
  .fx-topbar, .fx-toolbar, .fx-page-actions, .fx-no-print { display: none !important; }
  body.fx-account { background: #fff; }
  .fx-page { padding: 0; max-width: none; }
  .fx-box, .fx-kpis { box-shadow: none; }
  .fx-table tbody tr:hover td { background: none; }
}

/* ---------- Inputs with icons, password reveal, busy buttons ---------- */
.fx-control { position: relative; }
.fx-control .fx-input { height: 48px; padding-left: 42px; }
.fx-control .fx-input-reveal { padding-right: 48px; }
.fx-control-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; font-size: 16px; line-height: 1; color: var(--fx-subtle); pointer-events: none; transition: color .15s ease; }
.fx-control:focus-within .fx-control-icon { color: var(--fx-primary); }
.fx-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: var(--fx-radius-sm); background: transparent; color: var(--fx-subtle);
  font-size: 16px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.fx-reveal i { display: flex; line-height: 1; }
.fx-reveal:hover { background: var(--fx-line-2); color: var(--fx-ink-2); }
.fx-reveal.on { color: var(--fx-primary-600); }
.fx-reveal:focus-visible { outline: none; box-shadow: var(--fx-focus); }
.fx-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }
.fx-error, .fx-caps { display: flex; align-items: center; gap: 6px; }
.fx-error i, .fx-caps i { display: flex; line-height: 1; }
.fx-caps { color: var(--fx-warning); font-weight: 600; }
.fx-caps[hidden] { display: none; }
.fx-field-inline { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 24px; }
.fx-btn-lg { height: 48px; font-size: 15px; }
.fx-btn-primary { box-shadow: 0 1px 2px rgba(0, 24, 74, .12), 0 8px 20px -10px rgba(0, 171, 158, .7); }
.fx-btn-primary:active { transform: translateY(1px); }
.fx-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: fx-spin .7s linear infinite; }
.fx-btn.is-busy { pointer-events: none; opacity: .92; }
.fx-btn.is-busy .fx-btn-label { display: none; }
.fx-btn.is-busy .fx-spinner { display: inline-block; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fx-spinner { animation-duration: 1.6s; } }

@media (max-width: 1180px) {
  .fx-brand { padding: 40px 44px; }
  .fx-brand-copy h2 { font-size: 30px; }
  .fx-preview-chip { right: 0; }
}
@media (max-height: 820px) {
  .fx-preview { display: none; }
}
@media (max-width: 960px) {
  .fx-shell, .fx-shell.fx-wide { grid-template-columns: 1fr; }
  .fx-brand { display: none; }
  .fx-main-top { justify-content: space-between; padding: 16px 20px; min-height: 64px; border-bottom: 1px solid var(--fx-line-2); }
  .fx-main-logo { display: block; }
  .fx-main-nav .fx-muted-sm { display: none; }
  .fx-main-body { align-items: flex-start; padding: 32px 20px 40px; }
  .fx-main-foot { padding: 16px 20px; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
  .fx-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fx-title { font-size: 24px; }
  .fx-main-body { padding-top: 24px; }
}
.fx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
