:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #17212b;
    --muted: #677482;
    --primary: #1769e0;
    --border: #dce2e8;
    --success: #16834c;
    --warning: #b66b00;
    --danger: #c33535;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; }
h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 32px); }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.muted-light { color: #dbe7ff; margin-left: 10px; font-size: 14px; }
.topbar { min-height: 64px; padding: 12px clamp(16px, 4vw, 36px); display: flex; align-items: center; justify-content: space-between; background: #10233f; color: white; }
.container { width: min(1100px, calc(100% - 28px)); margin: 30px auto; }
.narrow-container { width: min(560px, calc(100% - 28px)); margin: 40px auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.table-card, .form-card, .login-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 32px rgba(20, 35, 55, .06); }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f9fbfd; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 38px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.actions form { margin: 0; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.active { background: #dff5e8; color: #106b3c; }
.badge.suspended { background: #fff0d7; color: #945700; }
.badge.blocked { background: #fde1e1; color: #a72a2a; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn.primary { background: var(--primary); color: white; }
.btn.secondary { background: #e8edf3; color: var(--text); margin-top: 10px; }
.btn.success { background: #def3e7; color: #116d3c; }
.btn.warning { background: #fff0d8; color: #915500; }
.btn.danger { background: #fde1e1; color: #a52828; }
.btn.ghost { color: white; border: 1px solid rgba(255,255,255,.45); background: transparent; }
.btn.small { padding: 7px 10px; }
.btn.full { width: 100%; margin-top: 14px; }
.form-card, .login-card { padding: 28px; }
label { display: block; margin: 14px 0 7px; font-weight: 700; }
input { width: 100%; padding: 12px 13px; border: 1px solid var(--border); border-radius: 9px; font: inherit; background: white; }
input:focus { outline: 3px solid rgba(23,105,224,.15); border-color: var(--primary); }
.alert { padding: 12px 14px; border-radius: 9px; margin: 14px 0; }
.alert.success { background: #e0f5e8; color: #126b3c; }
.alert.error { background: #fde4e4; color: #a32626; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(145deg, #edf3ff, #f7f8fa); }
.login-card { width: min(420px, 100%); }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--primary); font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.license-box { padding: 18px; margin: 18px 0 4px; border: 2px dashed var(--primary); background: #eef5ff; border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(17px, 4vw, 23px); text-align: center; font-weight: 800; letter-spacing: .04em; word-break: break-all; }
@media (max-width: 640px) {
    .page-head { align-items: stretch; flex-direction: column; }
    .page-head .btn { width: 100%; }
    .muted-light { display: none; }
}
