:root {
    --blue-950: #062f55;
    --blue-900: #0b4f8a;
    --blue-700: #1467a9;
    --cyan-700: #0e9fa9;
    --cyan-500: #1bb8b6;
    --green-700: #218b5b;
    --green-500: #2fa06a;
    --orange-500: #f7941d;
    --yellow-400: #f7c948;
    --ink: #17233b;
    --muted: #5f6b7d;
    --line: #dbe4ec;
    --surface: #ffffff;
    --surface-soft: #f4f8fb;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #067647;
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 8px 24px rgba(11, 79, 138, .08);
    --shadow: 0 18px 50px rgba(6, 47, 85, .13);
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-900); text-decoration: none; }
a:hover { color: var(--cyan-700); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 9999; padding: 12px 16px; color: #fff; background: var(--blue-950); border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219,228,236,.85);
}
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 185px; display: block; }
.main-nav { display: flex; align-items: center; gap: 20px; font-size: .95rem; font-weight: 700; }
.main-nav a { color: var(--ink); }
.main-nav a:hover { color: var(--blue-700); }
.nav-cta { color: #fff !important; background: linear-gradient(135deg, var(--blue-900), var(--cyan-700)); padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 20px rgba(11,79,138,.2); }
.nav-cta-outline { color: var(--blue-900) !important; background: #fff; border: 1px solid var(--blue-900); box-shadow: none; }
.nav-toggle { display: none; width: 46px; height: 42px; padding: 9px; border: 0; border-radius: 10px; background: var(--surface-soft); }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: var(--blue-950); }

.flash-stack { margin-top: 16px; display: grid; gap: 10px; }
.flash { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: #fff; font-weight: 650; }
.flash-success { color: var(--success); border-color: #abefc6; background: #ecfdf3; }
.flash-danger { color: var(--danger); border-color: #fecdca; background: #fef3f2; }
.flash-warning { color: var(--warning); border-color: #fedf89; background: #fffaeb; }
.flash-info { color: var(--blue-900); border-color: #b2ddff; background: #eff8ff; }

.hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 80px;
    background:
        radial-gradient(circle at 80% 10%, rgba(27,184,182,.24), transparent 31%),
        radial-gradient(circle at 10% 80%, rgba(247,148,29,.14), transparent 26%),
        linear-gradient(145deg, #f7fbff 0%, #eef9f7 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -80px; top: -80px; border: 32px solid rgba(11,79,138,.08); }
.hero::after { width: 130px; height: 130px; left: -45px; bottom: -40px; border: 24px solid rgba(47,160,106,.1); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 64px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; color: var(--blue-900); background: rgba(255,255,255,.82); border: 1px solid rgba(11,79,138,.12); font-size: .84rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange-500); box-shadow: 0 0 0 5px rgba(247,148,29,.14); }
.hero h1 { max-width: 720px; margin: 20px 0 20px; font-size: clamp(2.45rem, 5vw, 5rem); line-height: .98; letter-spacing: -.055em; color: var(--blue-950); }
.hero h1 strong { color: var(--cyan-700); font-weight: 850; }
.hero-lead { max-width: 690px; margin: 0 0 30px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-900), var(--cyan-700)); box-shadow: 0 12px 26px rgba(11,79,138,.23); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px rgba(11,79,138,.28); }
.btn-secondary { color: var(--blue-900); background: #fff; border-color: rgba(11,79,138,.2); }
.btn-secondary:hover { color: var(--blue-900); background: #f8fbfd; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-small { min-height: 36px; padding: 7px 12px; border-radius: 9px; font-size: .86rem; }

.hero-visual { position: relative; }
.hero-card { padding: 28px; border: 1px solid rgba(255,255,255,.85); border-radius: var(--radius-lg); background: rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-card-logo { width: 330px; margin: 0 auto 22px; display: block; }
.progress-item { margin-top: 18px; }
.progress-label { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.progress-track { height: 10px; margin-top: 7px; border-radius: 999px; background: #e4edf3; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--cyan-500)); }
.float-badge { position: absolute; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 24px; color: #fff; font-size: .84rem; line-height: 1.2; font-weight: 850; text-align: center; box-shadow: var(--shadow); transform: rotate(4deg); }
.float-badge.one { right: -24px; top: -28px; background: linear-gradient(145deg, var(--orange-500), #ffb03a); }
.float-badge.two { left: -32px; bottom: 28px; background: linear-gradient(145deg, var(--blue-900), var(--cyan-700)); transform: rotate(-5deg); }

.section { padding: 76px 0; }
.section-soft { background: var(--surface-soft); }
.section-dark { color: #fff; background: linear-gradient(135deg, var(--blue-950), var(--blue-900)); }
.section-header { max-width: 760px; margin-bottom: 34px; }
.section-header.center { margin-inline: auto; text-align: center; }
.section-kicker { margin: 0 0 8px; color: var(--green-700); font-size: .82rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.section-dark .section-kicker { color: #9ce7d2; }
.section-title { margin: 0 0 12px; color: var(--blue-950); font-size: clamp(1.9rem, 3vw, 3.15rem); line-height: 1.1; letter-spacing: -.035em; }
.section-dark .section-title { color: #fff; }
.section-description { margin: 0; color: var(--muted); font-size: 1.08rem; }
.section-dark .section-description { color: #d6e5ef; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-card { padding: 24px; border: 1px solid rgba(219,228,236,.9); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.metric-value { display: block; color: var(--blue-900); font-size: 2.1rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.metric-label { display: block; margin-top: 8px; color: var(--muted); font-weight: 650; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { min-height: 100%; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.feature-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--blue-900), var(--cyan-700)); font-size: 1.35rem; font-weight: 900; }
.feature-card:nth-child(2n) .feature-icon { background: linear-gradient(135deg, var(--green-700), var(--cyan-500)); }
.feature-card:nth-child(3n) .feature-icon { background: linear-gradient(135deg, var(--orange-500), #ef6c00); }
.feature-card h3 { margin: 0 0 10px; color: var(--blue-950); font-size: 1.24rem; }
.feature-card p { margin: 0; color: var(--muted); }

.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.content-card { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.content-cover { height: 170px; background: linear-gradient(135deg, rgba(11,79,138,.95), rgba(27,184,182,.85)); display: grid; place-items: center; color: #fff; font-size: 2.4rem; font-weight: 900; }
.content-cover img { width: 100%; height: 100%; object-fit: cover; }
.content-body { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--blue-900); background: #eff8ff; font-size: .76rem; font-weight: 850; }
.content-card h3 { margin: 13px 0 8px; color: var(--blue-950); font-size: 1.18rem; line-height: 1.25; }
.content-card p { margin: 0 0 18px; color: var(--muted); }
.content-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; }
.empty-state { padding: 42px; border: 1px dashed #b9c8d5; border-radius: var(--radius); background: #fbfdff; text-align: center; color: var(--muted); }

.page-hero { padding: 54px 0 42px; background: linear-gradient(135deg, #f5fbff, #edf9f4); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 8px 0 10px; color: var(--blue-950); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.04em; }
.page-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.08rem; }

.prose { max-width: 860px; }
.prose h2 { margin-top: 36px; color: var(--blue-950); }
.prose h3 { color: var(--blue-900); }
.prose p, .prose li { color: #39485c; }
.prose ul { padding-left: 22px; }
.callout { padding: 22px; border-left: 5px solid var(--green-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #effaf5; }

.auth-section { min-height: calc(100vh - 84px); padding: 56px 0 76px; background: linear-gradient(135deg, #eff7fd, #f0fbf7); }
.auth-shell { display: grid; grid-template-columns: .9fr 1.1fr; max-width: 1000px; margin: 0 auto; overflow: hidden; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.auth-aside { position: relative; padding: 48px; color: #fff; background: linear-gradient(145deg, var(--blue-950), var(--blue-900) 56%, var(--cyan-700)); overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -80px; border: 35px solid rgba(255,255,255,.09); border-radius: 50%; }
.auth-aside img { width: 270px; padding: 14px; border-radius: 14px; background: #fff; }
.auth-aside h1 { margin: 30px 0 12px; font-size: 2.1rem; line-height: 1.1; }
.auth-aside p { color: #d9edf7; }
.auth-main { padding: 44px; }
.auth-main h2 { margin: 0 0 8px; color: var(--blue-950); font-size: 2rem; }
.auth-main > p { margin-top: 0; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { color: var(--ink); font-size: .9rem; font-weight: 800; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], input[type="number"], input[type="datetime-local"], textarea, select {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #cbd7e1;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border .15s ease, box-shadow .15s ease;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(20,103,169,.12); }
.help-text { color: var(--muted); font-size: .82rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { margin-top: 5px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 86px; }
.password-toggle { position: absolute; right: 6px; top: 6px; min-height: 34px; padding: 4px 9px; border: 0; border-radius: 8px; color: var(--blue-900); background: #eff7fd; font-size: .8rem; font-weight: 800; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.error-list { padding: 14px 18px; border: 1px solid #fecdca; border-radius: 10px; color: var(--danger); background: #fef3f2; }
.error-list ul { margin: 0; padding-left: 20px; }

.dashboard { padding: 44px 0 76px; background: var(--surface-soft); min-height: 70vh; }
.dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dashboard-header h1 { margin: 0; color: var(--blue-950); font-size: clamp(2rem, 4vw, 3rem); }
.dashboard-header p { margin: 6px 0 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 108px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--ink); font-weight: 750; }
.sidebar a:hover, .sidebar a.active { color: var(--blue-900); background: #edf7ff; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 22px; }
.panel h2 { margin: 0 0 18px; color: var(--blue-950); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px; border-radius: 14px; background: var(--surface-soft); }
.stat span { display: block; color: var(--muted); font-size: .82rem; font-weight: 750; }
.stat strong { display: block; margin-top: 5px; color: var(--blue-900); font-size: 1.8rem; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--blue-950); background: #edf5fa; font-size: .84rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .76rem; font-weight: 850; }
.status-active { color: var(--success); background: #dcfae6; }
.status-inactive { color: #475467; background: #f2f4f7; }
.status-admin { color: #6941c6; background: #f4f3ff; }

.simulation-list { display: grid; gap: 16px; }
.simulation-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.simulation-card h2 { margin: 0 0 7px; color: var(--blue-950); font-size: 1.2rem; }
.simulation-card p { margin: 0; color: var(--muted); }
.simulation-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.question-card { margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.question-card h2 { margin: 0 0 16px; font-size: 1.1rem; color: var(--blue-950); }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.option:hover { border-color: #9dc7e8; background: #f4faff; }
.result-score { display: grid; place-items: center; width: 180px; height: 180px; margin: 0 auto 24px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--blue-900), var(--cyan-700)); box-shadow: var(--shadow); }
.result-score strong { font-size: 3rem; line-height: 1; }
.result-score span { font-size: .86rem; }

.site-footer { color: #dbe9f2; background: var(--blue-950); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 50px; padding: 50px 0; }
.footer-logo { width: 220px; padding: 11px; border-radius: 12px; background: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; }
.site-footer a { display: block; margin: 8px 0; color: #dbe9f2; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 12px 0; }
.partner-logo { width: 230px; padding: 8px; border-radius: 8px; background: #fff; }
.footer-bottom { padding: 16px 0; color: #a9c0d0; background: rgba(0,0,0,.17); font-size: .87rem; }

.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-topbar h2 { margin: 0; }
.inline-form { display: inline; }
.filter-bar { display: grid; grid-template-columns: 1.2fr .8fr auto; gap: 12px; align-items: end; margin-bottom: 18px; }

@media (max-width: 1024px) {
    .main-nav { gap: 13px; font-size: .88rem; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 650px; }
    .feature-grid, .content-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; display: flex; gap: 6px; overflow-x: auto; }
    .sidebar a { white-space: nowrap; }
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; left: 16px; right: 16px; top: 76px; display: none; align-items: stretch; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 10px 12px; border-radius: 9px; }
    .nav-cta { text-align: center; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { padding: 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .container { width: min(calc(100% - 22px), var(--container)); }
    .brand img { width: 155px; }
    .header-inner { min-height: 72px; }
    .hero { padding: 62px 0 54px; }
    .hero h1 { font-size: 2.65rem; }
    .hero-actions .btn { width: 100%; }
    .float-badge { display: none; }
    .hero-card { padding: 22px; }
    .section { padding: 54px 0; }
    .metrics-grid, .feature-grid, .content-grid, .stat-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .auth-main { padding: 28px 20px; }
    .dashboard-header { align-items: stretch; flex-direction: column; }
    .simulation-card { grid-template-columns: 1fr; }
    .simulation-card .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .filter-bar { grid-template-columns: 1fr; }
}
