:root {
  color-scheme: light;
  --brand: #ffc700;
  --brand-dark: #191400;
  --bg: #fafafa;
  --surface: #fff;
  --text: #1c1c1c;
  --muted: #777;
  --line: #e5e5e5;
  --danger: #b42318;
  --success: #168a4a;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  font-family: Almarai, Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.kudo-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  gap: 8px;
  padding: 8px max(12px, calc((100vw - 900px) / 2));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand img {
  height: 48px;
  max-width: 140px;
}

.icon-button,
.cart-link {
  border: 0;
  background: transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--brand-dark);
  font-weight: 700;
}

.icon-button {
  font-size: 30px;
}

.cart-link {
  position: relative;
  font-size: 15px;
}

.cart-link b {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  font-size: 11px;
}

.app-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 12px 48px;
}

.route-view {
  display: none;
}

.route-view.active {
  display: block;
}

.hero-card {
  margin: 0 0 14px;
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.branch-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 0 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 800;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 800;
}

.muted,
.branch-strip p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e9f8ef;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status.closed,
.status.cancelled,
.status.failed {
  background: #fff0ef;
  color: var(--danger);
}

.status.pending,
.status.info {
  background: #fff7d1;
  color: #8b6500;
}

.category-tabs {
  position: sticky;
  top: 66px;
  z-index: 10;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 8px 0 10px;
  margin: 0 -12px 10px;
  background: var(--bg);
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 18px;
  background: transparent;
  color: #555;
  font-weight: 800;
}

.category-tab.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.menu-list,
.cart-items,
.orders-board,
.notifications-board {
  display: grid;
  gap: 12px;
}

.menu-card,
.cart-card,
.order-card,
.notification-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  min-height: 150px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-card img,
.cart-card img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f3f3;
}

.card-content {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.primary,
.outline,
.text-action,
.status-button,
.qty-button {
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: var(--brand);
  color: var(--brand-dark);
}

.outline {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
}

.text-action {
  display: inline-flex;
  align-items: center;
  color: var(--brand-dark);
}

.full-width {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

.cart-page,
.checkout-page,
.login-page,
.internal-view {
  padding-top: 8px;
}

.login-page {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-logo img {
  width: 132px;
  max-width: 45vw;
}

.cart-title-row,
.internal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.internal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  font-weight: 800;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-weight: 800;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.qty-button {
  width: 38px;
  padding: 0;
  border: 0;
  background: var(--brand);
}

.remove-button {
  justify-self: start;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
}

.service-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 16px 0;
}

.service-toggle button {
  min-height: 48px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
}

.service-toggle button:first-child {
  border-radius: 0 8px 8px 0;
}

.service-toggle button:last-child {
  border-radius: 8px 0 0 8px;
}

.service-toggle button.active {
  background: var(--brand);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #555;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  padding: 13px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.checkout-sheet {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 20px -12px -48px;
  padding: 22px 12px 14px;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
}

.checkout-sheet p,
.checkout-sheet strong {
  margin: 0;
}

.checkout-sheet hr,
.checkout-sheet .full-width,
.checkout-sheet .form-message {
  grid-column: 1 / -1;
}

.checkout-sheet hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.form-message {
  min-height: 22px;
  color: var(--success);
  font-weight: 800;
}

.order-card,
.notification-card {
  display: block;
  min-height: auto;
}

.order-head,
.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.notification-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.notification-summary span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
}

.notification-summary strong {
  color: var(--text);
  font-size: 20px;
}

.order-items {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-button {
  border: 1px solid var(--line);
  background: #fff;
}

.notification-message {
  padding: 10px;
  border-radius: 8px;
  background: #fbfbfb;
  color: #333;
  line-height: 1.6;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.notification-actions a,
.notification-actions button {
  min-height: 38px;
}

.driver-assign {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.driver-assign label {
  margin-bottom: 0;
}

.driver-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.driver-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7d1;
  color: #6f5100;
  font-weight: 800;
}

.staff-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.staff-panel h2 {
  margin: 0;
  font-size: 18px;
}

.menu-item-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-admin-list {
  display: grid;
  gap: 8px;
}

.menu-admin-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-admin-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.outline.danger,
.status[title] {
  cursor: pointer;
}

.empty {
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 20px;
  }
}

@media (max-width: 420px) {
  .kudo-header {
    grid-template-columns: 70px 1fr 82px;
  }

  .cart-link span:last-of-type {
    display: none;
  }

  .menu-card,
  .cart-card {
    grid-template-columns: 82px 1fr;
  }

  .menu-card img,
  .cart-card img {
    width: 82px;
    height: 82px;
  }
}
