:root {
  --bg: #fff7ef;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #111827;
  --muted: #6b7280;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 28px 80px rgba(17, 24, 39, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.08), transparent 20%),
    linear-gradient(180deg, #fffaf5 0%, var(--bg) 100%);
  min-height: 100vh;
}

a { color: inherit; }

.shell,
.menu-page {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 28px;
}

.login-screen {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  padding: 28px;
}

.brand-block h1,
.menu-hero h1,
.topbar h2,
.section h3,
.section h2 { margin: 0; }

.brand-block h1,
.menu-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  color: var(--accent-dark);
  font-weight: 800;
}

.lead { color: var(--muted); font-size: 1.03rem; line-height: 1.7; max-width: 54ch; }

.ghost-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: 0.18s ease;
  font-weight: 700;
}

.ghost-link {
  margin-top: 20px;
  padding: 12px 16px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.button {
  padding: 12px 16px;
  background: #fff;
}

.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,0.8); }
.button.danger { background: #ef4444; color: white; }
.button.inline { display: inline-flex; width: fit-content; }

.panel { padding: 20px; }
.form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}

.form-card label,
.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.98rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.muted { color: var(--muted); }
.alert { padding: 12px 14px; border-radius: 14px; background: rgba(239, 68, 68, 0.1); color: #b91c1c; font-weight: 700; }
.hidden { display: none !important; }

.app-shell { display: grid; gap: 16px; }

.topbar,
.tabs,
.stats-grid,
.section-grid { display: grid; gap: 16px; }

.topbar { grid-template-columns: 1fr auto; align-items: center; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.86);
  padding: 12px;
  border-radius: 16px;
  font-weight: 800;
}
.tab.active { background: #111827; color: white; }

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
}
.stat-card .label { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.stat-card .value { font-size: 1.7rem; font-weight: 900; margin-top: 8px; }

.section-grid { grid-template-columns: 1fr; }
.section { display: none; }
.section.active { display: block; }
.section-head,
.dashboard-split,
.finance-grid { display: grid; gap: 16px; }
.section-head { grid-template-columns: 1fr auto; align-items: center; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.grid-form.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full-row { grid-column: 1 / -1; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

.card-list,
.finance-boxes,
.quick-list,
.menu-grid { display: grid; gap: 14px; }
.card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  border-radius: 22px;
  padding: 16px;
}
.card-top,
.card-actions,
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.badge { display:inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(249,115,22,.12); color: var(--accent-dark); font-size: .8rem; font-weight: 800; }
.thumb {
  width: 76px; height: 76px; border-radius: 18px; object-fit: cover; background: #f3f4f6; border: 1px solid var(--line); flex: 0 0 auto;
}
.thumb.large { width: 100%; height: 220px; }
.card-main { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.card-main.no-thumb { grid-template-columns: 1fr; }
.card-actions { justify-content: flex-start; }

.public-link-box {
  display: grid;
  place-content: center;
  min-height: 160px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(249,115,22,.12), rgba(17,24,39,.06));
  text-align: center;
}

.inline { width: fit-content; }
.desktop-hidden { display: none; }

.menu-hero { margin-bottom: 16px; }
.menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .login-screen { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-form, .grid-form.compact, .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shell, .menu-page { width: min(100% - 20px, 100%); }
  .topbar, .section-head { grid-template-columns: 1fr; }
  .stats-grid, .tabs, .grid-form, .grid-form.compact, .menu-grid { grid-template-columns: 1fr; }
  .card-main { grid-template-columns: 1fr; }
}
