:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-2: #eef4ff;
    --text: #172033;
    --muted: #6d778a;
    --line: #dde5f2;
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #0f9f6e;
    --danger: #d83a52;
    --warning: #d97706;
    --shadow: 0 18px 55px rgba(15, 23, 42, .08);
    --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(16px, 4vw, 46px); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(221,229,242,.8); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-weight: 800; box-shadow: 0 10px 30px rgba(37,99,235,.25); }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 10px 12px; border-radius: 12px; color: #26334d; font-weight: 650; font-size: 14px; }
.nav a:hover { background: var(--panel-2); color: var(--primary); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto 46px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; margin: 22px 0; }
.hero-card { padding: clamp(26px, 5vw, 56px); border-radius: 32px; background: radial-gradient(circle at top right, rgba(37,99,235,.24), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8); color: #fff; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero-card h1 { font-size: clamp(34px, 6vw, 64px); line-height: .98; margin: 0 0 18px; letter-spacing: -2px; }
.hero-card p { font-size: clamp(16px, 2vw, 20px); color: rgba(255,255,255,.78); max-width: 650px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.side-card { border-radius: 32px; background: #fff; padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.side-card h2 { margin: 0 0 14px; }
.feature-list { display: grid; gap: 12px; margin-top: 18px; }
.feature-list div { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--panel-2); }
.dot { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 99px; background: #dbeafe; color: #1d4ed8; display: grid; place-items: center; font-weight: 900; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card.compact { padding: 16px; box-shadow: none; }
.card h1, .card h2, .card h3 { margin-top: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.8px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: #fff !important; border: 0; border-radius: 14px; padding: 12px 16px; cursor: pointer; font-weight: 800; font-size: 14px; min-height: 42px; }
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: #eef4ff; color: var(--primary) !important; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 9px 12px; min-height: 34px; font-size: 13px; }
.btn.full { width: 100%; }
form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 750; font-size: 14px; color: #26334d; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); padding: 12px 13px; font: inherit; outline: none; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(37,99,235,.75); box-shadow: 0 0 0 4px rgba(37,99,235,.10); }
.help { color: var(--muted); font-size: 13px; line-height: 1.45; }
.alert { padding: 13px 16px; border-radius: 16px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.alert.success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert.error { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.alert.info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.metric { padding: 20px; border-radius: 22px; background: linear-gradient(180deg, #fff, #f8fbff); border: 1px solid var(--line); }
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; font-size: 32px; margin-top: 8px; letter-spacing: -1px; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #334155; background: #f8fbff; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.good { background: #dcfce7; color: #166534; }
.badge.bad { background: #ffe4e6; color: #be123c; }
.badge.warn { background: #fef3c7; color: #92400e; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.live-feed { display: grid; gap: 10px; }
.live-item { padding: 14px; border-radius: 16px; background: #f8fbff; border: 1px solid var(--line); }
.live-item strong { display: block; margin-bottom: 4px; }
.live-item small { color: var(--muted); }
.course-card { display: grid; gap: 12px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs a { padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 800; color: var(--muted); }
.tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pagination a { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 800; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.auth-wrap { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.auth-card { width: min(480px, 100%); }
.footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 26px clamp(16px, 4vw, 46px); border-top: 1px solid var(--line); color: var(--muted); background: #fff; }
.footer div { display: grid; gap: 4px; }
.empty { padding: 24px; border-radius: 18px; background: #f8fbff; color: var(--muted); border: 1px dashed #cbd5e1; text-align: center; }
@media (max-width: 900px) {
    .hero, .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .nav-toggle { display: inline-flex; }
    .nav { display: none; position: absolute; left: 16px; right: 16px; top: 76px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
    .nav.open { display: flex; }
    .brand { min-width: 0; }
    .footer { flex-direction: column; align-items: flex-start; }
}
.mini-table-wrap { width: 100%; overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; }
.mini-table { min-width: 420px; }
.mini-table code { white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer-links a { color: var(--primary); font-weight: 800; font-size: 13px; }
.wide-auth { width: min(760px, 100%); }
.demo-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--line); background: #f8fbff; border-radius: 18px; }
.demo-panel h2 { font-size: 18px; margin-bottom: 6px; }
.demo-table { min-width: 620px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbff; }
.check-row input { width: auto; margin-top: 4px; }
.check-row a { color: var(--primary); font-weight: 900; }
.legal-page { max-width: 920px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.legal-page h2 { margin-top: 26px; }
.cookie-banner { position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: var(--shadow); border-radius: 20px; }
.cookie-banner p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cookie-banner[hidden] { display: none; }
@media (max-width: 700px) {
    .cookie-banner { flex-direction: column; align-items: stretch; }
    .cookie-banner .actions { justify-content: stretch; }
    .cookie-banner .btn { width: 100%; }
}
