/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --orange:        #C8744F;
  --orange-light:  #D08B6D;
  --orange-pale:   #F7EFEA;
  --orange-border: #EBD5C9;
  --brown-dark:    #2D1500;
  --brown-mid:     #4A2500;
  --brown-light:   #7A4520;
  --cream:         #FFFAF5;
  --white:         #FFFFFF;
  --gray-100:      #F7F7F7;
  --gray-200:      #EEEEEE;
  --gray-400:      #BBBBBB;
  --gray-600:      #777777;
  --gray-800:      #333333;
  --text:          #2A2A2A;
  --green:         #3DAA6E;
  --green-pale:    #E8F8EF;
  --red:           #E84040;
  --red-pale:      #FDEAEA;
  --yellow:        #F5A623;
  --yellow-pale:   #FEF6E4;
  --blue:          #3B82F6;
  --blue-pale:     #EFF6FF;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition:    .18s ease;
}

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

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Shared form elements ──────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,53,.15);
}

.field-group textarea { resize: vertical; min-height: 90px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-light); box-shadow: 0 4px 12px rgba(255,107,53,.35); }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-outline:hover { background: var(--orange-pale); }

.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-200); }

.btn-danger {
  background: var(--red-pale);
  color: var(--red);
  border: 1.5px solid #f5c0c0;
}
.btn-danger:hover { background: var(--red); color: var(--white); }

.btn-sm { padding: 6px 13px; font-size: .83rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Badges / status pills ─────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-pending  { background: var(--yellow-pale); color: #9A6700; }
.badge-preparing{ background: var(--blue-pale);   color: #1D4ED8; }
.badge-ready    { background: var(--orange-pale);  color: var(--orange); }
.badge-delivered{ background: var(--green-pale);   color: #1A6E40; }
.badge-cancelled{ background: var(--red-pale);     color: var(--red); }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 20px 0;
}

/* ── Toggle switch ─────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-400);
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--orange); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: .9rem; color: var(--gray-600); }

/* ── Utility ───────────────────────────────────────────────── */
.text-muted  { color: var(--gray-600); }
.text-sm     { font-size: .85rem; }
.text-center { text-align: center; }
.mt-1 { margin-top:  8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom:  8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap:  8px; }
.gap-2 { gap: 16px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }
