/* ==========================================================================
   ITC TECHNOLOGY - Admin CMS Dashboard Design System
   ========================================================================== */

:root {
  --admin-primary: #0052cc;
  --admin-primary-dark: #0747a6;
  --admin-accent: #ff6b00;
  --admin-sidebar-bg: #0b1e36;
  --admin-sidebar-hover: #17365d;
  --admin-bg: #f4f6f9;
  --admin-card-bg: #ffffff;
  --admin-text: #2d3748;
  --admin-text-muted: #718096;
  --admin-border: #e2e8f0;
  --admin-success: #38a169;
  --admin-warning: #dd6b20;
  --admin-danger: #e53e3e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-modal: 0 20px 25px -5px rgba(0,0,0,0.2);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.5;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: var(--admin-sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand-logo {
  height: 40px;
  width: auto;
  max-width: 65px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
  flex-shrink: 0;
}

.brand-badge {
  background: var(--admin-primary);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--admin-accent);
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-nav {
  padding: 20px 12px;
  list-style: none;
  flex: 1;
}

.sidebar-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  padding: 10px 12px 6px 12px;
  letter-spacing: 1px;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--admin-sidebar-hover);
  color: #ffffff;
}

.nav-link.active {
  background-color: var(--admin-primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--admin-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-logout {
  background: none;
  border: none;
  color: #ff8b8b;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.admin-header {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--admin-sidebar-bg);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-info {
  line-height: 1.2;
}

.user-name {
  font-weight: 700;
  color: var(--admin-sidebar-bg);
}

.user-role {
  font-size: 11.5px;
  color: var(--admin-text-muted);
}

.admin-content {
  padding: 30px;
  flex: 1;
}

/* KPI Stats Cards - Industrial Multi-Color SaaS Layout */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stats-row-5 {
  grid-template-columns: repeat(5, 1fr);
}

.kpi-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
  animation: dashboardFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--admin-primary);
  opacity: 0.85;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

.kpi-card.card-blue::before { background: #2563eb; }
.kpi-card.card-blue:hover { border-color: #93c5fd; }

.kpi-card.card-emerald::before { background: #059669; }
.kpi-card.card-emerald:hover { border-color: #6ee7b7; }

.kpi-card.card-amber::before { background: #d97706; }
.kpi-card.card-amber:hover { border-color: #fcd34d; }

.kpi-card.card-indigo::before { background: #4f46e5; }
.kpi-card.card-indigo:hover { border-color: #a5b4fc; }

.kpi-card.card-teal::before { background: #0d9488; }
.kpi-card.card-teal:hover { border-color: #5eead4; }

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

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  letter-spacing: 0.2px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-feature-settings: "tnum";
  letter-spacing: -0.5px;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.kpi-card:hover .kpi-icon {
  transform: scale(1.08) rotate(3deg);
}

.kpi-icon.blue { background: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.kpi-icon.green { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.kpi-icon.orange { background: #fffbeb; color: #d97706; border: 1px solid #fef3c7; }
.kpi-icon.purple { background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.kpi-icon.teal { background: #f0fdfa; color: #0d9488; border: 1px solid #ccfbf1; }

.kpi-subtext {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.kpi-subtext.blue { background: #eff6ff; color: #1e40af; }
.kpi-subtext.green { background: #ecfdf5; color: #065f46; }
.kpi-subtext.orange { background: #fffbeb; color: #92400e; }
.kpi-subtext.purple { background: #eef2ff; color: #3730a3; }
.kpi-subtext.teal { background: #f0fdfa; color: #115e59; }

/* Dashboard Animation Keyframes */
@keyframes dashboardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: statusPulse 2s infinite;
}

/* Two-column dashboard split */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
  margin-bottom: 28px;
}

/* Customer Avatar Badge in Table */
.customer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Progress bar for distribution widget */
.progress-track {
  width: 100%;
  height: 7px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill.blue { background: #2563eb; }
.progress-fill.green { background: #059669; }
.progress-fill.orange { background: #d97706; }
.progress-fill.purple { background: #4f46e5; }
.progress-fill.teal { background: #0d9488; }

/* Data Tables */
.card {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 30px;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--admin-sidebar-bg);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th, .admin-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--admin-text-muted);
}

.admin-table tr:hover {
  background: #f8fbff;
}

.product-row-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--admin-border);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: #def7ec; color: #03543f; }
.badge-warning { background: #feecdc; color: #8a2c0d; }
.badge-primary { background: #deebff; color: #0747a6; }
.badge-secondary { background: #e2e8f0; color: #4a5568; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--admin-primary); color: #fff; }
.btn-primary:hover { background: var(--admin-primary-dark); }

.btn-accent { background: var(--admin-accent); color: #fff; }
.btn-accent:hover { background: #e05e00; }

.btn-secondary { background: #e2e8f0; color: var(--admin-text); }
.btn-secondary:hover { background: #cbd5e0; }

.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fca5a5; }

.btn-icon {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--admin-text);
  font-family: inherit;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Image Upload Dropzone */
.image-dropzone {
  border: 2px dashed var(--admin-border);
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}

.image-dropzone:hover {
  border-color: var(--admin-primary);
  background: #f0f7ff;
}

.image-preview-wrap {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.image-preview-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  overflow: hidden;
  position: relative;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Specs Dynamic Builder */
.specs-row-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr 40px;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 30, 54, 0.65);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: all 0.2s;
}

.admin-modal-overlay.active .admin-modal-card {
  transform: translateY(0);
}

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

.admin-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--admin-sidebar-bg);
}

.admin-modal-body {
  padding: 26px;
}

.admin-modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #fafbfc;
}

@media (max-width: 1200px) {
  .stats-row-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-row-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   MODERN TOAST NOTIFICATION SYSTEM
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-item.toast-hiding {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(110%);
    opacity: 0;
  }
}

.toast-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-success .toast-icon-wrap {
  background: #ecfdf5;
  color: #10b981;
}

.toast-error .toast-icon-wrap {
  background: #fef2f2;
  color: #ef4444;
}

.toast-warning .toast-icon-wrap {
  background: #fffbeb;
  color: #f59e0b;
}

.toast-info .toast-icon-wrap {
  background: #eff6ff;
  color: #3b82f6;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  word-break: break-word;
}

.toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-top: -2px;
}

.toast-close:hover {
  color: #334155;
  background: #f1f5f9;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toastProgress 3.5s linear forwards;
}

.toast-success .toast-progress { background: linear-gradient(90deg, #10b981, #059669); }
.toast-error .toast-progress { background: linear-gradient(90deg, #ef4444, #dc2626); }
.toast-warning .toast-progress { background: linear-gradient(90deg, #f59e0b, #d97706); }
.toast-info .toast-progress { background: linear-gradient(90deg, #3b82f6, #2563eb); }

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ============================================================
   RESPONSIVE ADMIN CMS SYSTEM (MOBILE & TABLET DRAWER)
   ============================================================ */

/* Mobile Hamburger Toggle in Header */
.admin-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-sidebar-bg);
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.admin-mobile-toggle:hover {
  background: #f1f5f9;
  color: var(--admin-primary);
  border-color: #cbd5e1;
}

.admin-mobile-toggle svg {
  width: 22px;
  height: 22px;
}

/* Sidebar Close Button on Mobile Drawer */
.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* Backdrop Blur Overlay */
.admin-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Bottom Navigation Bar (Dock) */
.admin-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--admin-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 9990;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  color: #64748b;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--admin-primary);
}

.bottom-nav-item.active svg {
  transform: scale(1.1);
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.bottom-nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 16px);
  background: var(--admin-accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   BREAKPOINT <= 992px: TABLETS & SMARTPHONES
   ============================================================ */
@media (max-width: 992px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .admin-layout {
    display: block;
    min-height: 100vh;
  }

  /* Transform Sidebar into an Off-Canvas Sliding Drawer */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-brand {
    padding: 18px 16px;
    justify-content: space-between;
  }

  .sidebar-close-btn {
    display: inline-flex;
  }

  /* Main Container on Mobile */
  .admin-main {
    width: 100% !important;
    min-width: 0;
    padding-bottom: 75px; /* Room for bottom navigation dock */
  }

  /* Admin Header on Mobile */
  .admin-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
    padding: 0 16px;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .admin-mobile-toggle {
    display: inline-flex;
  }

  .admin-header .page-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 120px);
    line-height: 1.2;
  }

  .admin-header .metric-badge-live {
    display: none; /* Hide clock badge on mobile header to save space */
  }

  .user-profile {
    gap: 6px;
  }

  .user-info {
    display: none; /* Hide user text, show compact avatar */
  }

  .admin-content {
    padding: 16px 14px 40px 14px;
  }

  /* Enable Bottom Navigation Bar on Mobile */
  .admin-bottom-nav {
    display: flex;
  }

  /* Tables, Cards & KPI Grids on Mobile */
  .stats-row,
  .stats-row-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  .kpi-card {
    padding: 14px 16px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
  }

  .card {
    padding: 16px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 15px auto !important;
  }
}

/* ============================================================
   BREAKPOINT <= 480px: SMARTPHONES
   ============================================================ */
@media (max-width: 480px) {
  .admin-header {
    height: 56px;
    padding: 0 12px;
  }

  .admin-header .page-title {
    font-size: 14.5px;
    max-width: calc(100vw - 110px);
  }

  .stats-row,
  .stats-row-5 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .admin-content {
    padding: 12px 10px 40px 10px;
  }

  .card {
    padding: 14px 12px;
  }

  .btn {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .table-responsive table {
    min-width: 580px; /* Enable clean horizontal scrolling inside table without breaking layout */
  }
}
