/* =============================================
   Twende Merchant Portal - Main Stylesheet
   ============================================= */

:root {
  --primary:       #E85D04;
  --primary-dark:  #C44E03;
  --primary-light: #F48C37;
  --secondary:     #1B3A6B;
  --secondary-dark:#142D54;
  --secondary-light:#2B5A9E;
  --sidebar-bg:    #1A1A2E;
  --sidebar-hover: #2A2A4E;
  --sidebar-active:#E85D04;
  --bg:            #F5F0EB;
  --surface:       #FFFFFF;
  --border:        #E2E0DC;
  --text-primary:  #1A202C;
  --text-secondary:#4A5568;
  --text-muted:    #A0AEC0;
  --success:       #38A169;
  --success-bg:    rgba(56,161,105,0.12);
  --warning:       #D69E2E;
  --warning-bg:    rgba(214,158,46,0.12);
  --danger:        #E53E3E;
  --danger-bg:     rgba(229,62,62,0.12);
  --info:          #3182CE;
  --info-bg:       rgba(49,130,206,0.12);
  --orange-bg:     rgba(232,93,4,0.12);
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.12);
  --transition:    0.2s ease;
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =============================================
   Login / Register Screen
   ============================================= */
#login-screen, #register-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A2E 0%, #E85D04 50%, #C44E03 100%);
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.register-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-md);
  max-height: 92vh;
  overflow-y: auto;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 13px;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
  margin-bottom: 16px;
}

.login-error.show { display: block; }

.register-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
  margin-bottom: 16px;
}

.register-success.show { display: block; }

/* ── Forms ────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
  flex: 1;
}

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

.required { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--orange-bg);
}

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='%234A5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.form-control { resize: vertical; }

.form-row {
  display: flex;
  gap: 16px;
}

.optional-fields {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.optional-fields summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.optional-fields[open] summary { margin-bottom: 16px; }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-secondary:hover { background: var(--secondary-dark); }

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover { background: #2F855A; }

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

.btn-danger:hover { background: #C53030; }

.btn-warning {
  background: var(--warning);
  color: #fff;
}

.btn-warning:hover { background: #B7791F; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }

.btn-block { width: 100%; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Login footer ─────────────────────────── */
.login-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.login-footer-link a {
  color: var(--primary);
  font-weight: 600;
}

.login-footer-link a:hover { text-decoration: underline; }

.login-footer-text {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

/* =============================================
   App Shell
   ============================================= */
#app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 100;
}

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

.sidebar-logo { font-size: 32px; }

.sidebar-brand { min-width: 0; }

.sidebar-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.sidebar-business-name {
  display: block;
  font-size: 12px;
  color: var(--primary-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

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

.nav-item.active {
  background: rgba(232,93,4,0.15);
  color: var(--primary-light);
  border-right: 3px solid var(--primary);
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: auto;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0;
}

/* ── Main wrapper ─────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ───────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  padding: 4px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-pending {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--danger-bg);
  color: var(--danger);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pending-dot {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse-badge 1.5s infinite;
}

.topbar-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Main content ─────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* =============================================
   Stat Cards
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card.alert-card {
  border-left: 4px solid var(--danger);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

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

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* =============================================
   Section Headers
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================
   Tabs
   ============================================= */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  position: relative;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-btn .tab-count {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* =============================================
   Order Cards
   ============================================= */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition);
}

.order-card:hover { transform: translateY(-2px); }

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

.order-id {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  font-family: monospace;
}

.order-time {
  font-size: 12px;
  color: var(--text-muted);
}

.order-card-body { padding: 16px; }

.order-items {
  margin-bottom: 12px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}

.order-item-name {
  color: var(--text-primary);
}

.order-item-qty {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.order-item-price {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.order-totals {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 8px;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
}

.order-total-row.grand-total {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.order-note {
  background: var(--warning-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
  font-style: italic;
}

.order-note::before {
  content: 'Note: ';
  font-weight: 600;
  font-style: normal;
}

.order-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #FAFAF8;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Status flow ──────────────────────────── */
.status-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.status-step {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.status-step.completed { color: var(--success); }
.status-step.current {
  color: var(--primary);
  font-weight: 700;
}

.status-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

.status-step.completed .status-step-dot {
  background: var(--success);
}

.status-step.current .status-step-dot {
  background: var(--primary);
  animation: pulse-badge 1.5s infinite;
}

.status-arrow {
  color: var(--text-muted);
  font-size: 10px;
  margin: 0 2px;
}

/* =============================================
   Menu Items
   ============================================= */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition);
}

.menu-card:hover { transform: translateY(-2px); }

.menu-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-muted);
}

.menu-card-body { padding: 16px; }

.menu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.menu-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.menu-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.menu-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.menu-card-category {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.menu-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Toggle switch ────────────────────────── */
.toggle-switch {
  position: relative;
  width: 42px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--text-muted);
  border-radius: 22px;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* =============================================
   Tables
   ============================================= */
.table-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-toolbar .form-control {
  max-width: 180px;
}

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

thead th {
  background: #F7F5F2;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: #FDFCFA; }

/* =============================================
   Badges
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);     color: var(--info);    }
.badge-orange  { background: var(--orange-bg);   color: var(--primary); }
.badge-gray    { background: #EDF2F7;            color: var(--text-muted); }
.badge-purple  { background: rgba(128,90,213,0.12); color: #805AD5; }

/* =============================================
   Pagination
   ============================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 12px;
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.25s ease;
}

.modal-box.wide { max-width: 640px; }

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

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

.modal-body { padding: 24px; }

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

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Toast
   ============================================= */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
  font-size: 13px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger);  }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info    { border-left: 4px solid var(--info);    }

.toast.hiding { opacity: 0; transform: translateX(40px); transition: all 0.25s ease; }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-message { flex: 1; }

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

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

/* =============================================
   Loading
   ============================================= */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

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

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 13px;
}

/* =============================================
   Settings Form
   ============================================= */
.settings-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.settings-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* =============================================
   Earnings Page
   ============================================= */
.earnings-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.payout-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.payout-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* =============================================
   Cancel Modal
   ============================================= */
.cancel-reason-input {
  width: 100%;
  margin-top: 12px;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
  }

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

  .topbar-toggle { display: block; }

  .main-content { padding: 16px; }

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

  .orders-grid { grid-template-columns: 1fr; }

  .menu-grid { grid-template-columns: 1fr; }

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

  .table-toolbar { flex-direction: column; align-items: stretch; }

  .table-toolbar .form-control { max-width: none; }

  .login-card { padding: 32px 24px; }

  .register-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
