:root {
    --bg-deep: #07111d;
    --bg-panel: rgba(10, 22, 38, 0.88);
    --bg-panel-soft: rgba(16, 30, 48, 0.92);
    --bg-card: rgba(255, 255, 255, 0.05);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.3);
    --text-main: #ecf3ff;
    --text-soft: #9eb2cd;
    --text-faint: #6e83a1;
    --white: #ffffff;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --sun: #f59e0b;
    --rose: #f43f5e;
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, 0.14);
    --orange-soft: rgba(245, 158, 11, 0.14);
    --red-soft: rgba(244, 63, 94, 0.14);
    --gray-soft: rgba(148, 163, 184, 0.12);
    --shadow: 0 22px 60px rgba(2, 6, 23, 0.38);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.12), transparent 28%),
        linear-gradient(180deg, #050b14 0%, #0a1422 46%, #0f1c2d 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-bg-pattern {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.site-app {
    position: relative;
    min-height: 100vh;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-main {
    position: relative;
    z-index: 1;
    padding-bottom: 72px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 17, 29, 0.84);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.site-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #07111d;
    background: linear-gradient(135deg, #fde68a, #f97316);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.26);
}

.site-brand__copy {
    display: grid;
    gap: 3px;
}

.site-brand__copy strong {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 1rem;
    color: var(--white);
}

.site-brand__copy small {
    color: var(--text-soft);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.site-nav__link--cta {
    color: #07111d;
    background: linear-gradient(135deg, #f8fafc, #dbeafe);
    border-color: transparent;
}

.site-nav__link--cta:hover,
.site-nav__link--cta:focus {
    color: #07111d;
    background: linear-gradient(135deg, #ffffff, #bfdbfe);
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 11, 20, 0.88);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 24px 0 32px;
}

.site-footer__brand {
    display: grid;
    gap: 3px;
}

.site-footer__brand strong {
    color: var(--white);
    font-size: 1rem;
}

.site-footer__brand span,
.site-footer__meta {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.page-section {
    padding: 32px 0;
}

.page-section--tight {
    padding-top: 6px;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel--hero {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(14, 21, 35, 0.94), rgba(8, 18, 32, 0.94));
}

.panel--soft {
    background: var(--bg-panel-soft);
}

.hero-grid,
.split-grid {
    display: grid;
    gap: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(56, 189, 248, 0.1);
    color: #d7f4ff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow--warm {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.12);
    color: #ffe6ad;
}

.eyebrow--green {
    border-color: rgba(52, 211, 153, 0.22);
    background: rgba(52, 211, 153, 0.12);
    color: #cffbf0;
}

.title-xl,
.title-lg,
.title-md {
    margin: 16px 0 0;
    color: var(--white);
    line-height: 1.08;
}

.title-xl {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(2rem, 5vw, 4.25rem);
}

.title-lg {
    font-size: clamp(1.7rem, 4vw, 3rem);
    font-weight: 800;
}

.title-md {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 800;
}

.lead {
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.8;
}

.lead--compact {
    font-size: 0.95rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 800;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.btn-app--primary {
    color: #07111d;
    background: linear-gradient(135deg, #ffffff, #dbeafe);
}

.btn-app--dark {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-app--accent {
    color: #fff4d7;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(249, 115, 22, 0.2));
    border-color: rgba(245, 158, 11, 0.22);
}

.btn-app--danger {
    color: #ffe4e6;
    background: rgba(244, 63, 94, 0.18);
    border-color: rgba(244, 63, 94, 0.26);
}

.btn-app--block {
    width: 100%;
}

.metric-grid,
.summary-grid,
.info-grid,
.zone-grid {
    display: grid;
    gap: 14px;
}

.metric-grid,
.summary-grid,
.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card,
.info-card,
.summary-card {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.metric-card__label,
.summary-card__label,
.info-card__label,
.section-kicker,
.meta-text {
    color: var(--text-faint);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.metric-card__value,
.summary-card__value {
    display: block;
    margin-top: 8px;
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 800;
}

.metric-card__text,
.summary-card__text,
.info-card__text {
    margin-top: 8px;
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 0.94rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 18px;
    margin-bottom: 20px;
}

.section-title {
    margin: 8px 0 0;
    color: var(--white);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 800;
}

.section-subtitle {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.zone-grid {
    grid-template-columns: 1fr;
}

.zone-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.zone-card:hover {
    transform: translateY(-2px);
}

.zone-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.zone-title {
    margin: 8px 0 0;
    color: var(--white);
    font-size: 1.05rem;
    line-height: 1.45;
    font-weight: 800;
}

.zone-copy {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.zone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.93rem;
}

.zone-row span {
    color: var(--text-soft);
}

.zone-row strong {
    color: var(--white);
    font-weight: 800;
}

.zone-card--green {
    border-color: rgba(52, 211, 153, 0.22);
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.13), rgba(10, 22, 38, 0.94));
}

.zone-card--orange {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(10, 22, 38, 0.94));
}

.zone-card--red {
    border-color: rgba(244, 63, 94, 0.24);
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.12), rgba(10, 22, 38, 0.94));
}

.zone-card--gray {
    border-color: rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(10, 22, 38, 0.94));
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.badge--green {
    color: #d8fff2;
    background: var(--green-soft);
    border-color: rgba(52, 211, 153, 0.26);
}

.badge--orange {
    color: #ffefc3;
    background: var(--orange-soft);
    border-color: rgba(245, 158, 11, 0.26);
}

.badge--red {
    color: #ffe1e7;
    background: var(--red-soft);
    border-color: rgba(244, 63, 94, 0.26);
}

.badge--gray {
    color: #d8e1ec;
    background: var(--gray-soft);
    border-color: rgba(148, 163, 184, 0.22);
}

.form-card {
    max-width: 860px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid--two {
    grid-template-columns: 1fr;
}

.field--full {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
}

.field-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.field-control:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.field-note,
.muted-text {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 0.94rem;
    line-height: 1.6;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.22);
}

.notice--success {
    color: #d8fff2;
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.26);
}

.notice--warning {
    color: #fff0c7;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.26);
}

.notice--error {
    color: #ffe1e7;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.26);
}

.notice--info {
    color: #d8f3ff;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.26);
}

.error-list {
    margin: 0;
    padding-left: 18px;
    color: inherit;
}

.vote-option {
    display: block;
}

.vote-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vote-option__input:checked + .zone-card {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
    transform: translateY(-2px);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.42);
    animation: pulse 2.6s infinite;
}

.stack {
    display: grid;
    gap: 16px;
}

.table-shell {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.data-table td {
    color: var(--text-main);
    font-size: 0.92rem;
}

.inline-form {
    display: grid;
    gap: 10px;
}

.inline-form__grid {
    display: grid;
    gap: 10px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.34);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(52, 211, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

@media (min-width: 700px) {
    .form-grid--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 760px) {
    .site-nav {
        width: auto;
        justify-content: flex-end;
    }
}

@media (min-width: 860px) {
    .zone-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
        align-items: stretch;
    }

    .split-grid {
        grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
        align-items: start;
    }

    .zone-grid--three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

    .panel,
    .zone-card {
        padding: 18px;
        border-radius: 22px;
    }

    .site-nav__link,
    .btn-app {
        width: 100%;
    }
}

/* Compatibility for older bootstrap-based pages still in the project */
.glass-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    color: var(--text-main);
}

.form-shell,
.admin-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 32px auto;
}

.section-title {
    color: var(--white);
}

.form-label {
    color: var(--white);
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.btn {
    border-radius: 16px;
    font-weight: 800;
}

.btn-danger {
    border: 0;
    background: linear-gradient(135deg, #f43f5e, #fb7185);
}

.btn-outline-primary,
.btn-outline-light,
.btn-light,
.btn-success {
    border-radius: 16px;
}

.table {
    color: var(--text-main);
}

.table thead th {
    color: var(--text-soft);
}
