/* Foody — PWA tamna zadana tema, mobilni izgled u stilu Wolta, crno + nebesko plavo */

:root,
[data-theme="dark"] {
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --secondary: #0ea5e9;
  --bg: #000000;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 56px;
  --font: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --tap-min: 44px;
}

[data-theme="light"] {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --secondary: #0ea5e9;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.15);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Početna — pretraga u headeru (Wolt-style na desktopu) */
.header-inner--index {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo actions"
    "search search";
  gap: 10px 12px;
  align-items: center;
  min-height: var(--header-h);
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-inner--index .logo {
  grid-area: logo;
}

.header-inner--index .header-search-mid {
  grid-area: search;
  min-width: 0;
}

.header-inner--index .header-actions {
  grid-area: actions;
  justify-self: end;
}

/* Mobilno: bez „Narudžbe” u headeru (donja traka) */
@media (max-width: 767px) {
  .site-header .nav {
    display: none !important;
  }

  .header-inner--sub {
    grid-template-areas:
      "logo actions"
      "search search";
  }

  .header-inner--sub.header-inner--no-global-search {
    grid-template-areas: "logo actions";
  }
}

@media (min-width: 768px) {
  .header-inner--index {
    grid-template-columns: auto minmax(180px, 1fr) auto;
    grid-template-areas: "logo search actions";
    gap: 16px 20px;
    padding-top: 0;
    padding-bottom: 0;
    min-height: var(--header-h);
  }

  .header-inner--index .logo {
    grid-area: logo;
    justify-self: start;
  }

  .header-inner--index .header-search-mid {
    grid-area: search;
    justify-self: center;
    width: 100%;
    max-width: 460px;
    padding: 0 8px;
  }

  .header-inner--index .header-actions {
    grid-area: actions;
    justify-self: end;
  }
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.logo--text-only .logo-text {
  font-size: 1.35rem;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Ako negdje ostane <img class="logo-img">, ne prikazuj ga — brend je samo tekst „Foody”. */
.logo-img {
  display: none !important;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav a:hover {
  background: var(--bg);
  text-decoration: none;
}

.nav a.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--bg);
}

.cart-badge-wrap {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary);
  color: #0f172a;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-badge:empty {
  display: none;
}

/* Podstranice — Foody (logo) uvijek vidljiv; mobilno + desktop */
.header-inner--sub {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo actions"
    "search search"
    "nav nav";
  gap: 10px 12px;
  align-items: center;
}

.header-inner--sub .logo {
  grid-area: logo;
}

.header-inner--sub .nav {
  grid-area: nav;
}

.header-inner--sub .header-search-mid {
  grid-area: search;
}

.header-inner--sub .header-actions {
  grid-area: actions;
}

.header-inner--sub.header-inner--no-global-search {
  grid-template-areas:
    "logo actions"
    "nav nav";
}

.header-search-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.header-search-cta:hover {
  text-decoration: none;
  border-color: #4da6ff;
  color: var(--text);
}

.header-search-cta .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search-cta .search-icon svg {
  width: 20px;
  height: 20px;
}

.header-search-cta-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .header-search-cta {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.header-cart-desktop {
  display: none;
}

/* Košarica u headeru: mobilno samo ikona, skriveno “Košarica”; desktop ikona + tekst */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-sizing: border-box;
}

.cart-btn:hover {
  text-decoration: none;
}

.cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.cart-icon svg {
  width: 22px;
  height: 22px;
}

.cart-text {
  display: inline;
  font-weight: 600;
  font-size: 0.9375rem;
}

@media (max-width: 767px) {
  .cart-text {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .header-actions .cart-btn.btn-sm {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    padding-left: 10px;
    padding-right: 10px;
  }
}

.cart-btn--header-desktop {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.cart-btn--header-desktop:hover {
  border-color: var(--primary);
  background: var(--bg);
}

.cart-badge--float {
  top: -2px;
  right: -2px;
}

/* Blok kontejner (ne <span>): Safari ne smije “rasparčati” dropdown iz nevaljanog span>div. */
#nav-auth {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-auth-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.nav-user-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  padding: 4px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.nav-user-chip:hover {
  text-decoration: none;
  border-color: var(--primary);
}

.nav-auth-dropdown {
  position: relative;
}

.nav-auth-dropdown__head {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-auth-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-auth-caret:hover {
  color: var(--text);
  background: var(--bg);
}

.nav-auth-dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px 0;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  z-index: 200;
}

.nav-auth-dropdown__panel[hidden] {
  display: none !important;
}

.nav-auth-dropdown__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}

.nav-auth-dropdown__item:hover {
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.nav-auth-dropdown__item--signout {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
  color: var(--danger, #b91c1c);
}

.nav-user-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.nav-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

@media (min-width: 768px) {
  .header-only-mobile {
    display: none !important;
  }

  .header-cart-desktop {
    display: block;
  }

  .header-inner--sub:not(.header-inner--no-global-search) {
    grid-template-columns: auto minmax(180px, 1fr) auto;
    grid-template-areas: "logo search actions";
    gap: 16px 20px;
    padding-top: 0;
    padding-bottom: 0;
    min-height: var(--header-h);
  }

  .header-inner--sub:not(.header-inner--no-global-search) .logo {
    grid-area: logo;
    justify-self: start;
  }

  .header-inner--sub:not(.header-inner--no-global-search) .nav {
    display: none;
  }

  .header-inner--sub:not(.header-inner--no-global-search) .header-search-mid {
    grid-area: search;
    justify-self: center;
    width: 100%;
    max-width: 460px;
    padding: 0 8px;
  }

  .header-inner--sub:not(.header-inner--no-global-search) .header-actions {
    grid-area: actions;
    justify-self: end;
  }

  .header-inner--no-global-search {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo . actions";
    gap: 16px 20px;
    min-height: var(--header-h);
    padding-top: 0;
    padding-bottom: 0;
  }

  .header-inner--no-global-search .logo {
    grid-area: logo;
    justify-self: start;
  }

  .header-inner--no-global-search .nav {
    display: none;
  }

  .header-inner--no-global-search .header-actions {
    grid-area: actions;
    justify-self: end;
  }
}

/* Main — mobile first */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right))
    calc(58px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

@media (min-width: 768px) {
  main {
    padding: 24px 20px 80px;
  }
}

.page-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

@media (min-width: 480px) {
  .page-title {
    font-size: 1.75rem;
  }
}

.page-sub {
  color: var(--text-muted);
  margin: 0 0 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0f172a;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

[data-theme="light"] .btn-primary {
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Restaurant grid — single column on phones */
.restaurant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .restaurant-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 900px) {
  .restaurant-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.restaurant-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.restaurant-card-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: var(--border);
}

.restaurant-card-body {
  padding: 16px 18px 18px;
}

.restaurant-card h2 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.restaurant-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-weight: 600;
}

.delivery-time::before {
  content: "•";
  margin-right: 12px;
  color: var(--border);
}

.badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--primary);
}

/* Menu */
.menu-toolbar {
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--secondary);
}

.menu-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cat-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.cat-chip:hover,
.cat-chip.active {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 14px;
  align-items: stretch;
}

.menu-item-img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.menu-item-info {
  flex: 1;
  min-width: 0;
}

.menu-item-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.menu-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.menu-item-price {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.05rem;
}

.menu-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--bg);
}

.qty-control button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control span {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Cart */
.cart-layout {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

.cart-list {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cart-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.cart-row .qty-control {
  align-self: center;
}

.cart-row-info {
  min-width: 0;
}

.cart-row-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.cart-line-edit {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.cart-line-edit:hover {
  text-decoration: underline;
}

.cart-restaurant-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.cart-restaurant-link:hover {
  text-decoration: underline;
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--border);
  display: block;
}

.cart-checkout {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.order-type {
  margin-bottom: 18px;
}

.order-type legend {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

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

.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Forms */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* Prijava — modal u stilu Wolta */
body.login-page {
  overflow-x: hidden;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 15% 15%, rgba(56, 189, 248, 0.38), transparent 52%),
    radial-gradient(ellipse 90% 70% at 85% 75%, rgba(14, 165, 233, 0.2), transparent 48%),
    rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .login-backdrop {
  background:
    radial-gradient(ellipse 100% 80% at 20% 0%, rgba(14, 165, 233, 0.22), transparent 50%),
    rgba(15, 23, 42, 0.38);
}

main.login-page__main {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100dvh;
  min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top, 0)) 20px calc(28px + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
}

body.login-page .bottom-nav {
  display: none !important;
}

.login-modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  padding: 6px 22px 22px;
}

[data-theme="light"] .login-modal {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.login-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.login-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  margin-right: -10px;
  transition:
    background 0.15s,
    color 0.15s;
}

.login-modal__close:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.login-modal__theme {
  margin-left: -8px;
  min-width: 42px;
  min-height: 42px;
  width: 42px;
  height: 42px;
}

.login-modal__title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1.2;
  padding-right: 6px;
}

@media (min-width: 480px) {
  .login-modal__title {
    font-size: 1.65rem;
  }
}

.login-mode-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.login-mode-switch__btn {
  border: none;
  background: none;
  padding: 0 0 3px;
  font: inherit;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.login-mode-switch__btn:hover {
  color: var(--text);
}

.login-mode-switch__btn.active {
  color: var(--secondary);
  border-bottom-color: var(--primary);
}

.login-mode-switch__sep {
  color: var(--text-muted);
  user-select: none;
}

.btn-google-wolt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

[data-theme="light"] .btn-google-wolt {
  background: #fff;
  border-color: #e2e8f0;
}

.btn-google-wolt:hover {
  border-color: rgba(66, 133, 244, 0.45);
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-google-wolt__logo {
  flex-shrink: 0;
}

.login-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.login-modal__divider::before,
.login-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-modal__divider span {
  flex-shrink: 1;
  text-align: center;
  line-height: 1.35;
}

.login-modal__form .field {
  margin-bottom: 14px;
}

.login-modal__form .field label {
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.login-modal .field input {
  border-radius: 12px;
  padding: 14px 16px;
}

.login-modal__submit {
  width: 100%;
  margin-top: 6px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-radius: 12px;
}

.login-modal__hint {
  margin-top: 14px;
  margin-bottom: 0;
}

.login-modal__legal {
  margin: 18px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.login-modal__legal a {
  color: var(--secondary);
}

.login-page__footer.site-footer {
  margin-top: 0;
  padding-top: 0;
  border: none;
}

.auth-card {
  max-width: 400px;
  margin: 40px auto;
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.profile-card {
  margin-top: 8px;
}

.profile-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.profile-card__email {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9375rem;
  word-break: break-all;
}

.profile-card__hint {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  font-size: 0.9375rem;
}

.profile-card__actions {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-card__signout {
  width: 100%;
  margin-top: 8px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button.active {
  color: var(--secondary);
  border-bottom-color: var(--primary);
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 12px;
}

.field-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-hint {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-google {
  width: 100%;
  margin-top: 4px;
  padding: 12px 18px;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.btn-google:hover {
  border-color: var(--primary);
  background: var(--bg);
}

.btn-google__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  font-size: 0.75rem;
}

[data-theme="light"] .btn-google__icon {
  background: #f8fafc;
}

.auth-card select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.form-success {
  color: #16a34a;
  font-size: 0.875rem;
  margin-top: 12px;
}

/* Orders */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.order-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.order-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--primary);
}

.order-items {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  padding-left: 18px;
}

/* Empty & loading states */
.empty-state,
.loading-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

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

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

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.alert-warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
}

[data-theme="dark"] .alert-warn {
  color: #fbbf24;
}

.hidden {
  display: none !important;
}

/* Donja navigacija — Wolt / app stil (samo mobilno), kompaktna visina */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 95;
  box-sizing: border-box;
  background: #111;
  justify-content: space-around;
  align-items: center;
  padding: 6px 6px max(6px, env(safe-area-inset-bottom, 0px));
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow:
    0 -8px 28px rgba(0, 0, 0, 0.45),
    0 -1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
  }
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none !important;
  }
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 96px;
  padding: 3px 4px;
  text-decoration: none;
  color: #aaa;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.nav-item:hover {
  text-decoration: none;
  color: #ccc;
}

.nav-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: inherit;
  transition:
    color 0.2s ease,
    filter 0.2s ease;
}

.nav-item__icon svg {
  width: 20px;
  height: 20px;
}

.nav-item.active {
  color: #4da6ff;
}

.nav-item.active .nav-item__icon {
  color: #4da6ff;
  filter: drop-shadow(0 0 6px rgba(77, 166, 255, 0.85)) drop-shadow(0 0 2px rgba(77, 166, 255, 0.6));
}

.nav-item__label {
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
}

/* Pretraga restorana */
.search-field {
  margin-bottom: 20px;
}

.search-field input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.search-field input:focus {
  outline: none;
  border-color: #4da6ff;
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.2);
}

.search-field-wrap {
  position: relative;
}

.search-field-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-field-wrap .search-icon svg {
  width: 20px;
  height: 20px;
}

/* Pretraga u headeru na početnoj — pill kao Wolt */
.header-inner--index .home-hero-search {
  margin: 0;
}

.header-bar-search input {
  padding: 12px 16px 12px 44px;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: none;
}

.header-bar-search .search-icon {
  left: 14px;
}

.header-bar-search .search-icon svg {
  width: 20px;
  height: 20px;
}

.header-bar-search input:focus {
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.2);
}

[data-theme="light"] .header-bar-search input {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

[data-theme="light"] .header-bar-search input:focus {
  background: #fff;
  border-color: #4da6ff;
}

@media (min-width: 768px) {
  .header-bar-search input {
    padding: 12px 18px 12px 44px;
    font-size: 1.02rem;
  }
}

#profile-panel {
  padding-top: 8px;
}

@media (max-width: 768px) {
  .header-inner:not(.header-inner--index) {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }

  .header-inner:not(.header-inner--index) .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-inner:not(.header-inner--index) .header-actions {
    margin-left: auto;
  }

  .menu-item {
    flex-wrap: wrap;
  }

  .menu-item-actions {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer__inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__inner a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.site-footer__sep {
  opacity: 0.5;
  user-select: none;
}

/* Pretraga — filteri */
.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  flex: 1;
}

.filter-field__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-field select {
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* Košarica / checkout */
.checkout-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
  margin: 0 0 16px;
}

.checkout-fieldset legend {
  padding: 0 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.checkout-delivery-fields .field {
  margin-bottom: 12px;
}

.checkout-delivery-fields .field:last-child {
  margin-bottom: 0;
}

.checkout-totals {
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.total-row--muted {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.total-row--grand {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 1.125rem;
  font-weight: 700;
}

.radio-row--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.radio-row--stack label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

/* Restoran — status */
.restaurant-status-banner {
  margin-bottom: 16px;
}

/* Jelo — dijalog */
.menu-item-dialog {
  max-width: min(92vw, 420px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.menu-item-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.menu-item-dialog__inner {
  position: relative;
  padding: 24px 20px 20px;
}

.menu-item-dialog__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.menu-item-dialog__title {
  margin: 0 40px 12px 0;
  font-size: 1.2rem;
}

.menu-item-dialog__desc,
.menu-item-dialog__allergens {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.menu-item-dialog__price {
  margin: 16px 0 0;
  font-weight: 700;
  font-size: 1.125rem;
}

.menu-item-dialog__cart {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.menu-item-dialog__cart.hidden {
  display: none;
}

.menu-item-dialog__addons-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.menu-item-dialog__addons-hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.menu-item-dialog-addons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.menu-addon-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.menu-addon-row input {
  accent-color: var(--primary);
  width: 1.1rem;
  height: 1.1rem;
}

.menu-addon-price {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.menu-item-dialog__add-cart {
  width: 100%;
  justify-content: center;
}

.menu-item-addons-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.cart-row-addons {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.menu-item-closed-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Narudžbe — klik kartica */
.order-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.order-card--link:hover {
  text-decoration: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.order-card__chev {
  display: block;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

/* Potvrda narudžbe */
.confirm-page .confirm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.confirm-id-label {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.confirm-id-value {
  margin: 0 0 16px;
  font-weight: 700;
  word-break: break-all;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .confirm-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Detalj narudžbe */
.order-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 20px;
}

.order-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.order-detail-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.order-detail-type,
.order-detail-pay {
  font-size: 0.9375rem;
  margin: 0 0 8px;
}

.order-detail-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.order-detail-block h3 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.order-detail-block p {
  margin: 0;
  font-size: 0.9375rem;
}

.order-detail-totals {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.order-detail-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .order-detail-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.order-cancelled-msg {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #dc2626;
  margin: 16px 0 0;
}

[data-theme="dark"] .order-cancelled-msg {
  color: #fca5a5;
}

/* Timeline */
.order-timeline {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  counter-reset: step;
}

.order-timeline__step {
  flex: 1;
  min-width: 72px;
  text-align: center;
  position: relative;
  padding: 0 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.order-timeline__dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
}

.order-timeline__step.is-active .order-timeline__dot {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.order-timeline__step.is-done .order-timeline__dot {
  border-color: var(--primary);
  background: var(--primary);
}

.order-timeline__step.is-done {
  color: var(--text);
}

.order-timeline__step.is-active {
  color: var(--primary);
}

/* Statičke stranice */
.static-prose {
  max-width: 42rem;
  color: var(--text-muted);
}

.static-prose p,
.static-prose li {
  margin-bottom: 12px;
}

.static-prose ul {
  padding-left: 1.25rem;
}

/* Fokus tipkovnice — vidljiv prsten bez mijenjanja klika mišem */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none;
}

.restaurant-card-wrap {
  position: relative;
}

.restaurant-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  background: rgba(15, 23, 42, 0.65);
  color: #fda4af;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.12s,
    background 0.12s;
}

.restaurant-fav-btn:hover {
  transform: scale(1.06);
  background: rgba(15, 23, 42, 0.8);
}

.restaurant-fav-btn.is-favorite {
  color: #fb7185;
}

[data-theme="light"] .restaurant-fav-btn {
  background: rgba(255, 255, 255, 0.85);
  color: #e11d48;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    rgba(148, 163, 184, 0.12) 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.skeleton--img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius) var(--radius) 0 0;
}

.skeleton--thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.skeleton--line {
  height: 14px;
  border-radius: 6px;
}

.skeleton--line-lg {
  width: 70%;
}

.skeleton--line-md {
  width: 55%;
}

.skeleton--line-sm {
  width: 40%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.restaurant-card--skeleton {
  pointer-events: none;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.menu-item--skeleton {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.order-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
}

.order-live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
  animation: order-live-pulse 1.4s ease-in-out infinite;
}

@keyframes order-live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.92);
  }
}

.order-cancel-wrap {
  margin: 16px 0;
}

.star-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.star-rating__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.12s,
    color 0.12s,
    background 0.12s;
}

.star-rating__btn.is-active {
  border-color: var(--primary);
  color: #fbbf24;
  background: rgba(56, 189, 248, 0.08);
}

.star-rating__num {
  font-weight: 700;
}

.star-rating__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.profile-section {
  margin-top: 1.5rem;
  text-align: left;
}

.profile-section__title {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.saved-address-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.saved-address-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.saved-address-item p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.saved-address-phone {
  margin-top: 4px !important;
}

.staging-note {
  font-size: 0.9rem;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Admin panel — modern dashboard (restaurant CMS + orders) */
body[data-page="admin"] main {
  padding-bottom: max(96px, calc(80px + env(safe-area-inset-bottom, 0)));
}

body[data-page="admin"] .admin-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 18px 32px;
}

.admin-order-banner {
  font-size: 0.9rem;
  padding: 12px 16px;
  margin: 0 0 12px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--primary);
  backdrop-filter: blur(8px);
}

.admin-hero {
  margin: 0 0 8px;
  padding: 20px 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.admin-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(55%, 320px);
  height: 100%;
  background: radial-gradient(ellipse at 70% 20%, rgba(56, 189, 248, 0.22) 0%, transparent 65%);
  pointer-events: none;
}

[data-theme="light"] .admin-hero::before {
  background: radial-gradient(ellipse at 70% 20%, rgba(2, 132, 199, 0.12) 0%, transparent 65%);
}

.admin-hero__text {
  position: relative;
  z-index: 1;
}

.admin-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.95;
}

.admin-content .page-title {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 4.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-refresh-btn {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .admin-refresh-btn {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-page-sub {
  margin: 14px 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.admin-page-sub code {
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.admin-denied {
  padding: 8px 0 24px;
}

/* Segmented primary navigation */
.admin-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin: 1.15rem 0 1.35rem;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-main-tab {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.admin-main-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .admin-main-tab:hover {
  background: rgba(15, 23, 42, 0.04);
}

.admin-main-tab--active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(56, 189, 248, 0.25);
}

[data-theme="light"] .admin-main-tab--active {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(2, 132, 199, 0.2);
}

.admin-main-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.admin-tab-panel {
  margin-bottom: 0.75rem;
  animation: admin-panel-in 0.35s ease both;
}

@keyframes admin-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-tab-panel {
    animation: none;
  }

  .admin-order-card:hover,
  .admin-step-btn:hover,
  .admin-metric-card:hover {
    transform: none;
  }
}

/* Workflow card + stepper */
.admin-workflow {
  margin-bottom: 1.35rem;
  padding: 20px 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.admin-workflow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-workflow-intro {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 42em;
}

.admin-workflow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}

.admin-workflow-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.65;
  user-select: none;
}

.admin-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.admin-step-btn:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.admin-step-btn--active {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.12);
}

[data-theme="light"] .admin-step-btn--active {
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.1);
}

.admin-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: inherit;
}

.admin-step-btn--active .admin-step-num {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.2);
  color: var(--text);
}

.admin-step-label {
  font-size: 0.9rem;
}

.admin-step-cta {
  margin: 0.85rem 0 0;
}

.admin-catalog-toast {
  font-size: 0.9rem;
  padding: 14px 18px;
  margin: 0 0 16px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: var(--text);
  line-height: 1.45;
  backdrop-filter: blur(8px);
}

.admin-catalog-toast:not(.hidden) strong {
  color: var(--primary);
}

/* Section cards */
body[data-page="admin"] .admin-section {
  margin-top: 1.15rem;
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="admin"] .admin-section:first-of-type {
  margin-top: 0;
}

body[data-page="admin"] .admin-tab-panel > .admin-section:first-child,
body[data-page="admin"] .admin-step-panel > .admin-section:first-child {
  margin-top: 0;
}

body[data-page="admin"] .admin-section--flush:first-child {
  margin-top: 0;
}

/* Dashboard KPI strip (restaurants / orders / active / pending) */
.admin-dashboard-metrics {
  margin: 0.25rem 0 1.35rem;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 960px) {
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .admin-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.admin-metric-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 1.15rem 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  min-height: 92px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-metric-card:hover {
  border-color: rgba(56, 189, 248, 0.22);
  transform: translateY(-1px);
}

[data-theme="light"] .admin-metric-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.admin-metric-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--primary);
}

.admin-metric-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-metric-card__val {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.admin-metric-card__lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-metric-card--accent {
  border-color: rgba(56, 189, 248, 0.32);
  background: linear-gradient(155deg, var(--surface) 0%, rgba(56, 189, 248, 0.08) 100%);
}

.admin-metric-card--accent .admin-metric-card__icon {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}

.admin-metric-card--warn .admin-metric-card__icon {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.admin-menu-item-legacy {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

body[data-page="admin"] .admin-form-grid .field--wide {
  grid-column: 1 / -1;
}

.admin-check-row--single {
  justify-content: flex-start;
}

@media (min-width: 960px) {
  body[data-page="admin"] #admin-step-restaurant {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.25rem;
    align-items: start;
  }

  body[data-page="admin"] #admin-step-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  body[data-page="admin"] #admin-step-restaurant > .admin-section,
  body[data-page="admin"] #admin-step-menu > .admin-section {
    margin-top: 0;
  }
}

.admin-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.admin-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.admin-filter-row {
  margin-bottom: 16px;
}

body[data-page="admin"] .admin-filter-row select,
body[data-page="admin"] .admin-order-status {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  min-height: var(--tap-min);
}

.admin-orders {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-order-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-order-card:hover {
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .admin-order-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.admin-order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-order-card__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-order-card__total {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  white-space: nowrap;
}

.admin-order-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.admin-order-status-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-order-status {
  flex: 1;
  min-width: 160px;
  font: inherit;
}

.admin-restaurants {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-rest-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.admin-rest-row:hover {
  border-color: rgba(56, 189, 248, 0.22);
}

.admin-rest-row__info {
  flex: 1;
  min-width: 140px;
}

.admin-rest-row__info strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-rest-row__city {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-rest-row__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 6px 0;
}

.admin-users-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-users-table th,
.admin-users-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-users-table th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-users-table tbody tr {
  transition: background 0.15s ease;
}

.admin-users-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}

[data-theme="light"] .admin-users-table tbody tr:hover {
  background: rgba(2, 132, 199, 0.06);
}

.admin-users-table tr:last-child td {
  border-bottom: none;
}

.admin-form {
  max-width: 720px;
  padding: 8px 0 4px;
}

body[data-page="admin"] .admin-form .field input,
body[data-page="admin"] .admin-form .field textarea,
body[data-page="admin"] .admin-form .field select,
body[data-page="admin"] .admin-section .field input,
body[data-page="admin"] .admin-section .field textarea,
body[data-page="admin"] .admin-section select {
  border-radius: 12px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.admin-menu-items-list {
  margin-top: 14px;
}

.admin-menu-item-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.2s ease;
}

.admin-menu-item-row:hover {
  border-color: rgba(56, 189, 248, 0.2);
}

.admin-menu-item-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

body[data-page="admin"] .admin-content .site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  opacity: 0.9;
}

/* --- Restoran — real-time narudžbe --- */
.rd-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

body[data-page="restaurant-dashboard"] .rd-main {
  max-width: 960px;
}

@media (max-width: 767px) {
  body[data-page="restaurant-dashboard"] .rd-main {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 1rem);
  }
}

.rd-panel {
  padding: 1rem 0;
}

.rd-section-title {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.75rem;
}

.rd-orders-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rd-order-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--surface-2);
}

.rd-order-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent, #38bdf8);
  margin-bottom: 8px;
}

.rd-order-card__meta {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--text);
}

.rd-order-card__meta p {
  margin: 0 0 6px;
}

.rd-order-card__num {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rd-order-card__note {
  font-size: 0.88rem;
}

.rd-item-note {
  color: var(--text-muted);
  font-weight: 500;
}

.rd-order-card__items {
  margin: 0 0 10px;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.rd-order-card__total {
  font-size: 1rem;
  margin-bottom: 12px;
}

.rd-order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rd-popup {
  border: none;
  padding: 0;
  max-width: calc(100vw - 2rem);
  width: 420px;
  border-radius: 18px;
  background: transparent;
}

.rd-popup::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.rd-popup__inner {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.rd-popup__badge {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--accent, #38bdf8);
}

.rd-popup__meta {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 12px;
}

.rd-popup__meta p {
  margin: 0 0 6px;
}

.rd-popup__items {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.rd-popup__total {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.rd-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rd-popup__close {
  margin-left: auto;
}

body[data-page="restaurant-dashboard"] .rd-header-slug {
  font-size: 0.85rem;
}

/* —— Restoran: puni partner panel —— */
.rd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.rd-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}

.rd-stat__val {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent, #38bdf8);
}

.rd-stat__lbl {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.rd-tablet-btn {
  flex-shrink: 0;
}

.rd-push-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.rd-push-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rd-push-banner__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.rd-push-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.rd-push-banner__status {
  font-size: 0.82rem;
}

.rd-panel-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.25rem 0 1rem;
}

.rd-panel-nav-btn {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rd-panel-nav-btn:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.rd-panel-nav-btn--active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--accent, #38bdf8);
}

.rd-section.hidden {
  display: none;
}

.rd-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}

.rd-tab {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rd-tab:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.3);
}

.rd-tab--active {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.rd-tab-count {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--surface-1);
  color: var(--accent, #38bdf8);
  vertical-align: middle;
}

.rd-tab--active .rd-tab-count {
  background: rgba(56, 189, 248, 0.25);
}

.rd-order-card__time {
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.rd-order-card__items-h {
  margin: 0 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.rd-inline-msg {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--accent, #38bdf8);
  margin-bottom: 0.75rem;
}

.rd-menu-form,
.rd-settings-form {
  margin-bottom: 1.5rem;
}

.rd-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}

.rd-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.rd-label input,
.rd-label textarea {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
}

.rd-label--check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.rd-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.rd-wh-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.25rem;
  max-width: 420px;
}

.rd-wh-row {
  display: grid;
  grid-template-columns: 110px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.rd-wh-day {
  color: var(--text-muted);
  font-weight: 600;
}

.rd-wh-sep {
  text-align: center;
  color: var(--text-muted);
}

.rd-wh-row input[type="time"] {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
}

.rd-menu-list-host {
  margin-top: 1rem;
}

.rd-menu-table {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rd-menu-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .rd-menu-row {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }

  .rd-menu-row__price,
  .rd-menu-row__flags,
  .rd-menu-row__actions {
    grid-column: 2;
  }

  .rd-menu-row__actions {
    justify-self: start;
  }
}

.rd-menu-row__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-1);
  flex-shrink: 0;
}

.rd-menu-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rd-menu-row__main strong {
  display: block;
  font-size: 0.95rem;
}

.rd-menu-row__desc {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.rd-menu-row__price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent, #38bdf8);
}

.rd-menu-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rd-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
}

.rd-pill--ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.rd-pill--off {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

html.rd-tablet-mode body[data-page="restaurant-dashboard"] .site-header,
html.rd-tablet-mode body[data-page="restaurant-dashboard"] .bottom-nav,
html.rd-tablet-mode body[data-page="restaurant-dashboard"] .site-footer {
  display: none;
}

html.rd-tablet-mode body[data-page="restaurant-dashboard"] .rd-main {
  max-width: none;
  padding: 1.25rem 1.5rem 2rem;
}

html.rd-tablet-mode .rd-order-card {
  padding: 22px 24px;
  border-radius: 20px;
}

html.rd-tablet-mode .rd-order-card__meta {
  font-size: 1.05rem;
}

html.rd-tablet-mode .rd-order-card__items {
  font-size: 1.05rem;
}

html.rd-tablet-mode .rd-stat__val {
  font-size: 2rem;
}

html.rd-tablet-mode .rd-order-tabs {
  gap: 12px;
}

html.rd-tablet-mode .rd-tab {
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
}

@media (min-width: 900px) {
  html.rd-tablet-mode body[data-page="restaurant-dashboard"] .rd-orders-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  html.rd-tablet-mode body[data-page="restaurant-dashboard"] .rd-orders-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
