:root {
    --esa-deep-space: #003247;
    --esa-deep-space1: #335e6f;
    --esa-pure-teal: #00ae9d;
    --esa-pure-teal1: #76c8ae;
    --esa-neutral-space: #e8e8e4;
    --esa-text-dark: #0f1820;
    --esa-surface: #ffffff;
    --esa-shadow: 0 24px 48px rgba(0, 50, 71, 0.18);
}

@font-face {
    font-family: "NotesESA";
    src:
        url("../fonts/NotesESA/NotesESA-Regular.woff2") format("woff2"),
        url("../fonts/NotesESA/NotesESA-Regular.woff") format("woff"),
        url("../fonts/NotesESA/NotesESA-Regular.ttf") format("truetype");
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    background:
        radial-gradient(circle at top left, rgba(0, 174, 157, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(118, 200, 174, 0.16), transparent 28%),
        linear-gradient(180deg, var(--esa-deep-space) 0%, #072434 100%);
    color: var(--esa-text-dark);
    font-family: "NotesESA", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: var(--esa-pure-teal);
}

.page-shell {
    min-height: 100vh;
    padding: 2rem 1.25rem 3rem;
}

.page-frame {
    max-width: 980px;
    margin: 0 auto;
}

.hero-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.language-switch {
    display: inline-flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.09);
    padding: 0.35rem;
    border-radius: 999px;
}

.language-switch a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.language-switch a.is-active {
    background: var(--esa-pure-teal);
    color: var(--esa-text-dark);
    font-weight: 700;
}

.hero-logo {
    width: min(240px, 42vw);
    display: flex;
    justify-content: flex-end;
}

.hero-logo img {
    max-width: 100%;
    height: auto;
}

.content-card {
    background: var(--esa-surface);
    border-radius: 28px;
    box-shadow: var(--esa-shadow);
    overflow: hidden;
}

.content-header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 174, 157, 0.08) 0%, rgba(232, 232, 228, 0.6) 100%);
    border-bottom: 1px solid rgba(0, 50, 71, 0.1);
}

.content-header--split .content-header__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    align-items: center;
    gap: 2.5rem;
}

.content-header--split .content-header__text {
    min-width: 0;
}

.content-header--split .content-header__logo {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.content-header--split .content-header__logo img {
    display: block;
    max-width: 100%;
    max-height: 112px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.content-header h1 {
    margin: 0 0 0.5rem;
    color: var(--esa-deep-space);
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.05;
}

.content-header p {
    margin: 0;
    color: var(--esa-deep-space1);
    max-width: 58ch;
    line-height: 1.6;
}

.form-body {
    padding: 2rem;
}

.eyebrow {
    color: var(--esa-pure-teal);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.flash-stack {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.error-banner,
.privacy-box {
    border-radius: 20px;
    padding: 1rem 1.1rem;
}

.error-banner {
    background: #fff1f1;
    color: #8a1d1d;
}

.privacy-box {
    background: linear-gradient(135deg, rgba(0, 174, 157, 0.11) 0%, rgba(232, 232, 228, 0.85) 100%);
    color: var(--esa-deep-space);
}

.privacy-box h2 {
    margin: 0;
    font-size: 1.2rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 1.5rem;
}

.meta-box {
    background: #f4f8f9;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(0, 50, 71, 0.08);
}

.meta-box__label {
    font-size: 12px;
    color: #5f7892;
    margin-bottom: 6px;
}

.meta-box__value {
    font-weight: 700;
    color: var(--esa-deep-space);
}

.hint-list {
    margin: 0 0 1.75rem;
    padding-left: 1.25rem;
    color: #486684;
    line-height: 1.65;
}

.field {
    margin-bottom: 1.2rem;
}

.field-label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 700;
    color: var(--esa-deep-space);
}

.field-input {
    width: 100%;
    border: 1px solid rgba(0, 50, 71, 0.18);
    border-radius: 18px;
    padding: 0.95rem 1rem;
    font: inherit;
    color: var(--esa-text-dark);
    background: #fff;
}

.field-input:focus {
    outline: none;
    border-color: var(--esa-pure-teal);
    box-shadow: 0 0 0 4px rgba(0, 174, 157, 0.12);
}

.field-help {
    display: block;
    color: #64788e;
    margin-top: 0.45rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--esa-deep-space);
}

.checkbox-row input[type="checkbox"] {
    margin-top: 0.2rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(90deg, var(--esa-pure-teal) 0%, var(--esa-pure-teal1) 100%);
    color: var(--esa-text-dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 16px 28px rgba(0, 174, 157, 0.22);
}

.btn:hover {
    filter: brightness(1.02);
}

@media (max-width: 720px) {
    .page-shell {
        padding: 1.25rem 0.85rem 2rem;
    }

    .hero-bar {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .hero-logo {
        width: 100%;
        justify-content: flex-start;
    }

    .content-header,
    .form-body {
        padding: 1.5rem;
    }

    .content-header--split .content-header__layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-header--split .content-header__logo {
        width: 100%;
        justify-content: flex-start;
    }

    .content-header--split .content-header__logo img {
        max-height: 72px;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}

.status-badge {
    display: inline-flex;
    width: auto;
    margin: 0;
    border-radius: 999px;
    background: var(--esa-deep-space);
    color: #fff;
}

.status-approved,
.status-exported {
    background: #17683a;
}

.status-cancelled,
.status-rejected {
    background: #8a1d1d;
}

.status-correction_requested {
    background: #f4cf61;
    color: var(--esa-deep-space);
}

.gateway-note {
    margin-top: 1rem;
}

.muted {
    color: #64788e;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.75rem;
}

th,
td {
    padding: 0.8rem 0.65rem;
    border-bottom: 1px solid rgba(0, 50, 71, 0.1);
    text-align: left;
    vertical-align: top;
}

th {
    color: #5f7892;
    font-size: 0.9rem;
}

pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    border-radius: 16px;
    border: 1px solid rgba(0, 50, 71, 0.1);
    background: #f4f8f9;
    padding: 1rem;
}
