/* =======================================================
   AUTOCARE — Main Stylesheet (Phase 1 Redesign)
   Theme: Pure White + Sky Blue (#0EA5E9) + Soft Gray
   Mobile-first. Bottom tab nav. Chart.js ready.
   ======================================================= */

/* ---- CSS Variables ---- */
:root {
  --blue-50:  #F0F9FF;
  --blue-100: #E0F2FE;
  --blue-200: #BAE6FD;
  --blue-400: #38BDF8;
  --blue-500: #0EA5E9;
  --blue-600: #0284C7;
  --blue-700: #0369A1;

  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  --white: #FFFFFF;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;

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

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10);

  --tab-height: 64px;
  --topbar-height: 56px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  padding-top: var(--topbar-height);
  padding-bottom: calc(var(--tab-height) + 16px);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }

/* ---- Typography ---- */
h1 { font-size: 22px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 14px; font-weight: 600; }
h5 { font-size: 13px; font-weight: 600; }
p  { font-size: 14px; line-height: 1.6; }

/* ---- Top Bar ---- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: 34px; height: 34px;
  background: var(--blue-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.2px;
}

.topbar-subtitle {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 400;
  margin-top: -2px;
}

/* TODO: Replace with real user profile component when auth is extended */
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--blue-200);
  cursor: pointer;
}

/* ---- Page Content ---- */
.page-content {
  padding: 16px;
  max-width: 100%;
}

.page-header {
  margin-bottom: 16px;
}

.page-header h2 {
  font-size: 18px;
  color: var(--gray-900);
}

.page-header p {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: visible; /* changed from hidden so dropdowns aren't clipped */
}
/* Preserve rounded corners on first/last list items instead */
.card > .list-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card > .list-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

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

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ---- Stat Cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}

.stat-card:active { transform: scale(.98); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.blue::before   { background: var(--blue-500); }
.stat-card.green::before  { background: var(--success); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon.blue   { background: var(--blue-50);    color: var(--blue-500); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.amber  { background: var(--warning-light); color: var(--warning); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ---- Chart Cards ---- */
.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
  overflow: hidden;
}

.chart-card-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.chart-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.chart-card-subtitle {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 1px;
}

.chart-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--blue-50);
  color: var(--blue-600);
}

.chart-card-body { padding: 16px; }

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-wrap canvas { width: 100% !important; }

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-masuk   { background: var(--blue-50);       color: var(--blue-600); }
.badge-proses  { background: var(--warning-light);  color: #92400E; }
.badge-selesai { background: var(--success-light);  color: #065F46; }
.badge-aktif   { background: var(--success-light);  color: #065F46; }
.badge-nonaktif{ background: var(--gray-100);       color: var(--gray-500); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: background .15s, transform .1s;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-600); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.btn-danger:hover { background: #FEE2E2; }

.btn-success {
  background: var(--success-light);
  color: var(--success);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-control,
.form-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

.form-control::placeholder { color: var(--gray-300); }

textarea.form-control {
  height: auto;
  min-height: 90px;
  padding: 12px;
  resize: vertical;
}

/* ---- Tables (for desktop / large screens) ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }

/* ---- Modals ---- */
.modal-content {
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.modal-body {
  padding: 20px;
  max-height: 65vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-dialog-scrollable .modal-content { max-height: 85vh; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  gap: 8px;
}

/* ---- Bottom Tab Bar ---- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-height);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: stretch;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  position: relative;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
  font-size: 20px;
  line-height: 1;
  transition: transform .15s;
}

.bottom-nav-item.active {
  color: var(--blue-500);
}

.bottom-nav-item.active i { transform: translateY(-1px); }

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--blue-500);
  border-radius: 0 0 4px 4px;
}

/* ---- Bottom Sheet (Lainnya) ---- */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 0 calc(var(--tab-height) + 8px);
  z-index: 2001;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
}

.bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 0 20px 8px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}

.sheet-item:active { background: var(--gray-50); }

.sheet-item i {
  font-size: 18px;
  width: 40px; height: 40px;
  background: var(--blue-50);
  color: var(--blue-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet-item span {
  flex: 1;
  text-align: left;
}

.sheet-item .sheet-chevron {
  background: transparent;
  color: var(--gray-300);
  width: auto; height: auto;
  font-size: 14px;
}

.sheet-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 20px;
}

/* ---- Alert ---- */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}

.alert-danger { background: var(--danger-light); color: #991B1B; }
.alert-success { background: var(--success-light); color: #065F46; }
.alert-info { background: var(--blue-50); color: var(--blue-700); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: 13px; }

/* ---- Avatar ---- */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- List items (mobile card-list pattern) ---- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
}

.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--gray-50); }

.list-item-body { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 1px;
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: var(--gray-700);
}

.quick-action:active { transform: scale(.95); background: var(--blue-50); }

.quick-action i {
  font-size: 22px;
  color: var(--blue-500);
}

.quick-action span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--gray-600);
  line-height: 1.2;
}

/* ---- Dropdown ---- */
.dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  z-index: 9999 !important;
  font-size: 13px;
}

.dropdown-item { padding: 10px 14px; color: var(--gray-700); }
.dropdown-item:hover { background: var(--gray-50); color: var(--gray-900); }
/* Elevate the list-item row that has an open dropdown above its siblings */
.list-item:has(.dropdown.show) {
  position: relative;
  z-index: 100;
}
.dropdown.show { z-index: 9999; }

/* ---- Login Page ---- */
.login-page {
  padding: 0;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-hero {
  background: var(--blue-500);
  padding: 60px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  top: -60px; right: -60px;
}

.login-hero::after {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -40px; left: -40px;
}

.login-logo {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,.3);
}

.login-hero h1 {
  color: var(--white);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.login-hero p {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.login-form-wrap {
  flex: 1;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}

.login-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.login-form-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 28px;
}

.login-page .form-control {
  height: 50px;
  font-size: 15px;
}

.login-page .btn-primary {
  height: 50px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  width: 100%;
  margin-top: 4px;
  letter-spacing: .2px;
}

.login-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--gray-300);
}


/* ---- Foto Service Grid ---- */
.foto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px)  { .foto-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .foto-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---- Utilities ---- */
.text-blue   { color: var(--blue-500); }
.text-muted  { color: var(--gray-400); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.fw-bold { font-weight: 700; }
.fw-semi { font-weight: 600; }

.small { font-size: 12px; }
.tiny  { font-size: 11px; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Hide desktop-only elements on mobile ---- */
.desktop-sidebar { display: none; }
.desktop-topbar  { display: none; }

/* On mobile, app-layout is just a normal block so content flows naturally */
.app-layout    { display: block; }
.desktop-main  { display: block; }

/* ---- Responsive: tablet and up ---- */
@media (min-width: 640px) {
  body {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* On larger screens the bottom nav and mobile topbar hide; sidebar appears */
  .bottom-nav { display: none; }
  .topbar     { display: none; }

  .app-layout {
    display: flex;
    min-height: 100vh;
  }

  .desktop-sidebar {
    width: 220px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    flex-shrink: 0;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 20px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 12px;
  }

  .sidebar-brand-logo {
    width: 32px; height: 32px;
    background: var(--blue-500);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 15px; flex-shrink: 0;
  }

  .sidebar-brand-name {
    font-size: 15px; font-weight: 800;
    color: var(--gray-900); letter-spacing: -.3px;
  }

  .sidebar-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--gray-300);
    padding: 0 8px;
    margin-bottom: 4px;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background .1s, color .1s;
    text-decoration: none;
  }

  .sidebar-nav-item i { font-size: 17px; width: 20px; text-align: center; }
  .sidebar-nav-item:hover { background: var(--gray-50); color: var(--gray-700); }
  .sidebar-nav-item.active { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }

  .sidebar-spacer { flex: 1; }

  .sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .1s;
  }

  .sidebar-logout:hover { background: var(--danger-light); }
  .sidebar-logout i { font-size: 17px; }

  .desktop-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .desktop-topbar {
    height: 56px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .desktop-page-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }

  .topbar { display: none; }

  .page-content { padding: 24px; }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(6, 1fr);
  }

}

/* =======================================================
   LOGIN — Split-screen layout (desktop) + stacked (mobile)
   ======================================================= */

/* ---- Login Split Container ---- */
.login-split {
  display: flex;
  min-height: 100vh;
  background: var(--white);
}

/* ---- Panels ---- */
.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

/* ---- LEFT PANEL (Brand) ---- */
.login-panel-brand {
  background: var(--blue-500);
  color: var(--white);
  position: relative;
  overflow: hidden;
  flex: 1.1;
  min-height: 320px;
}

.login-panel-brand::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -120px;
  right: -120px;
}

.login-panel-brand::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -100px;
  left: -100px;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.login-brand-content .login-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--white);
  margin: 0 auto 20px;
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,.25);
}

.login-brand-content h1 {
  color: var(--white);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-brand-content p {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(2px);
}

.login-feature i {
  width: 24px;
  text-align: center;
  font-size: 16px;
  color: rgba(255,255,255,.9);
}

/* ---- RIGHT PANEL (Form) ---- */
.login-panel-form {
  background: var(--white);
  flex: 1;
  padding: 40px 32px;
}

.login-form-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.login-form-header {
  margin-bottom: 28px;
}

.login-form-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.login-form-sub {
  font-size: 14px;
  color: var(--gray-400);
}

/* ---- Form Inputs ---- */
.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-300);
  font-size: 14px;
  pointer-events: none;
}

.login-input {
  padding-left: 42px !important;
  height: 48px;
  font-size: 15px;
}

.login-input:focus + .login-input-icon {
  color: var(--blue-400);
}

.login-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-300);
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
}

.login-password-toggle:hover {
  color: var(--gray-500);
}

/* ---- Remember me ---- */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 18px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
  border-radius: 4px;
  cursor: pointer;
}

.login-remember span {
  font-weight: 500;
}

.login-forgot-placeholder {
  /* Placeholder for future "Forgot password?" link */
  font-size: 13px;
  color: var(--gray-400);
}

/* ---- Submit Button ---- */
.login-submit-btn {
  width: 100%;
  height: 50px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  letter-spacing: 0.2px;
  margin-top: 4px;
}

/* ---- Form Footer ---- */
.login-form-footer {
  text-align: center;
  padding-top: 24px;
  font-size: 12px;
  color: var(--gray-300);
  margin-top: 8px;
  border-top: 1px solid var(--gray-100);
}

/* =======================================================
   RESPONSIVE: Mobile (stacked layout)
   ======================================================= */

@media (max-width: 767px) {
  .login-split {
    flex-direction: column;
    min-height: 100vh;
  }

  .login-panel {
    padding: 32px 24px;
    flex: none;
  }

  /* ---- Left panel becomes hero (mobile) ---- */
  .login-panel-brand {
    min-height: auto;
    padding: 48px 24px 40px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex: none;
  }

  .login-panel-brand::before {
    width: 200px;
    height: 200px;
    top: -60px;
    right: -60px;
  }

  .login-panel-brand::after {
    width: 160px;
    height: 160px;
    bottom: -60px;
    left: -60px;
  }

  .login-brand-content .login-logo {
    width: 64px;
    height: 64px;
    font-size: 26px;
    margin-bottom: 14px;
  }

  .login-brand-content h1 {
    font-size: 24px;
  }

  .login-brand-content p {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .login-brand-features {
    display: none; /* hide features on mobile to keep it clean */
  }

  /* ---- Right panel (form) ---- */
  .login-panel-form {
    padding: 24px 16px 32px;
    flex: 1;
  }

  .login-form-container {
    max-width: 100%;
  }

  .login-form-title {
    font-size: 20px;
  }

  .login-form-sub {
    font-size: 13px;
  }

  .login-input {
    height: 44px;
    font-size: 14px;
  }

  .login-submit-btn {
    height: 46px;
    font-size: 14px;
  }

  .login-options {
    margin: 2px 0 14px;
  }

  .login-form-footer {
    font-size: 11px;
    padding-top: 16px;
    margin-top: 4px;
  }

  /* Hide remember me on mobile (optional — keep if you want) */
  /* .login-remember { display: none; } */
}

/* =======================================================
   RESPONSIVE: Tablet (768px - 1023px) — keep split but adjust
   ======================================================= */

@media (min-width: 768px) and (max-width: 1023px) {
  .login-panel-brand {
    flex: 0.8;
    padding: 32px 24px;
  }

  .login-panel-form {
    padding: 32px 24px;
  }

  .login-brand-content h1 {
    font-size: 26px;
  }

  .login-brand-features {
    display: none;
  }

  .login-form-container {
    max-width: 340px;
  }

  .login-form-title {
    font-size: 20px;
  }
}

/* =======================================================
   RESPONSIVE: Large screens (1400px+)
   ======================================================= */

@media (min-width: 1400px) {
  .login-panel-brand {
    flex: 1.2;
  }

  .login-brand-content {
    max-width: 460px;
  }

  .login-brand-content h1 {
    font-size: 38px;
  }

  .login-form-container {
    max-width: 440px;
  }
}