:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #15283a;
    background: #edf2f5;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 32px 20px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 90%), transparent 36%),
        linear-gradient(145deg, #f2f6f8 0%, #e4ebef 100%);
}

.portal-card {
    width: min(760px, 100%);
    overflow: hidden;
    border: 1px solid rgb(26 60 83 / 10%);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgb(20 43 59 / 14%);
}

.brand-header {
    min-height: 102px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #e7edf1;
    background: #fff;
}

.brand-logo {
    width: 138px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

.brand-fallback {
    width: 84px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #123f61;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.brand-copy strong {
    overflow: hidden;
    color: #173f5f;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy span {
    color: #6d7e8b;
    font-size: 12px;
    letter-spacing: .025em;
}

.language-badge {
    padding: 8px 11px;
    border: 1px solid #dbe4e9;
    border-radius: 999px;
    color: #425c6e;
    background: #f6f9fa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.status-content {
    padding: 42px 56px 38px;
    text-align: center;
}

.status-symbol {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border: 3px solid #1e668f;
    border-radius: 50%;
    color: #1e668f;
}

.status-symbol span {
    width: 20px;
    height: 10px;
    border-bottom: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: translateY(-2px) rotate(-45deg);
}

.status-waiting .status-symbol {
    border-color: #d89a1d;
    border-top-color: transparent;
    animation: portal-spin 1.2s linear infinite;
}

.status-waiting .status-symbol span {
    display: none;
}

.status-error .status-symbol {
    border-color: #b84b52;
    color: #b84b52;
}

.status-error .status-symbol span {
    width: 3px;
    height: 24px;
    border: 0;
    border-radius: 2px;
    background: currentColor;
    transform: none;
}

.status-error .status-symbol span::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    margin: 29px 0 0 -2px;
    border-radius: 50%;
    background: currentColor;
}

.eyebrow {
    margin: 0 0 10px;
    color: #587387;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    color: #123d5c;
    line-height: 1.2;
}

h1 {
    font-size: clamp(28px, 5vw, 38px);
}

h2 {
    font-size: clamp(20px, 3.5vw, 25px);
}

.message {
    max-width: 600px;
    margin: 14px auto 0;
    color: #344d60;
    font-size: 17px;
    line-height: 1.55;
}

.language-divider {
    margin: 28px auto 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #84939d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.language-divider::before,
.language-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e1e8ec;
}

.language-secondary .message {
    color: #587080;
    font-size: 15px;
}

.detail {
    margin-top: 28px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dfe7eb;
    border-radius: 10px;
    background: #f5f8fa;
    text-align: left;
}

.detail span {
    color: #70828f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.detail strong {
    color: #173f5f;
    overflow-wrap: anywhere;
}

.portal-footer {
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #e7edf1;
    color: #7a8c98;
    background: #fafcfd;
    font-size: 11px;
}

@keyframes portal-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .status-waiting .status-symbol {
        animation: none;
    }
}

@media (max-width: 620px) {
    body {
        padding: 14px;
    }

    .portal-card {
        border-radius: 15px;
    }

    .brand-header {
        padding: 17px 18px;
        gap: 12px;
    }

    .brand-logo {
        width: 96px;
        max-height: 46px;
    }

    .brand-copy span,
    .language-badge {
        display: none;
    }

    .status-content {
        padding: 32px 22px 30px;
    }

    .message {
        font-size: 16px;
    }

    .detail,
    .portal-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
