/* ==========================================================================
   CCWebHost — "Obsidian" theme (v4.0)
   Full design-system rebuild on the Twenty-One base: near-black surfaces,
   lime-green accent, light/dark mode toggle (persisted via localStorage),
   and font-independent unicode/symbol icons everywhere this theme
   controls markup — so nothing ever renders as a blank box, regardless
   of whether the server's FontAwesome files load correctly.

   Auto-loaded by includes/head.tpl via {assetExists file="custom.css"} —
   do not rename this file.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* -------------------------------------------------------------------------
   THEME TOKENS — dark (default) and light, switched via
   [data-theme="light"] on <html>. Also redefines the two variable
   systems Twenty-One's own stylesheets read from (theme.css's Bootstrap
   role names, and the newer --primary-900/--rounding-* tokens) so the
   palette applies to every inherited stock page too.
------------------------------------------------------------------------- */
:root{
  --bg:#050505; --surface:#0b0b0c; --surface2:#101011; --border:#222225;
  --text:#f5f5f3; --muted:#8b8b91; --faint:#55555b;
  --primary:#c8ff32; --primary-soft:#c8ff3215; --primary-text:#050505;
  --good:#55df87; --warn:#ffbd58; --danger:#ff6678; --info:#7eabff;
  --good-bg:#55df8724; --warn-bg:#ffbd5824; --danger-bg:#ff667824; --info-bg:#7eabff24;
  --good-border:#55df874a; --warn-border:#ffbd584a; --danger-border:#ff66784a; --info-border:#7eabff4a;
  --header-bg:#070707e8; --sidebar-bg:#070707; --input-bg:#09090a; --row-border:#202023;
  --card-shadow:0 18px 60px rgba(0,0,0,.5);
  --nav-text:#8d8d92; --nav-hover-bg:#101011; --nav-hover-text:#fff;
  --navicon:#65656a; --count-bg:#1b1b1d; --count-border:#2a2a2d; --count-text:#888;
  --count-active-bg:#29350f; --count-active-border:#394b14;
  --avatar-bg:#171719; --avatar-border:#303034;
  --miniicon-border:#29292d; --miniicon-bg:#0a0a0b; --miniicon-text:#aaa;
  --table-th:#55555b; --field-bg:#09090a; --field-border:#29292d;
  --hero-border:#313328; --hero-ring:#c8ff3224; --hero-glow1:#c8ff3207; --hero-glow2:#c8ff3204;
  --grain-op:.35; --grain-line:#ffffff03;
  --radius: 13px; --radius-sm: 8px; --radius-lg: 18px;
  --ease: cubic-bezier(.2,.7,.3,1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 270px;

  /* Bootstrap role variables (theme.css reads these) */
  --primary-bs: var(--primary);
  --secondary: var(--muted);
  --success: var(--good);
  --info-bs: var(--info);
  --warning: var(--warn);
  --danger-bs: var(--danger);
  --light: var(--surface2);
  --dark: var(--bg);
  --primary-900: var(--primary);
  --rounding-sm: var(--radius-sm);
  --rounding-md: var(--radius);
  --rounding-lg: var(--radius-lg);
}

html[data-theme="light"]{
  --bg:#f4f4f2; --surface:#ffffff; --surface2:#fbfbfa; --border:#e3e3e0;
  --text:#141414; --muted:#5c5c62; --faint:#8c8c92;
  --primary:#5b7d0a; --primary-soft:#5b7d0a12; --primary-text:#ffffff;
  --good:#1f9d54; --warn:#a5680a; --danger:#d13a4d; --info:#2f66c9;
  --good-bg:#1f9d5418; --warn-bg:#a5680a18; --danger-bg:#d13a4d18; --info-bg:#2f66c918;
  --good-border:#1f9d5440; --warn-border:#a5680a40; --danger-border:#d13a4d40; --info-border:#2f66c940;
  --header-bg:#ffffffe8; --sidebar-bg:#ffffff; --input-bg:#ffffff; --row-border:#ececea;
  --card-shadow:0 12px 34px rgba(0,0,0,.05);
  --nav-text:#5c5c62; --nav-hover-bg:#efefec; --nav-hover-text:#141414;
  --navicon:#8c8c92; --count-bg:#eeeeeb; --count-border:#e0e0dc; --count-text:#7a7a80;
  --count-active-bg:#e6f0d3; --count-active-border:#c9dba0;
  --avatar-bg:#eeeeeb; --avatar-border:#e0e0dc;
  --miniicon-border:#e3e3e0; --miniicon-bg:#f7f7f5; --miniicon-text:#5c5c62;
  --table-th:#8c8c92; --field-bg:#ffffff; --field-border:#dcdcd8;
  --hero-border:#e3e3e0; --hero-ring:#5b7d0a2a; --hero-glow1:#5b7d0a0d; --hero-glow2:#5b7d0a08;
  --grain-op:.5; --grain-line:#00000006;
}

/* Back-compat aliases: our earlier hq-* variables now point at the
   Obsidian tokens above, so any leftover hq-* reference still resolves. */
:root, html[data-theme="light"]{
  --hq-primary: var(--primary);
  --hq-primary-dark: var(--primary);
  --hq-primary-light: var(--primary-soft);
  --hq-green: var(--good);
  --hq-red: var(--danger);
  --hq-gold: var(--warn);
  --hq-ink: var(--text);
  --hq-body: var(--muted);
  --hq-muted: var(--faint);
  --hq-border: var(--border);
  --hq-bg: var(--bg);
  --hq-card: var(--surface);
  --hq-radius: var(--radius-lg);
  --hq-radius-sm: var(--radius-sm);
  --hq-shadow: var(--card-shadow);
  --hq-shadow-xs: 0 1px 2px rgba(0,0,0,.2);
  --hq-shadow-md: var(--card-shadow);
  --hq-shadow-primary: 0 10px 24px var(--primary-soft);
  --hq-sidebar-w: var(--sidebar-w);
  --hq-font: var(--font);
  --hq-font-display: var(--font);
  --hq-ease: var(--ease);
}

*{ box-sizing:border-box; }
html{ transition:background-color .25s ease, color .25s ease; }
body{
  background:var(--bg); color:var(--text); font-family:var(--font);
  font-size:14.5px; -webkit-font-smoothing:antialiased;
}
/* Subtle film-grain texture over the whole app, like the reference */
body::before{
  content:''; position:fixed; inset:0; pointer-events:none; z-index:2;
  background-image:
    linear-gradient(transparent 97%, var(--grain-line) 98%),
    linear-gradient(90deg, transparent 97%, var(--grain-line) 98%);
  background-size:42px 42px;
  mask-image:linear-gradient(#000, transparent 80%);
  opacity:var(--grain-op);
}
a{ color:var(--primary); transition:color .15s var(--ease); }
a:hover{ color:var(--text); }
h1,h2,h3,h4,h5,h6,.card-title,.h3,.h4,.h5{ color:var(--text); font-weight:800; letter-spacing:-.01em; }
::selection{ background:var(--primary-soft); color:var(--text); }
*{ scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
*::-webkit-scrollbar{ width:9px; height:9px; }
*::-webkit-scrollbar-thumb{ background:var(--border); border-radius:99px; }

/* -------------------------------------------------------------------------
   Buttons
------------------------------------------------------------------------- */
.btn{
  font-weight:800; font-family:var(--font); border:1px solid var(--border);
  background:var(--surface2); color:var(--text); border-radius:var(--radius-sm);
  transition:all .15s var(--ease);
}
.btn:hover{ border-color:var(--faint); color:var(--text); }
.btn-primary{
  background:var(--primary); border-color:var(--primary); color:var(--primary-text) !important;
}
.btn-primary:hover,.btn-primary:focus{
  background:var(--primary); border-color:var(--primary); filter:brightness(1.08);
  transform:translateY(-1px);
}
.btn-outline-primary{ background:transparent; border-color:var(--border); color:var(--text); border-width:1px; }
.btn-outline-primary:hover{ border-color:var(--primary); color:var(--primary); background:var(--primary-soft); }
.btn-success{ background:var(--good); border-color:var(--good); color:#04150a; }
.btn-light{ background:var(--surface2); border-color:var(--border); color:var(--text); }
.btn-lg{ padding:.85rem 1.6rem; font-size:15px; }
.btn, .form-control, .input-group-text, .badge{ border-radius:var(--radius-sm); }
.form-control{
  border-color:var(--field-border); background:var(--field-bg); color:var(--text); font-family:var(--font);
}
.form-control:focus{ border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); background:var(--field-bg); color:var(--text); }
.form-control::placeholder{ color:var(--faint); }

/* -------------------------------------------------------------------------
   Cards
------------------------------------------------------------------------- */
.card{
  background:linear-gradient(145deg, var(--surface2), var(--surface));
  border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--card-shadow); transition:box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card-header{ background:transparent; border-bottom:1px solid var(--row-border); font-weight:800; padding:16px 20px; color:var(--text); }
.card-body{ padding:20px; }
.card-sidebar{ border-radius:var(--radius); overflow:hidden; }
.card-sidebar .card-header{ background:var(--surface2); }

/* -------------------------------------------------------------------------
   Tables — Obsidian's uppercase, tracked-out header + hover row
------------------------------------------------------------------------- */
.table-list thead th, table thead th{
  color:var(--table-th); font-size:11px; text-transform:uppercase; letter-spacing:.08em;
  border-top:0; border-bottom:1px solid var(--row-border); font-weight:700;
  background:transparent;
}
.table-list td, table td{ border-top:1px solid var(--row-border); color:var(--text); }
.table-list > tbody > tr, table tbody tr{ cursor:pointer; transition:background .12s var(--ease); }
.table-list > tbody > tr:hover, table tbody tr:hover{ background:var(--primary-soft); }
.table-container{
  background:linear-gradient(145deg, var(--surface2), var(--surface));
  border:1px solid var(--border); border-radius:var(--radius); padding:10px 18px;
  box-shadow:var(--card-shadow);
}

/* Status pills — Obsidian's bordered, tinted pill style */
.label.status{
  border-radius:5px; padding:.35em .7em; font-weight:800; font-size:10.5px;
  text-transform:uppercase; letter-spacing:.05em; border:1px solid transparent;
}
.status-active,.status-open,.status-completed,.status-paid{ background:var(--good-bg); color:var(--good); border-color:var(--good-border); }
.status-pending,.status-pending-transfer,.status-awaiting-customer,.status-payment-pending{ background:var(--warn-bg); color:var(--warn); border-color:var(--warn-border); }
.status-suspended,.status-unpaid,.status-overdue{ background:var(--danger-bg); color:var(--danger); border-color:var(--danger-border); }
.status-cancelled,.status-terminated,.status-closed,.status-expired{ background:var(--surface2); color:var(--muted); border-color:var(--border); }
.status-fraud,.status-collections{ background:var(--danger-bg); color:var(--danger); border-color:var(--danger-border); }
.status-customer-reply,.status-answered{ background:var(--info-bg); color:var(--info); border-color:var(--info-border); }

/* =========================================================================
   APP SHELL — persistent sidebar layout for the logged-in Client Area
   ========================================================================= */
.app-shell{ display:flex; align-items:stretch; min-height:100vh; }

/* --- Sidebar --- */
.app-sidebar{
  width:var(--sidebar-w); flex:0 0 var(--sidebar-w);
  background:var(--sidebar-bg); border-right:1px solid var(--border);
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; z-index:1030;
}
.app-sidebar-brand{ display:flex; align-items:center; justify-content:space-between; padding:0 20px; height:78px; border-bottom:1px solid var(--border); }
.app-sidebar-brand a{ color:var(--text); font-weight:900; font-size:16px; letter-spacing:.03em; display:flex; align-items:center; gap:12px; text-decoration:none; }
.app-sidebar-brand a::before{
  content:'●'; width:37px; height:37px; flex:0 0 37px; border-radius:11px;
  background:var(--primary); color:var(--primary-text); display:flex; align-items:center; justify-content:center;
  font-size:20px; box-shadow:0 0 25px var(--primary-soft);
}
.app-sidebar-brand .logo-img{ max-height:34px; }
.app-sidebar-close{ display:none; background:none; border:0; font-size:22px; line-height:1; color:var(--muted); }
.app-sidebar-nav{ flex:0 0 auto; overflow-y:auto; padding:13px 11px; max-height:50vh; }
.app-sidebar-footer{ padding:13px; border-top:1px solid var(--border); margin-top:auto; }

.app-nav-list{ list-style:none; margin:0; padding:0; }
.app-nav-item{ margin-bottom:2px; }
.app-nav-link{
  display:flex; align-items:center; gap:12px; padding:10px 11px; border-radius:var(--radius-sm);
  color:var(--nav-text); font-weight:600; text-decoration:none; font-size:13.5px; position:relative;
  transition:background .15s var(--ease), color .15s var(--ease);
}
.app-nav-link i{ display:none !important; } /* icon fonts hidden — replaced by ::before symbol below */
.app-nav-link::before{
  content:'○'; width:20px; min-width:20px; text-align:center; font-size:15px;
  color:var(--navicon); transition:color .15s var(--ease);
}
.app-nav-link:hover{ background:var(--nav-hover-bg); color:var(--nav-hover-text); text-decoration:none; }
.app-nav-item.active > .app-nav-link,
.app-nav-link.active{
  background:var(--primary-soft); color:var(--nav-hover-text);
  box-shadow:inset 2px 0 var(--primary);
}
.app-nav-item.active > .app-nav-link::before,
.app-nav-link.active::before{ color:var(--primary); }
.app-nav-link .badge{
  margin-left:auto; background:var(--count-bg); border:1px solid var(--count-border);
  color:var(--count-text); font-weight:700; border-radius:5px; padding:2px 6px; font-size:11px;
}
.app-nav-link.active .badge{ background:var(--count-active-bg); border-color:var(--count-active-border); color:var(--primary); }

.app-nav-item.has-children > .app-nav-link .chevron{ margin-left:auto; transition:transform .15s var(--ease); font-size:10px; color:var(--muted); }
.app-nav-item.has-children.open > .app-nav-link .chevron{ transform:rotate(90deg); }
.app-nav-children{ list-style:none; margin:2px 0 6px 32px; padding:0; display:none; border-left:1px solid var(--border); }
.app-nav-item.open > .app-nav-children{ display:block; }
.app-nav-children .app-nav-link{ padding:7px 11px; font-weight:500; font-size:12.5px; }

/* Sidebar section labels (Overview / My Account / Billing / Support) —
   opt-in: add class="app-nav-group-label" above a group of nav items via
   a menu hook if you want Obsidian's uppercase section headers. */
.app-nav-group-label{
  font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--faint); padding:14px 11px 6px;
}

/* Sidebar "Need Help?" card */
.app-sidebar-help{
  margin:13px; padding:18px; text-align:center; border-radius:var(--radius);
  background:var(--surface2); border:1px solid var(--border);
}
.app-sidebar-help-bot{
  width:44px; height:44px; margin:0 auto 12px; border-radius:12px;
  background:var(--primary); color:var(--primary-text);
  display:flex; align-items:center; justify-content:center; font-size:20px;
  box-shadow:0 0 20px var(--primary-soft);
}
.app-sidebar-help-bot svg{ width:22px; height:22px; }
.app-sidebar-help-bot svg *{ stroke:var(--primary-text); }
.app-sidebar-help-title{ font-weight:800; color:var(--text); font-size:13.5px; margin-bottom:3px; }
.app-sidebar-help-sub{ color:var(--muted); font-size:12px; margin-bottom:14px; }
.app-sidebar-help .btn-light{ background:var(--surface); border:1px solid var(--border); font-weight:700; }
.app-sidebar-help .btn-light:hover{ background:var(--primary); color:var(--primary-text); border-color:var(--primary); }

/* --- User block at the very bottom of the sidebar --- */
.app-sidebar-user{
  margin-top:auto; border-top:1px solid var(--border); padding:13px 20px;
  display:flex; align-items:center; gap:10px;
}
.app-sidebar-user .avatar{
  width:36px; height:36px; border-radius:50%; background:var(--avatar-bg);
  border:1px solid var(--avatar-border); display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; color:var(--text); flex:0 0 36px;
}
.app-sidebar-user b{ font-size:14px; color:var(--text); display:block; }
.app-sidebar-user small{ display:block; color:var(--muted); font-size:12px; margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:150px; }

/* --- Main column --- */
.app-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }

.app-topbar{
  background:var(--header-bg); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border); position:sticky; top:0; z-index:1020; height:78px;
}
.app-topbar-inner{ display:flex; align-items:center; gap:16px; padding:0 28px; height:100%; }
.app-sidebar-toggle{ background:none; border:0; font-size:18px; color:var(--text); }
.app-search{ position:relative; flex:0 1 340px; height:38px; }
.app-search i{ display:none; }
.app-search::before{
  content:'⌕'; position:absolute; left:13px; top:50%; transform:translateY(-50%);
  color:var(--muted); font-size:15px; z-index:2;
}
.app-search .form-control{
  padding-left:38px; height:38px; border-radius:var(--radius-sm);
  background:var(--input-bg); border-color:var(--border); font-size:14px;
}
.app-search .form-control:focus{ border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.app-topbar-actions{ display:flex; align-items:center; gap:6px; }
.app-topbar-actions > .btn{
  border:1px solid var(--border); background:var(--input-bg); color:var(--text); position:relative;
  width:38px; height:38px; border-radius:var(--radius-sm);
  display:inline-flex; align-items:center; justify-content:center; font-size:15px;
}
.app-topbar-actions > .btn:hover{ border-color:var(--faint); color:var(--primary); }
.app-topbar-actions .badge{ position:absolute; top:-4px; right:-4px; font-size:10px; background:var(--danger); color:#fff; border-radius:99px; }
.app-topbar-actions .active-client{ margin-left:6px; }
.app-topbar-actions .active-client .btn{
  width:auto; height:38px; border-radius:var(--radius-sm); padding:0 14px;
  background:var(--input-bg); font-weight:700; font-size:13.5px; border:1px solid var(--border); color:var(--text);
}
.app-topbar-actions .active-client .btn:hover{ border-color:var(--primary); color:var(--primary); }
.app-topbar-actions .active-client .btn-return-to-admin{ background:var(--warn); color:#221a04; border-color:var(--warn); }

/* --- Theme (light/dark) switcher pill, added to the topbar --- */
.app-theme-switch{
  display:flex; align-items:center; gap:2px; border:1px solid var(--border);
  background:var(--input-bg); border-radius:var(--radius-sm); padding:3px; margin-left:2px;
}
.app-theme-btn{
  width:30px; height:30px; border:0; background:transparent; border-radius:6px;
  color:var(--muted); display:flex; align-items:center; justify-content:center; font-size:15px;
  transition:background .15s var(--ease), color .15s var(--ease);
}
.app-theme-btn.is-active{ background:var(--primary); color:var(--primary-text); }

.app-content{ padding:28px; flex:1 1 auto; }
.app-content > .container, .app-content > .container-fluid{ padding:0; max-width:none; }
.app-shell-guest .app-topbar{ position:static; background:var(--surface); backdrop-filter:none; }

/* -------------------------------------------------------------------------
   Dashboard welcome header
------------------------------------------------------------------------- */
.hq-dash-welcome h2{ font-size:26px; letter-spacing:-.02em; }
.hq-dash-welcome p{ color:var(--muted); }

/* -------------------------------------------------------------------------
   Dashboard stat cards — Obsidian's "statTop / statValue / statFoot" style
------------------------------------------------------------------------- */
.hq-stats .row{ margin-left:-7px; margin-right:-7px; }
.hq-stats [class^="col-"]{ padding-left:7px; padding-right:7px; }
.hq-stat-card{
  display:block; background:linear-gradient(145deg, var(--surface2), var(--surface));
  border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--card-shadow);
  padding:18px; margin-bottom:14px; color:inherit; text-decoration:none; position:relative;
  min-height:118px; transition:transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hq-stat-card:hover{ transform:translateY(-3px); color:inherit; text-decoration:none; border-color:var(--faint); }
.hq-stat-icon{
  position:absolute; top:18px; right:18px; width:auto; height:auto; background:none !important;
  box-shadow:none; color:var(--primary); font-size:19px;
}
.hq-stat-icon svg{ width:19px; height:19px; }
.hq-stat-icon svg *{ stroke:var(--primary); }
.hq-stat-icon i{ display:none; }
.hq-stat-body{ display:flex; flex-direction:column; }
.hq-stat-label{
  order:1; color:var(--faint); font-weight:700; font-size:11.5px; text-transform:uppercase;
  letter-spacing:.07em; margin-top:0; padding-right:30px;
}
.hq-stat-num{ order:2; font-size:29px; font-weight:900; color:var(--text); line-height:1.15; margin-top:14px; letter-spacing:-.02em; }

/* Home KB search + panels */
.home-kb-search{ position:relative; margin-bottom:8px; }
.home-kb-search .form-control{ padding-left:44px; height:50px; border-radius:var(--radius-sm); }
.home-kb-search i{ display:none; }
.home-kb-search::before{ content:'⌕'; position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:16px; }
.client-home-cards .card, .hq-panel{ margin-bottom:20px; }
.client-home-cards .card-title{ font-size:15px; }
.client-home-cards .list-group-item{ border-color:var(--row-border); padding:12px 20px; background:transparent; color:var(--text); transition:background .12s var(--ease); }
.client-home-cards .list-group-item:hover{ background:var(--primary-soft); }
.list-group-item{ background:transparent; border-color:var(--row-border); color:var(--text); }

/* -------------------------------------------------------------------------
   Nebulix/Obsidian dashboard panels (clientareahome.tpl — services table,
   invoice list, ticket list, fed by includes/hooks/ccwebhost_dashboard.php)
------------------------------------------------------------------------- */
.hq-dash-panel{ overflow:hidden; }
.hq-dash-panel .card-header{ padding:16px 20px; }
.hq-dash-panel .card-title{ font-size:15px; }

.hq-services-table{ margin-bottom:0; }
.hq-services-table thead th{
  border-top:0; border-bottom:1px solid var(--row-border); color:var(--table-th);
  font-size:11px; text-transform:uppercase; letter-spacing:.07em; font-weight:700; padding:12px 20px;
  background:transparent;
}
.hq-services-table tbody td{ padding:15px 20px; border-top:1px solid var(--row-border); vertical-align:middle; font-size:13.5px; color:var(--text); }
.hq-services-table tbody tr:hover{ background:var(--primary-soft); }
.hq-svc-name{ font-weight:700; color:var(--text); }
.hq-svc-group{ color:var(--muted); font-size:12px; margin-top:2px; }

.hq-list-panel{ }
.hq-invoice-row,.hq-ticket-row{
  display:flex; align-items:center; gap:13px; padding:14px 20px;
  border-color:var(--row-border) !important; color:inherit; transition:background .12s var(--ease);
}
.hq-invoice-row:hover,.hq-ticket-row:hover{ background:var(--primary-soft); color:inherit; text-decoration:none; }
.hq-row-icon{
  flex:0 0 34px; width:34px; height:34px; border-radius:8px; border:1px solid var(--miniicon-border);
  background:var(--miniicon-bg); color:var(--miniicon-text);
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.hq-row-icon i{ display:none; }
.hq-row-body{ flex:1 1 auto; min-width:0; }
.hq-row-title{ font-weight:700; color:var(--text); font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hq-row-sub{ color:var(--muted); font-size:12px; margin-top:2px; }
.hq-row-end{ flex:0 0 auto; text-align:right; }
.hq-row-amount{ font-weight:900; color:var(--text); font-size:14px; margin-bottom:4px; }

.hq-empty-panel{ text-align:center; padding:40px 24px; color:var(--muted); }
.hq-empty-panel i{ display:none; }
.hq-empty-panel::before{ content:'○'; display:block; font-size:26px; color:var(--border); margin-bottom:10px; }
.hq-empty-panel p{ margin:0; font-size:13.5px; }

/* -------------------------------------------------------------------------
   Sidebar quick-links (cPanel/module sidebar icon grid)
------------------------------------------------------------------------- */
.card-sidebar .list-group.d-md-flex{ display:flex !important; flex-wrap:wrap; gap:2px; padding:10px; }
.card-sidebar .list-group.d-md-flex .list-group-item{
  flex:0 0 33.33%; max-width:33.33%; border:0; border-radius:var(--radius-sm); text-align:center; padding:14px 6px;
}
.card-sidebar .list-group.d-md-flex .sidebar-menu-item-wrapper{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.card-sidebar .list-group.d-md-flex .sidebar-menu-item-icon{ font-size:19px; color:var(--primary); }
.card-sidebar .list-group.d-md-flex .sidebar-menu-item-label{ font-size:12px; font-weight:600; color:var(--text); }
.card-sidebar .list-group.d-md-flex .list-group-item:hover{ background:var(--primary-soft); }

.dial-usage{ font-weight:800 !important; color:var(--primary) !important; }

/* -------------------------------------------------------------------------
   Home / marketing "how can we help" icon grid + pricing cards
------------------------------------------------------------------------- */
.action-icon-btns a{ color:var(--text); font-weight:700; }
.action-icon-btns a .ico-container{
  background:var(--surface2); border:1px solid var(--border); box-shadow:var(--card-shadow); transition:all .2s var(--ease);
}
.action-icon-btns a:hover{ color:var(--primary); }
.action-icon-btns a:hover .ico-container{ border-color:var(--primary); }
.action-icon-btns a:hover .ico-container i{ color:var(--primary) !important; }
.card-columns.home .card{ border-radius:var(--radius); }
.pricing-card-title{ color:var(--text); }

/* =========================================================================
   Hero / marketing homepage sections
   ========================================================================= */
.hq-hero{
  position:relative; overflow:hidden; padding:88px 0 56px;
  background:
    radial-gradient(circle at 85% 15%, var(--primary-soft), transparent 35%),
    linear-gradient(180deg, var(--surface2) 0%, var(--bg) 100%);
}
.hq-eyebrow{
  display:inline-flex; align-items:center; gap:6px; background:var(--surface2); border:1px solid var(--border);
  color:var(--primary); font-weight:800; font-size:12px; letter-spacing:.06em; text-transform:uppercase;
  padding:7px 16px; border-radius:99px; margin-bottom:22px;
}
.hq-hero h1{ font-size:46px; font-weight:900; line-height:1.14; letter-spacing:-.02em; color:var(--text); }
.hq-hero h1 .text-primary{ color:var(--primary) !important; }
.hq-hero p.lead{ color:var(--muted); font-size:17px; max-width:640px; }
.hq-hero-badges{ display:flex; flex-wrap:wrap; gap:24px; margin-top:26px; color:var(--muted); font-weight:700; font-size:13px; }
.hq-hero-badges i{ display:none; }
.hq-hero-badges span::before{ content:'✓ '; color:var(--good); }

.hq-feature-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin:40px 0; }
.hq-feature{
  background:linear-gradient(145deg, var(--surface2), var(--surface)); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--card-shadow); padding:24px 20px; text-align:center;
  transition:transform .2s var(--ease);
}
.hq-feature:hover{ transform:translateY(-4px); border-color:var(--faint); }
.hq-feature .hq-feature-icon{
  width:48px; height:48px; border-radius:12px; background:var(--primary-soft); color:var(--primary);
  display:flex; align-items:center; justify-content:center; font-size:19px; margin:0 auto 14px;
}
.hq-feature h5{ margin-bottom:6px; font-size:15px; color:var(--text); }
.hq-feature p{ color:var(--muted); font-size:13px; margin:0; line-height:1.6; }

.hq-section-head{ text-align:center; max-width:620px; margin:0 auto 32px; }
.hq-section-head .hq-eyebrow{ margin-bottom:12px; }
.hq-section-head h2{ font-size:28px; color:var(--text); }
.hq-section-head p{ color:var(--muted); font-size:15px; }

.hq-pricing-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; align-items:stretch; }
.hq-plan{
  background:linear-gradient(145deg, var(--surface2), var(--surface)); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--card-shadow); padding:30px 24px; position:relative;
  display:flex; flex-direction:column; transition:transform .2s var(--ease);
}
.hq-plan:hover{ transform:translateY(-4px); }
.hq-plan.is-popular{ border-color:var(--primary); box-shadow:0 0 0 1px var(--primary), var(--card-shadow); }
.hq-plan-badge{ position:absolute; top:-12px; right:22px; background:var(--primary); color:var(--primary-text); font-size:11px; font-weight:800; padding:5px 13px; border-radius:99px; }
.hq-plan-icon{ width:44px; height:44px; border-radius:11px; background:var(--primary-soft); color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:18px; margin-bottom:16px; }
.hq-plan h4{ margin-bottom:2px; color:var(--text); }
.hq-plan .hq-plan-tagline{ color:var(--muted); font-size:13px; margin-bottom:18px; }
.hq-plan ul{ list-style:none; margin:0 0 22px; padding:0; flex:1 1 auto; }
.hq-plan ul li{ padding:7px 0; border-bottom:1px dashed var(--border); font-size:14px; color:var(--text); }
.hq-plan ul li:last-child{ border-bottom:0; }
.hq-plan ul li i{ display:none; }
.hq-plan ul li::before{ content:'✓ '; color:var(--good); font-weight:800; margin-right:4px; }
.hq-plan .hq-price{ font-size:32px; font-weight:900; color:var(--text); letter-spacing:-.02em; }
.hq-plan .hq-price small{ font-size:14px; font-weight:600; color:var(--muted); }

.card-columns.home{ column-gap:20px; }
.card-columns.home .card{ border-radius:var(--radius); border-color:var(--border); }
.card-columns.home .card:hover{ transform:translateY(-3px); }

.hq-faq .card{ margin-bottom:10px; border-radius:var(--radius-sm); }
.hq-faq .card-header{ padding:16px 20px; }
.hq-faq .card-header a{ display:flex; justify-content:space-between; align-items:center; font-weight:700; color:var(--text); }
.hq-faq .card-header a:hover{ color:var(--primary); }
.hq-faq .card-header a .fa-chevron-down{ display:none; }
.hq-faq .card-header a::after{ content:'▾'; color:var(--muted); transition:transform .15s var(--ease); }
.hq-faq .card-header a[aria-expanded="true"]::after{ transform:rotate(180deg); color:var(--primary); }

.hq-testimonial{
  background:linear-gradient(145deg, var(--surface2), var(--surface)); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--card-shadow); padding:26px; height:100%;
}
.hq-testimonial .stars{ color:var(--warn); margin-bottom:11px; font-size:13px; }
.hq-testimonial p{ color:var(--text); font-style:italic; line-height:1.65; }
.hq-testimonial-author{ display:flex; align-items:center; gap:11px; margin-top:17px; }
.hq-testimonial-avatar{ width:38px; height:38px; border-radius:50%; background:var(--primary); color:var(--primary-text); display:flex; align-items:center; justify-content:center; font-weight:800; }
.hq-testimonial-author strong{ display:block; font-size:14px; color:var(--text); }
.hq-testimonial-author span{ font-size:12px; color:var(--muted); }

.hq-cta{
  background:linear-gradient(145deg, var(--surface2), var(--surface)); border:1px solid var(--primary);
  border-radius:var(--radius-lg); color:var(--text); padding:38px 42px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:42px 0;
  position:relative; overflow:hidden; box-shadow:0 0 0 1px var(--primary-soft), var(--card-shadow);
}
.hq-cta::before{ content:''; position:absolute; inset:0; background:radial-gradient(320px 200px at 90% 0%, var(--primary-soft), transparent 70%); }
.hq-cta h3{ color:var(--text); margin:0; font-size:22px; position:relative; }
.hq-cta p{ margin:0; color:var(--muted); position:relative; }
.hq-cta .btn-light{ background:var(--primary); color:var(--primary-text); font-weight:800; position:relative; border-color:var(--primary); }

.hq-blog-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.hq-blog-card{
  background:linear-gradient(145deg, var(--surface2), var(--surface)); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--card-shadow); overflow:hidden; display:flex; flex-direction:column;
  transition:transform .2s var(--ease);
}
.hq-blog-card:hover{ transform:translateY(-4px); }
.hq-blog-card-thumb{ height:148px; background:var(--surface2); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--primary); font-size:26px; }
.hq-blog-card-body{ padding:20px; flex:1 1 auto; display:flex; flex-direction:column; }
.hq-blog-card .hq-blog-date{ color:var(--faint); font-size:11px; margin-bottom:8px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.hq-blog-card h3{ font-size:16px; margin-bottom:8px; color:var(--text); }
.hq-blog-card article{ color:var(--muted); font-size:14px; flex:1 1 auto; line-height:1.6; }
.hq-blog-card .btn{ align-self:flex-start; margin-top:14px; }

/* -------------------------------------------------------------------------
   Contact page
------------------------------------------------------------------------- */
.hq-contact-map{ border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; height:100%; min-height:320px; filter:grayscale(1) invert(.92) contrast(.9); }
html[data-theme="light"] .hq-contact-map{ filter:none; }
.hq-contact-map iframe{ width:100%; height:100%; min-height:320px; border:0; display:block; }
.hq-contact-info{ list-style:none; margin:20px 0 0; padding:0; }
.hq-contact-info li{ display:flex; gap:13px; margin-bottom:17px; color:var(--text); }
.hq-contact-info i{ display:none; }
.hq-contact-info li::before{
  content:'○'; width:22px; height:22px; display:flex; align-items:center; justify-content:center;
  border-radius:7px; background:var(--primary-soft); color:var(--primary); font-size:11px; flex:0 0 22px;
}

/* -------------------------------------------------------------------------
   Footer
------------------------------------------------------------------------- */
.footer{ background:var(--surface); border-top:1px solid var(--border); padding-top:34px; }
.footer .copyright{ color:var(--muted); font-size:13px; }
.footer .nav-link{ color:var(--text); font-weight:700; font-size:13.5px; }
.footer .nav-link:hover{ color:var(--primary); }

/* -------------------------------------------------------------------------
   Generic icon-font fallback: any leftover FontAwesome <i> tag WHMCS
   itself injects (menu items, alerts, breadcrumbs) becomes a small
   neutral dot instead of a blank box if the icon font fails to load.
   Real glyphs still show fine when the font loads; this is a safety net.
------------------------------------------------------------------------- */
.fas,.far,.fal,.fab,.fad{ font-family:var(--font), "Font Awesome 5 Free","Font Awesome 5 Pro",sans-serif; }

/* -------------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------- */
@media (max-width: 1199.98px){
  .app-sidebar{ position:fixed; left:0; top:0; bottom:0; transform:translateX(-100%); transition:transform .25s var(--ease); }
  .app-sidebar.is-open{ transform:translateX(0); box-shadow:0 20px 60px rgba(0,0,0,.5); }
  .app-sidebar-close{ display:block; }
  .hq-feature-grid{ grid-template-columns:repeat(2,1fr); }
  .hq-pricing-grid{ grid-template-columns:1fr; }
  .hq-blog-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 767.98px){
  .app-topbar-inner{ padding:0 16px; }
  .app-content{ padding:16px; }
  .hq-hero{ padding:56px 0 40px; }
  .hq-hero h1{ font-size:30px; }
  .hq-feature-grid{ grid-template-columns:1fr 1fr; }
  .hq-blog-grid{ grid-template-columns:1fr; }
  .hq-cta{ padding:26px; }
  .hq-services-table{ font-size:12.5px; }
  .hq-services-table thead{ display:none; }
  .hq-services-table tbody td{ padding:10px 14px; }
  .hq-invoice-row,.hq-ticket-row{ padding:13px 16px; }
  .hq-row-title{ max-width:150px; }
  .app-search{ display:none; }
}

/* =========================================================================
   RTL (Arabic) support
   ========================================================================= */
html[dir="rtl"] body{ direction:rtl; text-align:right; }
html[dir="rtl"] .app-sidebar{ border-right:0; border-left:1px solid var(--border); }
html[dir="rtl"] .app-nav-link .badge{ margin-left:0; margin-right:auto; }
html[dir="rtl"] .app-nav-children{ margin-left:0; margin-right:32px; border-left:0; border-right:1px solid var(--border); }
html[dir="rtl"] .app-nav-item.has-children > .app-nav-link .chevron{ margin-left:0; margin-right:auto; transform:scaleX(-1); }
html[dir="rtl"] .app-nav-item.has-children.open > .app-nav-link .chevron{ transform:scaleX(-1) rotate(90deg); }
html[dir="rtl"] .app-search::before{ left:auto; right:13px; }
html[dir="rtl"] .app-search .form-control{ padding-left:12px; padding-right:38px; }
html[dir="rtl"] .app-topbar-actions{ margin-left:0 !important; margin-right:auto; }
html[dir="rtl"] .hq-plan-badge{ right:auto; left:22px; }
html[dir="rtl"] .home-kb-search::before{ left:auto; right:16px; }
html[dir="rtl"] .home-kb-search .form-control{ padding-left:12px; padding-right:44px; }
html[dir="rtl"] .float-right{ float:left !important; }
html[dir="rtl"] .float-left{ float:right !important; }
html[dir="rtl"] .text-right{ text-align:left !important; }
html[dir="rtl"] .text-left{ text-align:right !important; }
