/* =============================================================================
   Express Rail Delivery — Admin design system
   Clean, modern admin UI. Overrides the rough base styles in app.css.
   ============================================================================= */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --a-bg: #f1f5f9;
  --a-sidebar: #0f172a;
  --a-sidebar-2: #16233c;
  --a-primary: #f97316;
  --a-primary-strong: #ea580c;
  --a-navy: #0b4f8a;
  --a-text: #0f172a;
  --a-muted: #64748b;
  --a-border: #e2e8f0;
  --a-card: #ffffff;
  --a-danger: #dc2626;
  --a-success: #16a34a;
  --a-radius: 12px;
  --a-radius-sm: 8px;
  --a-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --a-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
}

/* ===== Base ===== */
.admin-body,
.admin-body * { box-sizing: border-box; }

.admin-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--a-text);
  background: var(--a-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.admin-body a { color: var(--a-navy); text-decoration: none; }
.admin-body a:hover { color: var(--a-primary-strong); }

/* ===== Layout ===== */
.admin-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.admin-sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: linear-gradient(180deg, var(--a-sidebar) 0%, var(--a-sidebar-2) 100%);
  color: #cbd5e1;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
  color: #fff;
}

.admin-brand-logo {
  display: block;
  max-width: 100%;
  width: auto;
  height: 40px;
  object-fit: contain;
}

.admin-brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-sidebar .nav-label {
  padding: 18px 12px 8px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 0;
}

.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-sidebar nav a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-sidebar nav a:hover i { color: #fff; }

.admin-sidebar nav a.active {
  background: rgba(249, 115, 22, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--a-primary);
}

.admin-sidebar nav a.active i { color: var(--a-primary); }

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-foot a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #cbd5e1;
  font-weight: 500;
}

.admin-sidebar-foot a:hover {
  background: rgba(220, 38, 38, 0.16);
  color: #fca5a5;
}

/* ===== Topbar ===== */
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--a-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-topbar-title {
  margin: 0;
  color: var(--a-text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.admin-hamburger {
  display: none;
  border: 0;
  background: transparent;
  font-size: 20px;
  color: var(--a-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.admin-hamburger:hover { background: var(--a-bg); }

.admin-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--a-muted);
  font-weight: 500;
  font-size: 13.5px;
}

.admin-topbar-link:hover { background: var(--a-bg); color: var(--a-text); }

.admin-icon-btn,
.admin-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--a-text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
  position: relative;
}

.admin-icon-btn:hover,
.admin-profile-btn:hover { background: var(--a-bg); }

.admin-icon-btn i { font-size: 17px; color: var(--a-muted); }

.admin-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--a-danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-navy), var(--a-primary));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.admin-profile-name { font-size: 13.5px; }

.admin-profile-btn .fa-chevron-down { font-size: 11px; color: var(--a-muted); }

/* ===== Content ===== */
.admin-content {
  flex: 1;
  padding: 28px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Page head ===== */
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h2 {
  margin: 0;
  color: var(--a-text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-head .spacer { margin-left: auto; }

/* ===== Cards ===== */
.admin-main .card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--a-shadow);
}

/* ===== Stat cards ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--a-shadow-lg);
}

.stat-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  color: #fff;
  font-size: 20px;
}

.stat-card__body strong {
  display: block;
  color: var(--a-text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-card__body span {
  color: var(--a-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--a-primary); color: #fff; }
.btn-primary:hover { background: var(--a-primary-strong); color: #fff; box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3); }

.btn-secondary { background: var(--a-navy); color: #fff; }
.btn-secondary:hover { background: #0a3f72; color: #fff; }

.btn-danger { background: var(--a-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-outline { background: #fff; color: var(--a-text); border-color: var(--a-border); }
.btn-outline:hover { background: var(--a-bg); color: var(--a-text); border-color: #cbd5e1; }

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.4;
}

/* ===== Alerts ===== */
.alert {
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
}

.alert-success { color: #166534; background: #dcfce7; border: 1px solid #bbf7d0; }
.alert-error { color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; }
.alert-error ul { margin: 8px 0 0 18px; padding: 0; }

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
}

/* Grid/flex parents must be allowed to shrink below their content width,
   otherwise the 760px table forces the whole page to overflow instead of
   scrolling inside .table-wrap. */
.profile-grid > *,
.admin-main > *,
.admin-content > * { min-width: 0; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--a-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--a-border);
}

.admin-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: #f8fafc; }

.admin-table .mono {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-weight: 600;
  color: var(--a-navy);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table-actions a,
.table-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--a-muted);
  background: #f1f5f9;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.table-actions a:hover,
.table-actions button:hover { background: #e2e8f0; color: var(--a-text); }
.table-actions a.text-danger,
.table-actions button.text-danger { color: var(--a-danger); }

/* ===== Toolbar / filters ===== */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  margin-bottom: 18px;
}

.admin-toolbar .toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}

.admin-toolbar .toolbar-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--a-muted);
}

.admin-toolbar input,
.admin-toolbar select {
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  color: var(--a-text);
  background: #fff;
  min-width: 0;
}

.admin-toolbar input:focus,
.admin-toolbar select:focus {
  outline: none;
  border-color: var(--a-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.admin-toolbar .toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

/* ===== Forms ===== */
.admin-shipment-form { display: grid; gap: 20px; }

.admin-form-section {
  padding: 24px;
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  background: #fff;
  box-shadow: var(--a-shadow);
}

.admin-form-section__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--a-border);
}

.admin-form-section__head > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: var(--a-navy);
  font-weight: 700;
  font-size: 15px;
}

.admin-form-section__head h2 {
  margin: 0 0 3px;
  color: var(--a-text);
  font-size: 17px;
  font-weight: 700;
}

.admin-form-section__head p { margin: 0; color: var(--a-muted); font-size: 13px; }

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.admin-field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--a-text);
}

.admin-field label small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--a-muted);
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.admin-main input,
.admin-main select,
.admin-main textarea {
  width: 100%;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--a-text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-field textarea,
.admin-main textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.admin-main input:focus,
.admin-main select:focus,
.admin-main textarea:focus {
  outline: none;
  border-color: var(--a-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.admin-field input[type="file"] { padding: 8px; }

.admin-field-full { grid-column: 1 / -1; }

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 18px 24px;
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  background: #fff;
  box-shadow: var(--a-shadow);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 18px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--a-border);
  color: var(--a-text);
  background: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}

.pagination a:hover { background: var(--a-bg); }

.pagination .current { background: var(--a-navy); border-color: var(--a-navy); color: #fff; }
.pagination .disabled { opacity: 0.4; pointer-events: none; }
.pagination .page-info { border: 0; background: transparent; color: var(--a-muted); }

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--a-muted);
}

.empty-state .icon { font-size: 42px; color: #cbd5e1; margin-bottom: 14px; }
.empty-state h3 { color: var(--a-text); margin: 0 0 6px; font-size: 17px; }
.empty-state p { margin: 0 0 18px; }

/* ===== Dropdowns ===== */
.admin-dropdown { position: relative; }

.admin-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--a-border);
  border-radius: 12px;
  box-shadow: var(--a-shadow-lg);
  z-index: 50;
  overflow: hidden;
}

.admin-dropdown.open .admin-dropdown-menu { display: block; }

.admin-dropdown-head {
  padding: 12px 16px;
  font-weight: 700;
  color: var(--a-text);
  border-bottom: 1px solid var(--a-border);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  color: #334155;
  text-decoration: none;
  font-size: 13.5px;
  border-bottom: 1px solid #f1f5f9;
}

.admin-dropdown-item:last-child { border-bottom: 0; }
.admin-dropdown-item:hover { background: #f8fafc; }
.admin-dropdown-item span { font-weight: 600; color: var(--a-text); }
.admin-dropdown-item small { margin-left: auto; color: var(--a-muted); }

/* ===== Shipment profile (view page) ===== */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 22px;
}

.detail-list {
  display: grid;
  gap: 1px;
  background: var(--a-border);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  overflow: hidden;
}

.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  background: #fff;
}

.detail-list > div span { color: var(--a-muted); font-size: 13px; font-weight: 500; }
.detail-list > div strong { color: var(--a-text); text-align: right; overflow-wrap: anywhere; font-weight: 600; }

/* ===== Timeline ===== */
.timeline { position: relative; }
.timeline-item { position: relative; padding: 0 0 24px 28px; border-left: 2px solid var(--a-border); }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 4px #fff;
}
.timeline-item.is-current { border-left-color: var(--a-primary); }
.timeline-item.is-current::before { background: var(--a-primary); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15); }
.timeline-meta { color: var(--a-muted); font-size: 12.5px; font-weight: 600; }
.timeline-status { margin: 8px 0 5px; }
.timeline-status .badge { font-size: 10.5px; }
.timeline-title { margin: 4px 0 3px; color: var(--a-text); font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.timeline-desc { margin: 0; color: var(--a-muted); overflow-wrap: anywhere; font-size: 13.5px; }

.timeline-actions {
  display: flex;
  gap: 6px;
  position: absolute;
  top: 0;
  right: 0;
}
.timeline-actions a,
.timeline-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #64748b;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}
.timeline-actions a:hover { background: #e2e8f0; color: #0f172a; }
.timeline-actions button:hover { background: #fee2e2; color: #dc2626; }

/* ===== Map ===== */
.tracking-map,
#admin-tracking-map,
#shipment-map { border-radius: 12px; overflow: hidden; border: 1px solid var(--a-border); background: #e2e8f0; }
.vehicle-marker {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; background: var(--a-primary); box-shadow: 0 10px 24px rgba(249, 115, 22, 0.4);
}

/* ===== Login ===== */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  margin: 0;
  background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.18), transparent 40%),
              linear-gradient(135deg, #0f172a 0%, #0b4f8a 100%);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-card {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  padding: 36px 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.login-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 26px; }
.login-brand-logo {
  display: block;
  max-width: 100%;
  width: auto;
  height: 44px;
  object-fit: contain;
}
.login-brand-name { color: var(--a-text); font-weight: 700; font-size: 15px; line-height: 1.25; }

.login-card h1 { margin: 0 0 6px; color: var(--a-text); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.login-sub { margin: 0 0 24px; color: var(--a-muted); font-size: 14px; }

.login-alert { padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; font-size: 13.5px; font-weight: 500; }

.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-field label { font-size: 13px; font-weight: 600; color: var(--a-text); }
.login-field input {
  width: 100%; height: 44px; border: 1px solid var(--a-border); border-radius: 9px;
  padding: 10px 13px; font: inherit; font-size: 14px; color: var(--a-text); background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-field input:focus { outline: none; border-color: var(--a-primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14); }

.login-check { display: flex; align-items: center; gap: 8px; margin: 2px 0 18px; color: #334155; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.login-check input { width: auto; }

.login-submit { width: 100%; height: 46px; font-size: 15px; font-weight: 700; border-radius: 10px; }

.login-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--a-muted); font-weight: 500; font-size: 13.5px; text-decoration: none; }
.login-back:hover { color: var(--a-text); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
  .admin-body { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 82vw); z-index: 45;
    transform: translateX(-100%); transition: transform 0.22s ease;
  }
  .admin-body.sidebar-open .admin-sidebar { transform: translateX(0); }
  .admin-body.sidebar-open .admin-backdrop { display: block; }
  .admin-hamburger { display: inline-flex; }
  .admin-content { padding: 20px; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-toolbar .toolbar-field { min-width: 0; flex: 1 1 220px; }
}

@media (max-width: 575px) {
  .stat-grid { grid-template-columns: 1fr; }
  .admin-topbar { padding: 12px 16px; gap: 10px; flex-wrap: wrap; row-gap: 8px; }
  .admin-topbar-title { font-size: 16px; }
  .admin-topbar-link span,
  .admin-profile-name { display: none; }
  .admin-topbar-actions { gap: 4px; }
  .admin-content { padding: 16px; }
  .admin-main .card,
  .admin-form-section { padding: 18px; }
  .admin-toolbar { padding: 16px; }
  .admin-toolbar .toolbar-field { flex: 1 1 100%; }
  .admin-toolbar .toolbar-actions { margin-left: 0; width: 100%; }
  .admin-dropdown-menu { min-width: 0; width: min(280px, calc(100vw - 32px)); }
  .page-head h2 { font-size: 18px; }
  .admin-field > div[style*="display:flex"] { flex-wrap: wrap; }
  .admin-field > div[style*="display:flex"] > select { width: 100% !important; }
  .login-card { padding: 28px 22px; }
}

.admin-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 40;
}
