:root {
    --bg: #0a0f1a;
    --panel: rgba(17, 24, 39, 0.88);
    --panel-soft: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --text: #eef2ff;
    --muted: #9fb0cf;
    --primary: #f97316;
    --primary-hover: #fb923c;
    --secondary: #1f2937;
    --green: #22c55e;
    --yellow: #f59e0b;
    --red: #ef4444;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 25%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 20%),
        linear-gradient(180deg, #07101d 0%, #0b1323 100%);
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
    padding: 42px 20px;
}

.wide {
    max-width: 1180px;
    margin: 0 auto;
}

.hero-card,
.wizard-card,
.result-card,
.admin-card {
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
}

.hero-topline {
    color: #f8a56d;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 14px;
}

h1 {
    margin: 0 0 14px;
    font-size: 40px;
    line-height: 1.1;
}

h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

h3 {
    margin: 0 0 8px;
}

.lead,
.section-description,
.feature-card p,
.question-card p,
.disclaimer-box p,
.admin-grid p {
    color: var(--muted);
    line-height: 1.6;
}

.feature-grid,
.meta-boxes,
.input-grid,
.practice-grid,
.admin-grid,
.stats-grid {
    display: grid;
    gap: 18px;
}

.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 28px 0;
}

.feature-card,
.meta-box,
.question-card,
.practice-box,
.recommendation-card,
.disclaimer-box,
.info-panel,
.stat-box,
.chart-box {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.feature-card,
.meta-box,
.practice-box,
.disclaimer-box,
.stat-box,
.chart-box {
    padding: 20px;
}

.meta-boxes,
.practice-grid,
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 28px;
}

.meta-label,
.practice-grid span,
.question-number,
.score-label,
.recommendation-section,
.stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.info-inline,
.info-button {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(249, 115, 22, 0.35);
    background: rgba(249, 115, 22, 0.12);
    color: #ffd4b0;
    font-weight: 700;
}

.hero-card form {
    margin-top: 24px;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--line);
}

.wizard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.step-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 28px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fb923c, #f97316);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.input-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.input-group label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.input-group input,
.input-group select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
}

.input-group select option {
    color: #111827;
}

.honeypot-group {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
}

.question-card {
    padding: 22px;
}

.question-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.info-button {
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.info-panel {
    padding: 16px 18px;
    margin-bottom: 16px;
    display: none;
}

.info-panel.open {
    display: block;
}

.example {
    margin-top: 10px;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.answer-option input {
    accent-color: var(--primary);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin-top: 8px;
}

.button-row.wrap {
    justify-content: flex-start;
}

.score-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--line);
    border-radius: 22px;
    margin: 26px 0;
}

.score-value {
    font-size: 68px;
    font-weight: 800;
    line-height: 1;
}

.status-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    margin-top: 8px;
}

.status-pill.green {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.status-pill.yellow {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

.status-pill.red {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.section-block {
    margin-top: 30px;
}

.section-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-result-row {
    display: grid;
    grid-template-columns: 280px 1fr 70px;
    gap: 16px;
    align-items: center;
}

.section-result-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.section-result-fill {
    height: 100%;
    background: linear-gradient(90deg, #fb923c, #f97316);
    border-radius: 999px;
}

.section-result-percent {
    text-align: right;
    font-weight: 700;
}

.recommendation-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 18px;
    padding: 20px;
    margin-bottom: 16px;
}

.recommendation-card.single {
    grid-template-columns: 1fr;
}

.recommendation-index {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(249, 115, 22, 0.14);
    color: #ffd2b2;
    font-weight: 800;
    font-size: 20px;
}

/* =========================
   Admin / Dashboard
   ========================= */

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 24px;
}

.chart-box-wide {
    grid-column: 1 / -1;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 26px;
    margin-bottom: 28px;
}

.stat-box {
    padding: 22px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-box strong {
    font-size: 34px;
    line-height: 1;
    color: #fff;
}

.chart-box {
    padding: 22px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-box h3 {
    margin-bottom: 14px;
}

.chart-box canvas {
    width: 100% !important;
    height: 280px !important;
    max-height: 280px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid transparent;
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.25);
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.25);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    table-layout: fixed;
}

table.admin-table th,
table.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

table.admin-table th {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

table.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.admin-table th:first-child,
.admin-table td:first-child {
    width: 70%;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 15%;
    white-space: nowrap;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 15%;
    white-space: nowrap;
}

.small-muted {
    color: var(--muted);
    font-size: 13px;
}



/* =========================
   Portal / Check-Center
   ========================= */

.portal-intro {
    margin-bottom: 30px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 8px;
}

.portal-card {
    display: flex;
    flex-direction: column;
    min-height: 375px;
    text-decoration: none;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.10), transparent 34%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.30);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.portal-card.disabled {
    cursor: default;
    opacity: 0.95;
}

.portal-card.disabled:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.portal-card-header {
    margin-bottom: 22px;
}

.portal-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.28);
    color: #ffd2b2;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.portal-card-body {
    flex: 1;
}

.portal-card-body h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.portal-card-body p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

.portal-card-footer {
    margin-top: 22px;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.portal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-status {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.10);
    border: 1px solid rgba(249, 115, 22, 0.22);
    color: #ffd2b2;
    font-size: 14px;
    font-weight: 700;
}

.portal-contact-card {
    margin-top: 28px;
    padding: 30px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 28%),
        rgba(255,255,255,0.03);
    border: 1px solid var(--line);
}

.portal-contact-eyebrow {
    display: inline-block;
    color: #f8a56d;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    margin-bottom: 12px;
}

.portal-contact-card h2 {
    margin-bottom: 10px;
}

.portal-contact-card p {
    color: var(--muted);
    line-height: 1.7;
}

.portal-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.portal-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
}

.portal-contact-item-wide {
    grid-column: span 1;
}

.portal-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.22);
    color: #ffd2b2;
    font-size: 18px;
    font-weight: 700;
}

.portal-contact-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.portal-contact-item a,
.portal-contact-item strong {
    color: #ffffff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
}

.portal-contact-item a:hover {
    color: #ffd2b2;
}

.portal-contact-footnote {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
    .portal-grid,
    .portal-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
    .wizard-header,
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .section-result-row {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 30px;
    }

    .hero-card,
    .wizard-card,
    .result-card,
    .admin-card {
        padding: 24px;
    }

    .chart-box-wide {
        grid-column: auto;
    }

    .admin-table th:first-child,
    .admin-table td:first-child,
    .admin-table th:nth-child(2),
    .admin-table td:nth-child(2),
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        width: auto;
        white-space: normal;
    }
}

/* =========================
   Check-Center / Portal
   ========================= */

.portal-intro {
    max-width: 760px;
    margin-bottom: 30px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 280px;
    padding: 28px;
    text-decoration: none;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 35%);
    pointer-events: none;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.24);
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
}

.portal-card.disabled {
    cursor: default;
    opacity: 0.92;
}

.portal-card.disabled:hover {
    transform: none;
}

.portal-card-header,
.portal-card-footer,
.portal-card-body {
    position: relative;
    z-index: 1;
}

.portal-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.18);
    color: #ffd4b0;
    font-size: 28px;
    font-weight: 800;
}

.portal-card h3 {
    margin: 0;
    font-size: 24px;
}

.portal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.portal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.portal-chip,
.portal-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.portal-chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    color: var(--muted);
}

.portal-status {
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.22);
    color: #ffd4b0;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #fff;
}

.portal-note {
    margin-top: 28px;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 980px) {
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-card {
        min-height: 0;
    }
}


.portal-note {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-note p {
    margin: 0;
}

.portal-note a {
    color: #ffd2b2;
    text-decoration: none;
}

.portal-note a:hover {
    color: #fff;
    text-decoration: underline;
}
