:root {
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #172026;
  --muted: #6b7b86;
  --accent: #1f7a8c;
  --danger: #9f2f2f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', Tahoma, sans-serif; background: linear-gradient(180deg, #f7fafb, #e9f0f4); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
.landing { max-width: 700px; margin: 3rem auto; padding: 1.5rem; background: var(--card); border-radius: 16px; box-shadow: 0 10px 30px rgba(13,38,55,.08); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }
.btn, button { border: 0; border-radius: 12px; padding: .65rem 1rem; background: var(--accent); color: #fff; cursor: pointer; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.card-form { background: var(--card); border: 1px solid #dde7ed; border-radius: 14px; padding: 1rem; margin: .8rem 0; display: grid; gap: .45rem; }
.form-grid { display: grid; gap: .45rem; grid-template-columns: 1fr; }
input, select, textarea { width: 100%; padding: .55rem .7rem; border-radius: 10px; border: 1px solid #cad7df; }
textarea { min-height: 85px; }
.alert { padding: .75rem; border-radius: 8px; margin: .5rem 0; }
.alert-error { background: #ffdfe1; color: var(--danger); }
.muted { color: var(--muted); }
.inline-form { display: inline; }

.admin-shell .admin-header { display: flex; gap: 1rem; align-items: center; padding: .8rem 1rem; background: var(--card); border-bottom: 1px solid #dde7ed; position: sticky; top: 0; z-index: 20; }
.admin-main { max-width: 980px; margin: 1rem auto; padding: 0 1rem 3rem; }
.stat-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 1rem 0; }
.stat { background: var(--card); border-radius: 12px; padding: .8rem; border: 1px solid #dde7ed; }
.stat span { display: block; color: var(--muted); }
.stat strong { font-size: 1.4rem; }
.thumb { width: 110px; border-radius: 8px; margin-top: .4rem; }
.items-admin-list { display: grid; gap: .6rem; }
.item-admin-row { background: var(--card); border: 1px solid #dde7ed; border-radius: 12px; overflow: hidden; }
.item-admin-row summary { display: grid; grid-template-columns: 1fr auto auto auto; gap: .5rem; align-items: center; padding: .7rem .8rem; cursor: pointer; list-style: none; }
.item-admin-row summary::-webkit-details-marker { display: none; }
.item-admin-title { font-weight: 700; }
.item-admin-meta { color: var(--muted); font-size: .92rem; }
.item-admin-price { font-weight: 700; }
.hours-row { display: grid; grid-template-columns: 80px 1fr 1fr auto; gap: .5rem; align-items: center; }

.menu-page { --accent: #1f7a8c; }
.theme-fresh {
  --menu-bg: linear-gradient(180deg, #f7fcfb, #eef6f4);
  --menu-card: #ffffff;
  --menu-text: #132a2f;
  --menu-muted: #5d727a;
}
.theme-warm {
  --menu-bg: linear-gradient(180deg, #fff9f2, #f9efe2);
  --menu-card: #fffdf9;
  --menu-text: #362214;
  --menu-muted: #7a6450;
}
.theme-mono {
  --menu-bg: linear-gradient(180deg, #f5f5f6, #ececef);
  --menu-card: #ffffff;
  --menu-text: #1f2328;
  --menu-muted: #616974;
}
.menu-page {
  background: var(--menu-bg);
  color: var(--menu-text);
  min-height: 100vh;
}
.venue-header { background: transparent; }
.venue-cover { width: 100%; max-height: 220px; object-fit: cover; }
.venue-meta { padding: 1rem; background: var(--menu-card); border-bottom: 1px solid #dde7ed; }
.venue-title-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .35rem; }
.venue-title-row h1 { margin: 0; }
.venue-logo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.status { border-radius: 999px; padding: .15rem .55rem; font-size: .82rem; font-weight: 600; }
.status-on { background: #d7f3df; color: #145c2e; }
.status-off { background: #ffdede; color: #7f1717; }
.cat-nav { position: sticky; top: 0; z-index: 15; display: flex; gap: .35rem; overflow-x: auto; padding: .6rem; background: var(--menu-card); border-top: 1px solid #dde7ed; border-bottom: 1px solid #dde7ed; }
.cat-nav a { white-space: nowrap; padding: .4rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 15%, #fff); color: var(--menu-text); }
.cat-nav a.is-active { background: var(--accent); color: #fff; }
.search-wrap { padding: .7rem; background: var(--menu-card); }
.menu-content { padding: .6rem; }
.menu-category h2 { margin: 1rem 0 .6rem; }
.item-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.item-card { display: grid; grid-template-columns: 110px 1fr; min-height: 128px; background: var(--menu-card); border: 1px solid #dde7ed; border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.item-card:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(24, 45, 63, .08); }
.item-card img, .item-noimg { width: 110px; height: 100%; min-height: 128px; object-fit: cover; }
.item-noimg { display: grid; place-items: center; font-size: .78rem; color: #6b7b86; background: #edf3f7; }
.item-body { padding: .65rem; display: grid; grid-template-rows: auto 1fr auto auto; gap: .2rem; }
.item-body h3 { margin: 0 0 .3rem; }
.item-body p { margin: 0 0 .35rem; color: var(--menu-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { font-size: .85rem; color: #6d5d00; }
.item-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.menu-modal { position: fixed; inset: 0; display: none; z-index: 90; }
.menu-modal.is-open { display: block; }
.menu-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 20, 27, .55); }
.menu-modal-card { position: relative; margin: 5vh auto; width: min(680px, 92vw); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.22); }
.menu-modal-close { position: sticky; top: .6rem; left: calc(100% - 2.6rem); width: 2rem; height: 2rem; border-radius: 999px; padding: 0; z-index: 2; }
.menu-modal-image { width: 100%; max-height: 44vh; object-fit: cover; }
.menu-modal-content { padding: 1rem; display: grid; gap: .5rem; }

@media (min-width: 850px) {
  .item-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}
