:root {
    --color-bg: #f6f8fa;
    --color-text: #1a1f36;
    --color-accent: #0b5fff;
    --color-border: #d8dee9;
    --color-error: #b42318;
    --color-success: #067647;
    --max-width: 48rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.site-header, .admin-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--color-border);
    margin-top: 1.5rem;
    color: #4b5565;
    font-size: 0.95rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.brand__logo {
    display: block;
    height: 2rem;
    width: auto;
}

.header-nav a, .lang-switch a {
    margin-right: 0.75rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lang-switch__icon {
    display: block;
    flex-shrink: 0;
    color: #5c6370;
}

.theme-dark .lang-switch__icon {
    color: var(--color-text-muted);
}

.lang-switch a.active { font-weight: 700; }

h1, h2 { line-height: 1.2; }

.lead { font-size: 1.125rem; }

.intro-hero {
    display: grid;
    grid-template-columns: 1fr min(42%, 18rem);
    gap: 1.5rem 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.intro-hero__text h1 { margin-top: 0; }

.intro-hero__figure {
    margin: 0;
    justify-self: center;
}

.intro-hero__image {
    display: block;
    width: 100%;
    max-width: 20rem;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(11, 95, 255, 0.12);
}

.warning {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--color-accent);
    background: #eef4ff;
}

fieldset {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 1rem 0;
    padding: 1rem;
    background: #fff;
}

label {
    display: block;
    margin-bottom: 0.75rem;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="date"], input[type="datetime-local"],
select, textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font: inherit;
}

.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.radio-inline, .checkbox-inline { display: inline-flex; align-items: center; gap: 0.35rem; }
.impact-group { border: none; padding: 0; margin: 0 0 1rem; }
.impact-group .field-label { margin-bottom: 0.5rem; font-weight: 600; }

fieldset.legal p {
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0.5rem 0 0;
}

.btn-primary, button[type="submit"] {
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 1.25rem;
    font: inherit;
    cursor: pointer;
}

.btn-link { margin-left: 0.5rem; }

.field-error { color: var(--color-error); font-size: 0.9rem; }
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin: 1rem 0; }
.alert-error { background: #feeceb; color: var(--color-error); }
.alert-success { background: #e8f8f0; color: var(--color-success); }

.site-footer__main {
    flex: 1 1 auto;
    min-width: min(100%, 14rem);
}

.site-footer__thanks {
    margin: 0 0 1rem;
}

.site-footer__company {
    font-style: normal;
    line-height: 1.65;
    margin: 0;
}

.site-footer__meta {
    margin: 0 0 0 auto;
    text-align: right;
    flex: 0 0 auto;
}

.site-footer__meta-sep {
    margin: 0 0.35rem;
    opacity: 0.65;
}

.site-footer__copyright {
    display: inline;
    margin: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.92rem;
}

.data-table th, .data-table td {
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-form input, .filter-form select { width: auto; min-width: 8rem; }

.inline-form { display: inline; }

.pre-wrap {
    white-space: pre-wrap;
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 6px;
}

.admin-login {
    max-width: 24rem;
    margin: 2rem auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.admin-main { padding-bottom: 2rem; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(9rem, 32%) 1fr;
    gap: 0.35rem 1.25rem;
    margin: 0 0 1rem;
}

.detail-grid dt {
    margin: 0;
    font-weight: 600;
    color: var(--color-text-muted, #4a5568);
}

.detail-grid dd {
    margin: 0;
}

.admin-report-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.admin-report-section:last-of-type {
    border-bottom: none;
}

.admin-report-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.admin-attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-attachments-list li {
    margin-bottom: 0.5rem;
}

.admin-attachments-list .attachment-meta {
    color: var(--color-text-muted, #4a5568);
    font-size: 0.9rem;
}

.admin-edit-form {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 640px) {
    .data-table { font-size: 0.8rem; }
    .intro-hero {
        grid-template-columns: 1fr;
    }
    .intro-hero__figure { order: -1; }
    .intro-hero__image { max-width: 16rem; margin-inline: auto; }
}

/* —— Public landing (dark) —— */
.theme-dark {
    color-scheme: dark;
    --color-bg: #0b0f17;
    --color-bg-elevated: #111827;
    --color-surface: #151b28;
    --color-surface-hover: #1c2433;
    --color-text: #e8ecf4;
    --color-text-muted: #9aa4b8;
    --color-accent: #4d9fff;
    --color-accent-strong: #2d7dff;
    --color-border: #2a3548;
    --color-error: #f87171;
    --color-success: #34d399;
    --color-glow: rgba(77, 159, 255, 0.18);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
}

body.theme-dark {
    color: var(--color-text);
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(77, 159, 255, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(45, 125, 255, 0.08), transparent),
        var(--color-bg);
}

.theme-dark .site-header {
    background: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--color-border);
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.theme-dark .header-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.theme-dark .header-nav a:hover {
    color: var(--color-text);
}

.theme-dark .header-nav__cta {
    color: var(--color-accent) !important;
    font-weight: 600;
}

.theme-dark .lang-switch a.active {
    color: var(--color-accent);
}

.theme-dark main.container {
    padding-block: 2rem 3rem;
}

.theme-dark .site-footer {
    background: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    border-top-color: var(--color-border);
    margin-top: 0;
    color: var(--color-text-muted);
}

.theme-dark .site-footer__inner {
    padding: 1.25rem 0;
}

.theme-dark .site-footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.theme-dark .site-footer a:hover {
    text-decoration: underline;
}

.theme-dark h1,
.theme-dark h2 {
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.theme-dark .lead {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    max-width: 38ch;
}

.landing-hero {
    display: grid;
    grid-template-columns: 1fr min(44%, 22rem);
    gap: 2rem 3rem;
    align-items: center;
    padding: 1rem 0 3rem;
}

.landing-hero__eyebrow {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(77, 159, 255, 0.12);
    border: 1px solid rgba(77, 159, 255, 0.25);
    border-radius: 999px;
}

.landing-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.landing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 1.75rem;
}

.landing-hero__figure {
    margin: 0;
    justify-self: center;
}

.landing-hero__image {
    display: block;
    width: 100%;
    max-width: 22rem;
    height: auto;
    border-radius: 16px;
    /*box-shadow: var(--shadow-card), 0 0 48px var(--color-glow);*/
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-weight: 600;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.25rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-ghost:hover {
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

.landing-panel {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.landing-panel--split {
    display: grid;
    grid-template-columns: 1fr min(38%, 16rem);
    gap: 2rem 2.5rem;
    align-items: center;
}

.landing-panel h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.landing-panel__aside {
    margin: 0;
    justify-self: center;
}

.landing-isometric {
    display: block;
    width: 100%;
    max-width: 20rem;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.checklist-grid {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.checklist-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.45;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-card:hover {
    border-color: rgba(77, 159, 255, 0.4);
    background: var(--color-surface-hover);
}

.checklist-card__icon {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
    box-shadow: 0 0 10px var(--color-glow);
}

.callout {
    margin: 1.5rem 0 0;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.callout--warning {
    border-left: 4px solid var(--color-accent);
    background: rgba(77, 159, 255, 0.08);
    color: var(--color-text-muted);
}

.landing-steps-section {
    margin-bottom: 2.5rem;
}

.landing-steps-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.steps-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    counter-reset: step;
}

.steps-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
    padding-bottom: 1.5rem;
    counter-increment: step;
}

.steps-timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.15rem;
    top: 2.25rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--color-border), transparent);
}

.steps-timeline__marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    box-shadow: 0 0 0 4px rgba(77, 159, 255, 0.08);
}

.steps-timeline__marker::before {
    content: counter(step);
}

.steps-timeline__item p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
}

.theme-dark .landing-form {
    scroll-margin-top: 5rem;
}

.theme-dark .landing-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.theme-dark fieldset {
    background: var(--color-surface);
    border-color: var(--color-border);
    border-radius: 12px;
}

.theme-dark fieldset legend {
    color: var(--color-text);
    font-weight: 600;
    padding: 0 0.35rem;
}

.theme-dark label {
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.theme-dark input[type="text"],
.theme-dark input[type="email"],
.theme-dark input[type="tel"],
.theme-dark input[type="password"],
.theme-dark input[type="search"],
.theme-dark input[type="date"],
.theme-dark input[type="datetime-local"],
.theme-dark select,
.theme-dark textarea {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
    color: var(--color-text);
}

.theme-dark input:focus,
.theme-dark select:focus,
.theme-dark textarea:focus {
    outline: 2px solid rgba(77, 159, 255, 0.45);
    outline-offset: 1px;
    border-color: var(--color-accent);
}

.theme-dark .btn-primary,
.theme-dark button[type="submit"] {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
    box-shadow: 0 4px 16px var(--color-glow);
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.theme-dark .btn-primary:hover,
.theme-dark button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--color-glow);
}

.theme-dark .alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.theme-dark .alert-success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.theme-dark .warning {
    background: rgba(77, 159, 255, 0.08);
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .landing-hero,
    .landing-panel--split {
        grid-template-columns: 1fr;
    }

    .landing-hero__figure {
        order: -1;
    }

    .landing-hero__image {
        max-width: 18rem;
        margin-inline: auto;
    }

    .landing-panel {
        padding: 1.25rem;
    }

    .landing-panel__aside {
        order: -1;
    }

    .landing-isometric {
        max-width: 16rem;
    }

    .theme-dark .header-nav__cta {
        display: none;
    }
}
