/* ── TapTrack AdminPanel — Design System ─────────────────────────────────── */
/* Mirrors the wireframe's visual language exactly.                            */

/* ── Custom Properties ──────────────────────────────────────────────────────*/
:root {
  --color-primary:    #2563eb;
  --color-primary-dk: #004ac6;
  --color-primary-lt: #dbe1ff;
  --color-success:    #10B981;
  --color-success-lt: #D1FAE5;
  --color-danger:     #ba1a1a;
  --color-danger-lt:  #ffdad6;
  --color-warning:    #F59E0B;
  --color-warning-lt: #FEF3C7;
  --color-orange:     #F97316;
  --color-orange-lt:  #FFEDD5;
  --color-purple:     #6D28D9;
  --color-purple-lt:  #EDE9FE;
  --color-blue-lt:    #dbe1ff;

  --text-dark:   #0b1c30;
  --text-body:   #434655;
  --text-muted:  #545f73;
  --text-subtle: #737686;

  --bg-app:   #f8f9ff;
  --bg-card:  #ffffff;
  --bg-light: #eff4ff;

  --border:       #c3c6d7;
  --border-light: #dfe3e7;

  --sidebar-bg:     #ffffff;
  --sidebar-border: var(--border-light);
  --sidebar-text:   var(--text-muted);
  --sidebar-active: var(--color-primary);

  --topbar-height:  56px;
  --sidebar-width:  220px;
  --sidebar-collapsed-width: 60px;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  --transition: 0.15s ease;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-icon: 'Material Symbols Rounded';

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-body);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

/* ── Material Symbols ────────────────────────────────────────────────────────*/
.material-symbols-rounded {
  font-family: var(--font-icon);
  font-weight: normal;
  font-style: normal;
  font-size: var(--icon-md);
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.icon-sm { font-size: var(--icon-sm); }
.icon-md { font-size: var(--icon-md); }
.icon-lg { font-size: var(--icon-lg); }

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

/* ── Sidebar ─────────────────────────────────────────────────────────────────*/
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--sidebar-border);
  transition: width var(--transition), min-width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-item-text,
.sidebar.collapsed .sidebar-item .badge-count,
.sidebar.collapsed .sidebar-user-info { display: none; }

.sidebar.collapsed .sidebar-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }

.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-box {
  width: 28px; height: 28px;
  background: var(--color-primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  flex-shrink: 0;
}
.sidebar-logo-text { font-weight: 700; font-size: 15px; color: var(--text-dark); white-space: nowrap; }
.sidebar-logo-badge {
  margin-left: auto;
  font-size: 9px; background: var(--color-primary-lt);
  color: var(--color-primary-dk); padding: 2px 7px; border-radius: 20px;
  border: 1px solid var(--color-primary-lt); white-space: nowrap;
}

.sidebar-section { padding: 16px 10px 6px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-subtle);
  padding: 0 6px 6px; white-space: nowrap; overflow: hidden;
}

.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-md);
  cursor: pointer; color: var(--sidebar-text); font-size: 12.5px;
  font-weight: 500; transition: all var(--transition); margin-bottom: 1px;
  text-decoration: none;
}
.sidebar-item:hover { background: var(--bg-light); color: var(--text-dark); text-decoration: none; }
.sidebar-item.active { background: var(--color-primary-lt); color: var(--color-primary-dk); font-weight: 600; }
.sidebar-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-item .nav-icon .material-symbols-rounded { font-size: 18px; line-height: 20px; }
.sidebar-item-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge-count {
  margin-left: auto;
  background: var(--color-danger); color: #fff;
  border-radius: 10px; font-size: 10px; font-weight: 700;
  padding: 1px 6px; min-width: 18px; text-align: center; flex-shrink: 0;
}

.sidebar-user {
  margin-top: auto; padding: 12px;
  border-top: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.sidebar-user-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--color-primary-dk); flex-shrink: 0;
}
.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.sidebar-user-role { font-size: 10px; color: var(--text-subtle); }

/* ── Main Content Area ───────────────────────────────────────────────────────*/
.main {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; background: var(--bg-app);
  overflow: hidden;
}
.main-body {
  flex: 1; padding: 24px; overflow-y: auto;
}

/* ── Topbar ──────────────────────────────────────────────────────────────────*/
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text-dark); }
.topbar-subtitle { font-size: 12px; color: var(--text-subtle); }
.topbar-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
}
.topbar-icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; position: relative;
  transition: background var(--transition);
}
.topbar-icon-btn:hover { background: var(--border-light); }
.topbar-icon-btn .notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-danger); border: 1.5px solid #fff;
}
.lang-btn {
  font-size: 11px; font-weight: 600; padding: 5px 10px;
  border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg-light); cursor: pointer; color: #4a5e76;
  transition: background var(--transition);
}
.lang-btn:hover { background: var(--border-light); }
.lang-select {
  font-size: 11px; font-weight: 600; padding: 4px 8px 4px 10px;
  border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg-light); cursor: pointer; color: #4a5e76;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23545f73'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
  outline: none;
  transition: background var(--transition);
}
.lang-select:hover { background-color: var(--border-light); }
.topbar-user-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(61,90,254,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--color-primary);
  cursor: pointer; border: 2px solid rgba(61,90,254,0.2);
  transition: background var(--transition);
}
.topbar-user-av:hover { background: rgba(61,90,254,0.2); }

/* ── Profile Dropdown ─────────────────────────────────────────────────────── */
.profile-dropdown-wrap { position: relative; z-index: 200; }
.profile-dropdown {
  position: fixed;
  top: calc(var(--topbar-height) + 8px);
  right: 20px;
  width: 264px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.07);
  z-index: 1000;
  overflow: hidden;
  animation: dropdown-in 0.14s cubic-bezier(.16,1,.3,1);
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-dropdown-header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, rgba(61,90,254,0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-light);
}
.profile-dropdown-av-lg {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(61,90,254,0.18) 0%, rgba(61,90,254,0.08) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--color-primary);
  border: 2px solid rgba(61,90,254,0.2);
  letter-spacing: -0.5px;
}
.profile-dropdown-info { flex: 1; min-width: 0; }
.profile-dropdown-name {
  font-size: 14px; font-weight: 700; color: var(--text-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.profile-dropdown-email {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px; line-height: 1.4;
}
.profile-plan-badge {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 7px;
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; cursor: pointer;
  color: var(--color-primary); border: 1.5px solid rgba(61,90,254,0.27);
  background: rgba(61,90,254,0.07); letter-spacing: 0.3px;
  transition: background var(--transition);
}
.profile-plan-badge:hover { background: rgba(61,90,254,0.14); }
.profile-dropdown-section { padding: 6px 0; }
.profile-dropdown-section + .profile-dropdown-section { border-top: 1px solid var(--border-light); }
.profile-dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--text-body);
  cursor: pointer; text-decoration: none; width: 100%;
  background: none; border: none; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.profile-dropdown-item:hover { background: var(--bg-light); color: var(--text-dark); }
.pdi-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-light);
  transition: background var(--transition);
}
.pdi-icon .material-symbols-rounded { font-size: 16px; color: var(--text-muted); transition: color var(--transition); }
.profile-dropdown-item:hover .pdi-icon { background: rgba(61,90,254,0.08); }
.profile-dropdown-item:hover .pdi-icon .material-symbols-rounded { color: var(--color-primary); }
.pdi-danger { color: var(--color-danger); }
.pdi-danger .pdi-icon .material-symbols-rounded { color: var(--color-danger); }
.pdi-danger:hover { background: rgba(220,38,38,0.05) !important; }
.pdi-danger:hover .pdi-icon { background: rgba(220,38,38,0.1) !important; }
.pdi-danger:hover .pdi-icon .material-symbols-rounded { color: var(--color-danger) !important; }
.mode-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  border: 1.5px solid; letter-spacing: 0.5px;
}
.mode-badge-hr     { color: var(--color-primary); border-color: rgba(61,90,254,0.27); background: rgba(61,90,254,0.07); }
.mode-badge-premium { color: #B45309; border-color: rgba(245,158,11,0.27); background: #FFFBEB; }

/* ── Cards ───────────────────────────────────────────────────────────────────*/
.wf-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  overflow: hidden;
}
.wf-card-header {
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 10px;
}
.wf-card-title { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.wf-card-subtitle { font-size: 11px; color: var(--text-subtle); }
.wf-card-action { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.wf-card-body { padding: 16px 18px; }
.wf-card-footer {
  padding: 10px 18px; border-top: 1px solid var(--border-light);
  background: #fafbfc;
}

/* ── KPI Cards ───────────────────────────────────────────────────────────────*/
.kpi-grid { 
  display: grid; gap: 20px; margin-bottom: 24px; width: 100%;
}
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Keep cards in one line on tablets, stack only on small phones */
@media (max-width: 1200px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .kpi-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}
@media (max-width: 900px) {
  .kpi-grid-5, .kpi-grid-4, .kpi-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.kpi-label {
  font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px;
}
.kpi-icon-box {
  width: 42px; height: 42px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon-box .material-symbols-rounded { font-size: 22px; }
.kpi-icon-blue   { background: #EEF2FF; color: #4338ca; }
.kpi-icon-green  { background: #DCFCE7; color: #15803d; }
.kpi-icon-orange { background: #FEF3C7; color: #B45309; }
.kpi-icon-purple { background: #F3E8FF; color: #7e22ce; }
.kpi-icon-red    { background: #FEE2E2; color: #b91c1c; }
.kpi-icon-teal   { background: #CCFBF1; color: #0f766e; }

.kpi-value {
  font-size: 30px; font-weight: 800; color: var(--text-dark);
  line-height: 1.1; margin-bottom: 8px; letter-spacing: -0.5px;
}

.kpi-trend-row {
  display: flex; align-items: center; gap: 6px;
}
.kpi-trend-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
}
.kpi-trend-pill .material-symbols-rounded { font-size: 13px; }
.kpi-trend-pill.up      { background: #F0FDF4; color: #16a34a; }
.kpi-trend-pill.down    { background: #FEF2F2; color: #dc2626; }
.kpi-trend-pill.neutral { background: var(--bg-light); color: var(--text-muted); }
.kpi-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ── Report Tabs ───────────────────────────────────────────────────────────*/
.report-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-light); border-radius: var(--radius-md);
  margin-bottom: 16px; align-self: flex-start;
}
.report-tab {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); border: none; background: transparent;
  border-radius: 6px; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.report-tab:hover { color: var(--text-dark); background: rgba(0,0,0,0.03); }
.report-tab.active {
  background: var(--bg-card); color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ── Badges ──────────────────────────────────────────────────────────────────*/
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; letter-spacing: 0.3px; white-space: nowrap;
}
.badge-green  { background: var(--color-success-lt); color: #047857; }
.badge-red    { background: var(--color-danger-lt);  color: #B91C1C; }
.badge-amber  { background: var(--color-warning-lt); color: #B45309; }
.badge-orange { background: var(--color-orange-lt);  color: #C2410C; }
.badge-blue   { background: var(--color-blue-lt);    color: #1D4ED8; }
.badge-purple { background: var(--color-purple-lt);  color: #6D28D9; }
.badge-gray   { background: #F0F4F8;                 color: #4a5e76; }
.badge-gold   { background: var(--color-warning-lt); color: #92400E; }
.badge-dark-red { background: #B91C1C; color: #fff; }

/* ── Tables ──────────────────────────────────────────────────────────────────*/

/* Shared table header + row styles used by both .wf-table and .table */
.wf-table-wrap { overflow-x: auto; }
.wf-table { width: 100%; border-collapse: collapse; }
.wf-table thead tr { border-bottom: 1.5px solid var(--border); }
.wf-table thead th {
  padding: 11px 16px; font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px; text-align: left; white-space: nowrap;
  background: transparent;
}
.wf-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background var(--transition); }
.wf-table tbody tr:last-child { border-bottom: none; }
.wf-table tbody tr:hover { background: var(--bg-light); }
.wf-table tbody td { padding: 12px 16px; font-size: 12.5px; color: var(--text-body); vertical-align: middle; }

/* .table-container — white card wrapper used by dashboard / super pages */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: 20px;
}

/* .table / .data-table — identical visual rules to .wf-table */
.table, .data-table { width: 100%; border-collapse: collapse; }
.table thead tr, .data-table thead tr { border-bottom: 1.5px solid var(--border); }
.table thead th, .data-table thead th {
  padding: 11px 16px; font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px; text-align: left; white-space: nowrap;
  background: transparent;
}
.table tbody tr, .data-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background var(--transition); }
.table tbody tr:last-child, .data-table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover, .data-table tbody tr:hover { background: var(--bg-light); }
.table tbody td, .data-table tbody td { padding: 12px 16px; font-size: 12.5px; color: var(--text-body); vertical-align: middle; }
.table .row-danger,   .data-table .row-danger   { background: var(--color-danger-lt); }
.table .row-warning,  .data-table .row-warning  { background: var(--color-warning-lt); }
.table .row-selected, .data-table .row-selected { background: rgba(61,90,254,0.05); }
.wf-table .row-danger  { background: var(--color-danger-lt); }
.wf-table .row-warning { background: var(--color-warning-lt); }

.td-primary { font-weight: 600; color: var(--text-dark); }
.td-sub { font-size: 11px; color: var(--text-subtle); margin-top: 2px; }
.td-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.text-center { text-align: center; }
.text-muted { color: var(--text-subtle); }
.text-sm    { font-size: 11.5px; }
.font-bold  { font-weight: 700; }

/* ── Buttons ─────────────────────────────────────────────────────────────────*/
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 8px 16px;
  border-radius: var(--radius-md); cursor: pointer;
  border: 1.5px solid transparent; font-family: inherit;
  white-space: nowrap; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary   { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: #2a47eb; }
.btn-secondary { background: var(--bg-card); color: var(--color-primary); border-color: #c0cfe8; }
.btn-secondary:hover { background: #f0f4ff; }
.btn-outline { background: var(--bg-card); color: var(--text-body); border-color: #dde8f3; }
.btn-outline:hover { background: #f9fafb; border-color: #cbd5e1; color: var(--text-dark); }
.btn-danger    { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-danger:hover { background: #dc2626; }
.btn-outline-danger { background: var(--bg-card); color: var(--color-danger); border-color: #fca5a5; }
.btn-outline-danger:hover { background: var(--color-danger-lt); }
.btn-ghost     { background: transparent; color: #4a5e76; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-app); }
.btn-sm { padding: 5px 11px; font-size: 11px; border-radius: var(--radius-sm); }
.btn-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg-light); cursor: pointer; font-size: 13px; color: #4a5e76;
}
.btn-icon:hover { background: var(--border); }
.btn:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── AppIconButton ────────────────────────────────────────────────────────────*/
.app-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--transition), color var(--transition);
  padding: 0; flex-shrink: 0;
}
.app-icon-btn-sm  { width: 28px; height: 28px; }
.app-icon-btn-md  { width: 34px; height: 34px; }
.app-icon-btn-lg  { width: 40px; height: 40px; }
.app-icon-btn-sm  .material-symbols-rounded { font-size: 16px; }
.app-icon-btn-md  .material-symbols-rounded { font-size: 20px; }
.app-icon-btn-lg  .material-symbols-rounded { font-size: 24px; }
.app-icon-btn-default { background: var(--bg-light); color: var(--text-muted); border: 1.5px solid var(--border); }
.app-icon-btn-default:hover { background: var(--border-light); color: var(--text-body); }
.app-icon-btn-primary { background: var(--color-primary-lt); color: var(--color-primary); }
.app-icon-btn-primary:hover { background: var(--color-primary); color: #fff; }
.app-icon-btn-danger  { background: var(--color-danger-lt); color: var(--color-danger); }
.app-icon-btn-danger:hover  { background: var(--color-danger); color: #fff; }
.app-icon-btn-ghost   { background: transparent; color: var(--text-muted); }
.app-icon-btn-ghost:hover   { background: var(--bg-light); color: var(--text-body); }
.app-icon-btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Forms ───────────────────────────────────────────────────────────────────*/
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 11.5px; font-weight: 600; color: #4a5e76; }
.form-label .req { color: var(--color-danger); margin-left: 2px; }
.form-control {
  height: 38px; border: 1.5px solid #dde8f3; border-radius: var(--radius-md);
  padding: 0 12px; font-size: 12px; font-family: inherit;
  background: var(--bg-card); color: var(--text-dark); width: 100%;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--color-primary); }
.form-control.readonly, .form-control:disabled { background: var(--bg-app); color: var(--text-subtle); }
.form-control.is-invalid { border-color: var(--color-danger); }
.form-select {
  height: 38px; border: 1.5px solid #dde8f3; border-radius: var(--radius-md);
  padding: 0 28px 0 11px; font-size: 12px; font-family: inherit;
  background: var(--bg-light) 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='%238fa8c4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat;
  appearance: none; cursor: pointer; color: var(--text-body); width: 100%;
}
.form-select:focus { outline: none; border-color: var(--color-primary); }
.form-textarea {
  border: 1.5px solid #dde8f3; border-radius: var(--radius-md);
  padding: 10px 12px; font-size: 12px; font-family: inherit;
  background: var(--bg-card); color: var(--text-body); width: 100%;
  resize: vertical; min-height: 80px;
}
.form-textarea:focus { outline: none; border-color: var(--color-primary); }
.form-helper { font-size: 10.5px; color: var(--text-subtle); margin-top: 2px; }
.form-error  { font-size: 10.5px; color: var(--color-danger); margin-top: 2px; }
.validation-message { font-size: 10.5px; color: var(--color-danger); display: block; margin-top: 3px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 700px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

.form-section { margin-bottom: 24px; }
.form-section-title {
  font-size: 12px; font-weight: 700; color: var(--color-primary);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1.5px solid var(--border-light);
}
.form-actions {
  display: flex; align-items: center; gap: 10px;
  padding-top: 20px; border-top: 1px solid var(--border-light); margin-top: 8px;
}

.form-toggle {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--bg-light); border-radius: var(--radius-md); border: 1.5px solid var(--border);
}
.toggle-switch {
  width: 36px; height: 20px; border-radius: 10px; background: #c8d8ec;
  position: relative; cursor: pointer; flex-shrink: 0; transition: background var(--transition);
}
.toggle-switch.on { background: var(--color-primary); }
.toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on::after { left: 19px; }

/* ── Filters ─────────────────────────────────────────────────────────────────*/
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); margin-bottom: 16px;
}
.filter-input {
  height: 34px; border: 1.5px solid #dde8f3; border-radius: var(--radius-md);
  padding: 0 12px; font-size: 12px; font-family: inherit; background: var(--bg-light);
  color: var(--text-body); min-width: 200px;
}
.filter-input:focus { outline: none; border-color: var(--color-primary); }
.filter-select {
  height: 34px; border: 1.5px solid #dde8f3; border-radius: var(--radius-md);
  padding: 0 28px 0 11px; font-size: 12px; font-family: inherit;
  background: var(--bg-light) 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='%238fa8c4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat;
  appearance: none; cursor: pointer; color: var(--text-body);
}

.summary-bar {
  display: flex; gap: 20px; padding: 10px 18px; background: var(--bg-light);
  border-radius: var(--radius-md); border: 1px solid var(--border);
  margin-bottom: 16px; font-size: 12px; color: #4a5e76; flex-wrap: wrap;
}
.summary-bar .item { display: flex; align-items: center; gap: 6px; }
.summary-bar .item strong { color: var(--text-dark); font-weight: 700; }
.summary-bar .sep { color: var(--border); }

/* ── Progress ────────────────────────────────────────────────────────────────*/
.progress-wrap { background: #e8eef4; border-radius: 4px; height: 6px; flex: 1; }
.progress-fill { height: 6px; border-radius: 4px; transition: width 0.3s; }
.progress-fill-primary { background: var(--color-primary); }
.progress-fill-green   { background: var(--color-success); }
.progress-fill-amber   { background: var(--color-warning); }
.progress-fill-red     { background: var(--color-danger); }

/* ── Alerts ──────────────────────────────────────────────────────────────────*/
.alert {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: var(--radius-md); font-size: 12px; font-weight: 500;
  margin-bottom: 16px; border: 1.5px solid;
}
.alert-danger  { background: #FEF2F2; border-color: #FCA5A5; color: #B91C1C; }
.alert-warning { background: #FFFBEB; border-color: #FCD34D; color: #92400E; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.alert-success { background: #F0FDF4; border-color: #86EFAC; color: #166534; }
.alert-icon    { font-size: 16px; flex-shrink: 0; }
.alert-action  { margin-left: auto; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ── Tabs ────────────────────────────────────────────────────────────────────*/
.tab-bar {
  display: flex; border-bottom: 2px solid var(--border);
  background: var(--bg-card); padding: 0 18px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tab {
  padding: 13px 16px; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -2px; white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover { color: var(--text-body); }
.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ── Wizard ──────────────────────────────────────────────────────────────────*/
.wizard-steps {
  display: flex; align-items: center; margin-bottom: 32px; padding: 0 20px;
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex: 1; position: relative;
}
.wizard-step::before {
  content: ''; position: absolute; top: 14px;
  left: calc(50% + 14px); right: calc(-50% + 14px);
  height: 2px; background: var(--border); z-index: 0;
}
.wizard-step:last-child::before { display: none; }
.wizard-step-circle {
  width: 28px; height: 28px; border-radius: 50%; background: var(--border);
  color: var(--text-subtle); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; z-index: 1; position: relative;
}
.wizard-step.done .wizard-step-circle   { background: var(--color-success); color: #fff; }
.wizard-step.active .wizard-step-circle { background: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px rgba(61,90,254,0.13); }
.wizard-step-label { font-size: 10px; font-weight: 600; color: var(--text-subtle); text-align: center; }
.wizard-step.active .wizard-step-label { color: var(--color-primary); }
.wizard-step.done .wizard-step-label   { color: var(--color-success); }

/* ── System Health Chips ─────────────────────────────────────────────────────*/
.sys-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1.5px solid var(--border); flex: 1; min-width: 130px;
}
.sys-chip-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sys-chip-dot.green  { background: var(--color-success); box-shadow: 0 0 0 3px var(--color-success-lt); }
.sys-chip-dot.amber  { background: var(--color-warning); box-shadow: 0 0 0 3px var(--color-warning-lt); }
.sys-chip-dot.red    { background: var(--color-danger);  box-shadow: 0 0 0 3px var(--color-danger-lt); }
.sys-chip-name { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.sys-chip-val  { font-size: 10.5px; color: var(--text-subtle); }

/* ── Plan Cards ──────────────────────────────────────────────────────────────*/
.plan-card {
  background: var(--bg-light); border-radius: var(--radius-lg);
  border: none; padding: 20px; flex: 1;
}
.plan-card.featured { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(61,90,254,0.1); }
.plan-name   { font-size: 18px; font-weight: 800; color: var(--text-dark); margin-bottom: 2px; }
.plan-price  { font-size: 26px; font-weight: 900; color: var(--color-primary); }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--text-subtle); }
.plan-tenants { font-size: 11px; color: var(--text-subtle); margin-bottom: 14px; margin-top: 4px; }
.plan-divider { height: 1px; background: var(--border-light); margin: 14px 0; }
.feature-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 12px;
}
.feature-row:last-child { border-bottom: none; }
.check { color: var(--color-success); font-weight: 800; font-size: 14px; }
.cross { color: #c8d8ec;              font-weight: 800; font-size: 14px; }

/* ── QR Grid ─────────────────────────────────────────────────────────────────*/
.qr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .qr-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .qr-grid { grid-template-columns: repeat(2, 1fr); } }
.qr-card {
  background: var(--bg-light); border-radius: var(--radius-lg);
  border: none; padding: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.qr-image {
  width: 120px; height: 120px; background: var(--bg-app);
  border: 2px solid var(--border); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--border);
}

/* ── Misc Helpers ────────────────────────────────────────────────────────────*/
.wf-row { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.flex-1  { flex: 1; min-width: 0; }
.flex-2  { flex: 2; min-width: 0; }
.flex-3  { flex: 3; min-width: 0; }
.w-100   { width: 100%; }
.mb-0    { margin-bottom: 0; }
.mt-4    { margin-top: 16px; }
.section-title {
  font-size: 14px; font-weight: 800; color: var(--text-dark);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.chip-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── Loading States ──────────────────────────────────────────────────────────*/
.spinner-ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border-light); border-top-color: var(--color-primary);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 40px; color: var(--text-subtle); font-size: 13px;
}

/* ── Auth Pages ──────────────────────────────────────────────────────────────*/
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1E2A3B 0%, #0f1722 100%); padding: 24px;
}
.auth-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-bottom: 28px;
}
.auth-logo-box {
  width: 40px; height: 40px; background: var(--color-primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.auth-logo-text { font-weight: 800; font-size: 20px; color: var(--text-dark); }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-subtle); margin-bottom: 28px; }
.auth-error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-app);
}
.auth-error-card {
  text-align: center; padding: 48px; max-width: 380px;
}
.auth-error-icon { font-size: 52px; margin-bottom: 16px; display: block; }
.auth-loading {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 100vh; font-size: 14px; color: var(--text-subtle);
}

/* ── Pagination ──────────────────────────────────────────────────────────────*/
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer; color: #4a5e76;
  transition: all var(--transition);
}
.page-btn:hover   { background: var(--border-light); }
.page-btn.active  { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Toasts ──────────────────────────────────────────────────────────────────*/
.toast {
  padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 12.5px; font-weight: 500; min-width: 240px;
  box-shadow: var(--shadow-md); animation: slideUp 0.2s ease;
  transition: opacity 0.3s, transform 0.3s;
}
.toast-info    { background: var(--color-primary); color: #fff; }
.toast-success { background: var(--color-success); color: #fff; }
.toast-danger  { background: var(--color-danger);  color: #fff; }
.toast-warning { background: var(--color-warning); color: #fff; }
.toast-hide    { opacity: 0; transform: translateY(10px); }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── RTL Support ─────────────────────────────────────────────────────────────*/
[dir="rtl"] .sidebar-item { flex-direction: row-reverse; }
[dir="rtl"] .topbar-right { margin-left: unset; margin-right: auto; }
[dir="rtl"] .td-actions { justify-content: flex-start; }
[dir="rtl"] .form-actions { flex-direction: row-reverse; }
[dir="rtl"] .wf-card-header .wf-card-action { margin-left: unset; margin-right: auto; }

/* ── Stat Row (plan usage bars) ─────────────────────────────────────────────*/
.stat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.stat-label { font-size: 11.5px; color: #4a5e76; width: 130px; flex-shrink: 0; }
.stat-bar   { flex: 1; display: flex; align-items: center; gap: 8px; }
.stat-val   { font-size: 11.5px; font-weight: 600; color: var(--text-dark); white-space: nowrap; }

/* ── Day Chips (shifts) ──────────────────────────────────────────────────────*/
.day-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 700; border: 1.5px solid var(--border); color: var(--text-subtle);
}
.day-chip.on { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Action Panel ────────────────────────────────────────────────────────────*/
.action-panel { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.action-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-light); border-radius: var(--radius-md); border: 1.5px solid var(--border);
}
.action-item-icon  { font-size: 18px; }
.action-item-title { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.action-item-sub   { font-size: 10.5px; color: var(--text-subtle); }
.action-item-btn   { margin-left: auto; }

/* ── Fraud Cards ─────────────────────────────────────────────────────────────*/
.fraud-score {
  font-size: 24px; font-weight: 900; padding: 6px 12px;
  border-radius: var(--radius-md); line-height: 1;
}
.fraud-score-high { background: var(--color-danger-lt);  color: #B91C1C; }
.fraud-score-med  { background: var(--color-warning-lt); color: #92400E; }
.fraud-score-low  { background: var(--color-success-lt); color: #047857; }
.fraud-reason-tag { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 4px; }
.fraud-reason-gps     { background: var(--color-orange-lt); color: #C2410C; }
.fraud-reason-device  { background: var(--color-purple-lt); color: #6D28D9; }
.fraud-reason-offline { background: var(--color-blue-lt);   color: #1D4ED8; }
.fraud-reason-general { background: var(--color-danger-lt); color: #B91C1C; }

/* Compatibility Aliases removed - now unified in core components */
.loading-message { font-size: 13px; color: var(--text-subtle); }
.loading-overlay.overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); z-index: 100; }

/* ── Subscription Page ───────────────────────────────────────────────────────*/
.sub-stat-card {
  background: var(--bg-light); border-radius: var(--radius-md);
  padding: 14px 16px;
}
.sub-stat-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px;
}
.sub-stat-value {
  font-size: 22px; font-weight: 800; color: var(--text-dark); line-height: 1.2;
}
.sub-stat-max { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.sub-stat-bar {
  height: 5px; border-radius: 3px; background: var(--border-light);
  margin-top: 8px; overflow: hidden;
}
.sub-stat-fill {
  height: 100%; border-radius: 3px; transition: width 0.3s ease;
}
.sub-stat-fill.ok      { background: var(--color-success); }
.sub-stat-fill.warning { background: var(--color-warning); }
.sub-stat-fill.danger  { background: var(--color-danger); }
.plan-feature-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-body);
  padding: 5px 0;
}
.plan-feature-row .material-symbols-rounded { color: var(--color-success); }
.plan-feature-off { color: var(--text-muted); }
.plan-feature-off .material-symbols-rounded { color: var(--color-danger); }
.plan-option-card {
  border: 2px solid var(--border-light); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.plan-option-card:hover { border-color: var(--color-primary); background: rgba(61,90,254,0.03); }
.plan-option-card.selected { border-color: var(--color-primary); background: rgba(61,90,254,0.05); }
.plan-option-radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); background: #fff;
  transition: border-color var(--transition), background var(--transition);
}
.plan-option-radio.checked {
  border-color: var(--color-primary); background: var(--color-primary);
  box-shadow: inset 0 0 0 3px #fff;
}

/* ── Modal ───────────────────────────────────────────────────────────────────*/
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.38); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-sm  { max-width: 440px; }
.modal-md  { max-width: 560px; }
.modal-lg  { max-width: 720px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border-light); flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.modal-body  { padding: 22px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border-light);
  background: var(--bg-light); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.modal-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--bg-app); color: var(--text-subtle); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: background var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: var(--border); color: var(--text-dark); }

/* ── Confirm Dialog ──────────────────────────────────────────────────────────*/
.confirm-body { padding: 24px 22px; text-align: center; }
.confirm-icon { font-size: 40px; margin-bottom: 12px; }
.confirm-title { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.confirm-text  { font-size: 13px; color: var(--text-subtle); }

/* Topbar missing elements */
.topbar-toggle {
  background: none; border: none; cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.topbar-toggle .material-symbols-rounded { font-size: 22px; }
.topbar-toggle:hover { background: var(--bg-app); }
.topbar-breadcrumb { font-size: 15px; font-weight: 700; color: var(--text-dark); flex: 1; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-lang { display: flex; align-items: center; gap: 4px; }
.topbar-lang .btn.active { background: var(--color-primary-lt); color: var(--color-primary); border-color: rgba(61,90,254,0.3); }

/* Page structure */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title  { font-size: 20px; font-weight: 800; color: var(--text-dark); }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

/* Login page */
.login-page  { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1E2A3B 0%, #0f1722 100%); padding: 24px; }
.login-card  { background: var(--bg-card); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.login-logo  { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 28px; }
.login-brand { font-weight: 800; font-size: 20px; color: var(--text-dark); }
.login-title { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 20px; text-align: center; }
.btn-full    { width: 100%; justify-content: center; margin-top: 8px; }

/* Alert close button */
.alert-close { background: none; border: none; cursor: pointer; font-size: 16px; font-weight: 700; margin-left: auto; color: inherit; opacity: 0.7; padding: 0 4px; line-height: 1; }
.alert-close:hover { opacity: 1; }

/* Avatar sizes */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary-lt); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.avatar-lg { width: 48px; height: 48px; border-radius: 50%; background: var(--color-primary-lt); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; }

/* Pagination info */
.pagination-info { font-size: 11.5px; color: var(--text-subtle); margin-left: 8px; }

/* Filter search width */
.filter-search { min-width: 220px; }

/* Misc helpers */
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.detail-list    { display: flex; flex-direction: column; gap: 10px; }
.detail-list dt { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.detail-list dd { font-size: 13px; color: var(--text-body); margin: 0; }
.detail-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-group      { display: flex; gap: 6px; align-items: center; }
.btn-group-vertical { display: flex; flex-direction: column; gap: 6px; }
.form-row       { display: flex; gap: 14px; }
.form-hint      { font-size: 10.5px; color: var(--text-subtle); margin-top: 3px; }
.tabs           { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn        { padding: 10px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; background: none; border: none; border-bottom: 2.5px solid transparent; margin-bottom: -2px; transition: all var(--transition); }
.tab-btn:hover  { color: var(--text-body); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.code-block     { font-family: 'Courier New', monospace; font-size: 12px; background: var(--bg-app); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text-dark); }

/* ── Environment banner ──────────────────────────────────────────────────── */
.env-banner       { position: sticky; top: 0; z-index: 1000; background: #F59E0B; color: #1a2232; text-align: center; padding: 6px 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.env-banner-icon  { font-size: 14px; }

/* ── Notification list ───────────────────────────────────────────────────── */
.notification-list    { display: flex; flex-direction: column; gap: 8px; }
.notification-card    { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.notification-card:hover { background: var(--bg-light); border-color: var(--color-primary); }
.notification-unread  { border-left: 3px solid var(--color-primary); background: var(--color-primary-lt); }
.notification-icon    { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notification-body    { flex: 1; min-width: 0; }
.notification-title   { font-size: 13.5px; font-weight: 600; color: var(--text-dark); margin-bottom: 3px; }
.notification-text    { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; white-space: pre-wrap; }
.notification-meta    { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.notification-dot     { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); flex-shrink: 0; margin-top: 6px; }
