: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.otf") format("opentype");
    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;
    display: flex;
    flex-direction: column;
}

.page-frame {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    flex: 1 0 auto;
}

.hero-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.hero-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    line-height: 1;
}

.hero-startup-name {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 800;
    margin-top: 0.55rem;
}

.hero-user-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--esa-pure-teal);
    font-size: 1rem;
    font-weight: 900;
    margin-top: 0.55rem;
}

.hero-user-name .fa-solid {
    font-size: 0.92rem;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 150px;
}

.hero-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 96px;
    object-fit: contain;
}

.hero-session-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    min-width: min(360px, 46vw);
    align-self: flex-start;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    text-align: right;
    padding-top: 0.2rem;
}

.hero-session-meta .fa-regular {
    color: var(--esa-pure-teal);
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    padding: 0.75rem 0.35rem 0.35rem;
    border-radius: 999px;
    margin-top: 0.15rem;
}

.portal-nav a,
.portal-nav__button {
    color: #fff;
    text-decoration: none;
    padding: 0.62rem 1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
}

.portal-nav a.is-active,
.portal-nav__button:hover,
.portal-nav a:hover {
    background: var(--esa-pure-teal);
    color: var(--esa-text-dark);
}

.portal-nav a .fa-solid,
.portal-nav__button .fa-solid {
    margin-right: 0.45rem;
}

.portal-nav__home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 2.8rem;
}

.portal-nav__home .fa-solid {
    margin-right: 0;
}

.portal-nav__right {
    margin-left: auto;
}

.portal-nav__end-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.portal-nav__form {
    margin: 0;
}

.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(180px, 300px);
    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;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--esa-pure-teal);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-body {
    padding: 2rem;
}

.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 {
    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;
}

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

.form-actions--split {
    align-items: center;
    justify-content: space-between;
}

.portal-primary-button,
.form-actions .btn {
    border: 0;
    border-radius: 999px;
    background: var(--esa-pure-teal);
    color: var(--esa-text-dark);
    font-weight: 900;
    padding: 0.82rem 1.4rem;
}

.portal-primary-button:hover,
.form-actions .btn:hover {
    background: var(--esa-pure-teal1);
    color: var(--esa-text-dark);
}

.error-banner {
    border: 1px solid rgba(201, 42, 42, 0.22);
    border-radius: 18px;
    background: rgba(201, 42, 42, 0.08);
    color: #8a1d1d;
    padding: 0.95rem 1rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.auth-account-note {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(0, 50, 71, 0.1);
    border-radius: 999px;
    background: #f4f8f9;
    color: var(--esa-deep-space);
    font-weight: 800;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
}

.auth-account-note .fa-solid {
    color: var(--esa-pure-teal);
}

.auth-secondary-link {
    color: var(--esa-deep-space1);
    font-weight: 800;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: var(--esa-pure-teal);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 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);
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.75rem 0 1rem;
}

.section-title-row h2 {
    margin: 0 0 0.35rem;
    color: var(--esa-deep-space);
    font-size: 1.35rem;
    font-weight: 900;
}

.section-title-row p {
    margin: 0;
    color: var(--esa-deep-space1);
}

.portal-table-shell {
    border: 1px solid rgba(0, 50, 71, 0.08);
    border-radius: 18px;
    overflow: hidden;
}

.table {
    --bs-table-hover-bg: rgba(0, 174, 157, 0.06);
}

.table thead th {
    color: var(--esa-deep-space);
    background: #f4f8f9;
    border-bottom-color: rgba(0, 50, 71, 0.12);
    font-size: 0.84rem;
    text-transform: uppercase;
}

.badge {
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
}

.empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px dashed rgba(0, 50, 71, 0.18);
    border-radius: 18px;
    color: #486684;
    background: #f8fbfc;
}

.empty-state > i {
    color: var(--esa-pure-teal);
    font-size: 1.5rem;
}

.empty-state p {
    margin: 0;
}

.portal-footer-bar {
    flex-shrink: 0;
    width: 100%;
    margin: 1.25rem auto 0;
    background: var(--esa-pure-teal);
    border-radius: 18px;
}

.portal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--esa-text-dark);
    padding: 0.9rem 1.25rem;
    white-space: nowrap;
}

.portal-footer a {
    color: var(--esa-text-dark);
    text-decoration: none;
    font-weight: 700;
}

.portal-footer a:visited,
.portal-footer a:focus,
.portal-footer a:hover {
    color: var(--esa-deep-space);
    text-decoration: none;
}

.portal-footer__links {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.footer-language-switch {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 0.25rem;
}

.footer-language-switch a {
    color: var(--esa-text-dark);
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
}

.footer-language-switch a.is-active {
    background: #fff;
    color: var(--esa-deep-space);
}

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

    .hero-brand-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .hero-session-meta {
        justify-content: flex-start;
        min-width: 0;
        text-align: left;
    }

    .portal-nav,
    .portal-nav__end-group {
        align-items: stretch;
        flex-direction: column;
        border-radius: 22px;
    }

    .portal-nav__right {
        margin-left: 0;
    }

    .portal-nav a,
    .portal-nav__button {
        display: block;
        width: 100%;
        text-align: left;
    }

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

    .content-header--split .content-header__layout,
    .meta-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions--split,
    .portal-footer,
    .portal-footer__links {
        align-items: stretch;
        flex-direction: column;
        white-space: normal;
    }

    .footer-language-switch {
        align-self: flex-start;
    }
}
