:root {
  --brand: #F26B1D; --brand-600: #D9560B; --brand-50: #FFF3EB; --brand-100: #FFE2CF;
  --ink: #17181C; --ink-2: #4A4D55; --ink-3: #80838C; --line: #E7E5E1; --bg: #F7F6F3; --card: #FFFFFF;
  --ok: #1E9E5A; --ok-bg: #E6F6EC; --warn: #B7791F; --warn-bg: #FDF4DF; --bad: #D23B3B; --bad-bg: #FDE8E8; --info: #2F6FDB; --info-bg: #E8F0FD;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-600); }
button, input, select, textarea { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 10px 16px;
  border-radius: 10px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #cfccc6; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
label.f { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.f > input, label.f > select, label.f > textarea, .inp {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
label.f > textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-100); border-color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eee; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand-600); }
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,24,.45); display: none; align-items: flex-start; justify-content: center; z-index: 50; padding: 4vh 16px; overflow-y: auto; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 980px; }
.modal h3 { margin: 0 0 16px; font-size: 20px; }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 12px; z-index: 99; transition: .25s; opacity: 0; visibility: hidden; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.toast.err { background: var(--bad); }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
