/* ==============================================================================
   OTOMAX STORE — MODERN LIGHT THEME BACKOFFICE DESIGN SYSTEM
   Professional, Clean, Flat UI, Hi-Tech Precision & Optimal Readability
   ============================================================================== */

:root {
  /* BACKGROUND & SURFACE TOKENS */
  --bg-app: #F8FAFC;            /* Slate 50 - Ultra light bluish-gray */
  --bg-surface: #FFFFFF;        /* Pure White Surface */
  --bg-subtle: #F1F5F9;         /* Slate 100 - Secondary surface */
  --bg-hover: #F8FAFC;          /* Hover surface */
  --bg-active: #EFF6FF;         /* Active menu soft blue tint */

  /* BORDER & DIVIDER TOKENS */
  --border-color: #E2E8F0;      /* Slate 200 - Clean thin border */
  --border-focus: #3B82F6;      /* Blue 500 */

  /* TYPOGRAPHY TOKENS */
  --text-main: #0F172A;         /* Slate 900 - High contrast readable text */
  --text-secondary: #475569;    /* Slate 600 */
  --text-muted: #94A3B8;        /* Slate 400 */
  --text-white: #FFFFFF;

  /* BRAND PRIMARY COLOR */
  --primary: #2563EB;           /* Modern Royal Blue */
  --primary-hover: #1D4ED8;     /* Darker Blue */
  --primary-light: #EFF6FF;     /* Blue 50 */
  --primary-border: #BFDBFE;    /* Blue 200 */

  /* ACCENT TOKENS (SOFT & CONTROLLED) */
  --accent-cyan: #0891B2;       /* Cyan 600 */
  --accent-cyan-light: #ECFEFF; /* Cyan 50 */
  --accent-cyan-border: #A5F3FC;

  --accent-green: #16A34A;      /* Emerald 600 */
  --accent-green-light: #F0FDF4;/* Emerald 50 */
  --accent-green-border: #BBF7D0;

  --accent-amber: #D97706;      /* Amber 600 */
  --accent-amber-light: #FFFBEB;/* Amber 50 */
  --accent-amber-border: #FDE68A;

  --accent-red: #DC2626;        /* Red 600 */
  --accent-red-light: #FEF2F2;  /* Red 50 */
  --accent-red-border: #FECACA;

  --accent-purple: #7C3AED;     /* Purple 600 */
  --accent-purple-light: #F5F3FF;

  /* GEOMETRY & ELEVATION */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* APP SHELL LAYOUT */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==============================================================================
   1. SIDEBAR (Clean White Flat Vertical Sidebar)
   ============================================================================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 50;
}

.brand {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 18px;
}

.brand-info h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-info h2 span {
  color: var(--primary);
}

.brand-info span.subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 10px 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.nav-item i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-item:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.nav-item:hover i {
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-border);
}

/* ==============================================================================
   2. MAIN CONTENT & TOP HEADER
   ============================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-app);
}

.top-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 420px;
  transition: all 0.15s ease;
}

.header-search-box:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.header-search-box i {
  color: var(--text-muted);
  font-size: 13.5px;
}

.header-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

.header-search-box input::placeholder {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
}

/* USER PROFILE PILL */
.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-profile-btn:hover {
  background: var(--bg-subtle);
  border-color: #CBD5E1;
}

.user-initials-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
}

.user-text-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.user-meta-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.user-meta-role {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==============================================================================
   3. DASHBOARD PAGE & KPI CARDS
   ============================================================================== */
.content-container {
  padding: 24px 28px;
  flex: 1;
}

/* Dashboard Greeting Header */
.dash-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-title-wrap h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.dash-title-wrap p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.dash-controls-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-badge-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.date-badge-pill i {
  color: var(--primary);
}

/* KPI GRID (4 CARDS) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.kpi-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #CBD5E1;
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.kpi-icon-wrap.blue { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.kpi-icon-wrap.cyan { background: var(--accent-cyan-light); color: var(--accent-cyan); border: 1px solid var(--accent-cyan-border); }
.kpi-icon-wrap.green { background: var(--accent-green-light); color: var(--accent-green); border: 1px solid var(--accent-green-border); }
.kpi-icon-wrap.amber { background: var(--accent-amber-light); color: var(--accent-amber); border: 1px solid var(--accent-amber-border); }

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

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.trend-badge-up {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-green);
  font-weight: 600;
}

.trend-badge-down {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-red);
  font-weight: 600;
}

/* ==============================================================================
   4. CHARTS & VISUALIZATIONS
   ============================================================================== */
.dash-analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.chart-tab-group {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.chart-tab-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-subtle);
}

.card-body {
  padding: 20px;
}

.chart-container-wrap {
  position: relative;
  height: 270px;
  width: 100%;
}

/* DONUT CHART CONTAINER & LEGEND */
.donut-chart-container {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.donut-center-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.donut-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.donut-legend-val {
  margin-left: auto;
  font-weight: 700;
  color: var(--text-main);
}

/* ==============================================================================
   5. TABLES & STATUS BADGES (Flat Modern Minimalist)
   ============================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table, .table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-surface);
}

table th, .table th {
  background-color: #F8FAFC;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

table td, .table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

table tbody tr, .table tbody tr {
  transition: background-color 0.1s ease;
}

table tbody tr:hover, .table tbody tr:hover {
  background-color: #F8FAFC;
}

/* MODULE HEADER & FILTER TOOLBAR */
.module-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.module-title-wrap h1, .module-title-wrap h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-title-wrap p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.filter-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.filter-group-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-pill {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-input-pill i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.search-input-pill input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.search-input-pill input:focus {
  background: #FFFFFF;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.fitment-spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
}

.sku-mono-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  display: inline-block;
}

/* STATUS BADGES (Soft Contrast) */
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
}

.badge-soft-success {
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid var(--accent-green-border);
}

.badge-soft-warning {
  background-color: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.badge-soft-info {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-soft-danger {
  background-color: var(--accent-red-light);
  color: var(--accent-red);
  border: 1px solid var(--accent-red-border);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border-color: #CBD5E1;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 14px;
}

.btn-icon:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

/* FORM INPUTS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* ==============================================================================
   6. MODAL & OVERLAYS
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
  background: #F8FAFC;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlide 0.25s ease;
}

.toast.success { border-left-color: var(--accent-green); }
.toast.error { border-left-color: var(--accent-red); }

@keyframes toastSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==============================================================================
   7. CLEAN LIGHT LOGIN SCREEN
   ============================================================================== */
.login-screen-container {
  min-height: 100vh;
  width: 100vw;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  overflow-y: auto;
}

.login-card-wrapper {
  width: 100%;
  max-width: 460px;
  margin: auto;
}

.login-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-box {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  margin-bottom: 12px;
}

.login-brand-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.login-brand-header h1 span {
  color: var(--primary);
}

.login-brand-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.login-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-shield-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid var(--primary-border);
}

.login-card-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.login-card-title p {
  font-size: 12px;
  color: var(--text-muted);
}

.login-error-box {
  background: var(--accent-red-light);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13.5px;
}

.input-with-icon .form-input {
  padding-left: 36px;
  padding-right: 36px;
  width: 100%;
}

.input-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}

.btn-login-block {
  width: 100%;
  height: 42px;
  font-size: 13.5px;
}

.login-samples-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.login-samples-title {
  text-align: center;
  margin-bottom: 10px;
}

.login-samples-title span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-samples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sample-account-pill {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-account-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

.sample-account-pill span {
  font-size: 16px;
}

.sample-info strong {
  display: block;
  font-size: 11.5px;
  color: var(--text-main);
}

.sample-info small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.login-card-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.login-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ==============================================================================
   8. RESPONSIVE BREAKPOINTS (Mobile & Tablet)
   ============================================================================== */
.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar-toggle-btn {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-modal);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .top-header {
    padding: 10px 16px;
  }
  .content-container {
    padding: 16px;
  }
  .user-text-meta {
    display: none;
  }
  .login-samples-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   9. SUB-TABS, MODULE UTILITIES & RBAC STYLES (Light Theme)
   ============================================================================== */
.sub-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.sub-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.sub-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* GENERAL BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-success {
  background: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid var(--accent-green-border);
}

.badge-warning {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.badge-danger {
  background: var(--accent-red-light);
  color: var(--accent-red);
  border: 1px solid var(--accent-red-border);
}

/* RBAC MATRIX & USERS LIST */
.rbac-matrix-table th, .rbac-matrix-table td {
  text-align: center;
  padding: 10px 14px;
}

.rbac-matrix-table th:first-child, .rbac-matrix-table td:first-child {
  text-align: left;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  background: #F1F5F9;
  color: var(--text-secondary);
}

/* ACTIVITY LOG CARDS */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
}

.activity-card:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.activity-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.activity-meta {
  flex: 1;
}

.activity-user-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.activity-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.activity-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.activity-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
}

