:root {
  --navy: #0b2a5b;
  --blue: #005ed9;
  --orange: #f6a21a;
  --bg: #f3f6fb;
  --card: #fff;
  --text: #13213a;
  --muted: #61708a;
  --line: #e2e8f2;
  --red: #d93636;
  --green: #12a150;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
.btn { border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #004fb8; }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: #fde8e8; color: var(--red); }
.card { background: var(--card); border-radius: 16px; box-shadow: 0 2px 10px rgba(11, 42, 91, .06); }
.error { color: var(--red); min-height: 1em; margin: 4px 0; }
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0; }
label input:not([type=checkbox]), label select, label textarea, .toolbar input, .toolbar select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; color: var(--text); background: #fff;
}
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); }
label.check input { width: 18px; height: 18px; accent-color: var(--blue); }
small { display: block; margin-top: 4px; color: var(--muted); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, var(--navy), var(--blue)); }
.login-card { width: 100%; max-width: 380px; padding: 32px; }
.login-logo { width: 220px; display: block; margin: 0 auto 8px; }
.login-card h1 { text-align: center; font-size: 18px; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 12px; }

.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.topbar-logo { height: 36px; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 10px 14px; border-radius: 10px; font: inherit;
  color: var(--muted); cursor: pointer; font-weight: 600; }
.tabs button.active { background: #e6f0ff; color: var(--blue); }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
main { padding: 24px; max-width: 1200px; margin: 0 auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(11, 42, 91, .05); }
.stat b { display: block; font-size: 26px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 220px; margin: 0; }
.toolbar select { width: auto; margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.badge { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.active { background: #e3f7ec; color: var(--green); }
.badge.pending { background: #fff3dc; color: #b06d00; }
.badge.locked { background: #fde8e8; color: var(--red); }
.badge.admin { background: #e6f0ff; color: var(--blue); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.settings { padding: 8px 24px 24px; max-width: 720px; }
.settings h2 { font-size: 16px; color: var(--navy); margin: 24px 0 4px; }
.hint { font-size: 13px; color: var(--muted); background: #f6f9ff; padding: 10px 12px; border-radius: 10px; }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(440px, 92vw); }
dialog::backdrop { background: rgba(11, 42, 91, .4); }
.dialog-body { padding: 24px; }
.dialog-body h2 { margin: 0 0 8px; font-size: 18px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
