body.admin { font-size: 16px; }
.small { font-size: 0.85rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }

.login { min-height: 90vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--surface); padding: 32px; border-radius: 20px; box-shadow: var(--shadow); width: min(400px, 100%); }

.admin-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.admin-bar-right { display: flex; align-items: center; gap: 12px; }

.admin-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 60px); }
.sidebar { border-right: 1px solid var(--line); padding: 18px; background: var(--bg-alt); }
.editor { padding: 24px clamp(16px, 3vw, 36px) 80px; min-width: 0; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  #drop-list .list-label { display: none; }
  #drop-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
  #drop-list .drop-link { min-width: 200px; }
  .admin-bar-right .muted { display: none; }
}

.list-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 8px; }
.drop-link {
  display: block; width: 100%; text-align: left; border: 1.5px solid transparent; background: var(--surface);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font: inherit; color: var(--ink);
}
.drop-link:hover { border-color: var(--line); }
.drop-link.active { border-color: var(--accent); }
.drop-link b { display: block; font-size: 0.95rem; }
.drop-link small { color: var(--muted); }
.drop-link .status-chip { margin: 4px 0 0; font-size: 0.65rem; }

.editor-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.editor-head h2 { margin: 0; font-size: 1.9rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin-bottom: 22px; }
.tab { background: none; border: 0; padding: 10px 16px; font: 800 0.95rem var(--font-body); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.tab .count { background: var(--accent-soft); color: var(--accent-dark); border-radius: 99px; padding: 1px 8px; font-size: 0.8rem; margin-left: 4px; }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.panel h3 { font-size: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; }
.status-help { font-size: 0.85rem; color: var(--muted); margin: -8px 0 14px; }

.item-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.item-row:first-of-type { border-top: 0; }
.item-row .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; font-size: 1.8rem; }
.item-row .name { font-weight: 800; }
.item-row .meta { font-size: 0.85rem; color: var(--muted); }
.item-row .meta b { color: var(--ink); }
.item-row .soldout-tag { color: var(--accent-dark); font-weight: 800; }
@media (max-width: 520px) {
  .item-row { grid-template-columns: 52px 1fr; }
  .item-row .thumb { width: 52px; height: 52px; }
  .item-row .actions { grid-column: 1 / -1; }
}

.photo-field { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.photo-preview { width: 110px; height: 110px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.photo-preview > * { width: 100%; height: 100%; object-fit: cover; font-size: 3rem; }
.file-btn { margin: 0 6px 6px 0; display: inline-flex; font-weight: 700; }

/* Reservations */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
.stat { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; }
.stat .k { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; }

table.tally { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.tally th, table.tally td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.tally th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
table.tally td.n, table.tally th.n { text-align: right; }

.res-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.res-tools input { margin: 0; flex: 1; min-width: 180px; }
.res-tools select { margin: 0; width: auto; }

.res { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.res.picked_up { background: var(--sage-soft); border-color: transparent; }
.res.cancelled { opacity: 0.55; }
.res-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.res-name { font-weight: 800; font-size: 1.05rem; }
.res-code { font-family: var(--font-head); letter-spacing: 0.1em; color: var(--accent); font-weight: 700; margin-left: 6px; }
.res-total { font-weight: 800; font-size: 1.1rem; }
.res-contact { font-size: 0.88rem; color: var(--muted); }
.res-items { margin: 8px 0; font-size: 0.95rem; }
.res-notes { font-size: 0.9rem; background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.res-badge { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.res.picked_up .res-badge { color: var(--sage); }
.res.cancelled .res-badge { color: var(--accent-dark); }

.website-link { margin-bottom: 14px; border-color: var(--line); }
input[type="color"] { height: 46px; padding: 4px; cursor: pointer; }
.website-link small { display: block; }
.field-block { margin-bottom: 14px; }
.field-block .cal { margin-top: 8px; }
.logo-preview { background: var(--cream); width: 160px; }
.logo-preview img { object-fit: contain !important; }

.list-editor { display: grid; gap: 12px; }
.list-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px 0; }
.list-row label { margin-bottom: 12px; }
.list-actions { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.list-actions .btn { padding: 5px 10px; }
.list-editor > .btn { justify-self: start; }

.save-bar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 999px; box-shadow: 0 8px 30px rgba(74, 44, 29, 0.18); padding: 8px 8px 8px 22px;
}

.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.day-tab { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font: 700 0.9rem var(--font-body); color: var(--ink); cursor: pointer; }
.day-tab.active { background: var(--pink); border-color: var(--pink-strong); }
.res-pickup { font-weight: 800; font-size: 0.9rem; margin-top: 2px; }
.print-only { display: none; }

.empty-editor { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-editor .big { font-size: 3rem; }

@media print {
  .admin-bar, .sidebar, .tabs, .actions, .res-tools, .demo-banner, .res .actions, .no-print { display: none !important; }
  .admin-layout { display: block; }
  .editor { padding: 0; }
  .panel, .stat, .res { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff; }
  .print-only { display: block; }
  .save-bar { display: none; }
}
