/* ==========================================================================
   CabSwale Admin — Premium custom theme (NO Bootstrap)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f4fb;
  --surface: #ffffff;
  --surface-soft: #f8f9ff;
  --border: #e7e8f4;
  --text: #1b1c33;
  --text-muted: #6b6d8a;
  --text-faint: #9a9cbd;

  --primary: #5b4bff;
  --primary-dark: #4536e0;
  --primary-soft: #eeecff;
  --accent: #17c3b2;
  --accent-soft: #e3faf6;
  --warning: #ffab2e;
  --warning-soft: #fff3e0;
  --danger: #ff5c72;
  --danger-soft: #ffe9ec;
  --success: #2bc48a;
  --success-soft: #e3f9ef;
  --info: #3aa0ff;
  --info-soft: #e7f3ff;

  --sidebar-bg: #16152b;
  --sidebar-bg-soft: #201f3b;
  --sidebar-text: #b7b6d8;
  --sidebar-text-active: #ffffff;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(27, 28, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 28, 51, 0.08);
  --shadow-lg: 0 20px 48px rgba(27, 28, 51, 0.14);

  --font-display: 'Plus Jakarta Sans', 'Manrope', sans-serif;
  --font-body: 'Manrope', 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--text); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------------------------- App shell ---------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-soft) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 24px 22px;
}
.sidebar-brand .logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 17px;
  box-shadow: 0 6px 16px rgba(91, 75, 255, 0.45);
}
.sidebar-brand .brand-text { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 16.5px; line-height: 1.2; }
.sidebar-brand .brand-sub { font-size: 11px; color: var(--sidebar-text); letter-spacing: 0.06em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 10px 14px 10px; overflow-y: auto; }
.nav-group-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6f6d99; padding: 16px 14px 6px;
}
.nav-group-label:first-child { padding-top: 6px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 4px;
  color: var(--sidebar-text); font-weight: 600; font-size: 13.6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, var(--primary), #7a6bff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(91, 75, 255, 0.35);
}
.sidebar-nav .nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer { padding: 16px 20px 22px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-role-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
  background: rgba(91, 75, 255, 0.25); color: #cfc9ff; margin-bottom: 10px;
}
.sidebar-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #fff; font-weight: 600; font-size: 13px;
}
.sidebar-logout:hover { background: var(--danger); border-color: var(--danger); }

/* ---------------------------------- Main column ---------------------------------- */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 74px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text); }

.admin-chip { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 700; font-family: var(--font-display);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.admin-meta { line-height: 1.25; }
.admin-meta .name { font-weight: 700; font-size: 13.5px; }
.admin-meta .role { font-size: 11.5px; color: var(--text-muted); text-transform: capitalize; }

.page-body { padding: 28px 32px 60px; }

/* ---------------------------------- Flash messages ---------------------------------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; font-size: 13.5px; }
.flash-success { background: var(--success-soft); color: #0d8a5c; }
.flash-error { background: var(--danger-soft); color: #c9273f; }

/* ---------------------------------- Stat cards (dashboard) ---------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-card .stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.stat-card .stat-label { color: var(--text-muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.stat-card .stat-sub { margin-top: 10px; font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
.stat-card.c-primary .stat-icon { background: var(--primary-soft); color: var(--primary); }
.stat-card.c-accent .stat-icon { background: var(--accent-soft); color: #0f9e8f; }
.stat-card.c-warning .stat-icon { background: var(--warning-soft); color: #c07500; }
.stat-card.c-info .stat-icon { background: var(--info-soft); color: #1b78d6; }

/* ---------------------------------- Filter bar ---------------------------------- */
.filter-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.filter-bar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.filter-field label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.filter-field input, .filter-field select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 13.5px; background: var(--surface-soft); color: var(--text); min-width: 150px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-field input:focus, .filter-field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.filter-search { flex: 1 1 220px; min-width: 220px; }
.filter-actions { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: none; font-weight: 700; font-size: 13.5px;
  cursor: pointer; transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 8px 18px rgba(91,75,255,0.3); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(91,75,255,0.4); }
.btn-ghost { background: var(--surface-soft); color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: #eef0fa; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline-danger { background: var(--danger-soft); color: #c9273f; border: 1.5px solid #ffd1d8; }
.btn-block { width: 100%; }

/* ---------------------------------- Card grid ---------------------------------- */
.results-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.results-count { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.results-toolbar { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.view-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button {
  border: none; background: var(--surface); color: var(--text-muted); padding: 8px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.view-toggle button.active { background: var(--primary); color: #fff; }
.view-toggle button svg { width: 15px; height: 15px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* List view: single column, cards reflow into compact horizontal rows */
.card-grid.view-list { grid-template-columns: 1fr; gap: 10px; }
.card-grid.view-list .entity-card {
  flex-direction: row; align-items: center; padding: 14px 20px; gap: 24px; flex-wrap: wrap;
}
.card-grid.view-list .entity-card.has-cover { flex-direction: row; padding: 10px 16px; }
.card-grid.view-list .entity-card.has-cover .cover-image { width: 70px; height: 56px; border-radius: 10px; flex-shrink: 0; }
.card-grid.view-list .entity-card.has-cover .cover-body { padding: 0; flex-direction: row; align-items: center; flex: 1; gap: 20px; }
.card-grid.view-list .entity-card-head { flex: 1 1 220px; }
.card-grid.view-list .entity-route { display: none; }
.card-grid.view-list .entity-meta-row { border-top: none; padding-top: 0; flex: 1 1 260px; }
.card-grid.view-list .entity-card-foot { margin-top: 0; flex: 0 0 auto; }

.entity-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex; flex-direction: column; gap: 12px;
}
.entity-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.entity-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.entity-ref { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; }
.entity-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: #0d8a5c; }
.badge-warning { background: var(--warning-soft); color: #c07500; }
.badge-danger { background: var(--danger-soft); color: #c9273f; }
.badge-info { background: var(--info-soft); color: #1b78d6; }
.badge-neutral { background: #eef0f7; color: #5a5c78; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }

.entity-route { display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--text); }
.route-line { flex: 1; display: flex; flex-direction: column; gap: 6px; position: relative; padding-left: 16px; }
.route-line::before {
  content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--border) 0 4px, transparent 4px 8px);
}
.route-point { position: relative; }
.route-point::before {
  content: ''; position: absolute; left: -16px; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}
.route-point.drop::before { background: var(--accent); }
.route-point .addr { color: var(--text-muted); font-weight: 500; }

.entity-meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 12px; }
.entity-meta-row strong { color: var(--text); font-weight: 700; }
.entity-meta-row .meta-item { display: flex; align-items: center; gap: 6px; }

.entity-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.entity-fare { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--text); }
.entity-actions { display: flex; gap: 8px; }

.avatar-circle {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-family: var(--font-display);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

/* Card with a cover image (hotels, room types, tourist places) */
.entity-card.has-cover { padding: 0; overflow: hidden; }
.entity-card.has-cover .cover-image {
  width: 100%; height: 150px; object-fit: cover; display: block; background: var(--surface-soft);
}
.entity-card.has-cover .cover-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }

/* Settings key-value card */
.setting-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; }
.setting-card .setting-key { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; color: var(--primary); text-transform: uppercase; letter-spacing: 0.03em; }
.setting-card form { display: flex; gap: 8px; }
.setting-card input { flex: 1; border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; background: var(--surface-soft); }
.setting-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Multi-image uploader */
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.image-gallery-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface-soft); border: 1px solid var(--border); }
.image-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-gallery-item form { position: absolute; top: 6px; right: 6px; }
.image-gallery-item .btn-remove-image {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(20,20,35,0.75); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.image-gallery-item .btn-remove-image:hover { background: var(--danger); }

.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 24px; text-align: center;
  background: var(--surface-soft); cursor: pointer; transition: border-color 0.15s ease;
}
.file-drop:hover { border-color: var(--primary); }
.file-drop input[type="file"] { display: none; }
.file-drop-label { font-size: 13.5px; color: var(--text-muted); font-weight: 600; }
.file-drop-label strong { color: var(--primary); }
.file-preview-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-preview-list span { font-size: 11.5px; background: var(--primary-soft); color: var(--primary); padding: 4px 10px; border-radius: 20px; font-weight: 600; }

/* Import CSV inline form */
.import-form { display: flex; align-items: center; gap: 8px; }
.import-form input[type="file"] {
  font-size: 12px; max-width: 170px; border: 1.5px dashed var(--border); border-radius: 8px; padding: 6px 8px; background: var(--surface-soft);
}

/* Permission matrix table */
.matrix-group { margin-bottom: 22px; }
.matrix-group-title { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; padding-left: 2px; }
.matrix-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.matrix-table th { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); padding: 12px 8px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.matrix-table th:first-child { text-align: left; padding-left: 18px; }
.matrix-table td { padding: 11px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.matrix-table td:first-child { text-align: left; padding-left: 18px; font-weight: 600; font-size: 13px; }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table tr:hover td { background: var(--surface-soft); }
.matrix-checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.matrix-select-all { font-size: 10.5px; color: var(--primary); font-weight: 700; cursor: pointer; text-transform: none; letter-spacing: 0; display: block; margin-top: 3px; }
.matrix-sticky-save { position: sticky; bottom: 20px; display: flex; justify-content: flex-end; margin-top: 20px; }

.stars { color: #f5a623; letter-spacing: 1px; }

.rating-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--warning-soft); color: #b3760c; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }

.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--text-faint);
  background: var(--surface); border-radius: var(--radius-lg); border: 1.5px dashed var(--border);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-muted); margin-bottom: 6px; }

/* ---------------------------------- Pagination ---------------------------------- */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--text-muted); border: 1.5px solid var(--border); background: var(--surface);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(91,75,255,0.3); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ---------------------------------- Detail / ticket thread ---------------------------------- */
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.thread { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; }
.thread-msg { max-width: 70%; padding: 13px 16px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.thread-msg.from-admin { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.thread-msg.from-user { align-self: flex-start; background: var(--surface-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.thread-msg .meta { display: block; font-size: 10.5px; opacity: 0.75; margin-top: 6px; font-weight: 600; }

.reply-box { display: flex; flex-direction: column; gap: 10px; }
.reply-box textarea {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px;
  min-height: 90px; resize: vertical; background: var(--surface-soft);
}
.reply-box textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------------------------------- Table (admin users) ---------------------------------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); padding: 14px 18px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 18px; font-size: 13.5px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-soft); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 21px; }
.section-head p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.form-field label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.form-field input, .form-field select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.8px; background: var(--surface-soft);
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; max-width: 620px; box-shadow: var(--shadow-sm); }

/* ---------------------------------- Login page ---------------------------------- */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 20% 20%, #241f5f 0%, #16152b 45%, #0e0d1e 100%);
  font-family: var(--font-body); padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: rgba(255,255,255,0.06); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 24px; padding: 40px 34px; box-shadow: var(--shadow-lg);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo .logo-mark { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 19px; box-shadow: 0 8px 20px rgba(91,75,255,0.5); }
.login-logo .brand-text { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 18px; }
.login-logo .brand-sub { font-size: 11px; color: #9694c4; letter-spacing: 0.05em; text-transform: uppercase; }
.login-card h1 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.login-card .subtitle { color: #a5a3ce; font-size: 13px; margin-bottom: 26px; }
.login-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 7px; }
.login-field label { color: #cfcdec; font-size: 12px; font-weight: 700; }
.login-field input {
  padding: 13px 15px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: #fff; font-size: 14px;
}
.login-field input::placeholder { color: #7a78a3; }
.login-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,75,255,0.3); }
.login-submit {
  width: 100%; padding: 13px; border-radius: 12px; border: none; margin-top: 6px;
  background: linear-gradient(135deg, var(--primary), #7a6bff); color: #fff; font-weight: 800; font-size: 14.5px;
  box-shadow: 0 10px 24px rgba(91,75,255,0.45);
}
.login-alert { padding: 11px 14px; border-radius: 10px; font-size: 12.8px; font-weight: 600; margin-bottom: 18px; }
.login-alert.error { background: rgba(255, 92, 114, 0.14); color: #ff9aa8; border: 1px solid rgba(255,92,114,0.3); }
.login-alert.info { background: rgba(58, 160, 255, 0.14); color: #9ecbff; border: 1px solid rgba(58,160,255,0.3); }
.login-foot { text-align: center; margin-top: 22px; color: #6f6d99; font-size: 11.5px; }

/* ---------------------------------- Error pages ---------------------------------- */
.error-shell { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.error-shell .code { font-family: var(--font-display); font-size: 72px; font-weight: 800; color: var(--primary-soft); background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-shell p { color: var(--text-muted); margin-bottom: 18px; }

/* ---------------------------------- Responsive ---------------------------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stat-grid, .card-grid { grid-template-columns: 1fr; }
  .page-body { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
}
