:root {
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --secondary: #ffb627;
  --bg: #fffaf6;
  --bg-alt: #fff1e3;
  --text: #1a1a1a;
  --muted: #6c5f56;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none;
}

.ribbon {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  position: sticky;
  top: 40px;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6vw;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.brand {
  font-weight: 700;
  font-size: 22px;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}

.badge {
  background: var(--primary);
  color: white;
  border-radius: 14px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.page {
  padding: 40px 6vw 60px;
}

.form-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 960px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5d2c6;
  font-family: inherit;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.order-summary {
  background: var(--bg-alt);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.admin-shell {
  min-height: 100vh;
  background: var(--bg);
}

.admin-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.stat-card strong {
  display: block;
  font-size: 18px;
}

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

.orders-table-wrapper {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.orders-table th,
.orders-table td {
  border-bottom: 1px solid #f0d8c9;
  padding: 10px;
  vertical-align: top;
}

.orders-table th {
  text-align: left;
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 1;
}

.orders-table tr.status-new {
  background: #fff7ed;
}

.orders-table tr.status-preparing {
  background: #fff4cc;
}

.orders-table tr.status-dispatched {
  background: #e9f3ff;
}

.orders-table tr.status-delivered {
  background: #e8f7ea;
}

.orders-table tr.status-cancelled {
  background: #fdeaea;
}

.items-list {
  display: grid;
  gap: 4px;
}

.items-list .addon {
  color: var(--muted);
  font-size: 12px;
}

.table-actions {
  display: grid;
  gap: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.logout {
  cursor: pointer;
  font-size: 13px;
  opacity: 0.8;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #2b241f;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

@media (max-width: 720px) {
  .nav-links {
    gap: 12px;
    font-size: 12px;
  }

  .orders-table,
  .orders-table thead,
  .orders-table tbody,
  .orders-table th,
  .orders-table td,
  .orders-table tr {
    display: block;
  }

  .orders-table tr {
    border: 1px solid #f0d8c9;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: #fff;
  }

  .orders-table th {
    display: none;
  }

  .orders-table td {
    border: none;
    padding: 6px 8px;
  }
}
