:root {
  --bg: #0a0c10;
  --surface: #111318;
  --surface2: #181b22;
  --surface3: #1f2330;
  --border: #252a38;
  --border2: #2e3448;
  --accent: #f97316;
  --accent2: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.18);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --yellow: #eab308;
  --yellow-bg: rgba(234, 179, 8, 0.1);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --text: #e8eaf0;
  --text2: #9aa0b8;
  --text3: #5a6080;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 99px;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  font-size: 18px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

/* ══════════════ LOGIN ══════════════ */
#loginScreen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background-image: radial-gradient(
    ellipse 80% 50% at 50% -10%,
    rgba(249, 115, 22, 0.15),
    transparent
  );
}
.login-card {
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 0 80px rgba(249, 115, 22, 0.06);
  animation: fadeUp 0.5s ease;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.login-logo .icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}
.login-logo span {
  font-family: "Syne", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.login-logo .dot {
  color: var(--accent);
}
.login-title {
  font-family: "Syne", sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}
.login-sub {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text3);
}
.form-group select option {
  background: var(--surface2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}
.btn-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.btn-success:hover {
  background: var(--green);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-full {
  width: 100%;
}
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text3);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-demo {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
}
.login-demo strong {
  color: var(--accent);
}

/* ══════════════ APP SHELL ══════════════ */
#appShell {
  display: none;
  height: 100vh;
  overflow: hidden;
}
#appShell.visible {
  display: flex;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  transition: var(--transition);
  position: relative;
  z-index: 10;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}
.sidebar-logo span {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 800;
}
.sidebar-logo .dot {
  color: var(--accent);
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--text3);
  text-transform: uppercase;
  padding: 18px 20px 8px;
}
.sidebar-nav {
  padding: 8px 12px;
  flex: 1;
  overflow: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 500;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.admin-profile:hover {
  background: var(--surface2);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar.green {
  background: var(--green);
}
.avatar.blue {
  background: var(--blue);
}
.avatar.red {
  background: var(--red);
}
.admin-info {
  flex: 1;
  min-width: 0;
}
.admin-info .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-info .role {
  font-size: 11px;
  color: var(--text3);
}
.role-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.role-badge.super {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent);
}
.role-badge.admin {
  background: var(--blue-bg);
  color: var(--blue);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-title {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-icon-btn {
  width: 38px;
  height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text2);
  position: relative;
}
.topbar-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.page-content {
  padding: 28px;
  flex: 1;
}

/* ══════════════ DASHBOARD ══════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.07;
}
.stat-card.orange::after {
  background: var(--accent);
}
.stat-card.green::after {
  background: var(--green);
}
.stat-card.blue::after {
  background: var(--blue);
}
.stat-card.yellow::after {
  background: var(--yellow);
}
.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}
.stat-icon.orange {
  background: var(--accent-glow);
  color: var(--accent);
}
.stat-icon.green {
  background: var(--green-bg);
  color: var(--green);
}
.stat-icon.blue {
  background: var(--blue-bg);
  color: var(--blue);
}
.stat-icon.yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
}
.stat-value {
  font-family: "Syne", sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--text2);
}
.stat-change {
  margin-top: 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up {
  color: var(--green);
}
.stat-change.down {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}
.card.span2 {
  grid-column: span 3;
}
.card.span3 {
  grid-column: span 3;
}

/* ── Mini Chart ── */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 8px 0;
}
.chart-bar {
  flex: 1;
  background: var(--surface3);
  border-radius: 4px 4px 0 0;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.chart-bar:hover {
  background: var(--accent);
}
.chart-bar.active {
  background: var(--accent);
}
.chart-bar:hover .bar-tooltip,
.chart-bar.active .bar-tooltip {
  opacity: 1;
  transform: translateY(0);
}
.bar-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}
.chart-labels {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: var(--text3);
}
.chart-labels span {
  flex: 1;
  text-align: center;
}

/* ── Recent Orders ── */
.orders-table {
  width: 100%;
  border-collapse: collapse;
}
.orders-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--border);
}
.orders-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.orders-table tr:last-child td {
  border-bottom: none;
}
.orders-table tr:hover td {
  background: var(--surface2);
}
.order-id {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge.delivered {
  background: var(--green-bg);
  color: var(--green);
}
.status-badge.pending {
  background: var(--yellow-bg);
  color: var(--yellow);
}
.status-badge.cancelled {
  background: var(--red-bg);
  color: var(--red);
}
.status-badge.processing {
  background: var(--blue-bg);
  color: var(--blue);
}
.status-badge.available {
  background: var(--green-bg);
  color: var(--green);
}
.status-badge.unavailable {
  background: var(--red-bg);
  color: var(--red);
}
.status-badge.blocked {
  background: var(--red-bg);
  color: var(--red);
}
.status-badge.active {
  background: var(--green-bg);
  color: var(--green);
}

/* ── Low Stock ── */
.stock-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.stock-item:last-child {
  border-bottom: none;
}
.stock-img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stock-info {
  flex: 1;
  min-width: 0;
}
.stock-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-cat {
  font-size: 11px;
  color: var(--text3);
}
.stock-count {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.stock-count.critical {
  color: var(--red);
}
.stock-count.low {
  color: var(--yellow);
}
.stock-count.ok {
  color: var(--green);
}

.progress-bar {
  height: 4px;
  background: var(--surface3);
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}
.progress-fill.critical {
  background: var(--red);
}
.progress-fill.low {
  background: var(--yellow);
}
.progress-fill.ok {
  background: var(--green);
}

/* ══════════════ PAGES ══════════════ */
.page {
  display: none;
}
.page.active {
  display: block;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 {
  font-family: "Syne", sans-serif;
  font-size: 24px;
  font-weight: 700;
}
.page-header p {
  color: var(--text2);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Data Table ── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent);
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  width: 200px;
}
.search-box input::placeholder {
  color: var(--text3);
}
.search-box i {
  color: var(--text3);
  font-size: 13px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.item-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.item-info .name {
  font-size: 13px;
  font-weight: 500;
}
.item-info .desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}
.price-text {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  color: var(--accent);
}
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.stock-pill.critical {
  background: var(--red-bg);
  color: var(--red);
}
.stock-pill.low {
  background: var(--yellow-bg);
  color: var(--yellow);
}
.stock-pill.ok {
  background: var(--green-bg);
  color: var(--green);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
  padding: 28px;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  width: 30px;
  height: 30px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 14px;
}
.modal-close:hover {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red);
}
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Image Upload ── */
.upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface2);
}
.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-area i {
  font-size: 28px;
  color: var(--text3);
  margin-bottom: 10px;
}
.upload-area p {
  font-size: 13px;
  color: var(--text2);
}
.upload-area small {
  font-size: 11px;
  color: var(--text3);
}
.upload-preview {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  display: none;
}

/* ── Toggle Switch ── */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface3);
  border-radius: 99px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider {
  background: var(--green);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Admin Cards ── */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
}
.admin-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}
.admin-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-card-info .n {
  font-weight: 600;
  font-size: 15px;
}
.admin-card-info .e {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}
.admin-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.meta-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.admin-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}
.toast.success {
  border-left: 3px solid var(--green);
}
.toast.error {
  border-left: 3px solid var(--red);
}
.toast.info {
  border-left: 3px solid var(--blue);
}
.toast i {
  font-size: 16px;
}
.toast.success i {
  color: var(--green);
}
.toast.error i {
  color: var(--red);
}
.toast.info i {
  color: var(--blue);
}
.toast p {
  font-size: 13px;
  color: var(--text);
}

/* ── Misc ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text3);
}
.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
}
.empty-state p {
  font-size: 14px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.inline-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cat-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* ── Quick Actions ── */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.quick-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  min-width: 160px;
}
.quick-action-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.qa-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.qa-label {
  font-size: 13px;
  font-weight: 500;
}
.qa-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

/* ── Delivery live feed ── */
.live-orders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-order {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
}
.live-order-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.live-order-info {
  flex: 1;
}
.live-order-info .id {
  font-size: 11px;
  color: var(--text3);
}
.live-order-info .customer {
  font-size: 13px;
  font-weight: 500;
}
.live-order-right {
  text-align: right;
}
.live-order-right .amount {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}
.live-order-right .time {
  font-size: 11px;
  color: var(--text3);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animate-in {
  animation: fadeUp 0.4s ease;
}

/* ── Category icons ── */
.cat-icon {
  font-size: 28px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text2);
  background: none;
  border: none;
  font-family: "DM Sans", sans-serif;
}
.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ── Reports ── */
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.report-row:last-child {
  border-bottom: none;
}
.report-label {
  font-size: 13px;
  color: var(--text2);
}
.report-value {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 15px;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card.span2 {
    grid-column: span 1;
  }
  .admin-cards {
    grid-template-columns: 1fr 1fr;
  }
}



.status-badge.sr-new            { background: #eef1f5; color: #5a6472; }
.status-badge.sr-ready          { background: #fff4e0; color: #b8790a; }
.status-badge.sr-pickup         { background: #fff4e0; color: #b8790a; }
.status-badge.sr-pickedup       { background: #e6f0ff; color: #2563eb; }
.status-badge.sr-transit        { background: #e6f0ff; color: #2563eb; }
.status-badge.sr-outfordelivery { background: #e9f7ee; color: #1a9e56; }
.status-badge.sr-delivered      { background: #e2f8e9; color: #16803c; }
.status-badge.sr-cancelled      { background: #fde8e8; color: #c0392b; }