:root { --brand: #103f40; --brand-2: #1f6f6b; --bg: #f4f6f5; --card: #fff; --text: #1d2b2b; --muted: #5d6b6a; --danger: #b3261e; --radius: 14px; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; } h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
.muted { color: var(--muted); font-size: .95rem; } .lead { font-size: 1.15rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; margin: 0 0 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.narrow { max-width: 420px; margin: 10vh auto; }
label { display: block; font-weight: 600; margin: 0 0 14px; }
input, select { display: block; width: 100%; font: inherit; padding: 12px 14px; border: 2px solid #cfd8d6; border-radius: 10px; margin-top: 6px; background: #fff; }
input:focus, select:focus { outline: 3px solid #9fd3cd; border-color: var(--brand-2); }
button, .big, a.big { font: inherit; font-weight: 600; border: 0; border-radius: 12px; cursor: pointer; }
.big { display: inline-block; text-align: center; text-decoration: none; padding: 16px 24px; min-height: 56px; background: var(--brand); color: #fff; font-size: 1.05rem; }
.big:hover { background: var(--brand-2); }
.secondary { background: #e3ecea; color: var(--brand); } .secondary:hover { background: #d2e2df; }
.danger { background: var(--danger); color: #fff; }
.link { background: none; color: #fff; text-decoration: underline; padding: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 20px; background: var(--brand); color: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tabs button { background: transparent; color: #d8ecea; padding: 10px 14px; font-size: 1rem; }
.tabs button.active { background: #fff; color: var(--brand); }
.content { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid #e6ecea; }
.list li .meta { color: var(--muted); font-size: .9rem; display: block; }
.list li .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.list li .btns a, .list li .btns button { padding: 10px 16px; min-height: 44px; border-radius: 10px; background: #e3ecea; color: var(--brand); text-decoration: none; font-weight: 600; font-size: 1rem; }
.list li .btns .primary { background: var(--brand); color: #fff; }
.filter { margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.menu-list { list-style: none; padding: 0; margin: 0 0 12px; }
.menu-list li { display: flex; gap: 8px; align-items: center; background: #f0f5f4; border-radius: 10px; padding: 8px; margin-bottom: 8px; cursor: grab; }
.menu-list li.dragging { opacity: .5; }
.menu-list input { margin: 0; flex: 1 1 160px; min-width: 0; }
.menu-list li { flex-wrap: wrap; }
.menu-list .href { color: var(--muted); font-size: .9rem; min-width: 120px; }
.menu-list button { min-width: 44px; min-height: 44px; background: #fff; border: 1px solid #cfd8d6; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; } .row select { flex: 1; min-width: 200px; margin: 0; }
.dropzone { display: grid; place-items: center; min-height: 160px; border: 3px dashed #9fb9b5; border-radius: var(--radius); background: #f7fbfa; text-align: center; padding: 20px; cursor: pointer; font-weight: 600; color: var(--brand); }
.dropzone.over { background: #e3f3f0; border-color: var(--brand-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.gallery figure { margin: 0; background: #f0f5f4; border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; height: 120px; object-fit: cover; display: block; }
.gallery figcaption { font-size: .75rem; padding: 6px; word-break: break-all; }
.error { color: var(--danger); font-weight: 600; }
.alert { border: 3px solid var(--danger); color: var(--danger); font-weight: 600; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #102a2b; color: #fff; padding: 14px 22px; border-radius: 12px; z-index: 20; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#toast.bad { background: var(--danger); }
dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: 420px; }
dialog::backdrop { background: rgba(0,0,0,.4); }
@media (max-width: 640px) {
  body { font-size: 17px; } .card { padding: 18px; } .topbar { padding: 10px 12px; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; } .tabs button { white-space: nowrap; }
  .actions .big { flex: 1 1 100%; }
  .menu-list input { flex-basis: calc(100% - 40px); }
  .menu-list .href { flex: 1; }
}
