@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root { --paper: #F7F0E4; --card: #FFFBF4; --ink: #22302E; --muted: #5A5F55; --green: #1F4D4A; --plum: #6B2342; --line: #D9CBB3; --danger: #A12B3B; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 "DM Sans", system-ui, sans-serif; }
a { color: var(--green); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: 36px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.danger { color: var(--danger) !important; }
code { background: #EFE5D3; padding: 1px 6px; border-radius: 6px; }

.a-head { background: var(--green); color: #FFFBF4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 12px 24px; }
.a-brand { display: flex; align-items: center; gap: 10px; color: #F2C26B; text-decoration: none; font-weight: 700; }
.a-brand img { height: 34px; width: auto; }
.a-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.a-nav a { color: #E9EFEA; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.a-nav a:hover { background: rgba(255,255,255,.1); }
.a-nav a[aria-current="page"] { background: #FFFBF4; color: var(--green); }
.count { background: #E3A83A; color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 13px; font-weight: 700; }
.a-user { display: flex; align-items: center; gap: 16px; }
.a-user a, .a-user .linkish { color: #E9EFEA; }

.a-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 120px; }
.a-narrow { max-width: 460px; margin: 40px auto; }
.a-card { background: var(--card); border-radius: 20px; padding: 24px; margin: 0 0 20px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.a-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.a-titlebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.flash { border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; font-weight: 500; }
.flash.ok { background: #DDEBDD; color: #1F4D2A; }
.flash.err { background: #F6DADF; color: #6B1F2E; }

.a-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; margin: 0 0 14px; }
.a-form label small { font-weight: 400; color: var(--muted); }
.a-form input:not([type=checkbox]):not([type=file]), .a-form textarea, .a-form select { font: 16px/1.4 "DM Sans", system-ui, sans-serif; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.a-form input:focus, .a-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,77,74,.15); }
.a-form textarea { resize: vertical; }
.a-form input[type=file] { font: inherit; padding: 8px 0; }
.a-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.a-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.a-check input { width: 20px; height: 20px; accent-color: var(--green); }
.a-fieldset { border: 2px dashed var(--line); border-radius: 16px; padding: 16px; margin: 0 0 16px; }
.a-fieldset legend { font-weight: 700; padding: 0 6px; }
.a-thumb { max-width: 260px; border-radius: 12px; margin-bottom: 10px; }

.a-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px; border-radius: 999px; border: 2px solid var(--green); background: var(--green); color: #FFFBF4; font: 700 16px "DM Sans", sans-serif; text-decoration: none; cursor: pointer; }
.a-btn:hover { background: #173B39; color: #FFFBF4; }
.a-btn-ghost { background: transparent; color: var(--green); }
.a-btn-ghost:hover { background: var(--green); color: #FFFBF4; }
.linkish { background: none; border: 0; padding: 6px 4px; color: var(--green); font: 500 15px "DM Sans", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish.add { font-weight: 700; text-decoration: none; padding: 8px 0; }
.a-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.a-actions form { display: inline; margin: 0; }

.a-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.a-tile { background: var(--card); border-radius: 20px; padding: 22px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; }
.a-tile:hover { border-color: var(--green); color: var(--ink); }
.a-tile strong { font: 500 21px/1.2 "Fraunces", Georgia, serif; }
.a-tile span { color: var(--muted); font-size: 14px; }

.a-list { list-style: none; margin: 0 0 20px; padding: 8px 24px; }
.a-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.a-list li:last-child { border-bottom: 0; }
.a-details summary { cursor: pointer; font-weight: 700; margin: 10px 0; }
.a-danger-zone { margin-top: 12px; }

.a-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.a-photo { margin: 0; padding: 12px; }
.a-photo img { width: 100%; height: 170px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.a-photo label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.a-photo input { font: 15px "DM Sans", sans-serif; border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; }
.a-sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 20px 0 16px; margin: 0; display: flex; align-items: center; gap: 14px; z-index: 5; }

.a-hours { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.a-hours th, .a-hours td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px dashed var(--line); }
.a-hours input[type=time] { font: 16px "DM Sans", sans-serif; border: 2px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.a-hours input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }

.a-msg.unread { border-left: 6px solid #E3A83A; }
.a-msg header { margin-bottom: 8px; }

/* Menu editor */
.a-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; padding-bottom: 6px; }
.a-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.a-labels label { margin: 0 !important; }
.a-inline { display: flex; align-items: center; gap: 8px; }
.a-inline .grow { flex: 1; }
.a-inline label { margin: 0 0 8px !important; }
.a-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; padding: 14px 0; border-top: 1px dashed var(--line); align-items: start; }
.a-item-main label { margin-bottom: 8px; }
.a-prices { display: flex; gap: 10px; }
.a-prices label { width: 110px; }
.a-prices input.price { text-align: right; }
.a-tags { display: flex; flex-direction: column; gap: 2px; padding-top: 22px; }
.a-tags .a-check { margin: 0 !important; font-size: 14px; }
.a-item-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: -6px; }
.a-add-section { display: block; margin: 0 0 24px; font-size: 17px; }

@media (max-width: 720px) {
  .a-head { padding: 10px 14px; }
  .a-nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .a-nav a { white-space: nowrap; }
  .a-user { margin-left: auto; }
  .a-hours { display: block; overflow-x: auto; }
  .a-hours input[type=time] { width: 112px; font-size: 15px; }
  .a-main { padding: 20px 14px 120px; }
  .a-item { grid-template-columns: minmax(0, 1fr); }
  .a-tags { flex-direction: row; padding-top: 0; gap: 12px; }
  .a-prices label { width: auto; flex: 1; }
  h1 { font-size: 30px; }
}
