* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --brand:#3D85C6; --brand-dark:#2F6EA8; --ink:#1e293b; --soft:#64748b; --line:#e5eaf1; --bg:#f2f4f8; }
body { font-family:'Segoe UI',Tahoma,sans-serif; background:var(--bg); color:var(--ink); }
a { color: var(--brand); text-decoration: none; }

.topnav { background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center;
  gap:22px; padding:0 22px; height:56px; position:sticky; top:0; z-index:10; }
.topnav .brand { font-weight:700; color:var(--brand); font-size:17px; margin-right:10px; }
.topnav a.nav { color:var(--soft); font-size:14px; padding:17px 2px; border-bottom:2px solid transparent; }
.topnav a.nav.active, .topnav a.nav:hover { color:var(--ink); border-bottom-color:var(--brand); }
.topnav .spacer { flex:1; }
.topnav .who { font-size:13px; color:var(--soft); }
.badge { font-size:11px; padding:2px 8px; border-radius:10px; background:#eef4fb; color:var(--brand); font-weight:600; }
.badge.admin { background:#fdf2e3; color:#b45309; }

.wrap { max-width:1100px; margin:26px auto; padding:0 20px; }
h1 { font-size:20px; margin-bottom:16px; }
h1 small { color:var(--soft); font-weight:400; font-size:13px; margin-left:8px; }

.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px 20px; margin-bottom:16px; }
.grid { display:grid; gap:14px; }
.grid.cols3 { grid-template-columns:repeat(3,1fr); }
.stat { text-align:center; padding:18px 8px; }
.stat .num { font-size:26px; font-weight:700; color:var(--brand); }
.stat .lbl { font-size:12.5px; color:var(--soft); margin-top:4px; }

table { width:100%; border-collapse:collapse; font-size:13.5px; }
th { text-align:left; color:var(--soft); font-weight:600; padding:8px 10px; border-bottom:1px solid var(--line); }
td { padding:9px 10px; border-bottom:1px solid #f1f5f9; }
tr:hover td { background:#f8fafc; }

label { display:block; font-size:12.5px; font-weight:600; color:#475569; margin:10px 0 5px; }
input, select, textarea { width:100%; padding:9px 11px; border:1.5px solid #dbe2ec; border-radius:8px;
  font-size:13.5px; font-family:inherit; }
textarea.mono { font-family:Consolas,monospace; font-size:12.5px; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--brand); }

.btn { display:inline-block; background:var(--brand); color:#fff; border:none; border-radius:8px;
  padding:9px 18px; font-size:13.5px; font-weight:600; cursor:pointer; }
.btn:hover { background:var(--brand-dark); }
.btn.ghost { background:#fff; color:#475569; border:1px solid #d7dee8; }
.btn.danger { background:#fff1f1; color:#dc2626; border:1px solid #ffd7d7; }
.btn.sm { padding:5px 12px; font-size:12.5px; }
.btn:disabled { opacity:.55; cursor:not-allowed; }

.msg { display:none; padding:10px 12px; border-radius:8px; font-size:13px; margin:10px 0; }
.msg.err { background:#fef2f2; color:#b91c1c; border:1px solid #ffdada; }
.msg.ok { background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
.muted { color:var(--soft); font-size:12.5px; }
.row { display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
.row > * { flex:1; min-width:140px; }
.right { text-align:right; }

.row.form3 > * { flex: 1 1 240px; }
.row.form3 .grow2 { flex: 2 1 340px; }
