/* ==========================================================================
   GROWUPHOST "HOSTING BLUE" THEME — loaded LAST by both admin and client
   layouts, so it wins over tokens.css / admin.css / client.css / ui.css.
   Solid colours only (no gradients), one brand blue, one type family,
   consistent buttons, cards, tables and sidebars across both panels.
   Remove the <link> to this file to fall back to the previous themes.
   ========================================================================== */

:root,
:root[data-theme="light"] {
  --brand: #1a56db;
  --brand-hover: #1544b8;
  --brand-ink: #1544b8;
  --brand-soft: #ebf2ff;
  --brand-border: #c3d6fb;
  --brand-ring: rgba(26, 86, 219, 0.2);
  --brand-blue: #1a56db;
  --brand-blue-dark: #1544b8;
  --brand-navy: #0b1f44;
  --on-brand: #ffffff;
  --primary: #1a56db;

  --canvas: #f4f7fb;
  --bg-base: #f4f7fb;
  --bg-app: #f4f7fb;
  --bg-app-grad: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --surface-raised: #ffffff;
  --surface-glass: #ffffff;
  --line: #e2e8f0;
  --line-soft: #edf1f6;
  --line-strong: #cfd8e5;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #7b8799;

  --success: #16a34a; --success-bg: #ecfdf3; --success-ink: #067647; --success-border: #b7ebc9;
  --warning: #d97706; --warning-bg: #fff8eb; --warning-ink: #a15c07; --warning-border: #fcdca4;
  --danger:  #dc2626; --danger-bg: #fef2f2;  --danger-ink: #b42318;  --danger-border: #fbcaca;
  --info:    #0284c7; --info-bg: #eff8ff;    --info-ink: #026aa2;    --info-border: #b9e0f7;
  --terracotta: #1a56db; --terracotta-soft: #ebf2ff; --terracotta-ink: #1544b8;

  /* Every gradient token collapses to a solid colour */
  --grad-brand: #1a56db;
  --grad-brand-hover: #1544b8;
  --grad-accent: #1a56db;
  --grad-rainbow: #1a56db;
  --grad-mesh: #0b1f44;
  --grad-sidebar: #0b1f44;
  --primary-gradient: #1a56db;
  --g-blue: #1a56db; --g-violet: #6d28d9; --g-pink: #db2777; --g-cyan: #0891b2;
  --g-amber: #d97706; --g-emerald: #059669; --g-orange: #ea580c; --g-rose: #e11d48;
  --glow-brand: 0 6px 16px -8px rgba(26, 86, 219, 0.55);
  --glow-strong: 0 8px 20px -8px rgba(26, 86, 219, 0.6);
  --shadow-glow: 0 6px 16px -8px rgba(26, 86, 219, 0.55);

  /* Admin sidebar: clean white with blue active state */
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --sidebar-text: #334155;
  --sidebar-text-active: #1a56db;
  --sidebar-hover: #f1f5fb;
  --sidebar-active-bg: #ebf2ff;
  --sidebar-active-border: #1a56db;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: var(--font-display);
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.04), 0 10px 24px -12px rgba(15, 23, 42, 0.18);
}

:root[data-theme="dark"] {
  --brand: #3b82f6;
  --brand-hover: #60a5fa;
  --brand-ink: #93c5fd;
  --brand-soft: rgba(59, 130, 246, 0.14);
  --brand-border: rgba(59, 130, 246, 0.38);
  --brand-ring: rgba(59, 130, 246, 0.32);
  --brand-blue: #3b82f6;
  --brand-blue-dark: #2563eb;
  --primary: #3b82f6;

  --canvas: #0b1220;
  --bg-base: #0b1220;
  --bg-app: #0b1220;
  --bg-app-grad: #0b1220;
  --surface: #111a2c;
  --surface-2: #152036;
  --surface-3: #1b2740;
  --surface-raised: #152036;
  --surface-glass: #111a2c;
  --line: #22304a;
  --line-soft: #1a263c;
  --line-strong: #2e3e5c;
  --ink: #e8eef8;
  --ink-2: #a3b1c6;
  --ink-3: #74839b;
  --terracotta: #3b82f6; --terracotta-soft: rgba(59, 130, 246, 0.14); --terracotta-ink: #93c5fd;

  --grad-brand: #3b82f6; --grad-accent: #3b82f6; --primary-gradient: #3b82f6;
  --grad-sidebar: #0a1222; --grad-mesh: #0a1222;

  --sidebar-bg: #0e1626;
  --sidebar-border: #1d2a42;
  --sidebar-text: #b4c0d4;
  --sidebar-text-active: #93c5fd;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active-bg: rgba(59, 130, 246, 0.14);
  --sidebar-active-border: #3b82f6;
}

/* ---------- Base ---------- */
body { background: var(--canvas) !important; font-family: var(--font-body); color: var(--ink); }
h1, h2, h3, h4, .page-title, .client-page-title, .card-title, .kpi-value, .stat-value {
  font-family: var(--font-display) !important;
  letter-spacing: -0.02em;
}
::selection { background: var(--brand-soft); color: var(--brand-ink); }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Buttons: one solid system ---------- */
.btn { border-radius: 10px; font-weight: 600; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
.btn-primary, button.btn-primary, a.btn-primary {
  background: var(--brand) !important; border: 1px solid var(--brand) !important;
  color: #fff !important; box-shadow: none !important; background-image: none !important;
}
.btn-primary:hover { background: var(--brand-hover) !important; border-color: var(--brand-hover) !important; box-shadow: var(--glow-brand) !important; }
.btn-secondary, .btn-outline, .btn-light {
  background: var(--surface) !important; border: 1px solid var(--line-strong) !important;
  color: var(--ink) !important; box-shadow: none !important; background-image: none !important;
}
.btn-secondary:hover, .btn-outline:hover, .btn-light:hover { border-color: var(--brand) !important; color: var(--brand) !important; background: var(--brand-soft) !important; }
.btn-success { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; background-image: none !important; box-shadow: none !important; }
.btn-danger  { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; background-image: none !important; box-shadow: none !important; }
.btn-whatsapp, .header-btn-whatsapp, .topbar-pill-whatsapp {
  background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; background-image: none !important; box-shadow: none !important;
}
.btn-whatsapp:hover, .header-btn-whatsapp:hover, .topbar-pill-whatsapp:hover { background: #15803d !important; }
.btn-cpanel, .btn-cpanel-gold {
  background: #ea580c !important; border: 1px solid #ea580c !important; color: #fff !important;
  background-image: none !important; box-shadow: none !important;
}
.btn-cpanel:hover, .btn-cpanel-gold:hover { background: #c2410c !important; }

/* ---------- Cards / KPIs ---------- */
.card, .data-card, .chart-card, .kpi-card, .client-card, .client-kpi-card, .stat-card, .plan-card {
  background: var(--surface) !important; border: 1px solid var(--line) !important;
  border-radius: 14px; box-shadow: var(--card-shadow) !important; background-image: none !important;
}
.kpi-card:hover, .client-kpi-card:hover, .data-card:hover, .chart-card:hover, .plan-card:hover { box-shadow: var(--card-shadow-hover) !important; border-color: var(--line-strong) !important; }
.kpi-card::before, .kpi-card::after, .client-kpi-card::before, .client-kpi-card::after { background-image: none !important; }
.kpi-blue  { --kpi-grad: #1a56db; --kpi-accent: #1a56db; }
.kpi-cyan  { --kpi-grad: #0891b2; --kpi-accent: #0891b2; }
.kpi-green { --kpi-grad: #16a34a; --kpi-accent: #16a34a; }
.kpi-amber { --kpi-grad: #d97706; --kpi-accent: #d97706; }
.kpi-pink  { --kpi-grad: #4f46e5; --kpi-accent: #4f46e5; }

/* ---------- Tables ---------- */
.table-responsive, .table-wrap, .data-card .table-container, .client-card .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table th, .client-table th, table.table th {
  background: var(--surface-2) !important; color: var(--ink-3) !important;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--line) !important;
}
.data-table tbody tr:hover td, .client-table tbody tr:hover td, table.table tbody tr:hover td { background: var(--brand-soft) !important; background-image: none !important; }
.data-table td, .client-table td { border-bottom: 1px solid var(--line-soft); }

/* ---------- Forms ---------- */
.form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  border-radius: 10px;
}
.form-control:focus, .form-select:focus, select:focus, textarea:focus, input:focus {
  border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-ring) !important; outline: none;
}

/* ---------- Badges / pills ---------- */
.nav-pill, .nav-pill-terracotta, .nav-badge { background: var(--brand-soft) !important; color: var(--brand-ink) !important; border: 0 !important; }
.badge-vip { background: var(--violet-bg) !important; color: var(--violet-ink) !important; border-color: transparent !important; }
.tier-gold, .tier-platinum, .tier-diamond, .tier-silver, .tier-bronze, .tier-badge { background-image: none !important; }
.plan-ribbon { background: var(--brand) !important; box-shadow: none !important; }

/* ---------- Admin sidebar ---------- */
.admin-sidebar { background: var(--sidebar-bg) !important; border-right: 1px solid var(--sidebar-border) !important; }
.admin-sidebar .sidebar-brand { border-bottom: 1px solid var(--sidebar-border); }
.admin-sidebar .brand-icon, .admin-sidebar .sidebar-logo, .admin-sidebar .brand-mark {
  background: var(--brand) !important; color: #fff !important; border: 0 !important; background-image: none !important;
}
.admin-sidebar .brand-badge { background: var(--brand-soft) !important; color: var(--brand-ink) !important; border: 0 !important; }
.admin-sidebar .category-indicator-dot { background: var(--brand) !important; }
.admin-sidebar .category-title-text { color: var(--ink-3) !important; }
.admin-sidebar .category-count-pill { background: var(--surface-3) !important; color: var(--ink-2) !important; }
.admin-sidebar .nav-item a { color: var(--sidebar-text) !important; border-radius: 9px; }
.admin-sidebar .nav-item a:hover { background: var(--sidebar-hover) !important; color: var(--ink) !important; }
.admin-sidebar .nav-item.active a {
  background: var(--sidebar-active-bg) !important; color: var(--sidebar-text-active) !important;
  font-weight: 650; box-shadow: inset 3px 0 0 var(--brand) !important; border-color: transparent !important;
}
.admin-sidebar .nav-item.active svg { color: var(--brand) !important; }
.admin-sidebar .nav-item.active a::before { background: var(--brand) !important; }

/* ---------- Admin topbar ---------- */
.admin-topbar { background: var(--surface) !important; border-bottom: 1px solid var(--line) !important; backdrop-filter: none !important; }
.user-avatar { background: var(--brand) !important; color: #fff !important; background-image: none !important; border: 0 !important; }
.system-status-indicator { background: var(--success-bg) !important; color: var(--success-ink) !important; border-color: var(--success-border) !important; }

/* Admin page headers: drop the serif & terracotta leftovers */
.page-header-icon, .page-icon, .header-icon-box { background: var(--brand-soft) !important; color: var(--brand) !important; border-color: var(--brand-border) !important; }
.breadcrumb a, .breadcrumbs a { color: var(--brand) !important; }

/* Dashboard trend chart: solid bars, current month = brand */
.trend-bars > div > div:first-child { background: #bfd3fb !important; background-image: none !important; }
.trend-bars > div:last-child > div:first-child { background: var(--brand) !important; }

/* ---------- Client sidebar: solid navy ---------- */
.client-sidebar { background: #0b1f44 !important; background-image: none !important; border-right: 0 !important; }
:root[data-theme="dark"] .client-sidebar { background: #0a1222 !important; border-right: 1px solid #1d2a42 !important; }
.client-sidebar .sidebar-brand { background: transparent !important; }
.client-sidebar .brand-icon { background: var(--brand) !important; background-image: none !important; box-shadow: none !important; }
.client-sidebar .nav-item.active a {
  background: rgba(59, 130, 246, 0.22) !important; background-image: none !important;
  color: #fff !important; box-shadow: inset 3px 0 0 #60a5fa !important;
}
.client-sidebar .nav-item.active a::before { background: #60a5fa !important; }
.client-sidebar .nav-item.active svg { color: #93c5fd !important; }
.client-sidebar .user-avatar { background: var(--brand) !important; }

/* ---------- Client header / content ---------- */
.client-header { background: var(--surface) !important; border-bottom: 1px solid var(--line) !important; backdrop-filter: none !important; }
.client-page-title, .summary-total strong, .plan-price strong, .invoice-word {
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ink) !important;
}
.group-tabs a.active { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; box-shadow: none !important; }
.plan-popular { border: 2px solid var(--brand) !important; background: var(--surface) !important; }
.plan-price { background: var(--surface-2) !important; }
.step-no, .bottom-nav-fab, .checkout-amount-hero, .pm-card { background: var(--brand) !important; background-image: none !important; }
.option-card input:checked + .option-body { background: var(--brand-soft) !important; border-color: var(--brand) !important; box-shadow: 0 0 0 1px var(--brand) !important; }
.invoice-doc::before { background: var(--brand) !important; }
.invoice-brand .brand-icon { background: var(--brand) !important; }

/* Hero + promo banners: solid deep navy instead of mesh gradients (inline styles too) */
.whmcs-hero-banner, .client-promo-banner-card, [class*="promo-banner"][style*="gradient"] {
  background: #0b1f44 !important; background-image: none !important;
  border: 1px solid #16306a !important; box-shadow: 0 14px 30px -20px rgba(11, 31, 68, 0.8) !important;
}
.whmcs-hero-banner::before, .whmcs-hero-banner::after { display: none !important; }
.client-promo-banner-card a.btn, .client-promo-banner-card .btn-primary,
.client-promo-banner-card a[style*="gradient"] { background: var(--brand) !important; background-image: none !important; box-shadow: none !important; border: 0 !important; }

/* Alert / announcement strips */
[class*="noc-alert"], .network-alert, .announcement-card { background-image: none !important; }

/* ---------- Auth pages (login / register) ---------- */
.auth-body { background: #0b1f44 !important; background-image: none !important; }
.auth-orb, .auth-grid, .auth-body::before, .auth-body::after { display: none !important; }
.auth-showcase { background: #1a56db !important; background-image: none !important; backdrop-filter: none !important; }
.auth-showcase::before, .auth-showcase::after { display: none !important; }
.auth-card, .auth-panel, .auth-form-side { background: var(--surface) !important; }
.auth-tab.active { color: var(--brand) !important; }

/* Inline-style gradients sprinkled across legacy views → solid surfaces */
[style*="linear-gradient(135deg, #1a5cff"], [style*="linear-gradient(135deg, #7c3aed"],
[style*="linear-gradient(135deg, #6366f1"], [style*="linear-gradient(135deg, #8b5cf6"],
[style*="linear-gradient(90deg, #1a5cff"], [style*="var(--primary-gradient)"], [style*="var(--grad-brand)"] {
  background: var(--brand) !important; background-image: none !important;
}

/* ---------- Mobile polish ---------- */
@media (max-width: 768px) {
  .btn { min-height: 40px; }
  .data-table, .client-table { font-size: 13px; }
  .client-promo-banner-card:not(.promo-slide) { flex-direction: column !important; align-items: flex-start !important; padding: 20px !important; }
  .client-promo-banner-card:not(.promo-slide) .promo-banner-media { display: none !important; }
  h1, .page-title, .client-page-title { font-size: 22px !important; }
}

/* Logo badge on the blue auth showcase: white tile, blue mark */
.auth-showcase .brand-icon, .auth-showcase .auth-logo, .auth-showcase [class*="brand-icon"] {
  background: #ffffff !important; color: #1a56db !important; background-image: none !important; box-shadow: none !important;
}
.auth-showcase .brand-icon svg { color: #1a56db !important; stroke: currentColor; }
.auth-showcase [class*="feature"] svg, .auth-showcase li svg { color: #ffffff; }

/* Flash / NOC bars: action becomes a small pill; stacks under the text on phones */
.client-flash-actions a { text-decoration: none !important; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink) !important; }
.client-flash-actions a:hover { background: var(--brand); color: #fff !important; }
@media (max-width: 640px) {
  .client-flash-bar { flex-wrap: wrap !important; padding: 12px 40px 12px 14px !important; }
  .client-flash-actions { width: 100%; justify-content: flex-start; }
  .client-flash-actions button { position: absolute; top: 8px; right: 8px; }
  .page-header .header-icon-box { display: none !important; }
  .page-header .header-title-group { gap: 0 !important; }
}

/* ---------- Admin → Servers ---------- */
.srv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.srv-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.srv-stat span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.srv-stat strong { display: block; font-size: 24px; font-weight: 750; color: var(--ink); margin-top: 4px; letter-spacing: -.02em; }
.srv-stat strong.is-ok { color: var(--success); }
.srv-stat strong.is-bad { color: var(--danger); }
.srv-layout { align-items: start; }
.srv-list { display: grid; gap: 12px; padding: 16px; }
.srv-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.srv-card:hover { border-color: var(--line-strong); box-shadow: var(--card-shadow-hover); }
.srv-card.is-editing { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.srv-card.is-disabled { opacity: .72; }
.srv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.srv-id { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.srv-id h4 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.srv-host { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-top: 3px; word-break: break-all; }
.srv-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--ink-3); }
.srv-dot-ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
.srv-dot-bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.srv-dot-warn { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-bg); }
.srv-pill { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.srv-pill-ok { background: var(--success-bg); color: var(--success-ink); }
.srv-pill-bad { background: var(--danger-bg); color: var(--danger-ink); }
.srv-pill-warn { background: var(--warning-bg); color: var(--warning-ink); }
.srv-msg { margin: 12px 0 0; font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; overflow-wrap: anywhere; }
.srv-msg-ok { background: var(--success-bg); color: var(--success-ink); }
.srv-msg-bad { background: var(--danger-bg); color: var(--danger-ink); }
.srv-meter { margin-top: 12px; }
.srv-meter-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.srv-meter-label strong { color: var(--ink); font-weight: 650; }
.srv-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.srv-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.srv-bar span.is-warn { background: var(--warning); }
.srv-bar span.is-bad { background: var(--danger); }
.srv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.srv-actions .inline-form { margin: 0; }
.srv-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.srv-help { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; font-size: 13px; color: var(--ink-2); }
.srv-help summary { cursor: pointer; font-weight: 650; color: var(--brand); }
.srv-help ol { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.btn-ghost-danger { background: transparent !important; border: 1px solid var(--danger-border) !important; color: var(--danger) !important; }
.btn-ghost-danger:hover { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
@media (max-width: 1100px) { .srv-layout { grid-template-columns: 1fr !important; } }
@media (max-width: 640px) {
  .srv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .srv-stat strong { font-size: 20px; }
  .srv-list { padding: 12px; }
  .srv-top { flex-direction: column; }
  .srv-actions .btn, .srv-actions .inline-form { flex: 1 1 auto; }
  .srv-actions .inline-form .btn { width: 100%; }
}

/* ==========================================================================
   Admin polish pass (UI audit fixes)
   ========================================================================== */

/* KPI tiles: drop the decorative "always rising" sparkline (it suggested trends that do not exist) */
.kpi-card::after, .client-kpi-card::after { display: none !important; }

/* Tables: keep dates, money, ids and short statuses on one line; let long text wrap */
.data-table td { vertical-align: middle; }
.data-table td:has(> .status-badge), .data-table td.nowrap, .data-table td.text-right,
.data-table td[style*="text-align:right"], .data-table td[style*="text-align: right"] { white-space: nowrap; }
.data-table td .mono, .data-table td code, .data-table td time { white-space: nowrap; }
.data-table td a[href^="mailto:"], .data-table td .email { overflow-wrap: anywhere; }
.table-responsive { scrollbar-width: thin; }
/* Wide tables at desktop: tighter cells so more columns fit before scrolling */
@media (min-width: 1025px) {
  .data-table th, .data-table td { padding-left: 12px !important; padding-right: 12px !important; }
  .data-table th { white-space: nowrap; }
}

/* Disabled "not available" actions look the same everywhere */
.btn:disabled, .btn.disabled, .btn[aria-disabled="true"] {
  background: var(--surface-3) !important; border-color: var(--line) !important; color: var(--ink-3) !important;
  box-shadow: none !important; cursor: not-allowed; opacity: 1 !important;
}

/* Row action groups: same height whether or not a Delete button is present */
.row-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.row-actions .inline-form { margin: 0; display: inline-flex; }
.row-actions .btn { min-height: 32px; }

/* Pagination (Core\Pager) */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.pager-info { font-size: 13px; color: var(--ink-3); }
.pager-links { display: flex; flex-wrap: wrap; gap: 4px; }
.pager-link { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.pager-link:hover { border-color: var(--brand); color: var(--brand) !important; }
.pager-link.is-current { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.pager-link.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Pages with their own inline <style>: follow the theme (light + dark) ---------- */
/* Automation */
.whmcs-automation-wrap .whmcs-section-panel { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 14px !important; overflow: hidden; box-shadow: var(--card-shadow); }
.whmcs-automation-wrap .whmcs-panel-header { background: var(--surface-2) !important; color: var(--ink) !important; border-bottom: 1px solid var(--line) !important; font-weight: 700; }
.whmcs-automation-wrap .whmcs-panel-body, .whmcs-automation-wrap .whmcs-form-table, .whmcs-automation-wrap .whmcs-form-table td { background: transparent !important; color: var(--ink) !important; border-color: var(--line-soft) !important; }
.whmcs-automation-wrap .whmcs-label-cell { color: var(--ink-2) !important; font-weight: 600; }
.whmcs-automation-wrap .whmcs-field-desc, .whmcs-automation-wrap .whmcs-check-label, .whmcs-automation-wrap .whmcs-radio-label { color: var(--ink-2) !important; }
.whmcs-automation-wrap .whmcs-main-heading { color: var(--ink) !important; }
.whmcs-automation-wrap .whmcs-warning-box { background: var(--info-bg) !important; color: var(--info-ink) !important; border: 1px solid var(--info-border) !important; border-radius: 10px; }
.whmcs-automation-wrap .whmcs-inline-select { width: auto !important; min-width: 120px; max-width: 220px; display: inline-block !important; }
.whmcs-automation-wrap .whmcs-num-input { width: 84px !important; }
.whmcs-automation-wrap .whmcs-kpi-tile { border-radius: 14px !important; }
.whmcs-automation-wrap .whmcs-btn-save { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; }
@media (max-width: 768px) {
  .whmcs-automation-wrap .whmcs-form-table, .whmcs-automation-wrap .whmcs-form-table tbody, .whmcs-automation-wrap .whmcs-form-table tr, .whmcs-automation-wrap .whmcs-form-table td { display: block; width: 100% !important; }
  .whmcs-automation-wrap .whmcs-label-cell { text-align: left !important; padding-bottom: 4px !important; }
  .whmcs-automation-wrap .whmcs-hero-kpi-row { grid-template-columns: 1fr !important; display: grid !important; }
}
/* Branding */
.brand-manager-container .brand-card-panel, .brand-manager-container .brand-asset-box, .brand-manager-container .brand-box-foot { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; }
.brand-manager-container .brand-panel-head { background: var(--surface-2) !important; border-color: var(--line) !important; }
.brand-manager-container .brand-main-heading, .brand-manager-container .brand-panel-title, .brand-manager-container .brand-demo-title { color: var(--ink) !important; }
.brand-manager-container .brand-main-subtitle, .brand-manager-container .brand-panel-hint, .brand-manager-container .brand-foot-desc, .brand-manager-container .brand-demo-sub, .brand-manager-container .brand-dropzone-sub { color: var(--ink-2) !important; }
/* Customer Experience */
.cx-card-panel, .cx-kpi-card { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; }
.cx-main-title { color: var(--ink) !important; }
/* System monitoring */
.env-item, .service-pill-item { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
.env-item *, .service-pill-item * { color: inherit; }

/* Dark-mode safety net for legacy inline styles (white panels, near-black headings, pale boxes) */
:root[data-theme="dark"] :is([style*="background: #fff;"], [style*="background:#fff;"], [style*="background: #ffffff"], [style*="background:#ffffff"],
  [style*="background: white"], [style*="background-color: #fff"], [style*="background-color: #ffffff"], [style*="background: #f8fafc"],
  [style*="background:#f8fafc"], [style*="background: #f9fafb"], [style*="background: #f1f5f9"], [style*="background: #d9edf7"]) {
  background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
:root[data-theme="dark"] :is([style*="color: #0f172a"], [style*="color:#0f172a"], [style*="color: #111827"], [style*="color: #1e293b"], [style*="color: #000"], [style*="color:#000"], [style*="color: #31708f"]) {
  color: var(--ink) !important;
}
:root[data-theme="dark"] :is([style*="color: #64748b"], [style*="color: #475569"], [style*="color: #6b7280"]) { color: var(--ink-2) !important; }

/* Phone/tablet: the WHMCS-style top menu duplicates the sidebar drawer and cannot fit, so hide it */
@media (max-width: 900px) { .whmcs-top-nav-strip { display: none !important; } }

/* Dashboard: no double spacing between stacked cards (the column already has a 24px gap) */
.dashboard-grid > div > .chart-card, .dashboard-grid > div > .data-card { margin-bottom: 0 !important; }
@media (min-width: 1101px) { .dashboard-grid { grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); } }
.brand-card-panel h2, .brand-card-panel h3, .brand-card-panel .brand-panel-title { color: var(--ink) !important; background: none !important; }
.brand-card-panel .brand-panel-head { background: transparent !important; }
.cx-card-panel h2, .cx-card-panel h3, .cx-kpi-card h3, .cx-kpi-card strong { color: var(--ink) !important; }

/* Customers list: drop secondary columns on narrower desktops so Actions stays visible (filters still cover them) */
@media (min-width: 769px) and (max-width: 1600px) { .customers-table th:nth-child(4), .customers-table td:nth-child(4), .customers-table th:nth-child(5), .customers-table td:nth-child(5), .customers-table th:nth-child(11), .customers-table td:nth-child(11) { display: none; } }
@media (min-width: 769px) and (max-width: 1500px) { .customers-table th:nth-child(10), .customers-table td:nth-child(10) { display: none; } }
.customers-table td:nth-child(3) { white-space: normal; max-width: 300px; overflow-wrap: anywhere; }

/* Support tickets: staff-only AI notes + AI draft button */
.ticket-msg.is-note { background: var(--warning-bg) !important; border: 1px dashed var(--warning-border) !important; }
.ticket-msg.is-note .ticket-msg-body { color: var(--warning-ink); }
.mini-chip.chip-amber { background: var(--warning-bg); color: var(--warning-ink); }
.ai-draft-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; margin-right: 8px; }

/* ==========================================================================
   Client area: offer slider, announcements with images, notifications
   ========================================================================== */

/* Offer slider (all active banners from Admin → CX & Engagement) */
.promo-slider { position: relative; margin-bottom: 24px; }
.promo-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 18px; }
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0 !important; min-height: 210px; }
:root .client-promo-banner-card.promo-slide { background-image: none !important; border-radius: 18px !important; box-shadow: none !important; padding: 28px 32px !important; display: grid !important; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 28px; }
:root .client-promo-banner-card.promo-slide.has-media { grid-template-columns: minmax(0, 1.15fr) minmax(220px, 1fr); }
:root .client-promo-banner-card.style-aurora { background: #0b1f44 !important; border: 1px solid #16306a !important; }
:root .client-promo-banner-card.style-dark { background: #0f172a !important; border: 1px solid #1e293b !important; }
:root .client-promo-banner-card.style-emerald { background: #065f46 !important; border: 1px solid #047857 !important; }
:root .client-promo-banner-card.style-crimson { background: #991b1b !important; border: 1px solid #b91c1c !important; }
:root .client-promo-banner-card.style-blue, :root .client-promo-banner-card.style-default { background: #1a56db !important; border: 1px solid #1e40af !important; }
.promo-slide .promo-text-col { max-width: none; }
.promo-slide .promo-headline { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.2; margin: 8px 0 8px; color: #fff; }
.promo-slide .promo-summary { color: rgba(255,255,255,.82); font-size: 14.5px; line-height: 1.55; margin: 0 0 18px; }
.promo-slide .promo-badge-tag { display: inline-block; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.promo-slide .promo-buttons-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.promo-slide .promo-cta-btn { background: #fff !important; color: #0b1f44 !important; border: 0 !important; font-weight: 700; padding: 11px 20px; border-radius: 10px; }
.promo-slide .promo-cta-btn:hover { background: #e8efff !important; }
.promo-slide .promo-coupon-pill { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.35); color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; }
.promo-slide .coupon-lbl { font-size: 12px; opacity: .8; }
.promo-slide .coupon-code { font-family: var(--font-mono); font-weight: 700; letter-spacing: .06em; color: #fff; background: none; }
.promo-slide .coupon-copy-btn { background: #fff; color: #0b1f44; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.promo-slide .promo-media-col { display: block; min-width: 0; }
.promo-slide .promo-artwork-img { display: block; width: 100% !important; max-width: none !important; max-height: 240px !important; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px !important; border: 1px solid rgba(255,255,255,.16) !important; box-shadow: 0 12px 28px -12px rgba(0,0,0,.6) !important; background: rgba(255,255,255,.06); }
.promo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.promo-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--line-strong); cursor: pointer; transition: width .2s, background .2s; }
.promo-dot.is-active { width: 22px; background: var(--brand); }
@media (max-width: 768px) {
  :root .client-promo-banner-card.promo-slide, :root .client-promo-banner-card.promo-slide.has-media { grid-template-columns: 1fr !important; padding: 20px !important; gap: 16px; }
  :root .client-promo-banner-card.promo-slide.has-media .promo-media-col { order: -1; display: block !important; }
  .promo-slide .promo-artwork-img { max-height: 180px !important; }
}

/* Hero status pill reflects real network issues */
.hero-status-pill { text-decoration: none !important; }
.hero-status-pill.is-issue { background: var(--warning-bg) !important; color: var(--warning-ink) !important; border-color: var(--warning-border) !important; }
.hero-status-pill.is-issue .pulse-green-dot { background: var(--warning) !important; box-shadow: none !important; }

/* Dashboard: latest updates */
.dash-updates { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; align-items: start; }
.dash-updates .client-card { margin: 0; }
@media (max-width: 1024px) { .dash-updates { grid-template-columns: 1fr; } }
.empty-state.small { padding: 18px 10px; }
.empty-state.small .empty-icon { font-size: 26px; }
.empty-state.small p { margin: 6px 0 0; color: var(--ink-3); font-size: 13.5px; }

/* Announcement cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.news-stack { display: grid; gap: 14px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.news-card:hover { border-color: var(--line-strong); box-shadow: var(--card-shadow-hover); }
.news-media { display: block; aspect-ratio: 2 / 1; background: var(--surface-3); overflow: hidden; }
.news-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.news-card:hover .news-media img { transform: scale(1.02); }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-date { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.news-title { margin: 0; font-size: 16px; line-height: 1.35; }
.news-title a { color: var(--ink) !important; text-decoration: none; }
.news-title a:hover { color: var(--brand) !important; }
.news-excerpt { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.news-more { margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand) !important; text-decoration: none; }
/* Compact (dashboard, 2nd+ item): thumbnail beside the text */
.news-card.is-compact { flex-direction: row; }
.news-card.is-compact .news-media { flex: 0 0 120px; aspect-ratio: auto; }
.news-card.is-compact .news-body { padding: 10px 14px; }
.news-card.is-compact .news-title { font-size: 14.5px; }
.news-card.is-compact .news-excerpt { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.is-compact .news-more { display: none; }
.news-article { overflow: hidden; }
.news-hero { display: block; width: 100%; max-height: 420px; object-fit: cover; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .news-card.is-compact .news-media { flex-basis: 88px; } }

/* Notifications (bell, dropdown, lists) */
.notif-btn { position: relative; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-menu { width: min(380px, calc(100vw - 24px)); padding: 0 !important; overflow: hidden; }
.notif-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-menu-head strong { font-size: 14px; }
.notif-mark { background: none; border: 0; color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none !important; color: var(--ink) !important; border-bottom: 1px solid var(--line-soft); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.is-unread { background: var(--brand-soft); }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-text strong { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.notif-text small { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.notif-text time { font-size: 11.5px; color: var(--ink-3); }
.notif-all { display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 700; color: var(--brand) !important; text-decoration: none; }
.notif-ico { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: var(--surface-3); }
.notif-billing { background: var(--success-bg); }
.notif-support { background: var(--info-bg); }
.notif-warning { background: var(--warning-bg); }
.notif-service, .notif-announcement { background: var(--brand-soft); }
.notif-network { background: var(--danger-bg); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.notif-row:last-child { border-bottom: 0; }
.notif-row.is-unread { background: var(--brand-soft); }
.notif-list.compact .notif-row { padding: 10px 2px; background: none; }
.notif-list.compact .notif-row.is-unread .notif-row-head strong::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.notif-row-main { flex: 1; min-width: 0; }
.notif-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.notif-row-head a { color: var(--ink) !important; text-decoration: none; }
.notif-row-head a:hover strong { color: var(--brand); }
.notif-row-head strong { font-size: 14px; overflow-wrap: anywhere; }
.notif-row-head time { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.notif-row p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.notif-new { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 7px; }
.notif-thumb { flex-shrink: 0; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 520px) { .notif-thumb { display: none; } .notif-row-head time { margin-left: 0; width: 100%; } }

/* Admin → Announcements: image thumbnails / preview */
.ann-row { display: flex; gap: 10px; align-items: center; }
.ann-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); flex-shrink: 0; }
.ann-preview { display: block; max-width: 100%; max-height: 160px; border-radius: 4px; border: 1px solid var(--line); margin-bottom: 8px; }
.ann-remove { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }

/* ==========================================================================
   Client area polish (audit fixes)
   ========================================================================== */

/* Public pages for signed-out visitors: slim header, no portal chrome */
body.is-guest .client-main { margin-left: 0 !important; width: 100% !important; max-width: none !important; }
body.is-guest .client-content { max-width: 1180px; margin: 0 auto; }
.public-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.public-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--ink) !important; font-size: 17px; }
.public-brand img { height: 34px; width: auto; }
.public-brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand) url("/favicon.svg") center / cover; }
.public-links { display: flex; gap: 18px; margin-left: 12px; }
.public-links a { color: var(--ink-2) !important; text-decoration: none; font-weight: 600; font-size: 14px; }
.public-links a:hover { color: var(--brand) !important; }
.public-actions { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 760px) {
  .public-header { padding: 10px 14px; gap: 10px; }
  .public-links { display: none; }
  .public-actions .btn-secondary { display: none; }
}

/* Login / register: white logo tile on the blue panel (overrides ui.css purple tile) */
:root .auth-showcase .brand-icon, :root .auth-body .auth-brand .brand-icon {
  background: #ffffff !important; color: #1a56db !important; box-shadow: none !important; background-image: none !important;
}
:root .auth-showcase .brand-icon svg, :root .auth-body .auth-brand .brand-icon svg { color: #1a56db !important; stroke: currentColor !important; }
.auth-points li span { color: #ffffff !important; }

/* Sidebar: the menu scrolls, the account card stays pinned — nothing hides behind it */
.client-sidebar { display: flex !important; flex-direction: column; height: 100vh; height: 100dvh; }
.client-sidebar .sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 12px; }
.client-sidebar .sidebar-footer { flex-shrink: 0; }

/* Help shortcut: a small round button that never covers content; label on hover */
.help-fab { display: inline-flex !important; align-items: center; gap: 8px; right: 18px !important; bottom: 18px !important; width: 44px; height: 44px; padding: 0 !important; border-radius: 999px !important; justify-content: center; overflow: hidden; transition: width .2s ease; box-shadow: 0 6px 18px -6px rgba(15,23,42,.35) !important; }
.help-fab span { display: none; }
.help-fab:hover, .help-fab:focus-visible { width: auto; padding: 0 16px !important; }
.help-fab:hover span, .help-fab:focus-visible span { display: inline; }
.help-fab svg { width: 20px; height: 20px; flex-shrink: 0; }
.client-content { padding-bottom: 72px; }

/* Client tables: let text columns wrap so the actions column stays visible */
:root .client-table td { white-space: normal; }
:root .client-table th { white-space: nowrap; }
.client-table td .btn, .client-table td .status-badge, .client-table td .badge, .client-table td code, .client-table td time { white-space: nowrap; }
@media (min-width: 1025px) {
  :root .client-table th, :root .client-table td { padding-left: 12px !important; padding-right: 12px !important; }
}

/* Mobile header: keep the greeting readable, drop chips that the dashboard already shows */
@media (max-width: 640px) {
  .client-header .balance-chip, .client-header .tier-badge { display: none !important; }
  .header-greeting > span { display: none; }
  .header-greeting strong { font-size: 15px !important; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  /* Dashboard stat cards: an odd last card spans the full row instead of sitting alone at half width */
  .client-kpi-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Dark mode: light chips and step numbers become readable */
:root[data-theme="dark"] .client-content .badge-primary, :root[data-theme="dark"] .client-content .mini-chip {
  background: var(--brand-soft) !important; color: var(--brand-ink) !important; border-color: transparent !important;
}
:root[data-theme="dark"] .step-no { background: var(--brand) !important; color: #fff !important; }
:root[data-theme="dark"] .client-hero-header .btn-outline, :root[data-theme="dark"] [class*="hero"] .btn-secondary { color: var(--ink) !important; }
:root[data-theme="dark"] .client-content [style*="background:#eff6ff"], :root[data-theme="dark"] .client-content [style*="background: #eff6ff"],
:root[data-theme="dark"] .client-content [style*="background:#f0fdf4"], :root[data-theme="dark"] .client-content [style*="background: #f0fdf4"],
:root[data-theme="dark"] .client-content [style*="background:#fef3c7"], :root[data-theme="dark"] .client-content [style*="background:#fdf2f8"],
:root[data-theme="dark"] .client-content [style*="background:#f5f3ff"], :root[data-theme="dark"] .client-content [style*="background: #f5f3ff"] {
  background: var(--surface-3) !important;
}

/* Cards that put content straight into .client-card still get breathing room */
.client-card > form, .client-card > .form-group, .client-card > p, .client-card > .kv, .client-card > .form-row { padding-left: 20px; padding-right: 20px; }
.client-card > form:last-child, .client-card > p:last-child { padding-bottom: 18px; }
.greet-short { display: none; }
@media (max-width: 640px) {
  .greet-long { display: none; }
  .greet-short { display: inline; }
  .header-greeting span.greet-short, .header-greeting span.greet-long { font-size: inherit; color: inherit; }
  /* Alert strips: title + action only on phones, so real content is visible on the first screen */
  .client-flash-bar > div:first-child > span:last-child { display: none !important; }
  .client-flash-bar { padding: 10px 40px 10px 12px !important; }
}
:root .header-greeting .greet-long, :root .header-greeting .greet-short { font-size: inherit !important; color: inherit !important; }
:root .header-greeting .greet-long { display: inline !important; }
:root .header-greeting .greet-short { display: none !important; }
@media (max-width: 640px) {
  :root .header-greeting .greet-long { display: none !important; }
  :root .header-greeting .greet-short { display: inline !important; }
}

/* ==========================================================================
   Checkout: UPI QR payments
   ========================================================================== */
.pay-tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-3); border-radius: 12px; margin: 16px 0; }
.pay-tab { flex: 1; text-align: center; padding: 10px 12px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2) !important; text-decoration: none !important; }
.pay-tab.is-active { background: var(--surface); color: var(--brand) !important; box-shadow: var(--shadow-sm); }
.upi-pay { margin-top: 8px; }
.upi-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.upi-steps li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.upi-steps li span { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 12px; }
.upi-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.upi-qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upi-qr, .upi-qr-img { width: 240px; max-width: 100%; aspect-ratio: 1; background: #ffffff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.upi-qr svg { width: 100%; height: 100%; display: block; }
.upi-qr-img { object-fit: contain; }
.upi-qr-note { font-size: 12px; color: var(--ink-3); text-align: center; }
.upi-details { display: grid; gap: 10px; }
.upi-amount { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.upi-amount span { color: var(--ink-3); font-weight: 600; }
.upi-amount strong { font-size: 30px; letter-spacing: -.02em; color: var(--ink); }
.upi-vpa { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.upi-vpa > span { min-width: 64px; color: var(--ink-3); font-weight: 600; }
.upi-vpa code { font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; overflow-wrap: anywhere; }
.upi-app-btn { margin-top: 4px; }
.upi-instructions { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.upi-form { margin-top: 18px; display: grid; gap: 4px; }
.upi-form #upiUtr { font-size: 18px; letter-spacing: .12em; font-family: var(--font-mono); height: 48px; }
.upi-state { display: flex; gap: 14px; padding: 18px; border-radius: 14px; border: 1px solid var(--info-border); background: var(--info-bg); color: var(--info-ink); }
.upi-state-ico { font-size: 26px; }
.upi-state p { margin: 4px 0 0; font-size: 14px; }
.upi-state code { background: rgba(255,255,255,.6); border-radius: 4px; padding: 1px 6px; }
@media (min-width: 761px) { .upi-app-btn { display: none; } } /* the UPI deep link only works on phones */
@media (max-width: 760px) {
  .upi-grid { grid-template-columns: 1fr; padding: 14px; }
  .upi-qr, .upi-qr-img { width: 220px; }
}
/* Admin queue */
.upi-utr { font-size: 13px; letter-spacing: .04em; }
.upi-reject { display: inline-block; position: relative; }
.upi-reject summary { list-style: none; cursor: pointer; }
.upi-reject summary::-webkit-details-marker { display: none; }
.upi-reject[open] .upi-reject-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; display: grid; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-md); }

/* ==========================================================================
   Client dashboard v2: attention panel, calmer stats, compact empty states
   ========================================================================== */
.dash-section-title { display: flex; align-items: center; gap: 8px; font-size: 16px !important; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.dash-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; }
.dash-attention { margin-bottom: 22px; }
.dash-att-list { display: grid; gap: 10px; }
.dash-att-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); text-decoration: none !important; color: var(--ink) !important; transition: box-shadow .15s, transform .15s; }
.dash-att-item:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }
.dash-att-item.tone-danger { border-left-color: var(--danger); }
.dash-att-item.tone-warning { border-left-color: var(--warning); }
.dash-att-item.tone-info { border-left-color: var(--brand); }
.dash-att-ico { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--surface-3); }
.tone-danger .dash-att-ico { background: var(--danger-bg); }
.tone-warning .dash-att-ico { background: var(--warning-bg); }
.tone-info .dash-att-ico { background: var(--brand-soft); }
.dash-att-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-att-text strong { font-size: 14.5px; overflow-wrap: anywhere; }
.dash-att-text small { font-size: 13px; color: var(--ink-2); }
.dash-att-cta { flex-shrink: 0; font-weight: 700; font-size: 13.5px; color: var(--brand); white-space: nowrap; }
.tone-danger .dash-att-cta { color: var(--danger); }
.dash-allset { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 22px; border-radius: 12px; background: var(--success-bg); color: var(--success-ink); border: 1px solid var(--success-border); font-weight: 600; font-size: 14px; }
@media (max-width: 560px) {
  .dash-att-item { flex-wrap: wrap; padding: 12px 14px; }
  .dash-att-cta { width: 100%; padding-left: 52px; }
}

/* Stats: one link colour, calmer sub-lines */
.client-kpi-card .kpi-trend { color: var(--brand) !important; font-weight: 700; }
.client-kpi-card .kpi-sub { color: var(--ink-3) !important; }
.client-kpi-card .kpi-val { font-size: 28px !important; }

/* Compact empty states inside dashboard cards */
.client-dashboard-wrap .client-empty-card { padding: 22px 16px !important; }
.client-dashboard-wrap .client-empty-card svg, .client-dashboard-wrap .client-empty-card .empty-icon { width: 34px !important; height: 34px !important; font-size: 26px !important; margin-bottom: 6px !important; }
.client-dashboard-wrap .client-empty-card h4, .client-dashboard-wrap .client-empty-card h3 { font-size: 15px !important; margin: 4px 0 !important; }
.client-dashboard-wrap .client-bottom-grid { align-items: start; }

/* Domain search: light card instead of a heavy dark block */
:root .client-domain-search-panel { background: var(--surface) !important; background-image: none !important; border: 1px solid var(--line) !important; box-shadow: var(--card-shadow) !important; color: var(--ink) !important; padding: 20px 22px !important; }
:root .client-domain-search-panel .search-head-title { color: var(--ink) !important; font-size: 16px !important; }
:root .client-domain-search-panel .search-head-desc { color: var(--ink-2) !important; }
:root .client-domain-search-panel .search-head-icon { background: var(--brand-soft) !important; color: var(--brand) !important; border: 0 !important; }
:root .client-domain-search-panel .domain-input-wrapper { background: var(--surface-2) !important; border: 1px solid var(--line-strong) !important; }
:root .client-domain-search-panel .domain-input-wrapper input { color: var(--ink) !important; background: transparent !important; }
:root .client-domain-search-panel .domain-input-wrapper svg { color: var(--ink-3) !important; }
:root .client-domain-search-panel .tld-pill { background: var(--brand-soft) !important; color: var(--ink-2) !important; border: 0 !important; }
:root .client-domain-search-panel .tld-pill strong { color: var(--brand) !important; }
.client-dashboard-wrap .dash-empty-row { display: flex !important; align-items: center; gap: 12px; text-align: left !important; padding: 18px 20px !important; }
.dash-empty-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dash-empty-row strong { font-size: 14.5px; color: var(--ink); }
.dash-empty-row small { font-size: 13px; color: var(--ink-3); }
.dash-empty-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); font-weight: 800; flex-shrink: 0; }

/* Image-only promo banner: the admin's picture fills the slide; the whole banner is the link */
.promo-image-only { position: relative; display: block; flex: 0 0 100%; scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: var(--surface-3); line-height: 0; }
.promo-image-only img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; min-height: 120px; }
.promo-image-only:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.promo-image-code { position: absolute; right: 14px; bottom: 14px; line-height: 1.2; background: rgba(15, 23, 42, .78); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; backdrop-filter: blur(4px); }
.promo-image-code strong { font-family: var(--font-mono); letter-spacing: .06em; }
@media (max-width: 640px) { .promo-image-only img { aspect-ratio: 2 / 1; } }
.promo-slider { margin-top: 4px; }

/* Automation: red status tile when cron is not running */
.whmcs-kpi-tile.tile-red { background: #d9534f; }
.whmcs-kpi-tile.tile-red .kpi-icon-cell { background: #c9302c; }
