/* ═══════════════════════════════════════════════════════════════
   Portal stylesheet — v1.19.0 refresh
   Calm, readable, accessible: solid surfaces, one accent colour,
   sentence-case labels, visible focus, comfortable tap targets.
   Brand colours come from Settings → Brand (inline :root layer).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --fh-bg:          #0b1220;
  --fh-surface:     #111a2b;
  --fh-accent:      #2aa8e0;
  --fh-accent-2:    #2aa8e0;
  --fh-accent-glow: rgba(42,168,224,.12);
  --fh-accent-rgb:  42,168,224;
  --fh-btn-bg:      var(--fh-accent);
  --fh-on-accent:   #0b1220;

  --fh-surface-2:   #172238;
  --fh-border:      #24324a;
  --fh-border-strong:#33445f;
  --fh-text:        #e8eef6;
  --fh-text-dim:    #c0cad8;
  --fh-text-muted:  #94a3b8;

  --fh-success:     #22c55e;
  --fh-warning:     #f59e0b;
  --fh-danger:      #f05252;

  --fh-radius:      10px;
  --fh-radius-sm:   8px;
  --fh-shadow:      0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.18);
  --fh-font:        'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fh-mono:        ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --fh-focus:       0 0 0 3px rgba(var(--fh-accent-rgb), .45);
}
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --fh-surface-2:    color-mix(in srgb, var(--fh-surface), #ffffff 5%);
    --fh-border:       color-mix(in srgb, var(--fh-surface), #ffffff 12%);
    --fh-border-strong:color-mix(in srgb, var(--fh-surface), #ffffff 20%);
  }
}

/* ─── Base ─────────────────────────────────────────────────── */
.flexhub-portal, .flexhub-portal * { box-sizing: border-box; }
.flexhub-portal * { margin: 0; padding: 0; }
.flexhub-portal {
  font-family: var(--fh-font);
  font-size: 14px;
  line-height: 1.55;
  background: var(--fh-bg);
  color: var(--fh-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
.flexhub-portal a { color: var(--fh-accent); text-underline-offset: 2px; }
.flexhub-portal h1, .flexhub-portal h2, .flexhub-portal h3, .flexhub-portal h4 { font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.flexhub-portal strong, .flexhub-portal b { font-weight: 600; }
.flexhub-portal code { font-family: var(--fh-mono); font-size: .92em; }
.flexhub-portal ::selection { background: rgba(var(--fh-accent-rgb), .35); }
.fh-icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.flexhub-portal .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* visible keyboard focus everywhere */
.flexhub-portal a:focus-visible,
.flexhub-portal button:focus-visible,
.flexhub-portal [role="button"]:focus-visible,
.flexhub-portal input:focus-visible,
.flexhub-portal select:focus-visible,
.flexhub-portal textarea:focus-visible { outline: none; box-shadow: var(--fh-focus); border-radius: var(--fh-radius-sm); }

/* ─── Layout ───────────────────────────────────────────────── */
.fh-wrapper { display: flex; min-height: 100vh; }
.fh-sidebar {
  width: 248px; background: var(--fh-surface);
  border-right: 1px solid var(--fh-border);
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; height: 100vh;
  overflow-y: auto; z-index: 100;
}
.fh-main { flex: 1; margin-left: 248px; padding: 32px 40px 48px; min-height: 100vh; max-width: 1360px; min-width: 0; }

/* ─── Sidebar ──────────────────────────────────────────────── */
.fh-logo { padding: 20px 20px 16px; }
.fh-logo-text { font-size: 17px; font-weight: 700; color: var(--fh-text); letter-spacing: -.01em; }
.fh-logo-text span { color: var(--fh-accent); }
.fh-logo-sub { font-size: 12px; color: var(--fh-text-muted); margin-top: 4px; }

.fh-nav { padding: 4px 12px 16px; flex: 1; }
.fh-nav-section { padding: 16px 10px 6px; font-size: 12px; font-weight: 500; color: var(--fh-text-muted); }
.fh-nav a {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 10px; margin: 1px 0;
  color: var(--fh-text-dim); text-decoration: none;
  font-size: 14px; font-weight: 500; border-radius: var(--fh-radius-sm);
  transition: background .15s, color .15s;
}
.fh-nav a:hover { background: var(--fh-surface-2); color: var(--fh-text); }
.fh-nav a.active { background: rgba(var(--fh-accent-rgb), .12); color: var(--fh-text); }
.fh-nav a.active .nav-icon { color: var(--fh-accent); }
.fh-nav a .nav-icon { width: 20px; display: inline-flex; justify-content: center; color: var(--fh-text-muted); }
.fh-nav a span[style*="background:#ef4444"] { margin-left: auto !important; }

.fh-sidebar-user { padding: 14px 16px; border-top: 1px solid var(--fh-border); display: flex; align-items: center; gap: 12px; }
.fh-avatar, .fh-customer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(var(--fh-accent-rgb), .16); color: var(--fh-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.fh-customer-avatar { width: 48px; height: 48px; font-size: 16px; }
.fh-sidebar-user-info { flex: 1; min-width: 0; }
.fh-sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--fh-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-sidebar-user-role { font-size: 12px; color: var(--fh-text-muted); }
.fh-logout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--fh-radius-sm);
  color: var(--fh-text-muted); text-decoration: none;
}
.fh-logout-btn:hover { color: var(--fh-danger); background: rgba(240,82,82,.1); }

/* mobile top bar (hidden on desktop) */
.fh-topbar { display: none; }

/* ─── Page header ──────────────────────────────────────────── */
.fh-page-header { margin-bottom: 24px; }
.fh-page-title { font-size: 22px; font-weight: 600; color: var(--fh-text); display: flex; align-items: center; gap: 10px; letter-spacing: -.015em; line-height: 1.3; }
.fh-page-subtitle { font-size: 14px; color: var(--fh-text-muted); margin-top: 4px; }

/* ─── Stat cards ───────────────────────────────────────────── */
.fh-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.fh-stat-card {
  background: var(--fh-surface); border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius); padding: 18px 20px; position: relative;
}
.fh-stat-card::before { content: none; }
.fh-stat-label { font-size: 13px; color: var(--fh-text-muted); font-weight: 500; padding-right: 40px; }
.fh-stat-value { font-size: 26px; font-weight: 600; color: var(--fh-text); margin: 6px 0 2px; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fh-stat-sub { font-size: 12.5px; color: var(--fh-text-muted); }
.fh-stat-icon {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 8px;
  background: var(--fh-surface-2); color: var(--fh-text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ─── Cards ────────────────────────────────────────────────── */
.fh-card { background: var(--fh-surface); border: 1px solid var(--fh-border); border-radius: var(--fh-radius); padding: 22px 24px; margin-bottom: 20px; }
.fh-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--fh-border); }
.fh-card-title { font-size: 15px; font-weight: 600; color: var(--fh-text); }
.fh-card-subtitle { font-size: 13px; color: var(--fh-text-muted); margin-top: 2px; }

/* subscription summary */
.fh-sub-card { background: var(--fh-surface); border: 1px solid var(--fh-border); border-radius: var(--fh-radius); padding: 24px; position: relative; margin-bottom: 20px; }
.fh-sub-card::after { content: none; }
.fh-sub-plan { font-size: 13px; color: var(--fh-text-muted); font-weight: 500; }
.fh-sub-name { font-size: 22px; font-weight: 600; margin: 4px 0 6px; }
.fh-sub-expiry { font-size: 14px; color: var(--fh-text-muted); }
.fh-sub-expiry strong { color: var(--fh-text); }
.fh-sub-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; margin-top: 12px; }
.fh-sub-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fh-sub-badge.active   { background: rgba(34,197,94,.12);  color: #4ade80; }
.fh-sub-badge.expired  { background: rgba(240,82,82,.12);  color: #f87171; }
.fh-sub-badge.expiring { background: rgba(245,158,11,.12); color: #fbbf24; }

/* credentials */
.fh-credentials { display: flex; flex-direction: column; gap: 10px; }
.fh-cred-row {
  background: var(--fh-surface-2); border: 1px solid var(--fh-border); border-radius: var(--fh-radius-sm);
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fh-cred-label { font-size: 12.5px; color: var(--fh-text-muted); margin-bottom: 2px; font-weight: 500; }
.fh-cred-value { font-size: 14px; font-weight: 500; color: var(--fh-text); font-family: var(--fh-mono); word-break: break-all; }
.fh-copy-btn {
  background: transparent; border: 1px solid var(--fh-border-strong); color: var(--fh-text-dim);
  min-height: 34px; padding: 6px 12px; border-radius: var(--fh-radius-sm);
  font: 500 13px var(--fh-font); cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.fh-copy-btn:hover { border-color: var(--fh-accent); color: var(--fh-text); }
.fh-copy-btn.copied { border-color: rgba(34,197,94,.5); color: #4ade80; }
.fh-cred-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }

/* ─── Tables ───────────────────────────────────────────────── */
.fh-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fh-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fh-table th {
  padding: 10px 14px; font-size: 12.5px; font-weight: 500; color: var(--fh-text-muted);
  text-align: left; border-bottom: 1px solid var(--fh-border); white-space: nowrap; background: transparent;
}
.fh-table td { padding: 12px 14px; border-bottom: 1px solid var(--fh-border); font-size: 14px; color: var(--fh-text); vertical-align: middle; }
.fh-table tbody tr { transition: background .12s; }
.fh-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.fh-table tr:last-child td { border-bottom: none; }

/* ─── Badges ───────────────────────────────────────────────── */
.fh-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap; text-transform: none; letter-spacing: 0;
}
.fh-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.fh-badge-green  { background: rgba(34,197,94,.12);  color: #4ade80; }
.fh-badge-blue   { background: rgba(var(--fh-accent-rgb),.14); color: var(--fh-accent); }
.fh-badge-yellow { background: rgba(245,158,11,.12); color: #fbbf24; }
.fh-badge-red    { background: rgba(240,82,82,.12);  color: #f87171; }
.fh-badge-gray   { background: rgba(148,163,184,.12); color: #b6c2d1; }

/* ─── Forms ────────────────────────────────────────────────── */
.fh-form-group { margin-bottom: 16px; }
.fh-label { display: block; font-size: 13px; font-weight: 500; color: var(--fh-text-dim); margin-bottom: 6px; }
.fh-muted { color: var(--fh-text-muted); font-weight: 400; }
.fh-input, .fh-select, .fh-textarea, .flexhub-portal input[type="text"], .flexhub-portal input[type="email"], .flexhub-portal input[type="password"], .flexhub-portal input[type="number"], .flexhub-portal input[type="date"], .flexhub-portal input[type="tel"], .flexhub-portal input[type="url"], .flexhub-portal select, .flexhub-portal textarea {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--fh-bg); border: 1px solid var(--fh-border-strong);
  border-radius: var(--fh-radius-sm); color: var(--fh-text);
  font: 400 14px/1.4 var(--fh-font); transition: border-color .15s, box-shadow .15s; outline: none;
}
.flexhub-portal input::placeholder, .flexhub-portal textarea::placeholder { color: #6b7a90; }
.fh-input:focus, .fh-select:focus, .fh-textarea:focus,
.flexhub-portal input:focus, .flexhub-portal select:focus, .flexhub-portal textarea:focus { border-color: var(--fh-accent); box-shadow: var(--fh-focus); }
.flexhub-portal input[type="checkbox"], .flexhub-portal input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--fh-accent); vertical-align: middle; }
.flexhub-portal input[type="date"] { color-scheme: dark; }
.fh-textarea, .flexhub-portal textarea { resize: vertical; min-height: 96px; }
.fh-select-inline { width: auto; min-width: 170px; }
.fh-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fh-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fh-text-dim); cursor: pointer; }

/* ─── Buttons ──────────────────────────────────────────────── */
.fh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--fh-radius-sm);
  font: 600 14px/1.2 var(--fh-font); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, filter .15s;
}
.fh-btn:disabled, .fh-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.flexhub-portal .fh-btn-primary { background: var(--fh-btn-bg); border-color: var(--fh-btn-bg); color: var(--fh-on-accent); box-shadow: none; }
.flexhub-portal .fh-btn-primary:hover { filter: brightness(1.08); transform: none; box-shadow: none; }
.flexhub-portal .fh-btn-success { background: #16a34a; border-color: #16a34a; color: #fff; box-shadow: none; }
.flexhub-portal .fh-btn-success:hover { background: #15803d; }
.fh-btn-outline { background: transparent; border-color: var(--fh-border-strong); color: var(--fh-text); }
.fh-btn-outline:hover { background: var(--fh-surface-2); border-color: var(--fh-border-strong); color: var(--fh-text); }
.fh-btn-danger { background: transparent; border-color: rgba(240,82,82,.45); color: #f87171; }
.fh-btn-danger:hover { background: rgba(240,82,82,.1); }
.fh-btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.fh-btn-full { width: 100%; }

/* ─── Login / standalone pages ─────────────────────────────── */
.fh-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--fh-bg); }
.fh-login-box { width: 100%; max-width: 420px; }
.fh-login-logo { text-align: center; margin-bottom: 24px; }
.fh-login-logo-text { font-size: 24px; font-weight: 700; color: var(--fh-text); }
.fh-login-logo-text span { color: var(--fh-accent); }
.fh-login-card { background: var(--fh-surface); border: 1px solid var(--fh-border); border-radius: 14px; padding: 28px; box-shadow: var(--fh-shadow); }
.fh-login-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; letter-spacing: -.01em; }
.fh-login-sub { font-size: 14px; color: var(--fh-text-muted); margin-bottom: 22px; }

/* ─── Alerts ───────────────────────────────────────────────── */
.fh-alert {
  padding: 11px 14px; border-radius: var(--fh-radius-sm); font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px; border: 1px solid; border-left-width: 3px; line-height: 1.5;
}
.fh-alert-error   { background: rgba(240,82,82,.08);  border-color: rgba(240,82,82,.35);  color: #fecaca; }
.fh-alert-success { background: rgba(34,197,94,.08);  border-color: rgba(34,197,94,.35);  color: #bbf7d0; }
.fh-alert-info    { background: rgba(var(--fh-accent-rgb),.08); border-color: rgba(var(--fh-accent-rgb),.35); color: var(--fh-text); }
.fh-alert-warning { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.35); color: #fde68a; }

/* ─── Tickets ──────────────────────────────────────────────── */
.fh-ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.fh-ticket-thread > div { display: flex; flex-direction: column; }
.fh-message-bubble { max-width: 82%; padding: 12px 15px; border-radius: 12px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.fh-message-customer { background: var(--fh-surface-2); border: 1px solid var(--fh-border); align-self: flex-start; border-bottom-left-radius: 4px; }
.fh-message-support  { background: rgba(var(--fh-accent-rgb),.10); border: 1px solid rgba(var(--fh-accent-rgb),.25); align-self: flex-end; border-bottom-right-radius: 4px; }
.fh-message-internal { background: rgba(245,158,11,.07); border: 1px dashed rgba(245,158,11,.4); align-self: flex-end; border-bottom-right-radius: 4px; }
.fh-message-meta { font-size: 12px; color: var(--fh-text-muted); margin-top: 4px; }
.fh-reply-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.fh-reply-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* ─── Customer header ──────────────────────────────────────── */
.fh-customer-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.fh-customer-name  { font-size: 18px; font-weight: 600; }
.fh-customer-email { font-size: 14px; color: var(--fh-text-muted); overflow-wrap: anywhere; }

/* ─── Search ───────────────────────────────────────────────── */
.fh-search-bar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.flexhub-portal .fh-search-input {
  flex: 1; min-width: 200px; padding: 9px 14px 9px 38px; background-color: var(--fh-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}

/* ─── Empty state ──────────────────────────────────────────── */
.fh-empty { text-align: center; padding: 44px 20px; color: var(--fh-text-muted); }
.fh-empty-icon { display: none; }
.fh-empty-text { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--fh-text-dim); }
.fh-empty-sub  { font-size: 14px; }

/* ─── Expiry bar ───────────────────────────────────────────── */
.fh-expiry-bar { margin-top: 12px; }
.fh-expiry-bar-track { height: 6px; background: var(--fh-surface-2); border-radius: 6px; overflow: hidden; }
.fh-expiry-bar-fill { height: 100%; border-radius: 6px; background: var(--fh-accent); transition: width .4s ease; }
.fh-expiry-bar-fill.low { background: var(--fh-danger); }

/* ─── Utilities ────────────────────────────────────────────── */
.fh-mt-0  { margin-top: 0; }
.fh-mt-16 { margin-top: 16px; }
.fh-mt-24 { margin-top: 24px; }
.fh-grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.fh-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.fh-flex   { display: flex; align-items: center; }
.fh-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fh-gap-8  { gap: 8px; }
.fh-gap-12 { gap: 12px; }
.fh-text-muted { color: var(--fh-text-muted); }
.fh-text-sm    { font-size: 13px; }
.fh-fw-700     { font-weight: 600; }
.fh-divider    { border: none; border-top: 1px solid var(--fh-border); margin: 20px 0; }
.fh-hide-sm { }

/* ─── Checkout pieces (shared with the inline checkout styles) ─ */
.flexhub-portal .fh-pm-row { border-width: 1px; border-radius: var(--fh-radius); min-height: 56px; }
.flexhub-portal .fh-pm-row:hover { border-color: var(--fh-border-strong); }
.flexhub-portal .fh-pm-row.fh-pm-selected { border-color: var(--fh-accent); background: rgba(var(--fh-accent-rgb), .06); box-shadow: inset 0 0 0 1px var(--fh-accent); }
.flexhub-portal .fh-pm-row.fh-pm-selected .fh-pm-check { color: var(--fh-on-accent); }
.flexhub-portal .fh-coin-btn { border-width: 1px; font-weight: 600; }

/* ─── Tame decorative inline styles from older templates ───── */
.flexhub-portal [style*="linear-gradient(135deg, var(--fh-accent)"],
.flexhub-portal [style*="linear-gradient(135deg,var(--fh-accent)"] { background: var(--fh-btn-bg) !important; color: var(--fh-on-accent) !important; }
.flexhub-portal [style*="text-transform:uppercase"] { text-transform: none !important; letter-spacing: 0 !important; }
.flexhub-portal [style*="font-weight:800"], .flexhub-portal [style*="font-weight:900"] { font-weight: 700 !important; }
.flexhub-portal [style*="box-shadow:0 4px 14px"] { box-shadow: none !important; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .fh-main { padding: 28px 24px 40px; }
  .fh-cred-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .flexhub-portal .fh-grid-2, .flexhub-portal .fh-grid-3 { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 768px) {
  .flexhub-portal .fh-topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 150; height: 56px; padding: 0 12px;
    background: var(--fh-surface); border-bottom: 1px solid var(--fh-border);
  }
  .fh-topbar-brand { font-weight: 600; font-size: 15px; color: var(--fh-text); }
  .flexhub-portal .fh-mobile-menu-btn {
    display: inline-flex; align-items: center; justify-content: center; position: static;
    width: 44px; height: 44px; border-radius: var(--fh-radius-sm);
    background: transparent; border: 0; color: var(--fh-text); cursor: pointer;
  }
  .flexhub-portal .fh-sidebar { width: 84vw; max-width: 300px; transform: translateX(-100%); transition: transform .25s ease, box-shadow .25s; box-shadow: 0 0 0 100vmax rgba(0,0,0,0); z-index: 200; }
  .flexhub-portal .fh-sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
  .flexhub-portal .fh-main { margin-left: 0; padding: 18px 14px 32px; }
  .flexhub-portal .fh-page-header { flex-wrap: wrap; gap: 10px; align-items: flex-start; }
  .flexhub-portal .fh-page-title { font-size: 19px; }
  .flexhub-portal .fh-flex-between { flex-wrap: wrap; gap: 8px; }
  .flexhub-portal .fh-card { padding: 16px; }
  .flexhub-portal .fh-table th, .flexhub-portal .fh-table td { padding: 10px 8px; font-size: 13.5px; }
  .flexhub-portal .fh-table td { overflow-wrap: anywhere; }
  .flexhub-portal .fh-table-wrap .fh-table { min-width: 560px; }
  .flexhub-portal .fh-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .flexhub-portal .fh-stat-card { padding: 14px; }
  .flexhub-portal .fh-stat-value { font-size: 22px; }
  .flexhub-portal .fh-stat-icon { display: none; }
  .flexhub-portal .fh-stat-label { padding-right: 0; }
  .flexhub-portal .fh-form-row { grid-template-columns: 1fr; }
  .flexhub-portal .fh-cred-grid { grid-template-columns: 1fr; }
  .flexhub-portal .fh-search-bar .fh-search-input { flex: 1 1 100%; }
  .flexhub-portal .fh-message-bubble { max-width: 92%; }
  .flexhub-portal .fh-reply-buttons, .flexhub-portal .fh-reply-buttons .fh-btn, .flexhub-portal .fh-reply-buttons .fh-select-inline { width: 100%; }
  /* inline multi-column grids in older templates → stack */
  .flexhub-portal [style*="grid-template-columns:repeat(3"],
  .flexhub-portal [style*="grid-template-columns:1fr 1fr 1fr"],
  .flexhub-portal [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .flexhub-portal [style*="grid-template-columns:1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
  .flexhub-portal [style*="grid-template-columns:1fr 1fr;"],
  .flexhub-portal [style*="grid-template-columns: 1fr 1fr;"] { grid-template-columns: 1fr !important; }
  /* customers list → one compact card per customer */
  .flexhub-portal .fh-table-wrap:has(#fh-customers-tbody) .fh-table { min-width: 0; }
  .flexhub-portal table:has(#fh-customers-tbody) thead { display: none; }
  .flexhub-portal #fh-customers-tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 2px; border-bottom: 1px solid var(--fh-border); }
  .flexhub-portal #fh-customers-tbody td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .flexhub-portal #fh-customers-tbody td:nth-child(2) { justify-self: end; }
  .flexhub-portal #fh-customers-tbody td:nth-child(4) { text-align: right; }
  .flexhub-portal #fh-customers-tbody td:nth-child(6) { grid-column: 1 / -1; }
  .flexhub-portal #fh-customers-tbody td:nth-child(6) .fh-btn { width: 100%; }
}
@media (min-width: 769px) { .fh-mobile-menu-btn { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .flexhub-portal *, .flexhub-portal *::before, .flexhub-portal *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ─── v1.19.0 details ──────────────────────────────────────── */
.flexhub-portal .fh-select-inline { width: auto; }
.fh-feature-list { list-style: none; display: grid; gap: 4px; }
.fh-feature-list li { display: flex; align-items: center; gap: 8px; }
.fh-feature-list .fh-icon { color: var(--fh-success); }
.fh-table td:first-child { white-space: nowrap; }
.fh-table td:last-child form { display: inline-block; }
.fh-table td:last-child > .fh-btn, .fh-table td:last-child > form, .fh-table td:last-child > a { margin: 2px 6px 2px 0; vertical-align: middle; }

/* ─── Shield portal controls from theme styles (v1.19.0) ───── */
.flexhub-portal button, .flexhub-portal .fh-btn, .flexhub-portal input[type="submit"] { text-transform: none; letter-spacing: normal; font-family: var(--fh-font); text-shadow: none; }
.flexhub-portal .fh-table th { text-transform: none; letter-spacing: 0; }
.flexhub-portal .fh-btn-outline { background: transparent; border-color: var(--fh-border-strong); color: var(--fh-text); }
.flexhub-portal .fh-btn-outline:hover { background: var(--fh-surface-2); color: var(--fh-text); }
.flexhub-portal .fh-btn-danger { background: transparent; border-color: rgba(240,82,82,.45); color: #f87171; }
.flexhub-portal .fh-btn-danger:hover { background: rgba(240,82,82,.1); color: #fca5a5; }
.flexhub-portal .fh-copy-btn { background: transparent; color: var(--fh-text-dim); }
.flexhub-portal .fh-mobile-menu-btn { background: transparent; }
