:root {
    --portal-navy: #022f67;
    --portal-navy-soft: #0e4d9a;
    --portal-ice: #f2f8ff;
    --portal-sky: #cfe6ff;
    --portal-accent: #0bb38f;
    --portal-ink: #102543;
    --portal-card-border: #d8e6f5;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--portal-ink);
    background:
        radial-gradient(900px 500px at -5% -8%, #cbe2ff 0%, transparent 70%),
        radial-gradient(800px 450px at 110% 0%, #dbf9f1 0%, transparent 67%),
        linear-gradient(180deg, #f7fbff 0%, #edf5fd 100%);
    min-height: 100vh;
}

.portal-shell {
    position: relative;
    z-index: 1;
}

.portal-aura {
    position: fixed;
    width: 480px;
    height: 480px;
    border-radius: 999px;
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.portal-aura-left {
    left: -140px;
    top: 110px;
    background: radial-gradient(circle at 30% 30%, #4db4ff, transparent 70%);
}

.portal-aura-right {
    right: -140px;
    top: -60px;
    background: radial-gradient(circle at 35% 30%, #58d6b7, transparent 70%);
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-topbar-right {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.portal-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.5rem;
    border-radius: 0.8rem;
    border: 1px solid var(--portal-card-border);
    background: #ffffffd9;
    box-shadow: 0 8px 18px rgba(20, 55, 97, 0.06);
}

.portal-language-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #356090;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

.lang-icon-btn {
    min-height: 2rem;
    padding: 0.18rem 0.52rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    border-radius: 999px;
    border: 1px solid #c8daee;
    background: #fff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.lang-icon-btn .lang-text {
    font-size: 0.74rem;
    font-weight: 700;
    color: #234f82;
    line-height: 1;
}

.lang-icon-btn .lang-flag {
    width: 1.15rem;
    height: 0.8rem;
    border-radius: 0.12rem;
    border: 1px solid #c8daee;
    object-fit: cover;
    display: inline-block;
}

.lang-icon-btn:hover {
    transform: translateY(-1px);
    border-color: #8cb9e8;
    box-shadow: 0 8px 16px rgba(9, 54, 108, 0.16);
}

.lang-icon-btn.active {
    border-color: #0f5aaa;
    box-shadow: inset 0 0 0 1px #0f5aaa;
}

.portal-logo-wrap {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 0.95rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--portal-card-border);
    box-shadow: 0 10px 26px rgba(8, 42, 87, 0.09);
}

.portal-logo {
    width: min(270px, 55vw);
    height: auto;
    display: block;
}

.portal-usercard {
    min-width: 250px;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--portal-card-border);
    background: #ffffffdb;
    box-shadow: 0 10px 20px rgba(20, 55, 97, 0.08);
}

.user-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: 0.82rem;
    color: #325174;
}

.user-meta-line+.user-meta-line {
    margin-top: 0.24rem;
}

.user-meta-line strong {
    color: #123f74;
    text-align: right;
}

.portal-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid #bed9f4;
    background:
        linear-gradient(120deg, rgba(1, 59, 128, 0.97) 0%, rgba(0, 84, 170, 0.93) 56%, rgba(10, 130, 180, 0.89) 100%);
    box-shadow: 0 20px 45px rgba(6, 38, 79, 0.3);
    color: #fff;
    animation: heroFade 0.45s ease-out;
}

.portal-kicker {
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-size: 0.74rem;
    color: #d3ecff;
    font-weight: 800;
}

.portal-title {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.6rem, 2.7vw, 2.5rem);
    line-height: 1.08;
    max-width: 20ch;
}

.portal-subtitle {
    color: #d9ebff;
    max-width: 62ch;
}

.portal-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.btn-portal-primary,
.btn-portal-ghost {
    border-radius: 999px;
    padding: 0.58rem 1rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.btn-portal-primary {
    background: #fff;
    color: var(--portal-navy);
}

.btn-portal-primary:hover {
    color: var(--portal-navy);
    background: #ecf6ff;
}

.btn-portal-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-portal-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.portal-hero-panel {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(0, 29, 67, 0.26);
    padding: 1rem;
}

.section-title {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.08rem;
}

.status-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    color: #d9edff;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 0.45rem;
}

.status-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.status-list strong {
    color: #fff;
}

.portal-badge {
    border: 1px solid #b8d6f4;
    background: #f4fbff;
    color: #0f4d8f;
    font-weight: 700;
}

.journey-card {
    border-radius: 1rem;
    border: 1px solid var(--portal-card-border);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(16, 45, 86, 0.08);
    padding: 1rem;
}

.journey-copy {
    color: #3f5f84;
}

.journey-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.journey-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #2d4e74;
}

.crumb {
    border-radius: 999px;
    border: 1px solid #c6dff7;
    background: #f4faff;
    color: #19508f;
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.crumb.active {
    border-color: #8cc4fa;
    background: #e8f4ff;
}

.btn-portal-secondary {
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-weight: 700;
    color: #1a4d88;
    border: 1px solid #a9caea;
    background: #eef7ff;
}

/* Text styles inside the dark hero panel */
.portal-panel-copy {
    color: #d9ebff;
    font-size: 0.88rem;
}

.portal-hero-panel .journey-breadcrumb {
    color: #d9ebff;
}

.portal-hero-panel .crumb {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #e8f5ff;
}

.portal-hero-panel .crumb.active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.customer-selector-form {
    margin-bottom: 0;
}

.portal-customer-select {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
}

.portal-customer-select option {
    color: var(--portal-ink);
    background: #fff;
}

.portal-hero-panel .btn-portal-secondary {
    color: #d9edff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.portal-hero-panel .btn-portal-secondary:disabled {
    opacity: 0.4;
}

.customer-context-loading {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.16);
    color: #e8f5ff;
    font-size: 0.82rem;
    font-weight: 600;
}

.customer-context-loading .spinner-border {
    width: 0.95rem;
    height: 0.95rem;
    border-width: 0.15em;
}

.portal-data-stack {
    position: relative;
}

.portal-data-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1rem;
    background: rgba(229, 238, 248, 0.72);
    backdrop-filter: blur(1.5px);
    pointer-events: all;
}

.portal-data-overlay-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(26, 80, 141, 0.28);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(15, 48, 87, 0.16);
    color: #1a4f8c;
    font-size: 0.9rem;
    font-weight: 700;
}

.portal-data-overlay-card .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.kpi-card,
.feature-card,
.doc-link {
    border-radius: 1rem;
    border: 1px solid var(--portal-card-border);
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 45, 86, 0.08);
}

.kpi-card,
.feature-card {
    height: 100%;
    padding: 1rem;
}

.kpi-label {
    color: #2f669f;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}

.kpi-value {
    font-family: 'Sora', 'Manrope', sans-serif;
    color: var(--portal-navy);
}

.kpi-note,
.feature-list {
    color: #4a688a;
}

.feature-list {
    padding-left: 1.1rem;
}

.feature-list li+li {
    margin-top: 0.4rem;
}

.portal-table {
    font-size: 0.86rem;
}

.portal-table thead th {
    color: #2f669f;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
}

.portal-table tbody td {
    color: #35577f;
    vertical-align: middle;
}

/* ── Skeleton / shimmer loading ─────────────────────────────────────────── */
@keyframes portal-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton {
    display: block;
    background: linear-gradient(90deg, #dde6f3 25%, #c8d7ec 50%, #dde6f3 75%);
    background-size: 1200px 100%;
    animation: portal-shimmer 1.5s infinite linear;
    border-radius: 6px;
}

.skeleton-kpi {
    height: 2rem;
    width: 68%;
    border-radius: 8px;
    margin: 0.15rem 0;
}

.skeleton-td {
    height: 0.78em;
    width: 80%;
    border-radius: 4px;
    display: inline-block;
}

.skeleton-td.w-40 {
    width: 40%;
}

.skeleton-td.w-55 {
    width: 55%;
}

.skeleton-td.w-30 {
    width: 30%;
}

.skeleton-td.w-20 {
    width: 20%;
}

/* ─────────────────────────────────────────────────────────────────────────── */

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #12447b;
    padding: 0.8rem 0.95rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.doc-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(13, 44, 85, 0.15);
    border-color: #8cb6de;
}

.doc-link[aria-disabled="true"] {
    color: #4f6785;
    cursor: default;
    opacity: 0.78;
}

.doc-link[aria-disabled="true"]:hover {
    transform: none;
    box-shadow: 0 12px 28px rgba(16, 45, 86, 0.08);
    border-color: var(--portal-card-border);
}

@keyframes heroFade {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 992px) {
    .portal-hero {
        grid-template-columns: 1.45fr 0.85fr;
        align-items: stretch;
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .portal-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-topbar-right {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-language-switch {
        width: fit-content;
    }

    .portal-usercard {
        width: 100%;
        min-width: 0;
    }
}