/**
 * POS Admin Dashboard — Styles v2.0
 */

/* === DESIGN TOKENS === */
:root {
  --sidebar-w: 260px;
  --sidebar-bg: #0c1929;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-hover: rgba(59,130,246,0.12);
  --sidebar-active: rgba(59,130,246,0.18);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37,99,235,0.25);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --purple: #7c3aed;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* === LAYOUT === */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #e2e8f0;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
}

/* Top accent stripe */
.admin-sidebar::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  flex-shrink: 0;
}

.admin-sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.admin-logo {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--sidebar-border);
}

.admin-logo svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.admin-logo h2 {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.admin-nav {
  flex: 1;
  padding: 10px;
  list-style: none;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 7px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  user-select: none;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}

.nav-item.active svg {
  stroke: var(--primary);
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-user-info {
  padding: 14px 18px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.18);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar svg {
  width: 16px;
  height: 16px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10.5px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.admin-sidebar.collapsed + .admin-main { margin-left: 0; }

/* === HEADER === */
.admin-header {
  background: var(--surface);
  padding: 0 28px;
  height: 58px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-toggle:hover {
  background: var(--bg);
  color: var(--text);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}

.header-right { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.notification-btn,
.refresh-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
}

.notification-btn:hover,
.refresh-btn:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}

.notification-btn svg, .refresh-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.5;
  border: 2px solid var(--surface);
}

/* === CONTENT AREA === */
.admin-content {
  flex: 1;
  padding: 26px 28px;
  background: var(--bg);
}

.content-section { display: none; }
.content-section.active { display: block; }

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  padding: 20px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Color accent stripe on left */
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

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

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.sales   { background: #dcfce7; }
.stat-icon.orders  { background: #dbeafe; }
.stat-icon.products{ background: #ede9fe; }
.stat-icon.low-stock{ background: #fef3c7; }

.stat-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-icon.sales svg     { stroke: var(--success); }
.stat-icon.orders svg    { stroke: var(--primary); }
.stat-icon.products svg  { stroke: var(--purple); }
.stat-icon.low-stock svg { stroke: var(--warning); }

/* Matching left-border color per card type */
.stat-card:has(.stat-icon.sales)::before     { background: var(--success); }
.stat-card:has(.stat-icon.orders)::before    { background: var(--primary); }
.stat-card:has(.stat-icon.products)::before  { background: var(--purple); }
.stat-card:has(.stat-icon.low-stock)::before { background: var(--warning); }

.stat-info { flex: 1; min-width: 0; }

.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 12.5px;
  margin-bottom: 8px;
}

.stat-change {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}

.stat-change.positive { background: #dcfce7; color: #065f46; }
.stat-change.negative { background: #fee2e2; color: #991b1b; }
.stat-change.neutral  { background: var(--bg); color: var(--text-secondary); }

/* === DASHBOARD GRID === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.dashboard-widget {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.widget-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.widget-action {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.widget-action:hover { background: #dbeafe; color: var(--primary-hover); }

.widget-content {
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}

.no-data {
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

/* === LISTS IN WIDGETS === */
.recent-order-item,
.top-product-item,
.low-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.recent-order-item:hover,
.top-product-item:hover,
.low-stock-item:hover { background: var(--bg); }

.recent-order-item:last-child,
.top-product-item:last-child,
.low-stock-item:last-child { border-bottom: none; }

.order-info,
.product-info,
.customer-info { display: flex; flex-direction: column; gap: 2px; }

.order-id {
  font-weight: 600;
  color: var(--text);
  font-size: 12.5px;
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
}

.order-date,
.product-sales,
.product-sku,
.customer-email { font-size: 11.5px; color: var(--text-muted); }

.order-total {
  font-weight: 700;
  color: var(--success);
  font-size: 13.5px;
}

.product-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.product-revenue {
  font-weight: 700;
  color: var(--primary);
  font-size: 13.5px;
}

.stock-level {
  font-weight: 600;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 20px;
}

.stock-level.low-stock  { background: #fef3c7; color: #92400e; }
.stock-level.out-of-stock { background: #fee2e2; color: #991b1b; }

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === BUTTONS === */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-sm {
  padding: 8px 15px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 2px rgba(37,99,235,0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.28);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-primary svg, .btn-secondary svg, .btn-danger svg, .btn-sm svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

th svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

th:hover svg { opacity: 0.9; }

/* === FILTERS === */
.inventory-filters,
.orders-filters {
  background: var(--surface);
  padding: 16px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-group input,
.filter-group select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.15s ease;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* === TABLES === */
.inventory-table-container,
.orders-table-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.inventory-table,
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.inventory-table th,
.orders-table th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.inventory-table th:hover,
.orders-table th:hover { background: #e8eef5; }

.inventory-table td,
.orders-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.inventory-table tr:hover td,
.orders-table tr:hover td { background: #f8fafc; }

.inventory-table tr:last-child td,
.orders-table tr:last-child td { border-bottom: none; }

/* === TABLE ELEMENTS === */
.product-info { display: flex; align-items: center; gap: 10px; }

.product-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.product-description {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.category-badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.status-badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
}

.status-badge.in-stock    { background: #dcfce7; color: #15803d; }
.status-badge.low-stock   { background: #fef3c7; color: #92400e; }
.status-badge.out-of-stock{ background: #fee2e2; color: #991b1b; }
.status-badge.pending     { background: #fef3c7; color: #92400e; }
.status-badge.completed   { background: #dcfce7; color: #15803d; }
.status-badge.refunded    { background: #dbeafe; color: #1e40af; }
.status-badge.cancelled   { background: #fee2e2; color: #991b1b; }

.stock-input {
  width: 70px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  text-align: center;
  transition: all 0.15s ease;
}

.stock-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.action-buttons { display: flex; gap: 6px; }

.item-count {
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.item-preview {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === ANALYTICS === */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.analytics-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card-actions select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text-secondary);
}

.card-content {
  padding: 18px;
  position: relative;
  height: 300px;
}

.card-content canvas { max-height: 100%; }

.stats-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.stat-item:last-child { border-bottom: none; }

.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-value { font-size: 14.5px; font-weight: 700; color: var(--text); }

.date-range-picker input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  min-width: 200px;
}

/* === SETTINGS === */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
}

.settings-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.settings-card .card-content {
  padding: 18px 20px;
  height: auto;
}

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  transform: scale(1.15);
  cursor: pointer;
}

.form-group input[type="file"] {
  padding: 7px;
  font-size: 12.5px;
}

/* === MODALS === */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--surface);
  border-radius: 14px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.1);
}

.modal-content.large { max-width: 780px; }

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

.modal-header h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body {
  padding: 20px 22px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

/* === ORDER DETAILS === */
.order-details { display: flex; flex-direction: column; gap: 20px; }

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

.order-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.order-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.info-item { display: flex; flex-direction: column; gap: 3px; }

.info-item label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-item span,
.info-item select { font-size: 13.5px; color: var(--text); }

.order-items h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.order-items-table th {
  background: var(--bg);
  padding: 9px 13px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.order-items-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
}

.order-items-table tr:last-child td { border-bottom: none; }

.item-info { display: flex; align-items: center; gap: 8px; }

.item-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.order-totals {
  background: var(--bg);
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.totals-row.total-row {
  font-size: 14.5px;
  font-weight: 700;
  padding-top: 11px;
  border-top: 1px solid var(--border-strong);
  margin-top: 5px;
  color: var(--text);
}

/* === NOTIFICATIONS === */
#notification-container {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

.notification {
  background: var(--surface);
  padding: 13px 15px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transform: translateX(400px);
  animation: slideInNotification 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}

.notification.success { border-left-color: var(--success); }
.notification.error   { border-left-color: var(--danger); }
.notification.info    { border-left-color: var(--primary); }

.notification-close {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  line-height: 1;
  transition: color 0.15s ease;
}

.notification-close:hover { color: var(--text); }

@keyframes slideInNotification {
  from { transform: translateX(400px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid  { grid-template-columns: 1fr; }
  .analytics-grid  { grid-template-columns: 1fr; }
  .settings-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .admin-content { padding: 18px 14px; }
  .admin-header { padding: 0 14px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 14px; align-items: flex-start; }
  .section-actions { flex-wrap: wrap; }
}
