/* ============================================================
   Pacific Diagnostics — Admin Panel Stylesheet
   Colors: Navy #111886 | Orange #FF6600 | Dark #180E3B
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --sidebar-bg:     #180E3B;
  --sidebar-text:   rgba(255,255,255,0.75);
  --sidebar-active: #FF6600;
  --navy:           #111886;
  --orange:         #FF6600;
  --bg:             #f0f2f7;
  --card:           #ffffff;
  --border:         #e2e5f1;
  --text:           #1a1a2e;
  --muted:          #6b7280;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;
  --sidebar-w:      260px;
  --header-h:       64px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  overflow-y: auto; overflow-x: hidden;
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-brand img { height: 38px; width: auto; }
.sidebar-brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: #fff; line-height: 1.2;
}
.sidebar-brand-sub {
  font-size: 0.62rem; color: var(--orange);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px;
}

.sidebar-nav { flex: 1; padding: 12px 0; }

.sidebar-section-title {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,0.28);
  padding: 14px 20px 5px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 0.84rem; font-weight: 400;
  transition: all 0.18s ease;
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-left-color: rgba(255,102,0,0.45);
}
.sidebar-link.active {
  background: rgba(255,102,0,0.1);
  color: #fff;
  border-left-color: var(--orange);
  font-weight: 600;
}
.sidebar-link i { width: 17px; text-align: center; font-size: 0.88rem; flex-shrink: 0; }
.sidebar-link .nav-badge {
  margin-left: auto;
  background: var(--orange);
  color: #fff;
  font-size: 0.6rem; padding: 2px 7px;
  border-radius: 10px; font-weight: 700;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--orange);
  flex-shrink: 0; background: rgba(255,255,255,0.1);
}
.sidebar-user-avatar-ph {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 0.8rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 0.68rem; color: rgba(255,255,255,0.45); }
.sidebar-logout {
  color: rgba(255,255,255,0.4); font-size: 0.85rem;
  transition: color 0.2s; flex-shrink: 0; padding: 4px;
}
.sidebar-logout:hover { color: var(--danger); }

/* ============================================================
   MAIN AREA
   ============================================================ */
.admin-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* ---- Top Header ---- */
.admin-header {
  background: var(--card);
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 24px; gap: 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 7px; color: var(--text); font-size: 1.1rem;
  border-radius: 7px; transition: background 0.2s;
}
.header-toggle:hover { background: var(--bg); }
.header-breadcrumb { flex: 1; }
.header-breadcrumb h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.header-breadcrumb .breadcrumb-trail {
  font-size: 0.72rem; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.breadcrumb-trail a { color: var(--navy); }
.breadcrumb-trail span { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-icon-btn {
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  border-radius: 8px; color: var(--muted);
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; position: relative;
  text-decoration: none;
}
.header-icon-btn:hover { background: var(--bg); color: var(--navy); }
.header-icon-btn .dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; background: var(--orange);
  border-radius: 50%; border: 2px solid #fff;
}

/* ---- Content ---- */
.admin-content { flex: 1; padding: 24px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem; font-weight: 800; color: var(--text); line-height: 1.2;
}
.page-title small {
  display: block; font-size: 0.78rem; font-weight: 400;
  color: var(--muted); font-family: 'Inter', sans-serif; margin-top: 3px;
}
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: 12px; padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.si-navy   { background: rgba(17,24,134,0.1);  color: var(--navy); }
.si-orange { background: rgba(255,102,0,0.1);  color: var(--orange); }
.si-green  { background: rgba(16,185,129,0.1); color: var(--success); }
.si-blue   { background: rgba(59,130,246,0.1); color: var(--info); }
.si-purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.si-red    { background: rgba(239,68,68,0.1);  color: var(--danger); }
.stat-info {}
.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.55rem; font-weight: 800; color: var(--text); line-height: 1;
}
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 500; margin-top: 3px; }

/* ============================================================
   CARDS
   ============================================================ */
.acard {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 22px;
  overflow: hidden;
}
.acard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.acard-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.acard-title i { color: var(--orange); font-size: 0.85rem; }
.acard-body { padding: 20px; }
.acard-body.p0 { padding: 0; }

/* Two-column layout */
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.content-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }

/* ============================================================
   TABLES
   ============================================================ */
.atable { width: 100%; border-collapse: collapse; font-size: 0.855rem; }
.atable th {
  background: #f8f9fc; color: var(--muted);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.55px; padding: 11px 15px;
  text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.atable td {
  padding: 11px 15px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
.atable tr:last-child td { border-bottom: none; }
.atable tbody tr:hover { background: #f8f9fc; }

/* Product thumbnail */
.prod-thumb {
  width: 42px; height: 42px; border-radius: 8px;
  object-fit: cover; border: 1.5px solid var(--border);
  background: var(--bg); display: flex; align-items: center;
  justify-content: center; font-size: 0.7rem; color: var(--muted);
  overflow: hidden; flex-shrink: 0;
}
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }

.td-product { display: flex; align-items: center; gap: 11px; }
.td-product-name { font-weight: 600; font-size: 0.84rem; }
.td-product-brand { font-size: 0.72rem; color: var(--muted); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.b-success { background: rgba(16,185,129,0.1); color: #059669; }
.b-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.b-danger  { background: rgba(239,68,68,0.1);  color: #dc2626; }
.b-info    { background: rgba(59,130,246,0.1);  color: #2563eb; }
.b-navy    { background: rgba(17,24,134,0.1);   color: var(--navy); }
.b-orange  { background: rgba(255,102,0,0.1);   color: var(--orange); }
.b-gray    { background: rgba(107,114,128,0.12); color: #6b7280; }
.b-purple  { background: rgba(139,92,246,0.1);  color: #7c3aed; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 0.855rem; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.18s ease; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-1px); }
.btn-navy   { background: var(--navy);    color: #fff; box-shadow: 0 2px 8px rgba(17,24,134,0.25); }
.btn-navy:hover   { background: #0d1679; box-shadow: 0 4px 12px rgba(17,24,134,0.35); }
.btn-orange { background: var(--orange);  color: #fff; box-shadow: 0 2px 8px rgba(255,102,0,0.25); }
.btn-orange:hover { background: #e55a00; box-shadow: 0 4px 12px rgba(255,102,0,0.35); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); border-color: var(--navy); color: var(--navy); }
.btn-sm  { padding: 5px 11px; font-size: 0.78rem; }
.btn-xs  { padding: 3px 8px;  font-size: 0.72rem; }

/* Action icon buttons */
.act-btn {
  width: 30px; height: 30px; border-radius: 6px; border: none;
  cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; font-size: 0.78rem; text-decoration: none;
  transition: all 0.18s;
}
.act-view   { background: rgba(59,130,246,0.1);  color: #2563eb; }
.act-view:hover   { background: #2563eb; color: #fff; }
.act-edit   { background: rgba(245,158,11,0.1);  color: #d97706; }
.act-edit:hover   { background: #d97706; color: #fff; }
.act-delete { background: rgba(239,68,68,0.1);   color: #dc2626; }
.act-delete:hover { background: #dc2626; color: #fff; }
.act-check  { background: rgba(16,185,129,0.1);  color: #059669; }
.act-check:hover  { background: #059669; color: #fff; }
.act-btns   { display: flex; align-items: center; gap: 5px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.form-section-title i { color: var(--orange); }
.form-grid  { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.form-full  { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 0.855rem; color: var(--text);
  background: #fff; font-family: 'Inter', sans-serif;
  transition: border-color 0.18s, box-shadow 0.18s; width: 100%;
}
.form-control:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(17,24,134,0.07);
}
.form-control:disabled { background: var(--bg); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 95px; }
.form-text { font-size: 0.72rem; color: var(--muted); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  background: var(--bg); transition: all 0.2s;
}
.upload-area:hover { border-color: var(--navy); background: rgba(17,24,134,0.02); }
.upload-area i { font-size: 1.8rem; color: var(--muted); display: block; margin-bottom: 7px; }
.upload-area p { font-size: 0.8rem; color: var(--muted); margin: 3px 0; }
.upload-area .hint { font-size: 0.7rem; color: var(--muted); }
.img-preview-grid { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.img-prev-item {
  position: relative; width: 78px; height: 78px;
  border-radius: 8px; overflow: hidden; border: 1.5px solid var(--border);
}
.img-prev-item img { width: 100%; height: 100%; object-fit: cover; }
.img-prev-item .rm {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; background: rgba(239,68,68,0.9);
  color: #fff; border: none; border-radius: 50%;
  font-size: 0.55rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 9px; }
.toggle {
  position: relative; width: 42px; height: 23px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 23px; transition: 0.2s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  height: 17px; width: 17px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider:before { transform: translateX(19px); }

/* ============================================================
   FILTERS BAR
   ============================================================ */
.filters-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 0 11px;
  flex: 1; min-width: 180px; max-width: 300px;
}
.search-box i { color: var(--muted); font-size: 0.82rem; }
.search-box input {
  border: none; outline: none; font-size: 0.855rem;
  padding: 8px 0; flex: 1; color: var(--text);
  font-family: 'Inter', sans-serif;
  background: transparent;
}
.filter-sel {
  padding: 8px 28px 8px 11px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 0.855rem; color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 9px center;
  appearance: none; cursor: pointer; font-family: 'Inter', sans-serif;
}
.filter-sel:focus { outline: none; border-color: var(--navy); }
.ml-auto { margin-left: auto; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 5px; margin-top: 18px; justify-content: center; }
.page-link {
  width: 34px; height: 34px; display: flex; align-items: center;
  justify-content: center; border-radius: 7px; text-decoration: none;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  border: 1.5px solid var(--border); background: #fff; transition: all 0.18s;
}
.page-link:hover { border-color: var(--navy); color: var(--navy); }
.page-link.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 11px 15px; border-radius: 8px; font-size: 0.855rem;
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.alert i { flex-shrink: 0; }
.a-success { background: rgba(16,185,129,0.09); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.a-danger  { background: rgba(239,68,68,0.09);  color: #991b1b; border: 1px solid rgba(239,68,68,0.2); }
.a-warning { background: rgba(245,158,11,0.09); color: #92400e; border: 1px solid rgba(245,158,11,0.2); }
.a-info    { background: rgba(59,130,246,0.09);  color: #1e40af; border: 1px solid rgba(59,130,246,0.2); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-wrap {
  position: fixed; top: 18px; right: 18px;
  z-index: 9999; display: flex; flex-direction: column; gap: 9px;
}
.toast {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 15px;
  min-width: 270px; max-width: 340px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.11);
  display: flex; align-items: flex-start; gap: 11px;
  animation: slideIn 0.28s ease;
}
.toast-ico {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; flex-shrink: 0;
}
.toast.t-success .toast-ico { background: rgba(16,185,129,0.1); color: var(--success); }
.toast.t-error   .toast-ico { background: rgba(239,68,68,0.1);  color: var(--danger); }
.toast.t-warning .toast-ico { background: rgba(245,158,11,0.1); color: var(--warning); }
.toast-body { flex: 1; }
.toast-title   { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.toast-message { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 0.72rem; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.48);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.22s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: #fff; border-radius: 14px; width: 90%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  transform: scale(0.95); transition: transform 0.22s;
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 11px;
}
.modal-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.96rem; font-weight: 700; flex: 1;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem; padding: 4px;
}
.modal-body { padding: 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 9px;
}

/* ============================================================
   ORDER DETAIL
   ============================================================ */
.order-timeline { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.timeline-step  { display: flex; align-items: flex-start; gap: 11px; position: relative; }
.timeline-step::before {
  content: ''; position: absolute; left: 10px; top: 26px;
  width: 2px; height: calc(100% + 4px); background: var(--border);
}
.timeline-step:last-child::before { display: none; }
.tl-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 0.55rem; color: #fff;
  flex-shrink: 0; position: relative; z-index: 1;
}
.timeline-step.done .tl-dot   { background: var(--success); }
.timeline-step.active .tl-dot { background: var(--orange); }
.tl-text strong { font-size: 0.8rem; color: var(--text); display: block; }
.tl-text span   { font-size: 0.72rem; color: var(--muted); }

/* ============================================================
   USER AVATAR
   ============================================================ */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}
.avatar-ph {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.avatar-lg { width: 72px; height: 72px; }
.avatar-lg.avatar-ph { font-size: 1.2rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-state i { font-size: 2.8rem; color: #dde; display: block; margin-bottom: 14px; }
.empty-state h3 { font-family: 'Poppins', sans-serif; font-size: 0.96rem; color: var(--muted); margin-bottom: 7px; }
.empty-state p { font-size: 0.8rem; color: var(--muted); max-width: 280px; margin: 0 auto 18px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(17,24,134,0.4) 0%, transparent 65%),
              radial-gradient(ellipse at 70% 70%, rgba(255,102,0,0.1) 0%, transparent 50%);
}
.login-card {
  background: #fff; border-radius: 20px;
  padding: 38px 40px; width: 100%; max-width: 410px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.32);
  position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo img { height: 50px; margin-bottom: 11px; }
.login-logo h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; font-weight: 800; color: var(--text);
}
.login-logo p { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.login-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-muted   { color: var(--muted); }
.text-navy    { color: var(--navy); }
.text-orange  { color: var(--orange); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm  { font-size: 0.8rem; }
.fs-xs  { font-size: 0.72rem; }
.gap-8  { gap: 8px; }
.d-flex { display: flex; }
.ai-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-8  { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.mb-0  { margin-bottom: 0; }
.w-100 { width: 100%; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.48);
  z-index: 999; display: none;
}
.sidebar-overlay.active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .content-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  /* Sidebar */
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .header-toggle { display: flex; }

  /* Layout */
  .admin-content { padding: 16px; }
  .content-grid-3 { grid-template-columns: 1fr; }

  /* Stats */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-actions { width: 100%; display: flex; flex-wrap: wrap; }
  .page-actions .btn { flex: 1; min-width: 120px; justify-content: center; }

  /* Filters */
  .filters-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box { max-width: 100%; }
  .filter-sel { width: 100%; }

  /* Forms */
  .form-grid, .form-grid3 { grid-template-columns: 1fr; }

  /* Login */
  .login-card { padding: 28px 22px; }

  /* Tables — horizontal scroll within card */
  .acard-body.p0 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .atable { min-width: 600px; }

  /* Larger touch targets for action buttons */
  .act-btn { width: 34px; height: 34px; font-size: 0.82rem; }
  .act-btns { gap: 4px; }

  /* Modal — full width on mobile */
  .modal { width: 95%; margin: 0 10px; }

  /* Toast — span full width */
  .toast-wrap { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: unset; max-width: 100%; width: 100%; }

  /* Acard header wrapping */
  .acard-header { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  /* Stats */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 12px; gap: 10px; }
  .stat-icon { width: 42px; height: 42px; font-size: 1rem; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.72rem; }

  /* Header */
  .admin-header { padding: 0 12px; gap: 8px; }
  .header-breadcrumb h1 { font-size: 0.9rem; }

  /* Page */
  .page-title { font-size: 1.15rem; }
  .admin-content { padding: 12px; }

  /* Pagination */
  .page-link { width: 30px; height: 30px; font-size: 0.78rem; }
}

@media (max-width: 380px) {
  .stats-row { grid-template-columns: 1fr; }
  .page-actions .btn { width: 100%; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(110%); }
}

/* Scrollbar global */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
