:root { --navy: #12285a; --navy-deep: #0b1b40; --yellow: #f5b81c; --line: #e2e7f0; --soft: #f3f6fb; --muted: #667085; --ink: #1b2437; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--soft); }
a { color: var(--navy); }
h1 { font-size: 1.6rem; margin: 0 0 18px; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 0 0 12px; color: var(--navy); }
.muted { color: var(--muted); }
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--navy-deep); color: #c4cfe7; padding: 22px 16px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: #fff; text-decoration: none; }
.admin-brand small { font-weight: 500; color: var(--yellow); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.logo-mark { width: 34px; height: 28px; color: #fff; }
.login .logo-mark { color: var(--navy); }
.admin-side nav { display: grid; gap: 2px; flex: 1; align-content: start; }
.admin-side nav a { color: #c4cfe7; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a.active { background: var(--yellow); color: var(--navy-deep); font-weight: 600; }
.admin-nav-label { margin: 14px 12px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: #7f90b8; }
.admin-side .link { color: #c4cfe7; }
.admin-main { padding: 32px clamp(16px, 4vw, 48px); min-width: 0; }
.btn { display: inline-block; background: var(--navy); color: #fff; border: 0; padding: 9px 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: #1d3a7a; }
.btn-light { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-light:hover { background: var(--soft); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); cursor: pointer; text-decoration: underline; }
.danger { color: #b42318; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.row-head h1, .row-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--muted); font-size: .88rem; }
.stat strong { display: block; font-size: 1.9rem; color: var(--navy); line-height: 1.1; }
.stat-accent { background: var(--yellow); border-color: var(--yellow); color: var(--navy-deep); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fafbfd; }
.table tr:last-child td { border-bottom: 0; }
.table .msg { max-width: 380px; white-space: pre-wrap; }
.table tr.status-new td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.table tr.status-closed { opacity: .6; }
.actions form { display: inline; }
.actions form::before { content: ' · '; }
.nowrap { white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--navy); margin-top: 2px; }
.icon { width: 20px; height: 20px; vertical-align: middle; }
.icon-cell .icon { color: var(--navy); width: 24px; height: 24px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; text-transform: capitalize; font-size: .88rem; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; }
.form .full { grid-column: 1 / -1; }
.form label, .login label { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid #cfd7e6; border-radius: 8px; width: 100%; background: #fff; }
textarea { resize: vertical; }
.icon-picker { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.icon-picker legend { font-weight: 600; font-size: .88rem; padding: 0 4px; }
.icon-picker label { display: block; cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; width: 0; }
.icon-picker span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); color: var(--navy); }
.icon-picker input:checked + span { background: var(--navy); color: var(--yellow); border-color: var(--navy); }
.icon-picker input:focus-visible + span { outline: 2px solid var(--yellow); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert-ok { background: #e8f6ec; color: #17603a; border: 1px solid #b6e1c4; }
.alert-err { background: #fdecec; color: #8a1f1f; border: 1px solid #f3c1c1; }
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--navy); }
.login { background: #fff; padding: 32px; border-radius: 14px; width: min(360px, 100% - 32px); display: grid; gap: 16px; }
.login .admin-brand { color: var(--navy); }
@media (max-width: 760px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .form { grid-template-columns: 1fr; }
}
