/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens — Light theme (default) ─────────────────────────────────── */
:root {
  --bg:           #f0f2f8;
  --bg-2:         #ffffff;
  --bg-3:         #f8f9fd;
  --bg-4:         #edf0f8;

  --sidebar-bg:          #0f1d3a;
  --sidebar-text:        rgba(255,255,255,.65);
  --sidebar-text-hover:  #ffffff;
  --sidebar-active-bg:   rgba(255,255,255,.1);
  --sidebar-active-border: #0096d6;
  --sidebar-sep:         rgba(255,255,255,.08);

  --topbar-bg:    #ffffff;
  --topbar-bdr:   #e4e8f4;

  --border:       #e4e8f4;
  --border-2:     #cdd3e8;

  --text:         #111827;
  --text-2:       #6b7280;
  --text-3:       #9ca3af;

  --accent:       #0096d6;
  --accent-dim:   rgba(0,150,214,.1);
  --accent-glow:  rgba(0,150,214,.25);
  --accent-hover: #007ab8;

  --green:        #10b981;
  --green-dim:    rgba(16,185,129,.1);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,.1);
  --amber:        #f59e0b;
  --amber-dim:    rgba(245,158,11,.1);
  --purple:       #8b5cf6;
  --purple-dim:   rgba(139,92,246,.1);
  --cyan:         #06b6d4;
  --cyan-dim:     rgba(6,182,212,.1);

  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    5px;
  --radius-pill:  999px;

  --sidebar-w:    272px;
  --sidebar-c:    62px;
  --topbar-h:     72px;

  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --shadow:       0 2px 16px rgba(0,0,0,.07);
  --shadow-sm:    0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.12);
}

/* ── Dark mode overrides ────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:        #0f1117;
  --bg-2:      #1a1d27;
  --bg-3:      #20232f;
  --bg-4:      #272a38;
  --topbar-bg: #1a1d27;
  --topbar-bdr:rgba(255,255,255,.08);
  --border:    rgba(255,255,255,.07);
  --border-2:  rgba(255,255,255,.12);
  --text:      #f0f2f8;
  --text-2:    #9ba3b4;
  --text-3:    #5a6278;
  --sidebar-bg: #090f1e;
  --sidebar-text: rgba(255,255,255,.62);
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg: rgba(255,255,255,.1);
  --sidebar-sep: rgba(255,255,255,.07);
  --shadow:    0 2px 20px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.3);
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-2) !important; }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-accent { color: var(--accent); }
.fw-700      { font-weight: 700; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .65rem; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.badge-green  { background: var(--green-dim); color: var(--green); }
.badge-red    { background: var(--red-dim);   color: var(--red); }
.badge-amber  { background: var(--amber-dim); color: var(--amber); }
.badge-accent { background: var(--accent-dim);color: var(--accent); }
.badge-purple { background: var(--purple-dim);color: var(--purple); }
.badge-cyan   { background: var(--cyan-dim);  color: var(--cyan); }
.badge-muted  { background: var(--bg-4); color: var(--text-2); border: 1px solid var(--border); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1.1rem; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 600; font-size: .875rem;
  border: none; cursor: pointer; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover  { opacity: .88; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); opacity: 1; }

.btn-cta {
  background: #00b4e4; color: #fff;
  box-shadow: 0 2px 10px rgba(0,180,228,.3);
  border-radius: var(--radius-pill);
}
.btn-cta:hover { background: #009acf; opacity: 1; }

.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost   { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); }

.btn-white   { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-white:hover { background: rgba(255,255,255,.25); }

.btn-danger  { background: var(--red-dim); color: var(--red); border: 1px solid transparent; }
.btn-sm      { padding: .35rem .85rem; font-size: .8125rem; border-radius: var(--radius-xs); }
.btn-lg      { padding: .75rem 1.75rem; font-size: 1rem; border-radius: var(--radius); }
.btn-full    { width: 100%; }
.btn-icon    { padding: .5rem; aspect-ratio: 1; border-radius: var(--radius-sm); }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group    { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.15rem; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label    { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.form-optional { font-weight: 400; opacity: .6; }
.form-hint     { font-size: .78rem; color: var(--text-2); margin-top: .25rem; }

.form-input {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: .9rem;
  padding: .6rem .9rem; width: 100%;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input:disabled { opacity: .5; cursor: not-allowed; }
.form-input::placeholder { color: var(--text-3); }
.form-textarea { resize: vertical; min-height: 100px; }
.input-error   { border-color: var(--red) !important; }

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.25rem;
}

.toggle-label { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .875rem; }
.toggle-label input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; align-items: center; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; margin-bottom: 1.25rem; border: 1px solid transparent;
}
.alert-success { background: var(--green-dim); border-color: rgba(16,185,129,.2); color: #065f46; }
.alert-error   { background: var(--red-dim);   border-color: rgba(239,68,68,.2);  color: #991b1b; }
.alert-info    { background: var(--accent-dim); border-color: rgba(0,150,214,.2);  color: var(--accent); }
[data-theme="dark"] .alert-success { color: var(--green); }
[data-theme="dark"] .alert-error   { color: var(--red); }

/* ── White box / section box ────────────────────────────────────────────────── */
.box {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.box-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; gap: .75rem; flex-wrap: wrap;
}
.box-title { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }

/* ── Portal body ────────────────────────────────────────────────────────────── */
.portal-body { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Top bar ────────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-bdr);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
  z-index: 400; box-shadow: var(--shadow-sm);
}
.topbar-logo {
  display: flex; align-items: center; gap: .6rem;
  width: var(--sidebar-w); flex-shrink: 0;
}
.topbar-logo-img  { height: 38px; width: auto; object-fit: contain; max-width: 180px; }
.topbar-logo-mark {
  width: 34px; height: 34px; background: var(--accent); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 800; font-size: .9rem; flex-shrink: 0;
}
.topbar-logo-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }

.topbar-right {
  margin-left: auto; display: flex; align-items: center; gap: .6rem;
}

/* Reward/Get rewarded button */
.topbar-reward {
  display: flex; align-items: center; gap: .45rem;
  padding: .5rem 1.1rem; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #00b4e4 0%, #0096d6 100%);
  color: #fff; font-size: .875rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; font-family: var(--font);
  transition: opacity .15s;
}
.topbar-reward:hover { opacity: .88; text-decoration: none; color: #fff; }
.topbar-reward svg { width: 15px; height: 15px; }

/* Icon buttons in topbar */
.topbar-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; transition: background .12s, color .12s; position: relative;
  font-family: var(--font);
}
.topbar-icon:hover { background: var(--bg-4); color: var(--text); }
.topbar-icon svg { width: 18px; height: 18px; }

/* Notification badge */
.topbar-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; background: var(--red);
  border-radius: var(--radius-pill); border: 2px solid var(--topbar-bg);
  font-size: .6rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 0 2px;
}
.topbar-badge.hidden { display: none; }

/* Avatar */
.topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-dim); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem; color: var(--accent);
  cursor: pointer; overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: none; box-shadow: 4px 0 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  z-index: 300; transition: width .22s ease; overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-c); }

/* Place order CTA in sidebar */
.sidebar-order-wrap { padding: .85rem .75rem .5rem; }
.sidebar-order-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .75rem 1rem;
  background: #00b4e4; color: #fff;
  border-radius: var(--radius-pill); font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: background .15s; font-family: var(--font);
  border: none; cursor: pointer; white-space: nowrap; overflow: hidden;
}
.sidebar-order-btn:hover { background: #009acf; text-decoration: none; color: #fff; }
.sidebar-order-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar-order-btn .order-label { transition: opacity .15s, max-width .22s; max-width: 160px; overflow: hidden; }
.sidebar.collapsed .sidebar-order-btn .order-label { opacity: 0; max-width: 0; }

/* Sidebar nav */
.sidebar-nav { flex: 1; padding: .5rem .6rem; overflow-y: auto; overflow-x: hidden; }

/* Nav section label */
.nav-section-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  padding: .75rem .75rem .25rem; white-space: nowrap;
  transition: opacity .15s;
}
.sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; }

/* Simple nav item */
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: .95rem; font-weight: 500;
  text-decoration: none; transition: background .12s, color .12s;
  margin-bottom: .1rem; white-space: nowrap; position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .nav-label { transition: opacity .15s, max-width .22s; max-width: 180px; overflow: hidden; }
.sidebar.collapsed .nav-item .nav-label { opacity: 0; max-width: 0; }
.nav-item:hover { background: rgba(255,255,255,.08); color: var(--sidebar-text-hover); text-decoration: none; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  border-left: 3px solid var(--sidebar-active-border);
}
.nav-item.active svg { color: var(--accent); }

/* Collapsed tooltip */
.sidebar.collapsed .nav-item::after,
.sidebar.collapsed .nav-group-trigger::after {
  content: attr(title);
  position: absolute; left: calc(var(--sidebar-c) + 6px);
  background: #1a3a5c; border: 1px solid rgba(255,255,255,.15);
  color: #fff; padding: .35rem .8rem;
  border-radius: var(--radius-xs); font-size: .8rem;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s; z-index: 500;
  box-shadow: var(--shadow);
}
.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-group-trigger:hover::after { opacity: 1; }

/* Nav group */
.nav-group { margin-bottom: .1rem; }

.nav-group-trigger {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; padding: .7rem 1rem; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: .95rem; font-weight: 500;
  background: none; border: none; font-family: var(--font);
  text-align: left; cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s; position: relative;
}
.nav-group-trigger svg.ni { width: 18px; height: 18px; flex-shrink: 0; }
.nav-group-trigger:hover { background: rgba(255,255,255,.08); color: var(--sidebar-text-hover); }
.nav-group-trigger.active { color: var(--accent); }

.nav-group-label-text { flex: 1; transition: opacity .15s, max-width .22s; max-width: 180px; overflow: hidden; }
.sidebar.collapsed .nav-group-label-text { opacity: 0; max-width: 0; }

.nav-chevron {
  width: 13px; height: 13px; flex-shrink: 0; color: rgba(255,255,255,.4);
  transition: transform .2s; margin-left: auto;
}
.sidebar.collapsed .nav-chevron { display: none; }
.nav-group.open > .nav-group-trigger .nav-chevron { transform: rotate(90deg); }

.nav-children {
  overflow: hidden; max-height: 0; transition: max-height .22s ease;
  padding-left: .5rem;
}
.sidebar.collapsed .nav-children { padding-left: 0; }
.nav-group.open > .nav-children { max-height: 400px; }
.sidebar.collapsed .nav-group.open > .nav-children { max-height: 0; }

.nav-child {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; border-radius: var(--radius-xs);
  color: rgba(255,255,255,.62); font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: background .1s, color .1s;
  margin-bottom: .05rem; white-space: nowrap;
}
.nav-child:hover  { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-child.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-child svg { width: 15px; height: 15px; flex-shrink: 0; color: rgba(255,255,255,.4); }
.nav-child.active svg { color: var(--accent); }

/* Floating collapse button (outside sidebar) */
.sidebar-float-btn {
  position: fixed;
  left: calc(var(--sidebar-w) - 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  z-index: 350;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: left .22s ease, color .12s, background .12s;
  font-family: var(--font);
}
.sidebar-float-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.sidebar-float-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
#sidebar.collapsed ~ .sidebar-float-btn { left: calc(var(--sidebar-c) - 14px); }
#sidebar.force-collapsed ~ .sidebar-float-btn { left: calc(var(--sidebar-c) - 14px); }
.sidebar-float-btn .collapse-icon-right { display: none; }
#sidebar.collapsed ~ .sidebar-float-btn .collapse-icon-left { display: none; }
#sidebar.collapsed ~ .sidebar-float-btn .collapse-icon-right { display: block; }
#sidebar.force-collapsed ~ .sidebar-float-btn .collapse-icon-left { display: none; }
#sidebar.force-collapsed ~ .sidebar-float-btn .collapse-icon-right { display: block; }
@media (max-width: 900px) { .sidebar-float-btn { display: none; } }

/* Mobile overlay */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 290; }
.sidebar-overlay.active { display: block; }

/* ── Portal main ────────────────────────────────────────────────────────────── */
.portal-main {
  margin-left: var(--sidebar-w); margin-top: var(--topbar-h);
  flex: 1; display: flex; flex-direction: column;
  transition: margin-left .22s ease; min-width: 0;
}
.sidebar.collapsed ~ .portal-main,
.portal-main.sidebar-collapsed { margin-left: var(--sidebar-c); }
.portal-main.sidebar-forced { margin-left: var(--sidebar-c); }

.portal-content { padding: 2rem 2.5rem; width: 100%; }

/* ── Breadcrumbs ────────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--text-2); padding: .65rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.breadcrumb a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-3); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ── Dropdown menus (notifications, user) ───────────────────────────────────── */
.dropdown-wrap { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 500; display: none;
}
.dropdown-menu.open { display: block; }

/* Notification dropdown */
.notif-dropdown { width: 340px; overflow: hidden; }
.notif-header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.1rem .7rem; border-bottom: 1px solid var(--border); }
.notif-header-title { font-weight: 700; font-size: .9rem; }
.notif-read-all { font-size: .78rem; color: var(--accent); cursor: pointer; background: none; border: none; font-family: var(--font); font-weight: 600; }
.notif-read-all:hover { opacity: .75; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); cursor: pointer; text-decoration: none; color: inherit; transition: background .1s; }
.notif-item:hover { background: var(--bg-3); text-decoration: none; color: inherit; }
.notif-item.unread { background: rgba(0,150,214,.04); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 5px; }
.notif-item.read .notif-dot { background: var(--text-3); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-text  { font-size: .78rem; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-item-time  { font-size: .72rem; color: var(--text-3); margin-top: .2rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--text-2); font-size: .875rem; }
.notif-footer { padding: .65rem 1.1rem; border-top: 1px solid var(--border); text-align: center; }
.notif-footer a { font-size: .8rem; color: var(--accent); font-weight: 600; }

/* User dropdown */
.user-dropdown { width: 210px; }
.user-drop-header { padding: .85rem 1rem .7rem; border-bottom: 1px solid var(--border); }
.user-drop-name  { font-weight: 700; font-size: .875rem; }
.user-drop-email { font-size: .75rem; color: var(--text-2); margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-drop-list  { padding: .4rem 0; }
.user-drop-link  { display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; font-size: .855rem; color: var(--text-2); text-decoration: none; transition: background .1s, color .1s; }
.user-drop-link:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
.user-drop-link svg { width: 14px; height: 14px; }
.user-drop-divider { height: 1px; background: var(--border); margin: .3rem 0; }
.user-drop-logout { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem 1rem; font-size: .855rem; color: var(--text-2); background: none; border: none; cursor: pointer; font-family: var(--font); transition: background .1s, color .1s; }
.user-drop-logout:hover { background: var(--red-dim); color: var(--red); }
.user-drop-logout svg { width: 14px; height: 14px; }

/* ── Welcome banner ─────────────────────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6b 100%);
  padding: 1.75rem 2rem; margin: -2rem -2rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.welcome-banner h1 { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.welcome-banner p  { color: rgba(255,255,255,.65); font-size: .875rem; margin-top: .2rem; }
.welcome-banner-actions { display: flex; gap: .75rem; flex-shrink: 0; flex-wrap: wrap; }

/* ── Stats strip ────────────────────────────────────────────────────────────── */
.stats-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.stats-item {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.1rem; border-right: 1px solid var(--border);
  cursor: pointer; text-decoration: none; color: inherit;
  transition: background .12s;
}
.stats-item:last-child { border-right: none; }
.stats-item:hover { background: var(--bg-3); text-decoration: none; color: inherit; }
.stats-item-icon { font-size: 1.2rem; flex-shrink: 0; }
.stats-item-body { min-width: 0; }
.stats-item-label { font-size: .72rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.stats-item-count { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }

/* ── Todo section ───────────────────────────────────────────────────────────── */
.todo-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.todo-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.todo-card-title { font-weight: 700; font-size: .95rem; }
.todo-tab-bar { display: flex; border-bottom: 1px solid var(--border); padding: 0 1.25rem; }
.todo-tab {
  flex: 1; padding: .65rem 1rem; cursor: pointer; font-weight: 600; font-size: .845rem;
  border-bottom: 2px solid transparent; color: var(--text-2); margin-bottom: -1px;
  background: none; border-left: none; border-right: none; border-top: none;
  font-family: var(--font); transition: color .15s, border-color .15s; text-align: center;
}
.todo-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.todo-tab:hover  { color: var(--text); }
.todo-panel { display: none; }
.todo-panel.active { display: block; }
.todo-list { padding: 0 1.25rem; }
.todo-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 0; border-bottom: 1px solid var(--border);
}
.todo-item:last-child { border-bottom: none; }
.todo-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.todo-item.done .todo-check { background: var(--green); border-color: var(--green); color: #fff; }
.todo-check svg { width: 11px; height: 11px; }
.todo-item-body { flex: 1; }
.todo-item-title { font-size: .875rem; font-weight: 600; }
.todo-item.done .todo-item-title { text-decoration: line-through; color: var(--text-2); }
.todo-item-sub   { font-size: .78rem; color: var(--text-2); margin-top: .1rem; }
.todo-item-action { font-size: .8rem; color: var(--accent); font-weight: 600; text-decoration: none; flex-shrink: 0; }
.todo-item-action:hover { text-decoration: underline; }

/* ── Service list (dashboard) ───────────────────────────────────────────────── */
.service-list-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.service-list-head { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.service-list-head-title { font-weight: 700; font-size: .875rem; display: flex; align-items: center; gap: .5rem; }
.service-list-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .1s; }
.service-list-row:last-child { border-bottom: none; }
.service-list-row:hover { background: var(--bg-3); }
.service-list-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-list-icon svg { width: 18px; height: 18px; color: var(--accent); }
.service-list-info { flex: 1; min-width: 0; }
.service-list-name { font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-list-sub  { font-size: .78rem; color: var(--text-2); margin-top: .1rem; }
.service-list-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* ── CTA box ────────────────────────────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, #0d1f3c 0%, #1e4080 100%);
  border-radius: var(--radius); padding: 1.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; box-shadow: var(--shadow);
}
.cta-box h3 { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: .25rem; }
.cta-box p  { color: rgba(255,255,255,.65); font-size: .875rem; }

/* ── Page header (inner pages) ──────────────────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, #0d1f3c 0%, #1e4080 100%);
  padding: 1.75rem 2rem; margin: -2rem -2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.page-banner h1 { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.page-banner-right { display: flex; gap: .75rem; }

/* Page action bar */
.page-actions {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-actions .search-input-wrap { flex: 1; max-width: 320px; position: relative; }
.page-actions .search-input-wrap svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.page-actions .search-input { padding-left: 2.2rem; }
.page-filter-group { display: flex; gap: .5rem; }

/* Page tabs */
.page-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.page-tab {
  padding: .65rem 1.25rem; cursor: pointer; font-weight: 600; font-size: .855rem;
  border-bottom: 2px solid transparent; color: var(--text-2); margin-bottom: -1px;
  background: none; border-left: none; border-right: none; border-top: none;
  font-family: var(--font); transition: color .15s, border-color .15s;
}
.page-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.page-tab:hover  { color: var(--text); }

/* ── Data tables ────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: .6rem .9rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--bg-3); }
.data-table td { padding: .85rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover   { background: var(--bg-3); }
.data-table-wrap { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

.table-user   { display: flex; align-items: center; gap: .65rem; }
.table-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; flex-shrink: 0; }
.table-name   { font-weight: 600; font-size: .875rem; }
.table-email  { font-size: .75rem; color: var(--text-2); }
.action-btns  { display: flex; gap: .4rem; }

/* ── Profile layout ─────────────────────────────────────────────────────────── */
.profile-layout {
  display: flex; margin: -2rem; min-height: calc(100vh - var(--topbar-h) - 37px);
}
.profile-subnav {
  width: 220px; flex-shrink: 0; background: var(--bg-2);
  border-right: 1px solid var(--border); padding: 1rem 0;
}
.profile-subnav-back {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; font-size: .845rem; font-weight: 600;
  color: var(--text-2); text-decoration: none; margin-bottom: .5rem;
  transition: color .12s;
}
.profile-subnav-back:hover { color: var(--text); text-decoration: none; }
.profile-subnav-back svg { width: 14px; height: 14px; }
.profile-subnav-divider { height: 1px; background: var(--border); margin: .5rem 0; }
.profile-subnav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem 1.1rem; font-size: .855rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  transition: background .1s, color .1s;
}
.profile-subnav-item:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
.profile-subnav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.profile-subnav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.profile-subnav-section { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: .75rem 1.1rem .25rem; }
.profile-body { flex: 1; padding: 2rem; min-width: 0; overflow: auto; }

/* Profile sections */
.profile-section { display: none; }
.profile-section.active { display: block; }
.profile-section-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.5rem; }

/* Profile info card (right side in screenshot) */
.profile-info-card {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6b 100%);
  border-radius: var(--radius); padding: 1.5rem; color: white; margin-bottom: 1.25rem;
}
.profile-info-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; color: white; margin-bottom: .75rem; border: 2px solid rgba(255,255,255,.3); overflow: hidden; }
.profile-info-name  { font-weight: 800; font-size: 1rem; }
.profile-info-email { font-size: .78rem; color: rgba(255,255,255,.65); margin-top: .15rem; }
.profile-info-meta  { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.15); }
.profile-meta-row   { display: flex; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.7); padding: .2rem 0; }
.profile-meta-label { color: rgba(255,255,255,.5); }

/* ── Services page ──────────────────────────────────────────────────────────── */
.services-tabs  { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.services-tab   { flex: 1; text-align: center; padding: .6rem 1.25rem; border: none; background: none; cursor: pointer; font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.services-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.services-tab:hover  { color: var(--text); }
.services-panel        { display: none; }
.services-panel.active { display: block; }
.services-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.service-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; position: relative; transition: border-color .2s, transform .2s; box-shadow: var(--shadow-sm); }
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.service-card-popular { border-color: var(--accent); }
.service-card-popular::after { content: 'Most Popular'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: .18rem .7rem; border-radius: var(--radius-pill); letter-spacing: .04em; white-space: nowrap; }
.service-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; }
.service-card-icon.blue   { background: var(--accent-dim); color: var(--accent); }
.service-card-icon.green  { background: var(--green-dim);  color: var(--green); }
.service-card-icon.purple { background: var(--purple-dim); color: var(--purple); }
.service-card-icon svg { width: 24px; height: 24px; }
.service-card-name { font-size: 1.1rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: .35rem; }
.service-card-desc { color: var(--text-2); font-size: .875rem; margin-bottom: 1.25rem; flex: 1; }
.service-card-price { margin-bottom: 1.25rem; }
.price-amount  { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; color: var(--text); }
.price-period  { color: var(--text-2); font-size: .875rem; margin-left: .2rem; }
.price-setup   { font-size: .8rem; color: var(--text-2); margin-top: .15rem; }
.price-onetime { font-size: .8rem; color: var(--green); font-weight: 600; margin-top: .15rem; }
.feature-list  { list-style: none; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.feature-item  { display: flex; align-items: flex-start; gap: .5rem; font-size: .855rem; }
.feature-check { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; margin-top: 2px; }

/* ── Build Package Wizard ───────────────────────────────────────────────────── */
.wizard-wrap { max-width: 820px; margin: 0 auto; }
.wizard-progress { margin-bottom: 2.5rem; }
.wizard-steps-bar { display: flex; align-items: center; gap: 0; position: relative; padding: 0 0 1rem; }
.wizard-step-item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.wizard-step-item::before { content: ''; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--border-2); z-index: 0; }
.wizard-step-item:first-child::before { display: none; }
.wizard-step-item.done::before, .wizard-step-item.active::before { background: var(--accent); }
.wizard-step-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--text-2); z-index: 1; position: relative; transition: all .2s; }
.wizard-step-item.done   .wizard-step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-step-item.active .wizard-step-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.wizard-step-label { font-size: .7rem; color: var(--text-2); margin-top: .4rem; font-weight: 600; text-align: center; }
.wizard-step-item.active .wizard-step-label { color: var(--accent); }
.wizard-step-item.done   .wizard-step-label { color: var(--text); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }
.wizard-question { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .6rem; text-align: center; }
.wizard-hint     { color: var(--text-2); font-size: 1rem; margin-bottom: 2rem; text-align: center; }
.yn-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.yn-btn { background: var(--bg-2); border: 2px solid var(--border-2); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; font-family: var(--font); transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.yn-btn:hover, .yn-btn.selected { border-color: var(--accent); background: var(--accent-dim); }
.yn-btn svg { width: 36px; height: 36px; color: var(--text-2); }
.yn-btn.selected svg { color: var(--accent); }
.yn-btn-label { font-weight: 700; font-size: 1.05rem; }
.yn-btn-sub   { font-size: .8rem; color: var(--text-2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.feature-chip { background: var(--bg-2); border: 2px solid var(--border-2); border-radius: var(--radius-sm); padding: 1rem; cursor: pointer; text-align: center; font-family: var(--font); transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.feature-chip:hover, .feature-chip.selected { border-color: var(--accent); background: var(--accent-dim); }
.feature-chip svg { width: 22px; height: 22px; color: var(--text-2); }
.feature-chip.selected svg { color: var(--accent); }
.feature-chip-label { font-size: .82rem; font-weight: 600; }
.bolt-on-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.bolt-on-chip { background: var(--bg-2); border: 2px solid var(--border-2); border-radius: var(--radius-sm); padding: 1rem 1.1rem; cursor: pointer; font-family: var(--font); transition: all .15s; display: flex; align-items: flex-start; gap: .75rem; }
.bolt-on-chip:hover, .bolt-on-chip.selected { border-color: var(--accent); background: var(--accent-dim); }
.bolt-on-chip-check { display: none; }
.bolt-on-chip.selected .bolt-on-chip-check { background: var(--accent); border-color: var(--accent); }
.bolt-on-chip-name  { font-weight: 700; font-size: .875rem; margin-bottom: .2rem; }
.bolt-on-chip-desc  { font-size: .78rem; color: var(--text-2); }
.bolt-on-chip-price { font-size: .82rem; color: var(--accent); font-weight: 600; margin-top: .3rem; }
.wizard-price-bar { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
[data-theme="dark"] .wizard-price-bar { background: var(--bg-3); }
.wizard-price-total { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.wizard-price-label { font-size: .8rem; color: var(--text-2); }
.wizard-price-breakdown { flex: 1; }
.wizard-nav-btns { display: flex; gap: .75rem; }
.wizard-summary-items { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.wizard-summary-item { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.wizard-summary-item:last-child { border-bottom: none; }
.wizard-summary-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; padding: .75rem 0; border-top: 2px solid var(--border-2); }

/* ── Reports ────────────────────────────────────────────────────────────────── */
.reports-toolbar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.reports-search  { flex: 1; min-width: 200px; max-width: 360px; }
.reports-list    { display: flex; flex-direction: column; gap: .6rem; }
.report-row { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; transition: border-color .15s; box-shadow: var(--shadow-sm); }
.report-row:hover { border-color: var(--accent); }
.report-row-meta    { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.report-row-body    { flex: 1; min-width: 0; }
.report-row-title   { font-weight: 600; font-size: .9rem; }
.report-row-sub     { font-size: .8rem; color: var(--text-2); margin-top: .15rem; }
.report-row-actions { flex-shrink: 0; }
.connect-card { text-align: center; padding: 3rem 2rem; }
.connect-card-icon { width: 60px; height: 60px; background: var(--accent-dim); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; color: var(--accent); }
.connect-card-icon svg { width: 30px; height: 30px; }
.connect-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.connect-card p  { color: var(--text-2); max-width: 380px; margin: 0 auto 1.5rem; font-size: .9rem; }

/* Reporting empty / connected states */
.reporting-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 5rem 2rem; background: var(--bg-2);
  border-radius: var(--radius); box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.reporting-empty-icon {
  width: 72px; height: 72px; border-radius: 20px;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.reporting-empty-icon svg { width: 34px; height: 34px; }
.reporting-empty-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .75rem; }
.reporting-empty-desc { color: var(--text-2); font-size: 1rem; max-width: 440px; margin: 0 auto 2rem; line-height: 1.65; }

.reporting-connected-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2); border-radius: var(--radius);
  padding: .85rem 1.25rem; margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.reporting-connected-info { display: flex; align-items: center; gap: .75rem; font-size: .9rem; font-weight: 500; }
.reporting-connected-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.analytics-field { display: flex; align-items: center; gap: .75rem; font-size: .875rem; margin-bottom: .6rem; }
.analytics-label { color: var(--text-2); min-width: 130px; font-weight: 500; }

/* ── Settings ───────────────────────────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
.settings-nav    { position: sticky; top: calc(var(--topbar-h) + 1rem); display: flex; flex-direction: column; gap: .2rem; }
.settings-nav-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .855rem; font-weight: 500; text-decoration: none; transition: background .12s, color .12s; }
.settings-nav-link:hover  { background: var(--bg-3); color: var(--text); text-decoration: none; }
.settings-nav-link.active { background: var(--accent-dim); color: var(--accent); }
.settings-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.settings-section        { display: none; }
.settings-section.active { display: block; }
.settings-section-title  { font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.25rem; }
.connection-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.connection-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.connection-info { flex: 1; }
.connection-name { font-weight: 700; font-size: .9rem; }
.connection-status { font-size: .8rem; color: var(--text-2); margin-top: .1rem; }

/* ── Refer a Friend ─────────────────────────────────────────────────────────── */
.refer-hero { background: linear-gradient(135deg, #0d1f3c 0%, #1e4080 100%); border-radius: var(--radius); padding: 2.5rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.refer-hero h2 { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.03em; margin-bottom: .4rem; }
.refer-hero p  { color: rgba(255,255,255,.65); max-width: 480px; font-size: .875rem; }
.refer-link-box { display: flex; align-items: center; gap: .75rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-sm); padding: .6rem 1rem; margin-top: 1.5rem; max-width: 540px; }
.refer-link-url { flex: 1; font-size: .845rem; color: rgba(255,255,255,.8); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refer-copy-btn { background: #00b4e4; color: #fff; border: none; border-radius: var(--radius-xs); padding: .35rem .85rem; font-weight: 700; font-size: .8rem; cursor: pointer; font-family: var(--font); flex-shrink: 0; }
.refer-copy-btn:hover { background: #009acf; }
.refer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.refer-stat  { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow-sm); }
.refer-stat-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: .4rem; }
.refer-stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; }

/* ── Generic card component (used in admin + some client pages) ──────────────── */
.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-title { font-size: .925rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
/* Pad direct form/paragraph children of cards (admin views without explicit card-body) */
.card > form { padding: 1.25rem; }
.card > p.text-muted { padding: .75rem 1.25rem 0; }

/* ── Section box (admin announcements / login-editor / site settings) ────────── */
.section-box { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1.5rem; padding: 1.25rem; }
.section-box-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); margin: -1.25rem -1.25rem 1.25rem; }
.section-box-title { font-size: .9rem; font-weight: 700; }

/* ── Client header card (admin user-detail) ──────────────────────────────────── */
.client-header-card { padding: 1.25rem; }
.client-header-info { flex: 1; min-width: 0; }
.client-badges { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Admin package cards ─────────────────────────────────────────────────────── */
.package-card { padding: 1.25rem; }
.package-items { margin-bottom: .5rem; }

/* ── Admin reports list ──────────────────────────────────────────────────────── */
.reports-admin-list { display: flex; flex-direction: column; gap: 0; padding: 0 1.25rem; }
.report-admin-row { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--border); gap: 1rem; }
.report-admin-row:last-child { border-bottom: none; }

/* ── Admin stats ────────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat-card-amber { background: rgba(245,159,11,.06); border-color: rgba(245,159,11,.2); }
.stat-card-amber .stat-label { color: rgba(245,159,11,.8); }
.stat-card-amber .stat-value { color: #f59e0b; }
.stat-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: .5rem; }
.stat-value { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.activity-feed  { display: flex; flex-direction: column; }
.activity-item  { display: flex; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.activity-action  { font-size: .855rem; }
.activity-details { font-size: .77rem; color: var(--text-2); margin-top: .1rem; }
.activity-time    { font-size: .75rem; color: var(--text-3); margin-top: .15rem; }
.sub-row { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.sub-row:last-of-type { border-bottom: none; }
.sub-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .25rem; }
.sub-row-meta   { font-size: .8rem; color: var(--text-2); }
.packages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.package-card-header  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.package-card-name    { font-size: 1rem; font-weight: 700; }
.package-card-date    { font-size: .78rem; color: var(--text-2); margin-bottom: .85rem; }
.package-item-row     { display: flex; justify-content: space-between; font-size: .85rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.package-total-row    { display: flex; justify-content: space-between; font-weight: 700; font-size: .875rem; padding-top: .65rem; margin-top: .25rem; border-top: 1px solid var(--border-2); }
.client-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.client-avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; flex-shrink: 0; }
.client-name  { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .25rem; }
.client-meta  { display: flex; gap: .5rem; font-size: .85rem; color: var(--text-2); flex-wrap: wrap; align-items: center; }

/* ── Admin search / actions ─────────────────────────────────────────────────── */
.search-form  { display: flex; gap: .5rem; flex: 1; }
.search-form .form-input { max-width: 320px; }

/* ── Auth layout ────────────────────────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: 460px 1fr; min-height: 100vh; width: 100%; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 3.5rem 3rem; background: var(--bg-2); border-right: 1px solid var(--border); position: relative; }
.auth-panel-inner { width: 100%; max-width: 360px; }
.auth-logo { display: flex; align-items: center; gap: .7rem; margin-bottom: 3rem; }
.auth-logo-img  { height: 34px; width: auto; object-fit: contain; }
.auth-logo-mark { width: 32px; height: 32px; background: var(--accent); border-radius: 9px; flex-shrink: 0; }
.auth-logo-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -.03em; }
.auth-heading { font-size: 1.8rem; font-weight: 800; margin-bottom: .4rem; letter-spacing: -.04em; }
.auth-sub     { color: var(--text-2); margin-bottom: 2.25rem; font-size: .9rem; }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-switch  { margin-top: 2rem; font-size: .875rem; color: var(--text-2); text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 500; }
.auth-visual { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 3rem; background: linear-gradient(135deg, #0d1f3c 0%, #1e4080 100%); }
.auth-visual-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 52px 52px; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(90px); animation: drift 12s ease-in-out infinite; }
.auth-orb-1 { width: 400px; height: 400px; background: rgba(0,180,228,.15); top: -100px; right: -80px; }
.auth-orb-2 { width: 300px; height: 300px; background: rgba(0,150,214,.1); top: 40%; left: 5%; animation-delay: -5s; }
.auth-orb-3 { width: 220px; height: 220px; background: rgba(139,92,246,.08); bottom: -60px; right: 15%; animation-delay: -9s; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-20px,-25px) scale(1.07); } }
.auth-visual-content { position: relative; z-index: 1; text-align: center; }
.auth-visual-content h2 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin-bottom: .75rem; color: #fff; }
.auth-visual-content p  { color: rgba(255,255,255,.65); max-width: 320px; margin: 0 auto; font-size: .95rem; }

/* ── Loading ────────────────────────────────────────────────────────────────── */
.loading-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }
.loading-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 2.5rem; opacity: 0; transform: translateY(12px); animation: fadeUp .5s ease forwards; }
.loading-logo-img  { height: 40px; width: auto; object-fit: contain; }
.loading-logo-mark { width: 40px; height: 40px; background: var(--accent); border-radius: 11px; }
.loading-logo-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; }
.loading-bar-track { width: 220px; height: 3px; background: var(--border-2); border-radius: var(--radius-pill); overflow: hidden; opacity: 0; animation: fadeUp .5s ease .2s forwards; }
.loading-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); border-radius: var(--radius-pill); width: 0%; animation: loadBar 1.6s ease .3s forwards; }
.loading-label     { margin-top: 1.25rem; font-size: .8rem; color: var(--text-3); letter-spacing: .05em; opacity: 0; animation: fadeUp .5s ease .3s forwards; }
@keyframes loadBar { 0% { width: 0%; } 60% { width: 75%; } 85% { width: 90%; } 100% { width: 100%; } }
@keyframes fadeUp  { to { opacity: 1; transform: translateY(0); } }

/* ── Error page ─────────────────────────────────────────────────────────────── */
.error-page    { text-align: center; padding: 6rem 1rem; }
.error-code    { font-size: 7rem; font-weight: 800; color: var(--accent); letter-spacing: -.06em; line-height: 1; margin-bottom: .5rem; }
.error-title   { font-size: 1.75rem; font-weight: 700; margin-bottom: .5rem; }
.error-message { color: var(--text-2); margin-bottom: 2rem; }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-2); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .25; }
.empty-state h3  { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.empty-state p   { max-width: 340px; margin: 0 auto; font-size: .875rem; }

/* ── Bento compat ───────────────────────────────────────────────────────────── */
.dash-bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.1rem; margin-bottom: 1.5rem; }
.bento-span-4  { grid-column: span 4; }
.bento-span-5  { grid-column: span 5; }
.bento-span-6  { grid-column: span 6; }
.bento-span-7  { grid-column: span 7; }
.bento-span-8  { grid-column: span 8; }
.bento-span-12 { grid-column: span 12; }
.bento-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.bento-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: .65rem; }
.bento-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.bento-sub   { font-size: .8rem; color: var(--text-2); margin-top: .2rem; }
.bento-link  { font-size: .8rem; color: var(--accent); margin-top: .75rem; display: inline-block; }

/* ── Notifications (in notif-wrap) ─────────────────────────────────────────── */
.notif-wrap { position: relative; }
.notif-btn  { position: relative; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; background: var(--red); border-radius: var(--radius-pill); border: 2px solid var(--topbar-bg); font-size: .6rem; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.notif-count.hidden { display: none; }
.notif-dropdown { width: 340px; }

/* User wrap */
.user-wrap { position: relative; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stats-item:nth-child(3) { border-right: none; }
  .stats-item:nth-child(4), .stats-item:nth-child(5) { border-top: 1px solid var(--border); }
}
@media (max-width: 1024px) {
  .dash-bento { grid-template-columns: 1fr 1fr; }
  .bento-span-4,.bento-span-5,.bento-span-6,.bento-span-7,.bento-span-8 { grid-column: span 1; }
  .bento-span-12 { grid-column: span 2; }
  .services-bento { grid-template-columns: 1fr 1fr; }
  .admin-grid-2   { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; margin-bottom: 1.25rem; }
  .refer-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .topbar-logo { width: auto; }
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; transition: transform .22s ease, width .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .portal-main { margin-left: 0 !important; }
  .hamburger { display: flex !important; }
  .profile-layout { flex-direction: column; }
  .profile-subnav { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .portal-content { padding: 1.25rem 1rem; }
  .welcome-banner { padding: 1.25rem 1rem; margin: -1.25rem -1rem 1.25rem; }
  .page-banner { padding: 1.25rem 1rem; margin: -1.25rem -1rem 1.5rem; }

  .services-bento { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .refer-stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .bolt-on-grid { grid-template-columns: 1fr; }
  .yn-choice { grid-template-columns: 1fr; }
  .topbar-reward span { display: none; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   NEW LAYOUT SUPPLEMENT
   ───────────────────────────────────────────────────────────────────────────── */

/* Topbar — new structure */
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-hamburger {
  display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer; padding: .5rem; flex-shrink: 0;
}
.topbar-hamburger span { display: block; height: 2px; border-radius: 1px; background: var(--text-2); width: 18px; transition: all .2s; }
@media (max-width: 900px) { .topbar-hamburger { display: flex; } }

.topbar-logo-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.topbar-logo-link:hover { text-decoration: none; opacity: .85; }
.topbar-logo-name { font-size: .95rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }

.topbar-user { position: relative; }

/* Theme toggle — sun/moon icon switching */
.icon-sun  { display: block; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* (collapse icon classes handled by sidebar-float-btn rules) */

/* Nav group label — new template uses .nav-group-label, CSS has .nav-group-label-text */
.nav-group-label { flex: 1; transition: opacity .15s, max-width .22s; max-width: 180px; overflow: hidden; }
.sidebar.collapsed .nav-group-label { opacity: 0; max-width: 0; }

/* Breadcrumb bar */
.breadcrumb-bar { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--text-2); padding: .65rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.breadcrumb-link { color: var(--text-2); text-decoration: none; font-weight: 500; }
.breadcrumb-link:hover { color: var(--accent); }

/* Dropdowns — position + show/hide */
.notif-wrap { position: relative; }
.notif-wrap .notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 600; display: none;
}
.notif-wrap .notif-dropdown.open { display: block; }

.topbar-user .user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 600; display: none;
}
.topbar-user .user-dropdown.open { display: block; }

/* Welcome banner new text classes */
.welcome-banner-content { flex: 1; }
.welcome-banner-title { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.welcome-banner-sub   { color: rgba(255,255,255,.65); font-size: .875rem; margin-top: .2rem; }

/* Ghost-light button (for dark banner backgrounds) */
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,.22); opacity: 1; }

/* Accent button alias */
.btn-accent { background: #00b4e4; color: #fff; box-shadow: 0 2px 10px rgba(0,180,228,.3); }
.btn-accent:hover { background: #009acf; opacity: 1; }

/* Stat boxes (inside stats-strip) */
.stats-strip .stat-box {
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.1rem 1.25rem; border-right: 1px solid var(--border);
}
.stats-strip .stat-box:last-child { border-right: none; }
.stat-box-icon { color: var(--accent); margin-bottom: .35rem; opacity: .7; }
.stat-box-num   { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.stat-box-label { font-size: .72rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-top: .1rem; }

/* Todo checklist (new style) */
.todo-checklist { padding: 0 1.25rem; }
.todo-check-item { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.todo-check-item:last-child { border-bottom: none; }
.todo-check-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-2); color: var(--text-3); margin-top: .1rem;
}
.todo-check-item.done .todo-check-icon { background: var(--green); border-color: var(--green); color: #fff; }
.todo-check-body   { flex: 1; }
.todo-check-label  { font-size: .875rem; font-weight: 600; display: block; }
.todo-check-item.done .todo-check-label { color: var(--text-2); text-decoration: line-through; }
.todo-check-action { font-size: .8rem; color: var(--accent); font-weight: 600; text-decoration: none; display: inline-block; margin-top: .2rem; }
.todo-check-action:hover { text-decoration: underline; }

/* Section label */
.section-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: .6rem; }

/* Service rows (new dashboard) */
.service-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .1s; }
.service-row:last-child { border-bottom: none; }
.service-row:hover { background: var(--bg-3); }
.service-row-left  { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; }
.service-row-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; flex-wrap: wrap; }
.service-row-info  { min-width: 0; }
.service-row-name  { font-size: .875rem; font-weight: 600; display: block; }
.service-row-domain { font-size: .78rem; color: var(--text-2); display: block; margin-top: .1rem; }

/* CTA box text classes */
.cta-box-content { flex: 1; }
.cta-box-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: .25rem; }
.cta-box-sub   { color: rgba(255,255,255,.65); font-size: .875rem; }

/* Explore/product cards */
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.explore-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  text-decoration: none; color: inherit; transition: border-color .2s, transform .15s;
  box-shadow: var(--shadow-sm);
}
.explore-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; color: inherit; }
.explore-card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-4); display: flex; align-items: center; justify-content: center; color: var(--text-2); margin-bottom: .25rem; }
.explore-card-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.explore-card-name { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.explore-card-desc { font-size: .84rem; color: var(--text-2); flex: 1; line-height: 1.5; }
.explore-card-arrow { font-size: .82rem; font-weight: 600; color: var(--text-2); margin-top: .25rem; }
@media (max-width: 900px) { .explore-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .explore-grid { grid-template-columns: 1fr; } }

/* Data table header */
.data-table-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); gap: .75rem; flex-wrap: wrap; }
.data-table-title  { font-size: .875rem; font-weight: 700; }
.data-table-search { display: flex; gap: .5rem; }

/* Page tabs wrap */
.page-tabs-wrap { padding: 0; }
.page-tabs-wrap .page-tabs { padding: 0 1.25rem; margin-bottom: 0; border-bottom: 1px solid var(--border); }

/* Panel card */
.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-title  { font-size: .9rem; font-weight: 700; }
.panel-body   { padding: 1.5rem 1.25rem; }

/* Form grid (billing info, profile) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field-full { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-field-full { grid-column: span 1; }
}

/* Profile sub-nav link */
.profile-subnav-head { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: .75rem 1.1rem .4rem; }
.profile-subnav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem 1.1rem; font-size: .855rem; font-weight: 500;
  color: var(--text-2); text-decoration: none; transition: background .1s, color .1s;
}
.profile-subnav-link:hover  { background: var(--bg-3); color: var(--text); text-decoration: none; }
.profile-subnav-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.profile-subnav-link svg    { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-2); }

/* Profile section display */
.profile-section        { display: none; }
.profile-section.active { display: block; }

/* Sidebar order btn label collapse */
.sidebar.collapsed .sidebar-order-btn .nav-label { opacity: 0; max-width: 0; }
.sidebar-order-btn .nav-label { transition: opacity .15s, max-width .22s; max-width: 200px; overflow: hidden; white-space: nowrap; }

/* Page tab full-width */
.page-tab { flex: 1; text-align: center; }

/* Card flatness overrides — no border, shadow only */
.panel { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.data-table-wrap { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.todo-card { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.service-list-card { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.stats-strip { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.explore-card { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.box { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.report-row { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }
.bento-card { border: none; box-shadow: 0 2px 20px rgba(0,0,0,.06); }

/* Stat box as link */
a.stat-box { text-decoration: none; color: inherit; transition: background .12s; }
a.stat-box:hover { background: var(--bg-3); text-decoration: none; color: inherit; }
a.stat-box:hover .stat-box-num { color: var(--accent); }

/* Section sub text */
.section-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 1.25rem; }

/* Wizard full-width panels */
.yn-choice { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Dark mode sidebar: no right border */
[data-theme="dark"] .sidebar { border-right-color: rgba(255,255,255,.07); }

/* Topbar logo in collapsed sidebar state */
#sidebar.collapsed ~ .portal-main .topbar-logo-name { /* stays visible - logo is in topbar not sidebar */ }

/* Breadcrumb bar in portal-main */
.portal-main .breadcrumb-bar { margin: 0 -2rem; width: calc(100% + 4rem); position: sticky; top: 0; z-index: 10; }

/* Bolt-on tags */
.bolt-on-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.bolt-tag { font-size: .72rem; padding: .15rem .5rem; background: var(--bg-4); color: var(--text-2); border-radius: var(--radius-pill); border: 1px solid var(--border); font-weight: 500; }

/* Page banner sub-text */
.page-banner-content { flex: 1; }
.page-banner-title   { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.page-banner-sub     { color: rgba(255,255,255,.65); font-size: .875rem; margin-top: .2rem; }

/* Empty state p/span fix */
.empty-state span { display: block; max-width: 340px; margin: .4rem auto 0; font-size: .875rem; }

/* ── Flatness overrides — remove borders, use shadows only ────────────────── */
.panel            { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.data-table-wrap  { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.todo-card        { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.service-list-card{ border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.stats-strip      { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.explore-card     { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.box              { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.report-row       { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; margin-bottom:.5rem; }
.bento-card       { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.service-card     { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.refer-stat       { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.stat-card        { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.connection-card  { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.card             { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
.section-box      { border: none !important; box-shadow: 0 2px 20px rgba(0,0,0,.06) !important; }
/* Hover on service cards still lifts slightly */
.service-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.12) !important; border: 1px solid var(--accent) !important; }

/* ── Stat box with icon ────────────────────────────────────────────────────── */
.stats-strip .stat-box {
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.1rem 1.4rem; border-right: 1px solid var(--border);
}
.stats-strip .stat-box:last-child { border-right: none; }
.stat-box-icon { color: var(--accent); margin-bottom: .4rem; opacity: .75; }
.stat-box-num  { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.stat-box-label{ font-size: .72rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-top: .1rem; }
a.stat-box { text-decoration: none; color: inherit; transition: background .12s; }
a.stat-box:hover { background: var(--bg-3); text-decoration: none; color: inherit; }
a.stat-box:hover .stat-box-num { color: var(--accent); }

/* ── Full-width tabs ───────────────────────────────────────────────────────── */
.todo-tab  { flex: 1; text-align: center; }
.page-tab  { flex: 1; text-align: center; }
.services-tab { flex: 1; text-align: center; }

/* ── Sidebar text color fix for white bg ──────────────────────────────────── */
.nav-group-trigger { color: var(--sidebar-text); }
.nav-group-trigger:hover { color: var(--sidebar-text-hover); }
.nav-group-trigger.active { color: var(--accent); }
.nav-chevron { color: var(--text-3); }
.nav-child { color: var(--text-2); }
.nav-child:hover { color: var(--text); background: var(--bg-3); }
.nav-child.active { color: var(--accent); background: var(--accent-dim); }
/* Dark mode: restore white text */
[data-theme="dark"] .nav-group-trigger { color: rgba(255,255,255,.68); }
[data-theme="dark"] .nav-group-trigger:hover { color: #fff; }
[data-theme="dark"] .nav-group-trigger.active { color: #00b4e4; }
[data-theme="dark"] .nav-child { color: rgba(255,255,255,.6); }
[data-theme="dark"] .nav-child:hover { color: #fff; background: rgba(255,255,255,.07); }
[data-theme="dark"] .nav-child.active { color: #fff; background: rgba(255,255,255,.1); }
[data-theme="dark"] .nav-item { color: rgba(255,255,255,.68); }
[data-theme="dark"] .nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
[data-theme="dark"] .nav-item.active { color: #fff; background: rgba(255,255,255,.13); }
[data-theme="dark"] .nav-chevron { color: rgba(255,255,255,.35); }
[data-theme="dark"] .sidebar-order-btn { background: #00b4e4; color: #fff; }

/* ── Breadcrumb fix — no negative margin ──────────────────────────────────── */
.portal-main .breadcrumb-bar {
  margin: 0; width: 100%; position: relative; z-index: 10;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  padding: .6rem 2rem;
}

/* ── Section sub ───────────────────────────────────────────────────────────── */
.section-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 1.25rem; }

/* ── Build-package full width + flat ──────────────────────────────────────── */
.yn-choice { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ── Topbar — topbar-avatar button ────────────────────────────────────────── */
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-dim); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem; color: var(--accent);
  cursor: pointer; font-family: var(--font);
}
.topbar-avatar:hover { background: var(--accent); color: #fff; }
