/* ============================================================
   AURUM — design system
   Palette grounded in Mtskheta wine country, not a generic
   black+gold theme: deep saperavi wine, aged parchment, gold leaf.
   Display: Cormorant Garamond (falls back to Noto Serif Georgian
   for Georgian script). Body: Inter (+ Noto Sans Georgian).
   ============================================================ */

:root {
  --wine: #2a0e13;          /* primary dark */
  --wine-soft: #3a151b;
  --ink: #170709;           /* deepest */
  --gold: #c8a24b;          /* signature accent (aurum) */
  --gold-bright: #e3c277;
  --parchment: #f4eddd;     /* light section bg */
  --cream: #fbf7ee;         /* cards / text on dark */
  --stone: #9a8f7d;         /* muted utility text */
  --line: rgba(200, 162, 75, 0.28);
  --shadow: 0 18px 50px rgba(15, 5, 7, 0.35);

  --display: 'Cormorant Garamond', 'Noto Serif Georgian', Georgia, serif;
  --body: 'Inter', 'Noto Sans Georgian', system-ui, sans-serif;

  --maxw: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--cream);
  background: var(--wine);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--cream); }

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.1s;
}
.btn:hover { background: var(--gold); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--gold); color: var(--ink); }
.btn--solid:hover { background: var(--gold-bright); }
.btn--ghost { border-color: var(--line); color: var(--cream); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); color: var(--cream); }
.btn--sm { padding: 9px 16px; font-size: 0.72rem; }
.nav__admin::before { content: "🔒"; margin-right: 6px; font-size: 0.9em; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 2px;
}

/* ── top navigation ──────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 7, 9, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-family: var(--display); font-size: 1.8rem; letter-spacing: 0.18em; color: var(--gold-bright); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { font-size: 0.82rem; letter-spacing: 0.08em; color: var(--cream); opacity: 0.85; }
.nav__links a:hover { opacity: 1; color: var(--gold-bright); }
.nav__right { display: flex; align-items: center; gap: 18px; }

.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang button {
  font-family: var(--body); background: transparent; color: var(--cream);
  border: none; padding: 7px 11px; font-size: 0.72rem; letter-spacing: 0.06em;
  cursor: pointer; opacity: 0.6; transition: 0.2s;
}
.lang button.active { background: var(--gold); color: var(--ink); opacity: 1; }
.lang button:hover { opacity: 1; }

.nav__toggle { display: none; background: none; border: none; color: var(--gold-bright); font-size: 1.6rem; cursor: pointer; }

/* ── hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(200,162,75,0.10), transparent 60%),
    linear-gradient(180deg, var(--ink), var(--wine) 70%);
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(200,162,75,0.03) 38px 39px);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; width: 100%; }
.hero__title {
  font-size: clamp(4rem, 16vw, 11rem);
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  text-shadow: 0 6px 40px rgba(0,0,0,0.5);
}
.hero__rule { width: 64px; height: 1px; background: var(--gold); margin: 22px auto; }
.hero__subtitle { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.9rem); color: var(--cream); font-style: italic; max-width: 620px; margin: 0 auto 36px; }
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── generic section ─────────────────────────────────────── */
.section { padding: 110px 0; }
.section--parchment { background: var(--parchment); color: var(--ink); }
.section--parchment .section-title { color: var(--ink); }
.section--parchment .eyebrow { color: #9a6b1f; }
.section__head { text-align: center; margin-bottom: 56px; }

/* ── about ───────────────────────────────────────────────── */
.about__body { max-width: 680px; margin: 0 auto 48px; text-align: center; font-size: 1.12rem; color: #4a3a32; }
.stats { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat__num { font-family: var(--display); font-size: 3.2rem; color: #9a6b1f; line-height: 1; }
.stat__label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: #7a6a5e; margin-top: 8px; }

/* ── menu ────────────────────────────────────────────────── */
.menu-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.menu-tab {
  font-family: var(--body); background: transparent; border: 1px solid var(--line);
  color: var(--cream); padding: 9px 20px; border-radius: 40px; cursor: pointer;
  font-size: 0.8rem; letter-spacing: 0.06em; transition: 0.2s; opacity: 0.78;
}
.menu-tab.active, .menu-tab:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); opacity: 1; }

.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 56px; }
.dish { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.dish__thumb { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: var(--wine-soft); }
.dish__body { flex: 1; }
.dish__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dish__name { font-family: var(--display); font-size: 1.4rem; color: var(--cream); }
.dish__name .star { color: var(--gold); font-size: 0.8em; }
.dish__price { font-family: var(--display); font-size: 1.4rem; color: var(--gold-bright); white-space: nowrap; }
.dish__desc { font-size: 0.92rem; color: var(--stone); margin-top: 4px; }
.menu-empty { text-align: center; color: var(--stone); grid-column: 1 / -1; padding: 40px; }

/* ── gallery ─────────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-grid .tile { aspect-ratio: 1; border-radius: var(--radius); background:
   linear-gradient(135deg, var(--wine-soft), var(--ink)); position: relative; overflow: hidden; }
.gallery-grid .tile::after { content: '✦'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--line); font-size: 2rem; }
.gallery-grid .tile img { width: 100%; height: 100%; object-fit: cover; }

/* ── contact ─────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.contact-card .label { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.contact-card .value { font-family: var(--display); font-size: 1.3rem; }

/* ── footer ──────────────────────────────────────────────── */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding: 40px 0; text-align: center; }
.footer .brand { display: block; margin-bottom: 8px; }
.footer small { color: var(--stone); display: block; }
.footer-admin {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 7px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--stone); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; transition: 0.18s;
}
.footer-admin::before { content: "🔒"; font-size: 0.85em; }
.footer-admin:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ============================================================
   ORDER PAGE
   ============================================================ */
.order-wrap { max-width: 980px; margin: 0 auto; padding: 48px 24px 90px; }
.steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.step-pill { display: flex; align-items: center; gap: 10px; color: var(--stone); font-size: 0.82rem; letter-spacing: 0.06em; }
.step-pill .dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 0.8rem; }
.step-pill.active { color: var(--gold-bright); }
.step-pill.active .dot { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.step-sep { width: 30px; height: 1px; background: var(--line); align-self: center; }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-head { text-align: center; margin-bottom: 8px; font-size: 2rem; color: var(--cream); }
.step-hint { text-align: center; color: var(--stone); margin-bottom: 32px; }

/* table floor plan — the signature element */
.tables-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.table-cell {
  position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--wine-soft); color: var(--cream); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.5rem; transition: 0.18s;
}
.table-cell .seats { font-family: var(--body); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--stone); margin-top: 2px; }
.table-cell:hover:not(.busy) { border-color: var(--gold); transform: translateY(-2px); }
.table-cell.selected { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.table-cell.selected .seats { color: rgba(23,7,9,0.7); }
.table-cell.busy { opacity: 0.4; cursor: not-allowed; }
.table-cell.busy::after { content: '●'; position: absolute; top: 6px; right: 8px; color: #c0392b; font-size: 0.6rem; }

.order-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: start; }
.order-menu-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.order-cat-head { font-family: var(--display); font-size: 1.3rem; color: var(--gold-bright); margin: 14px 0 4px; }
.order-dish { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wine-soft); }
.order-dish__photo { width: 64px; height: 64px; flex: 0 0 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.order-dish__photo--empty { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--gold); background: var(--ink); }
.order-dish__info { flex: 1; min-width: 0; }
.order-dish__name { font-family: var(--display); font-size: 1.15rem; }
.order-dish__desc { color: var(--stone); font-size: 0.82rem; margin: 2px 0 4px; line-height: 1.35; }
.order-dish__price { color: var(--gold-bright); font-size: 0.9rem; }

.cart { position: sticky; top: 90px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--ink); }
.cart h3 { font-size: 1.5rem; margin-bottom: 16px; color: var(--gold-bright); }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.cart-line .name { flex: 1; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 24px; height: 24px; border: 1px solid var(--line); background: var(--wine-soft); color: var(--cream); border-radius: 3px; cursor: pointer; font-size: 1rem; line-height: 1; }
.cart-total { display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.5rem; color: var(--gold-bright); margin: 18px 0; }
.cart .field { margin-bottom: 12px; }
.cart-empty { color: var(--stone); text-align: center; padding: 24px 0; }

.field label { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--body); font-size: 0.95rem; padding: 11px 13px;
  background: var(--wine-soft); border: 1px solid var(--line); border-radius: var(--radius); color: var(--cream);
}
.field textarea { min-height: 70px; resize: vertical; }

.order-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }

.success {
  text-align: center; max-width: 480px; margin: 60px auto; padding: 48px 32px;
  border: 1px solid var(--gold); border-radius: var(--radius); background: var(--ink);
}
.success .seal { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; margin: 0 auto 24px; color: var(--gold-bright); font-size: 2.4rem; }
.success h2 { font-size: 2.2rem; color: var(--gold-bright); margin-bottom: 12px; }
.success p { color: var(--cream); margin-bottom: 28px; }

.selected-badge { text-align: center; margin-bottom: 24px; color: var(--cream); }
.selected-badge strong { color: var(--gold-bright); font-family: var(--display); font-size: 1.6rem; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-body { background: var(--ink); min-height: 100vh; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 34px; background: var(--wine); box-shadow: var(--shadow); }
.auth-card .brand { text-align: center; display: block; margin-bottom: 6px; }
.auth-card h2 { text-align: center; font-size: 1.6rem; margin-bottom: 26px; color: var(--cream); }
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-switch { text-align: center; margin-top: 18px; }
.auth-switch a { color: var(--gold-bright); font-size: 0.86rem; cursor: pointer; }
.auth-error { background: rgba(192,57,43,0.16); border: 1px solid #c0392b; color: #f0b0a8; padding: 10px 14px; border-radius: var(--radius); font-size: 0.86rem; margin-bottom: 16px; display: none; }
.auth-error.show { display: block; }

.admin-top { display: flex; align-items: center; justify-content: space-between; height: 64px; border-bottom: 1px solid var(--line); padding: 0 24px; position: sticky; top: 0; background: rgba(23,7,9,0.9); backdrop-filter: blur(8px); z-index: 30; }
.admin-top .brand { font-size: 1.4rem; }
.admin-user { display: flex; align-items: center; gap: 16px; font-size: 0.86rem; color: var(--stone); }

.admin-tabs { display: flex; gap: 6px; padding: 16px 24px 0; flex-wrap: wrap; }
.admin-tab { font-family: var(--body); background: transparent; border: 1px solid var(--line); color: var(--cream); padding: 10px 20px; border-radius: var(--radius) var(--radius) 0 0; cursor: pointer; font-size: 0.84rem; opacity: 0.7; }
.admin-tab.active { background: var(--wine); opacity: 1; border-bottom-color: var(--wine); color: var(--gold-bright); }

.admin-view { display: none; padding: 28px 24px 80px; }
.admin-view.active { display: block; }
.admin-view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.admin-view-head h2 { font-size: 1.8rem; color: var(--cream); }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #46c46a; box-shadow: 0 0 0 0 rgba(70,196,106,0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(70,196,106,0.6);} 70% { box-shadow: 0 0 0 9px rgba(70,196,106,0);} 100% { box-shadow: 0 0 0 0 rgba(70,196,106,0);} }

/* live order cards */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.order-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--wine); overflow: hidden; animation: pop 0.35s ease; }
.order-card.preparing { border-color: var(--gold); }
@keyframes pop { from { opacity: 0; transform: scale(0.96);} to { opacity: 1; transform: none; } }
.order-card__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--ink); border-bottom: 1px solid var(--line); }
.order-card__table { font-family: var(--display); font-size: 1.5rem; color: var(--gold-bright); }
.order-card__table span { font-family: var(--body); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); display: block; }
.order-card__time { font-size: 0.78rem; color: var(--stone); }
.order-card__status { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 30px; border: 1px solid var(--line); }
.order-card__status.new { color: #46c46a; border-color: #46c46a; }
.order-card__status.preparing { color: var(--gold); border-color: var(--gold); }
.order-card__lines { padding: 14px 16px; }
.order-card__line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.92rem; }
.order-card__line .q { color: var(--gold-bright); font-weight: 600; margin-right: 6px; }
.order-card__note { font-size: 0.84rem; color: var(--stone); font-style: italic; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.order-card__foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.order-card__foot .btn { flex: 1; }
.empty-state { text-align: center; color: var(--stone); padding: 80px 20px; font-size: 1.05rem; }

/* admin data tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.data-table th { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--wine-soft); }
.row-actions { display: flex; gap: 6px; }
.tag { font-size: 0.68rem; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--stone); }
.tag.on { color: #46c46a; border-color: #46c46a; }
.tag.off { color: #c0392b; border-color: #c0392b; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,3,5,0.7); display: none; place-items: center; z-index: 100; padding: 24px; overflow-y: auto; }
.modal-backdrop.show { display: grid; }
.modal { width: 100%; max-width: 560px; background: var(--wine); border: 1px solid var(--gold); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.modal h3 { font-size: 1.5rem; color: var(--gold-bright); margin-bottom: 20px; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal .field { margin-bottom: 14px; }
.modal .checks { display: flex; gap: 22px; margin: 6px 0 16px; }
.modal .checks label { display: flex; align-items: center; gap: 7px; text-transform: none; letter-spacing: 0; font-size: 0.9rem; color: var(--cream); }
.modal .checks input { width: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--gold); color: var(--ink); padding: 14px 24px; border-radius: var(--radius); font-size: 0.9rem; box-shadow: var(--shadow); transition: transform 0.3s; z-index: 200; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--ink); padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--line); }
  .menu-grid { grid-template-columns: 1fr; gap: 0 0; }
  .order-layout { grid-template-columns: 1fr; }
  .cart { position: static; }
  .tables-grid { grid-template-columns: repeat(5, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 36px; }
  .modal .grid2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; transition: none !important; }
}
