:root {
    --red: #d6001c;
    --dark: #0f172a;
    --line: #d7dee8;
    --soft: #eef2f7;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--soft); color: #111827; }
a { color: var(--red); text-decoration: none; }
.topbar { background: var(--dark); color: white; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar span { color: #cbd5e1; font-size: 13px; }
.wrap { padding: 22px; }
.panel { background: white; border: 1px solid var(--line); padding: 18px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); padding: 16px; }
.card strong { display: block; font-size: 24px; margin-top: 8px; }
label { display: block; font-weight: bold; margin: 12px 0 5px; }
input, textarea, select { width: 100%; border: 1px solid #b8c2cc; padding: 10px; min-height: 38px; }
textarea { min-height: 120px; font-family: Consolas, monospace; }
button, .button { display: inline-block; border: 0; background: var(--red); color: white; padding: 10px 16px; font-weight: bold; cursor: pointer; }
.button.secondary, button.secondary { background: #e5e7eb; color: #111827; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert { padding: 11px 12px; margin: 10px 0; border: 1px solid transparent; }
.alert.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; font-size: 14px; }
th { background: #e8eef5; }
.status { font-weight: bold; }
.status.ACTIVE, .status.UNLIMITED { color: #047857; }
.status.EXPIRING { color: #b45309; }
.status.EXPIRED, .status.BLOCKED { color: #b91c1c; }
.auth-page { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(430px, calc(100% - 28px)); background: white; border: 1px solid var(--line); padding: 24px; }
.auth-card h1 { margin-top: 0; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
