/* ============================================================
   Spicy Restaurant — Design System
   DofrexLabs | Red · White · Black
   ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --red:         #E8212A;
  --red-dark:    #C4151D;
  --red-light:   #FF4757;
  --red-pale:    #FFF0F1;
  --black:       #0F0F0F;
  --black-soft:  #1A1A1A;
  --gray-900:    #111827;
  --gray-800:    #1F2937;
  --gray-700:    #374151;
  --gray-600:    #4B5563;
  --gray-500:    #6B7280;
  --gray-400:    #9CA3AF;
  --gray-300:    #D1D5DB;
  --gray-200:    #E5E7EB;
  --gray-100:    #F3F4F6;
  --gray-50:     #F9FAFB;
  --white:       #FFFFFF;

  --success:     #10B981;
  --warning:     #F59E0B;
  --info:        #3B82F6;
  --danger:      var(--red);

  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.14);
  --shadow-red:  0 8px 32px rgba(232,33,42,.25);

  --transition:  all .22s cubic-bezier(.4,0,.2,1);
  --font:        'Outfit', 'Inter', sans-serif;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; }
.text-red   { color: var(--red) !important; }
.text-black { color: var(--black) !important; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }

/* ─── Navbar ─────────────────────────────────────────────────── */
.spicy-nav {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
}
.spicy-nav .brand {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -0.5px;
}
.spicy-nav .brand span { color: var(--black); }
.nav-link-spicy {
  color: var(--gray-700) !important;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: .4rem .8rem !important;
}
.nav-link-spicy:hover, .nav-link-spicy.active {
  color: var(--red) !important;
}
.nav-link-spicy.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: .8rem; right: .8rem;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.cart-badge {
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 700;
  vertical-align: super;
  transition: var(--transition);
}

/* ─── Hero Section ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #2A0000 50%, var(--red-dark) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -30%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,33,42,.35) 0%, transparent 70%);
  animation: heroGlow 5s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(60px, 30px) scale(1.15); }
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; line-height: 1.1; }
.hero h1 .accent { color: var(--red-light); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-spicy {
  background: var(--red);
  color: var(--white) !important;
  border: none;
  border-radius: var(--radius-full);
  padding: .65rem 1.75rem;
  font-weight: 700;
  font-size: .95rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  box-shadow: var(--shadow-red);
}
.btn-spicy:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(232,33,42,.4);
}
.btn-spicy:active { transform: translateY(0); }

.btn-outline-spicy {
  background: transparent;
  color: var(--red) !important;
  border: 2px solid var(--red);
  border-radius: var(--radius-full);
  padding: .6rem 1.7rem;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-outline-spicy:hover {
  background: var(--red);
  color: #fff !important;
  transform: translateY(-2px);
}

.btn-dark-spicy {
  background: var(--black);
  color: var(--white) !important;
  border: none;
  border-radius: var(--radius-full);
  padding: .65rem 1.75rem;
  font-weight: 700;
  transition: var(--transition);
}
.btn-dark-spicy:hover { background: var(--gray-800); transform: translateY(-2px); }

/* ─── Cards ──────────────────────────────────────────────────── */
.card-spicy {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  overflow: hidden;
}
.card-spicy:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.menu-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.menu-card .card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gray-100);
}
.menu-card .card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.menu-card:hover .card-img-wrap img { transform: scale(1.08); }
.menu-card .badge-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.menu-card .card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.menu-card .item-name { font-weight: 700; font-size: 1.05rem; color: var(--black); margin-bottom: .3rem; }
.menu-card .item-desc { color: var(--gray-500); font-size: .85rem; flex: 1; margin-bottom: 1rem; }
.menu-card .price { font-size: 1.25rem; font-weight: 800; color: var(--red); }
.menu-card .prep-time { color: var(--gray-500); font-size: .8rem; }

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.blue   { border-left-color: var(--info); }
.stat-card.orange { border-left-color: var(--warning); }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--black); }
.stat-card .stat-label { color: var(--gray-500); font-size: .85rem; font-weight: 500; }
.stat-card .stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius);
  background: var(--red-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

/* ─── Admin Sidebar ──────────────────────────────────────────── */
.admin-sidebar {
  width: 260px;
  background: var(--black);
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.sidebar-brand {
  padding: 1.5rem;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand span { color: var(--red-light); }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav .nav-item { margin: 2px 12px; }
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.65) !important;
  padding: .7rem 1rem !important;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  transition: var(--transition);
  font-size: .92rem;
}
.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,.08);
  color: var(--white) !important;
}
.sidebar-nav .nav-link.active {
  background: var(--red) !important;
  color: var(--white) !important;
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-section {
  padding: .4rem 1.5rem .2rem;
  font-size: .7rem;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-top: .5rem;
}
.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--gray-50);
}
.admin-topbar {
  background: var(--white);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0; z-index: 800;
}
.admin-content { padding: 2rem; }
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--black); }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-spicy .form-control,
.form-spicy .form-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  font-size: .95rem;
  transition: var(--transition);
  background: var(--white);
}
.form-spicy .form-control:focus,
.form-spicy .form-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,33,42,.12);
  outline: none;
}
.form-spicy label { font-weight: 600; font-size: .88rem; color: var(--gray-700); margin-bottom: .35rem; }
.input-icon { position: relative; }
.input-icon i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}
.input-icon input { padding-left: 2.5rem !important; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge { font-weight: 600; padding: .35em .75em; border-radius: var(--radius-full); font-size: .75rem; }
.bg-pending   { background: #FEF3C7 !important; color: #92400E !important; }
.bg-confirmed { background: #DBEAFE !important; color: #1E40AF !important; }
.bg-preparing { background: #EDE9FE !important; color: #5B21B6 !important; }
.bg-ready     { background: #D1FAE5 !important; color: #065F46 !important; }
.bg-dispatched{ background: #DBEAFE !important; color: #1E40AF !important; }
.bg-delivered { background: #D1FAE5 !important; color: #065F46 !important; }
.bg-cancelled { background: #FEE2E2 !important; color: #991B1B !important; }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-spicy {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.table-spicy thead th {
  color: var(--gray-500);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: .6rem 1rem;
  border: none;
  background: transparent;
}
.table-spicy tbody tr {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  transition: var(--transition);
}
.table-spicy tbody tr:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.table-spicy tbody td {
  padding: .9rem 1rem;
  vertical-align: middle;
  border: none;
}
.table-spicy tbody td:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.table-spicy tbody td:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }

/* ─── Kitchen Display ────────────────────────────────────────── */
.kds-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.kds-card .kds-header {
  background: var(--black);
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kds-card.preparing .kds-header { background: #5B21B6; }
.kds-card.ready .kds-header     { background: var(--success); }
.kds-card .kds-body { padding: 1.25rem; }
.kds-card .kds-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .9rem;
}
.kds-card .kds-item:last-child { border: none; }
.kds-timer { font-size: .8rem; color: var(--red); font-weight: 600; }
.kds-timer.warning { color: var(--warning); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ─── POS System ─────────────────────────────────────────────── */
.pos-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; height: calc(100vh - 80px); }
.pos-menu   { overflow-y: auto; padding: 1.5rem; background: var(--gray-50); }
.pos-cart   { background: var(--white); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.pos-cart-header { padding: 1.25rem; border-bottom: 1px solid var(--gray-100); font-weight: 700; }
.pos-cart-items  { flex: 1; overflow-y: auto; padding: 1rem; }
.pos-cart-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 0; border-bottom: 1px solid var(--gray-100);
}
.pos-cart-footer { padding: 1.25rem; border-top: 1px solid var(--gray-100); }
.qty-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; transition: var(--transition);
}
.qty-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ─── Map Tracking ───────────────────────────────────────────── */
#tracking-map, #riders-map { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tracking-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); }
.status-steps { display: flex; gap: 0; position: relative; margin: 1.5rem 0; }
.status-step  { flex: 1; text-align: center; position: relative; }
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .5rem;
  font-size: .8rem;
  transition: var(--transition);
  position: relative; z-index: 1;
}
.step-dot.done { background: var(--success); color: #fff; }
.step-dot.active { background: var(--red); color: #fff; animation: ripple 1.5s infinite; }
.status-step::before {
  content: '';
  position: absolute;
  top: 18px; left: 0; right: 0;
  height: 3px;
  background: var(--gray-200);
  z-index: 0;
}
.status-step.done::before { background: var(--success); }
.status-step:first-child::before { display: none; }
.step-label { font-size: .72rem; color: var(--gray-500); font-weight: 600; }
@keyframes ripple {
  0% { box-shadow: 0 0 0 0 rgba(232,33,42,.4); }
  70% { box-shadow: 0 0 0 10px rgba(232,33,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,33,42,0); }
}

/* ─── Toast Notifications ────────────────────────────────────── */
.toast-container-spicy {
  position: fixed;
  top: 80px; right: 1.5rem;
  z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast-spicy {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  min-width: 280px; max-width: 380px;
  border-left: 4px solid var(--red);
  animation: slideIn .3s ease;
}
.toast-spicy.success { border-left-color: var(--success); }
.toast-spicy.info    { border-left-color: var(--info); }
.toast-spicy.warning { border-left-color: var(--warning); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── Rider Card ─────────────────────────────────────────────── */
.rider-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.rider-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rider-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--red-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: var(--red);
  flex-shrink: 0;
}
.online-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gray-400);
  border: 2px solid #fff;
  display: inline-block;
}
.online-dot.active { background: var(--success); animation: pulse 2s infinite; }

/* ─── Table Grid ─────────────────────────────────────────────── */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.table-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.table-tile:hover { transform: scale(1.04); box-shadow: var(--shadow-lg); }
.table-tile.available { border-color: var(--success); }
.table-tile.occupied  { border-color: var(--red); background: var(--red-pale); }
.table-tile.reserved  { border-color: var(--warning); }
.table-tile .table-icon { font-size: 2rem; margin-bottom: .4rem; }
.table-tile .table-num  { font-weight: 800; font-size: 1.1rem; color: var(--black); }
.table-tile .table-cap  { font-size: .8rem; color: var(--gray-500); }

/* ─── Loading States ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 400%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.spinner-spicy {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Section Headers ────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.5rem;
}
.section-line {
  height: 4px; width: 40px;
  background: var(--red);
  border-radius: 2px;
}
.section-title { font-size: 1.4rem; font-weight: 800; color: var(--black); }

/* ─── Category Pills ─────────────────────────────────────────── */
.cat-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

/* ─── Checkout ───────────────────────────────────────────────── */
.order-summary-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}
.summary-row {
  display: flex; justify-content: space-between;
  padding: .5rem 0;
  font-size: .9rem;
  color: var(--gray-600);
}
.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  border-top: 1.5px solid var(--gray-100);
  margin-top: .5rem;
  padding-top: .75rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer-spicy {
  background: var(--black);
  color: rgba(255,255,255,.6);
  padding: 3rem 0 1.5rem;
}
.footer-brand { font-size: 1.6rem; font-weight: 900; color: var(--white); }
.footer-brand span { color: var(--red-light); }

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

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .pos-layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .pos-cart { max-height: 50vh; }
}
@media (max-width: 576px) {
  .hero { padding: 3rem 0 2.5rem; }
  .admin-content { padding: 1rem; }
  .spicy-nav { padding: 0 1rem; }
}
