/* ============================================================
   CGX HUB — Databox-style Dark Dashboard
   ============================================================ */

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

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

/* Bebas Neue for headings, logo, big numbers, KPI values */
h1, h2, h3, .logo-text, .widget-value, .topbar-title, .sidebar-logo,
.kpi-value, .big-number, .widget-title, .admin-badge, .login-title {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  letter-spacing: 1.5px;
  font-weight: 400;
}

:root {
  --bg:          #0d0d0d;
  --bg-dark:     #0a0a0a;
  --sidebar-bg:  #111111;
  --card-bg:     #2260cc;
  --card-hover:  #2a6ee0;
  --accent:      #4d8aff;
  --accent-light:#6fa0ff;
  --green:       #00c853;
  --red:         #ff3d3d;
  --yellow:      #ffc107;
  --white:       #ffffff;
  --white-70:    rgba(255,255,255,0.7);
  --white-40:    rgba(255,255,255,0.4);
  --white-15:    rgba(255,255,255,0.15);
  --white-08:    rgba(255,255,255,0.08);
  --shadow:      0 4px 20px rgba(0,0,0,0.35);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.25);
  --radius:      12px;
  --radius-sm:   8px;
  --sidebar-w:   240px;
  --topbar-h:    80px;
  --font:        'Inter', -apple-system, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: #0d0d0d;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, select { font-family: var(--font); outline: none; }

/* ── App Shell ──────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #111111;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: width 0.3s ease;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--white-08);
  text-decoration: none;
}

.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--white);
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px 8px 16px;
  cursor: pointer;
  user-select: none;
}
.sidebar-section-header:hover .sidebar-section-label { color: var(--white-70); }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--white-40);
  text-transform: uppercase;
}

.sidebar-badge {
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  color: var(--white-40);
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.clients-chevron {
  font-size: 11px;
  color: var(--white-40);
}

.btn-add-client-inline {
  height: 24px;
  padding: 0 10px;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 4px;
  color: var(--white-70);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-add-client-inline:hover { background: var(--accent); color: white; border-color: var(--accent); }

.sidebar-client {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  font-weight: 500;
}

.sidebar-client:hover { background: var(--white-08); }
.sidebar-client.active { background: var(--accent); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--white-40);
}
.status-dot.active { background: var(--green); }
.status-dot.inactive { background: var(--red); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--white-08);
}

.btn-add-client {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--white-08);
  color: var(--white-70);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.btn-add-client:hover { background: var(--white-15); color: var(--white); }

/* ── Main content ────────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 50;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.topbar-logo .logo-icon {
  width: 28px; height: 28px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.topbar-client-name {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--white-70);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-updated {
  font-size: 11px;
  color: var(--white-40);
}

.badge-admin {
  background: #ff6b35;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.btn-edit-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--white-08);
  color: var(--white-70);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.btn-edit-mode:hover { background: var(--white-15); color: var(--white); }
.btn-edit-mode.active { background: var(--accent); color: var(--white); }

/* ── Dashboard Area ──────────────────────────────────────────── */
.dashboard-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Bottom resize bar on widgets */
.widget-resize-bar {
  display: none;
  width: 100%;
  height: 14px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--white-08);
  cursor: row-resize;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--white-40);
  letter-spacing: 3px;
  user-select: none;
  flex-shrink: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background 0.15s, color 0.15s;
}
.widget-resize-bar:hover {
  background: var(--accent);
  color: var(--white);
}
.edit-mode .widget-resize-bar { display: flex; }

/* 12-column CSS grid */
.dashboard-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
}

/* Gridstack takes over widget grid layout; this element is now .grid-stack */
.grid-stack {
  flex: 1;
  min-width: 0;
}

/* Width variants */
.w-full      { width: 100%; }
.w-half      { width: calc(50% - 8px); }
.w-third     { width: calc(33.333% - 11px); }
.w-quarter   { width: calc(25% - 12px); }
.w-two-third { width: calc(66.666% - 6px); }
.w-sixth     { width: calc(16.666% - 14px); }

/* ── Widget Card ─────────────────────────────────────────────── */
.widget-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.widget-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}



/* Widget Header */
.widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 8px;
  gap: 8px;
}

.widget-title-group { flex: 1; min-width: 0; }

.widget-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-daterange {
  font-size: 10px;
  color: var(--white-40);
  margin-top: 2px;
}

.widget-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Date range picker button */
.date-btn {
  font-size: 10px;
  font-weight: 500;
  color: var(--white-70);
  background: var(--white-08);
  border-radius: 6px;
  padding: 4px 8px;
  transition: background 0.15s;
  white-space: nowrap;
}
.date-btn:hover { background: var(--white-15); color: var(--white); }

/* Date range dropdown */
.date-dropdown {
  position: fixed;
  background: #0f2460;
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 9999;
  min-width: 150px;
  max-height: 280px;
  overflow-y: auto;
}

.date-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--white-70);
  background: transparent;
  transition: background 0.1s;
}
.date-dropdown button:hover { background: var(--white-08); color: var(--white); }
.date-dropdown button.active { color: var(--accent-light); font-weight: 600; }

/* Chart type switcher (admin only) */
.chart-type-switcher {
  display: flex;
  gap: 3px;
}

.chart-type-btn {
  width: 24px; height: 24px;
  background: var(--white-08);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--white-40);
  transition: background 0.15s, color 0.15s;
}
.chart-type-btn:hover { background: var(--white-15); color: var(--white); }
.chart-type-btn.active { background: var(--accent); color: var(--white); }

/* Widget Body */
.widget-body {
  padding: 4px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Chart wrapper — gives Chart.js a real height to work with */
.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 140px;
  width: 100%;
}

.chart-wrap canvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Big Number */
.big-number-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 0;
}

.big-number-value {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--white);
  margin: 8px 0 6px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
}

.big-number-value.medium { font-size: 40px; }
.big-number-value.small  { font-size: 30px; }

.widget-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.trend-up   { color: var(--green); }
.trend-down { color: var(--red); }
.trend-neutral { color: var(--white-40); }

.trend-arrow { font-size: 14px; }

.trend-prev {
  color: var(--white-40);
  font-size: 11px;
}

/* Chart container */
.chart-container {
  position: relative;
  margin-top: 8px;
  flex: 1;
  min-height: 120px;
}

.chart-container canvas {
  max-width: 100%;
}

/* Donut centre label */
.donut-wrap {
  position: relative;
  flex: 1;
  min-height: 140px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.donut-center {
  position: absolute;
  text-align: center;
  pointer-events: none;
}
.donut-center-value {
  font-size: 22px;
  font-weight: 800;
}
.donut-center-label {
  font-size: 10px;
  color: var(--white-40);
  margin-top: 2px;
}

/* Table widget */
.table-widget {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table-widget th {
  text-align: left;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--white-40);
  border-bottom: 1px solid var(--white-08);
}

.table-widget td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--white-08);
  color: var(--white-70);
}

.table-widget tr:last-child td { border-bottom: none; }

.table-widget td.value-cell {
  text-align: right;
  color: var(--white);
  font-weight: 600;
}

.table-rank {
  color: var(--white-40);
  font-size: 11px;
  width: 20px;
}

/* Comparison widget */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.comparison-item {
  background: var(--white-08);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.comparison-label {
  font-size: 10px;
  color: var(--white-40);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.comparison-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}

/* Gauge */
.gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gauge-value {
  font-size: 36px;
  font-weight: 800;
}

.gauge-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--white-15);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.gauge-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.8s ease;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--white-08) 25%, var(--white-15) 50%, var(--white-08) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}
.skeleton-big { height: 50px; width: 60%; margin: 12px 0; }

/* Error state */
.widget-error {
  text-align: center;
  padding: 20px;
  color: var(--red);
  font-size: 12px;
}

/* Empty state */
.widget-empty {
  text-align: center;
  padding: 20px;
  color: var(--white-40);
  font-size: 12px;
}

/* ── LOGIN PAGE ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-logo {
  margin-bottom: 28px;
}

.login-logo .logo-mark {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
}

.login-logo p {
  font-size: 12px;
  color: var(--white-40);
  margin-top: 4px;
}

.login-form { text-align: left; }

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--white-70);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--white);
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--accent-light);
  background: var(--white-15);
}
.form-group input::placeholder { color: var(--white-40); }

.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}
.btn-login:hover { background: var(--accent-light); }
.btn-login:active { transform: scale(0.98); }

.login-error {
  background: rgba(255,61,61,0.15);
  border: 1px solid rgba(255,61,61,0.3);
  color: var(--red);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  display: none;
}
.login-error.show { display: block; }

.login-divider {
  text-align: center;
  margin: 20px 0 12px;
  font-size: 11px;
  color: var(--white-40);
}

.btn-admin-link {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--white-70);
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.btn-admin-link:hover { background: var(--white-08); border-color: var(--white-40); }

/* ── Blank Dashboard ─────────────────────────────────────────── */
.blank-dashboard {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
}
.blank-dashboard-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.blank-dashboard-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; font-family: 'Bebas Neue', sans-serif; letter-spacing: 1px; }
.blank-dashboard-desc { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 24px; }
.blank-add-btn {
  padding: 12px 28px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.blank-add-btn:hover { background: var(--accent-light); transform: scale(1.03); }

/* ── Dashboard Tabs ──────────────────────────────────────────── */
.dashboard-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 16px 0;
  flex-wrap: wrap;
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.dashboard-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: all 0.15s;
  user-select: none;
}
.dashboard-tab:hover { background: rgba(255,255,255,0.1); color: white; }
.dashboard-tab.active {
  background: var(--card-bg);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}

.tab-delete {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.tab-delete:hover { color: #ff3d3d; }

.add-dashboard-btn {
  padding: 7px 14px;
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.add-dashboard-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(77,138,255,0.08); }

/* ── Edit Sidebar ────────────────────────────────────────────── */
.edit-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--white-08);
  border-radius: var(--radius);
  padding: 0;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky;
  top: 16px;
}

.edit-sidebar-header {
  font-size: 13px;
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--white-08);
  letter-spacing: 0.5px;
}

.edit-sidebar-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--white-08);
}

.edit-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white-40);
  margin-bottom: 8px;
}

.edit-sidebar-desc {
  font-size: 12px;
  color: var(--white-70);
  margin-bottom: 10px;
}

/* Chart type grid in sidebar */
.chart-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.chart-type-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: var(--white-08);
  border: 1px solid var(--white-08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.chart-type-grid-btn:hover { background: var(--white-15); border-color: var(--white-15); }
.chart-type-grid-btn.active { background: var(--accent); border-color: var(--accent); }
.ct-icon { font-size: 16px; }
.ct-label { font-size: 9px; color: var(--white-70); text-transform: uppercase; letter-spacing: 0.5px; }
.chart-type-grid-btn.active .ct-label { color: white; }

/* Size buttons in sidebar */
.size-btn-group {
  display: flex;
  gap: 6px;
}
.size-btn-group button {
  flex: 1;
  padding: 8px 0;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 6px;
  color: var(--white-70);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.size-btn-group button:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Colour panel */
.colour-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.colour-swatch-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.colour-swatch-label {
  font-size: 10px;
  color: var(--white-40);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.colour-swatch-group input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid var(--white-15);
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 2px;
}
.colour-presets { margin-bottom: 10px; }
.colour-preset-label {
  font-size: 10px;
  color: var(--white-40);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.colour-preset-row { display: flex; gap: 6px; }
.colour-preset {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.colour-preset:hover { border-color: white; transform: scale(1.1); }
.colour-divider {
  height: 1px;
  background: var(--white-08);
  margin: 12px 0;
}

/* Chart palette grid */
.chart-palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 10px;
}
.chart-palette-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 6px;
  background: var(--white-08);
  border: 1px solid var(--white-08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 10px;
  color: var(--white-70);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chart-palette-btn:hover { background: var(--white-15); border-color: var(--white-15); }
.chart-palette-btn.active { border-color: var(--accent); background: rgba(77,138,255,0.15); color: white; }
.palette-dots {
  display: flex;
  gap: 3px;
}
.palette-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.colour-reset-btn {
  width: 100%;
  padding: 6px;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 6px;
  color: var(--white-70);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.colour-reset-btn:hover { background: var(--white-15); }

/* Metric library */
.metric-lib-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.metric-lib-item:hover { background: var(--white-08); }

/* Selected widget highlight */
.widget-card.widget-selected {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ── Client Action Bar ───────────────────────────────────────── */
.client-action-bar {
  display: flex;
  gap: 10px;
  padding: 12px 0 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.cab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.cab-btn:hover { background: var(--accent); border-color: var(--accent); }
.cab-icon { font-size: 16px; }

.cab-panel {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.cab-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cab-close {
  background: transparent;
  border: none;
  color: var(--white-70);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}
.cab-panel-desc { font-size: 13px; color: var(--white-70); margin-bottom: 16px; }

/* Data Sources */
.ds-grid { display: flex; flex-direction: column; gap: 8px; }
.ds-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white-08);
  border-radius: 8px;
  border: 1px solid var(--white-08);
}
.ds-card.connected { border-color: rgba(0,200,83,0.4); background: rgba(0,200,83,0.06); }
.ds-icon { font-size: 24px; flex-shrink: 0; }
.ds-info { flex: 1; }
.ds-name { font-size: 13px; font-weight: 700; }
.ds-desc { font-size: 11px; color: var(--white-70); margin-top: 2px; }
.ds-type { font-size: 10px; color: var(--white-40); margin-top: 3px; }
.ds-connect {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.ds-connect.connected-btn { background: rgba(0,200,83,0.2); color: #4ade80; }

/* To Dos */
.todo-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.todo-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 8px;
  color: white;
  font-size: 13px;
}
.todo-add-btn {
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--white-08);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}
.todo-item.done span { text-decoration: line-through; opacity: 0.5; }
.todo-del { background: transparent; border: none; color: var(--white-40); cursor: pointer; margin-left: auto; }
.todo-empty { color: var(--white-40); font-size: 13px; padding: 12px 0; }

/* Client Info */
.info-form { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; flex-direction: column; gap: 4px; }
.info-row label { font-size: 11px; font-weight: 600; color: var(--white-70); text-transform: uppercase; letter-spacing: 0.5px; }
.info-row input, .info-row textarea {
  padding: 8px 12px;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-family: inherit;
}
.info-row textarea { min-height: 80px; resize: vertical; }
.info-save-btn {
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}

/* ── Portal Toggle ───────────────────────────────────────────── */
.portal-toggle {
  display: flex;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.portal-toggle button {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white-70);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.portal-toggle button.active {
  background: var(--accent);
  color: var(--white);
}
.portal-toggle button:hover:not(.active) {
  background: var(--white-08);
  color: var(--white);
}

/* ── Logo ────────────────────────────────────────────────────── */
.logo-img, img[alt="CGX"] {
  filter: brightness(0) invert(1);
  height: 44px !important;
  mix-blend-mode: screen;
  background: transparent;
}

/* ── Global range selector ───────────────────────────────────── */
.global-range-select {
  background: var(--white-08);
  border: 1px solid var(--white-15);
  color: var(--white-70);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.global-range-select:hover { background: var(--white-15); color: var(--white); }
.global-range-select option { background: #0f2460; color: var(--white); }

/* ── Size controls (edit mode only) ─────────────────────────── */
.size-controls {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--white-08);
}
.edit-mode .size-controls { display: flex; }

.size-controls-btns {
  display: flex;
  gap: 3px;
  align-items: center;
}

.size-controls button {
  height: 26px;
  padding: 0 10px;
  background: var(--white-08);
  border: 1px solid var(--white-15);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white-70);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.size-controls button:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.size-controls button.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* Bottom resize bar */
.widget-resize-bar {
  height: 14px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--white-08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  font-size: 10px;
  color: var(--white-40);
  letter-spacing: 3px;
  transition: background 0.15s, color 0.15s;
  border-radius: 0 0 var(--radius) var(--radius);
  flex-shrink: 0;
}
.widget-resize-bar:hover {
  background: var(--accent);
  color: var(--white);
}

/* Trash button in move bar */
.widget-delete-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 0 6px;
  opacity: 0.5;
  transition: opacity 0.15s;
  margin-left: auto;
  line-height: 1;
}
.widget-delete-btn:hover { opacity: 1; }

/* Hidden metric in library */
.metric-lib-item.metric-hidden { opacity: 0.5; }
.metric-lib-item.metric-hidden:hover { opacity: 1; background: rgba(0,200,83,0.08); }
.metric-add-btn {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  background: rgba(0,200,83,0.1);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Drag handle inside size bar — full width move button */
.size-controls .drag-handle {
  position: static;
  display: flex;
  width: 100%;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--white-40);
  cursor: grab;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
  transition: color 0.15s;
}
.size-controls .drag-handle:hover { color: var(--white); }
.size-controls .drag-handle:active { cursor: grabbing; }

/* Right-edge resize handle */
.edit-mode .widget-card::after {
  content: '⋮';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 40px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  cursor: col-resize;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.edit-mode .widget-card:hover::after { opacity: 1; }

/* ── No-data placeholder ─────────────────────────────────────── */
.no-data-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 80px 20px;
  text-align: center;
}

.no-data-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-data-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--white);
  margin-bottom: 10px;
}

.no-data-subtitle {
  font-size: 14px;
  color: var(--white-70);
  margin-bottom: 8px;
}

.no-data-hint {
  font-size: 12px;
  color: var(--white-40);
}

/* ── Gridstack overrides ─────────────────────────────────────── */
.grid-stack {
  background: transparent !important;
}
.grid-stack-item-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: visible;
  position: absolute !important;
  inset: 4px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.grid-stack-item > .ui-resizable-se {
  background: var(--accent);
  border-radius: 0 0 var(--radius) 0;
  opacity: 0.6;
}
.grid-stack-item > .ui-resizable-se:hover { opacity: 1; }
.widget-item-selected { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: var(--radius); }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--white-15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--white-40); }

/* ── Overlay / Modal ─────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: #0f2460;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  min-width: 300px;
  max-width: 460px;
  width: 90%;
}
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.btn-sm {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); }
.btn-ghost { background: var(--white-08); color: var(--white-70); }
.btn-ghost:hover { background: var(--white-15); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .w-third { width: calc(50% - 8px); }
  .w-sixth { width: calc(33.333% - 11px); }
}

@media (max-width: 600px) {
  .widget-grid .w-third, .widget-grid .w-half, .widget-grid .w-quarter,
  .widget-grid .w-two-third, .widget-grid .w-sixth { width: 100%; }
  .dashboard-area { padding: 12px; }
  .big-number-value { font-size: 32px; }
  .topbar-client-name { display: none; }
}

/* ── Drag handle ─────────────────────────────────────────────── */
.drag-handle {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px; height: 20px;
  cursor: grab;
  color: var(--white-40);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 10;
}
.drag-handle:active { cursor: grabbing; }
.edit-mode .drag-handle { display: flex; }

/* Pulse animation for loading */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.loading { animation: pulse 1.5s ease infinite; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a3d8f;
  border: 1px solid var(--accent);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Metric Picker Modal ─────────────────────────────────────── */
.metric-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.metric-picker-overlay.metric-picker-visible { opacity: 1; }

.metric-picker-modal {
  background: #0e1a2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.metric-picker-overlay.metric-picker-visible .metric-picker-modal { transform: translateY(0); }

.metric-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.metric-picker-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.5px;
}
.metric-picker-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.metric-picker-close:hover { background: rgba(255,255,255,0.15); color: white; }

.metric-picker-subtitle {
  padding: 8px 24px 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.metric-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
}

.metric-picker-card {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  user-select: none;
}
.metric-picker-card:hover {
  background: rgba(77,138,255,0.12);
  border-color: rgba(77,138,255,0.35);
  transform: translateY(-1px);
}
.metric-picker-card.selected {
  background: rgba(77,138,255,0.18);
  border-color: #4d8aff;
}
.metric-picker-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all 0.15s;
}
.metric-picker-card.selected .metric-picker-card-check {
  background: #4d8aff;
  border-color: #4d8aff;
  color: white;
}
.metric-picker-card-icon { font-size: 28px; margin-bottom: 10px; }
.metric-picker-card-name {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  line-height: 1.3;
}
.metric-picker-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

.metric-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  gap: 12px;
}
.metric-picker-count {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}
.metric-picker-footer-btns {
  display: flex;
  gap: 10px;
}
.metric-picker-cancel-btn {
  padding: 9px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.metric-picker-cancel-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.metric-picker-generate-btn {
  padding: 9px 22px;
  background: var(--accent, #4d8aff);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
}
.metric-picker-generate-btn:hover:not(:disabled) { background: #6ba3ff; transform: scale(1.02); }
.metric-picker-generate-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── New metric picker (mp-* classes) ── */
.mp-icon { font-size: 28px; margin-bottom: 8px; }
.mp-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.mp-desc { font-size: 10px; color: rgba(255,255,255,0.4); }
.mp-check { position: absolute; top: 8px; right: 8px; font-size: 14px; color: var(--accent); opacity: 0; transition: opacity 0.15s; }
.metric-picker-card.selected .mp-check { opacity: 1; }
.mp-count { font-size: 13px; color: rgba(255,255,255,0.5); }
.mp-generate-btn {
  padding: 10px 24px; background: var(--accent); border: none;
  border-radius: 8px; color: white; font-size: 14px; font-weight: 700; cursor: pointer;
}
.mp-generate-btn:hover { background: var(--accent-light, #6ba3ff); }

/* ── Teaslec Jobs Table ── */
.teaslec-jobs-wrap { width: 100%; }
.teaslec-summary-bar {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 16px 0 20px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tsb-item { display: flex; flex-direction: column; gap: 4px; }
.tsb-label { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.8px; }
.tsb-val { font-size: 22px; font-weight: 700; color: white; font-family: 'Bebas Neue', sans-serif; }
.teaslec-table-wrap { overflow-x: auto; }
.teaslec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.teaslec-table th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4); border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2); position: sticky; top: 0;
}
.teaslec-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.teaslec-table tr:hover td { background: rgba(255,255,255,0.04); }
.teaslec-table .job-num { font-weight: 700; color: white; font-family: monospace; }
.teaslec-table .job-name { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teaslec-table .money { text-align: right; font-variant-numeric: tabular-nums; }
.teaslec-table .pct { text-align: right; font-weight: 600; }
.teaslec-table .pos { color: #4ade80; }
.teaslec-table .neg { color: #f87171; }
.teaslec-table .high { color: #4ade80; }

/* ── Home Page ─────────────────────────────────── */
.home-page {
  padding: 24px;
  max-width: 1400px;
}
.home-section {
  margin-bottom: 40px;
}
.home-section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.home-section-title {
  font-size: 18px; font-weight: 700;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}
.home-section-count {
  font-size: 12px; color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  padding: 3px 10px; border-radius: 99px;
}
.client-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.client-home-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; flex-direction: column; gap: 12px;
}
.client-home-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.chc-header { display: flex; align-items: center; gap: 8px; }
.chc-name { font-size: 15px; font-weight: 700; }
.chc-stats { display: flex; gap: 16px; }
.chc-stat { display: flex; flex-direction: column; gap: 2px; }
.chc-stat-val { font-size: 20px; font-weight: 700; font-family: 'Bebas Neue', sans-serif; }
.chc-stat-label { font-size: 9px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }
.todo-pending { color: #fbbf24; }
.chc-open-btn {
  margin-top: auto; padding: 8px 0;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; width: 100%;
}
.client-home-card:hover .chc-open-btn { background: var(--accent); border-color: var(--accent); color: white; }
.home-todos { display: flex; flex-direction: column; gap: 8px; }
.home-todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.06);
}
.home-todo-client {
  font-size: 11px; font-weight: 600;
  color: var(--accent); background: rgba(77,138,255,0.12);
  padding: 2px 8px; border-radius: 4px;
  white-space: nowrap;
}
.home-todo-text { font-size: 13px; color: rgba(255,255,255,0.8); }

/* Home link in sidebar */
.sidebar-home-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.6);
  transition: all 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-home-btn:hover { color: white; background: rgba(255,255,255,0.05); }
