/* SVPROTUNING — admin. Same palette as the site: graphite side menu, light ground, green for actions. */
:root { --accent: #76BC21; --ink: #17191C; --graphite: #1B1D20; --ground: #F4F4F1; --line: #E3E4DF; --line2: #EDEEEA; --muted: #5F625C; --soft: #3E413B; --ok: #3F6E0C; --wait: #8A5200; --err: #B3261E; --tint: #EEF6E4; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.45 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--ok); }
h1 { font-size: 26px; font-weight: 800; margin: 2px 0 0; line-height: 1.25; }
h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.ok { color: var(--ok); font-weight: 600; }
.wait { color: var(--wait); }
.bad { color: var(--err); font-weight: 600; }
.b { font-weight: 700; }

.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--graphite); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 16px; }
.brand { padding: 2px 10px; display: flex; flex-direction: column; }
.brand span { font-weight: 800; font-size: 19px; }
.brand b { color: var(--accent); }
.brand small { font-size: 12px; color: #B9BBB4; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #D3D5CE; text-decoration: none; white-space: nowrap; }
.nav a span:first-child { flex: 1; }
.nav a:hover { background: #26292D; color: #fff; }
.nav a.on { background: #30343A; color: #fff; font-weight: 600; }
.cnt { background: #DC5F59; color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; border-top: 1px solid #2C2F33; padding-top: 8px; }
.side__foot a { color: #C8CAC3; font-size: 14px; padding: 10px; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.side__foot a:hover { color: #fff; }
.side__foot .dev { color: #8A8D86; font-size: 12px; padding: 4px 10px; }
.content { flex: 999 1 640px; min-width: 0; padding: 22px 20px 56px; display: flex; flex-direction: column; gap: 16px; }

.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.back { color: var(--muted); font-size: 14px; text-decoration: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions--end { justify-content: flex-end; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.box--flush { padding: 0; overflow: hidden; }
.box__h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.box__h h2 { margin: 0; }
.box__h a { font-weight: 600; text-decoration: none; }
.pad { padding: 16px; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-wide { flex: 999 1 460px; min-width: 0; }
.col-narrow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.flash { background: var(--tint); color: #2D500A; border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.err { background: #FCEDEC; color: #8C1D18; border-radius: 10px; padding: 10px 14px; }
.tag { font-size: 13px; background: #F2F3EF; border-radius: 999px; padding: 2px 10px; font-weight: 600; vertical-align: middle; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn--p { background: var(--accent); color: var(--ink); }
.btn--p:hover { filter: brightness(.94); }
.btn--s { background: #fff; color: var(--ink); border-color: #D3D5CE; font-weight: 500; }
.btn--s:hover { background: #F1F2EE; }
.mini { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #D3D5CE; background: #fff; font-size: 13px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.mini--del { color: var(--err); }
.x { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; color: #6B6E68; }

label { font-size: 13px; font-weight: 600; color: var(--soft); display: block; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: block; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-height: 44px; border: 1px solid #D3D5CE; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 15px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: #9AA394; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-weight: 400; color: var(--ink); font-size: 14px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--ok); flex-shrink: 0; }
.prefix { display: flex; align-items: center; gap: 4px; }
.prefix span { font-size: 12.5px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters > div { flex: 0 1 240px; }
.filters .grow { flex: 1 1 260px; }
.filters .end { flex: 0 0 auto; }
.grow { flex: 1; min-width: 0; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border: 1px solid #D3D5CE; text-decoration: none; cursor: pointer; }
.pill span { opacity: .7; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #F2F3EF; color: #2B2E28; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.kpi:hover { border-color: #B9BCB3; }
.kpi__t { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.kpi b { font-size: 28px; line-height: 1.1; }
.kpi span:last-child { font-size: 14px; color: var(--soft); }
.orow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line2); min-height: 56px; text-decoration: none; color: var(--ink); }
.orow:hover { background: #F7F8F5; }
.orow__n { width: 64px; }
.orow__w { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.orow__w small { font-size: 12.5px; color: var(--muted); }
.orow__s { white-space: nowrap; }
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.lowrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 14px; min-height: 44px; align-items: center; text-decoration: none; color: var(--ink); }
.lowrow:hover { background: #F2F3EF; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.line span { display: flex; flex-direction: column; min-width: 0; }
.line small { color: var(--muted); font-size: 12.5px; }
.line--sum { font-size: 15px; border: 0; }

.tablebox { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; min-width: 860px; }
.tbl th { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.r { text-align: right; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line2); font-size: 14px; vertical-align: middle; }
.tbl tr:hover td { background: #F7F8F5; }
.tbl__p { display: flex; gap: 10px; align-items: center; min-width: 300px; }
.tbl__p span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tbl__p a { font-weight: 600; color: var(--ink); }
.tbl__p small { font-size: 12px; color: var(--muted); }
.thumb { width: 48px; height: 38px; border-radius: 6px; background: #E9EAE5; overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl--form { min-width: 720px; }
.tbl--form td { padding: 6px 4px; }
.tbl--form tr:hover td { background: none; }
.tbl--form td:first-child { min-width: 220px; }
.tbl--form input { min-height: 40px; }

.sw { width: 52px; height: 44px; display: flex; align-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.sw span { display: inline-flex; align-items: center; width: 44px; height: 26px; border-radius: 999px; padding: 3px; background: #C9CBC3; justify-content: flex-start; transition: background .15s; }
.sw span::after { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw.on span { background: #3F7D12; justify-content: flex-end; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ph { margin: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #E9EAE5; }
.ph figcaption { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.ph__a { display: flex; gap: 4px; flex-wrap: wrap; }
.catlist { max-height: 340px; overflow-y: auto; border: 1px solid var(--line2); border-radius: 10px; padding: 4px 8px; }
.crow { display: flex; align-items: center; gap: 10px; padding-right: 12px; border-bottom: 1px solid var(--line2); min-height: 52px; }
.crow__f { flex: 1; display: flex; gap: 6px; align-items: center; min-width: 0; }
.crow__f input { min-height: 38px; border-color: transparent; background: transparent; }
.crow__f input:hover { border-color: #D3D5CE; }
.crow__n { width: 40px; text-align: right; }
.setrow { display: flex; gap: 10px; align-items: flex-start; }
.setrow .grow { display: flex; flex-direction: column; gap: 6px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--soft); }
.code { background: #F2F3EF; border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; }
.auth { max-width: 420px; margin: 8vh auto 0; width: 100%; }
.auth form { margin-top: 10px; }

@media (max-width: 760px) {
  .content { padding: 16px 12px 48px; }
  .side { padding: 10px; gap: 8px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .side__foot { flex-direction: row; margin-top: 0; overflow-x: auto; }
}
