:root { --bg: #f4f1ec; --card: #fff; --ink: #14201e; --muted: #6b7672; --line: #e3ddd2; --sea: #0c7377; --sun: #e2843a; --ok: #13795b; --bad: #b4401a; --warn: #a86a00; --r: 0.8rem; }
* { box-sizing: border-box; }
html { font-size: clamp(14px, 0.25vw + 11px, 18px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.side { background: #0f1a19; color: #e9e4da; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { font-weight: 800; letter-spacing: 0.08em; font-size: 1.05rem; text-decoration: none; padding: 0 0.6rem; }
.side .brand span { color: var(--sun); }
.side nav { display: grid; gap: 0.15rem; }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.75rem; border-radius: 0.55rem; text-decoration: none; font-weight: 600; font-size: 0.92rem; color: #c9c3b8; }
.side nav a:hover, .side nav a.on { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side .who { margin-top: auto; font-size: 0.82rem; color: #9aa39f; padding: 0 0.6rem; display: grid; gap: 0.5rem; }
.count { background: var(--sun); color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 0.05rem 0.5rem; font-weight: 700; }
.main { padding: clamp(1rem, 3vw, 2.2rem); min-width: 0; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 1.4rem; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; }
  .side nav { grid-auto-flow: column; overflow-x: auto; width: 100%; order: 3; gap: 0.3rem; padding-bottom: 0.2rem; }
  .side nav a { white-space: nowrap; gap: 0.4rem; }
  .side .who { margin: 0 0 0 auto; grid-auto-flow: column; align-items: center; }
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1rem, 2vw, 1.4rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { text-decoration: none; }
.stat b { display: block; font-size: 2rem; line-height: 1; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 40rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: #faf8f4; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfaf7; }
td a { font-weight: 700; }
.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: capitalize; }
.pill.pending { background: #fff3d6; color: var(--warn); }
.pill.accepted { background: #dcf3ea; color: var(--ok); }
.pill.rejected { background: #fbe3da; color: var(--bad); }
.pill.off { background: #eee; color: #777; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1.1rem; border-radius: 0.6rem; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 0.88rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost-bad { color: var(--bad); }
.btn.sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tabs a { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 0.85rem; font-weight: 600; background: var(--card); }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.6rem 1.2rem; margin: 0; }
dt { color: var(--muted); font-size: 0.85rem; }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl { grid-template-columns: 1fr; gap: 0.15rem; } dd { margin-bottom: 0.6rem; } }
.msg { white-space: pre-wrap; background: #faf8f4; border-radius: 0.6rem; padding: 0.8rem; font-weight: 500; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field label { font-size: 0.8rem; font-weight: 700; color: #3c4845; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea { width: 100%; padding: 0.65rem 0.8rem; border-radius: 0.55rem; border: 1px solid var(--line); background: #fff; min-width: 0; }
.field textarea { min-height: 9rem; resize: vertical; }
.field .err { color: var(--bad); font-size: 0.8rem; font-weight: 600; }
.check { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--sea); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.6rem; }
.photo { position: relative; border-radius: 0.6rem; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo label { display: flex; gap: 0.4rem; align-items: center; padding: 0.35rem 0.5rem; font-size: 0.78rem; }
.flash { padding: 0.75rem 1rem; border-radius: 0.6rem; background: #dcf3ea; color: var(--ok); font-weight: 700; margin-bottom: 1rem; }
.flash.err { background: #fbe3da; color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: #0f1a19; }
.login .card { width: min(24rem, 100%); display: grid; gap: 1rem; }
.login h1 span { color: var(--sun); }
.secret { font-family: ui-monospace, monospace; background: #fff8e6; border: 1px dashed var(--warn); padding: 0.8rem; border-radius: 0.6rem; overflow-wrap: anywhere; }
.list-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.thumb { width: 4.5rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.4rem; }
.mt { margin-top: 1.4rem; } .mb { margin-bottom: 0.5rem; }
.side .btn { color: var(--ink); }
@media (max-width: 860px) { .shell { grid-template-rows: auto 1fr; } }
