:root {
    --bg: #080808;
    --bg-soft: #0d0d0d;
    --panel: #121212;
    --panel-hover: #171717;

    --gold: #d7b85b;
    --gold-light: #f3dd96;
    --gold-dark: #7e692e;

    --text: #f5f1e8;
    --muted: #aaa494;
    --border: #302b20;

    --green: #acd593;
    --green-bg: #1d2a18;

    --blue: #9cb9d6;
    --blue-bg: #17222d;
}


* {
    box-sizing: border-box;
}


html {
    background: var(--bg);
}


body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 25% 0%,
            rgba(215,184,91,.11),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #0a0a0a,
            #070707
        );

    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


a {
    color: inherit;
}


.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}


.public-header,
.topbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 86px;

    border-bottom:
        1px solid var(--border);
}


.public-header {
    background: transparent;
}


.brand {
    display: inline-flex;

    align-items: center;

    gap: 13px;

    color: var(--text);

    text-decoration: none;
}


.brand-mark {
    display: grid;

    width: 44px;
    height: 44px;

    place-items: center;

    border:
        1px solid var(--gold);

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(215,184,91,.15),
            rgba(215,184,91,.03)
        );

    color: var(--gold-light);

    font-size: 21px;
    font-weight: 900;
}


.brand-mark.small {
    width: 40px;
    height: 40px;

    font-size: 19px;
}


.brand-text strong,
.brand-text small {
    display: block;
}


.brand-text strong {
    letter-spacing: .08em;
}


.brand-text small {
    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}


.security-label {
    padding: 8px 12px;

    border:
        1px solid var(--border);

    border-radius: 30px;

    color: var(--muted);

    font-size: 12px;
}


.login-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(340px, .75fr);

    gap: 80px;

    align-items: center;

    min-height:
        calc(100vh - 190px);

    padding:
        70px 0 80px;
}


.login-hero h1 {
    max-width: 800px;

    margin:
        15px 0 22px;

    font-size:
        clamp(42px, 5.5vw, 76px);

    line-height: 1.03;

    letter-spacing: -.045em;
}


.eyebrow {
    color: var(--gold);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .15em;
}


.hero-description {
    max-width: 680px;

    margin: 0;

    color: var(--muted);

    font-size:
        clamp(17px, 2vw, 20px);

    line-height: 1.65;
}


.service-strip {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    max-width: 800px;

    margin-top: 35px;
}


.service-strip span {
    padding: 8px 11px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background:
        rgba(255,255,255,.018);

    color: #cbc5b6;

    font-size: 12px;
}


.login-panel {
    padding: 38px;

    border:
        1px solid var(--border);

    border-radius: 18px;

    background:
        linear-gradient(
            160deg,
            #151515,
            #0f0f0f
        );

    box-shadow:
        0 30px 80px
        rgba(0,0,0,.32);
}


.login-panel-icon {
    display: grid;

    width: 58px;
    height: 58px;

    margin-bottom: 28px;

    place-items: center;

    border:
        1px solid var(--gold);

    border-radius: 14px;

    color: var(--gold-light);

    font-size: 26px;
    font-weight: 900;
}


.login-panel h2 {
    margin:
        11px 0 10px;

    font-size: 30px;
}


.login-panel > p {
    margin:
        0 0 10px;

    color: var(--muted);

    line-height: 1.55;
}


.primary-button {
    display: block;

    width: 100%;

    margin-top: 25px;

    padding: 15px 20px;

    border:
        1px solid var(--gold);

    border-radius: 9px;

    background: var(--gold);

    color: #090909;

    font-weight: 800;

    text-align: center;
    text-decoration: none;

    transition:
        transform .15s ease,
        background .15s ease;
}


.primary-button:hover {
    transform: translateY(-1px);

    background: var(--gold-light);
}


.login-security {
    margin-top: 24px;

    padding-top: 20px;

    border-top:
        1px solid var(--border);
}


.login-security strong,
.login-security span {
    display: block;
}


.login-security strong {
    font-size: 12px;
}


.login-security span {
    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}


.public-footer {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding:
        22px 0 28px;

    border-top:
        1px solid var(--border);

    color: var(--muted);

    font-size: 11px;
}


.topbar {
    position: sticky;

    z-index: 10;

    top: 0;

    padding:
        14px max(
            22px,
            calc((100vw - 1240px) / 2)
        );

    background:
        rgba(8,8,8,.94);

    backdrop-filter:
        blur(15px);
}


.topbar-user {
    display: flex;

    align-items: center;

    gap: 22px;
}


.topbar-user > div {
    text-align: right;
}


.topbar-user strong,
.topbar-user span {
    display: block;
}


.topbar-user strong {
    font-size: 13px;
}


.topbar-user span {
    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}


.outline-button {
    display: inline-block;

    padding:
        10px 15px;

    border:
        1px solid var(--gold-dark);

    border-radius: 8px;

    color: var(--gold-light);

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}


.dashboard {
    width:
        min(1240px, calc(100% - 40px));

    margin:
        0 auto;

    padding:
        52px 0 40px;
}


.dashboard-hero {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 35px;
}


.dashboard-hero h1 {
    margin:
        10px 0 8px;

    font-size:
        clamp(34px, 4vw, 52px);

    letter-spacing: -.035em;
}


.dashboard-hero p {
    margin: 0;

    color: var(--muted);

    line-height: 1.6;
}


.account-state {
    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 245px;

    padding:
        16px 18px;

    border:
        1px solid var(--border);

    border-radius: 11px;

    background:
        var(--panel);
}


.state-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background:
        #8fc273;

    box-shadow:
        0 0 15px
        rgba(143,194,115,.5);
}


.account-state strong,
.account-state small {
    display: block;
}


.account-state strong {
    font-size: 12px;
}


.account-state small {
    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;
}


.customer-summary {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    gap: 1px;

    margin-bottom: 42px;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background:
        var(--border);
}


.customer-summary > div {
    min-height: 92px;

    padding: 20px;

    background:
        var(--panel);
}


.customer-summary strong {
    display: block;

    margin-top: 8px;

    font-size: 14px;
}


.summary-label {
    color: var(--gold);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .13em;
}


.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 20px;
}


.section-heading.compact {
    margin-bottom: 18px;
}


.section-heading h2 {
    margin:
        8px 0 0;

    font-size: 27px;
}


.section-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;
}


.services-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    gap: 14px;
}


.service-card {
    display: flex;

    min-height: 260px;

    flex-direction: column;

    padding: 22px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background:
        linear-gradient(
            155deg,
            #151515,
            #101010
        );

    transition:
        transform .16s ease,
        border-color .16s ease,
        background .16s ease;
}


.service-card:hover {
    transform:
        translateY(-2px);

    border-color:
        #564a2b;

    background:
        var(--panel-hover);
}


.service-card.active {
    box-shadow:
        inset 0 2px 0
        var(--gold);
}


.service-head {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;
}


.service-icon {
    display: grid;

    width: 38px;
    height: 38px;

    place-items: center;

    border:
        1px solid var(--gold-dark);

    border-radius: 9px;

    color: var(--gold-light);

    font-size: 15px;
    font-weight: 900;
}


.status {
    display: inline-flex;

    align-items: center;

    min-height: 23px;

    padding:
        4px 8px;

    border-radius: 20px;

    background:
        var(--green-bg);

    color: var(--green);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .08em;
}


.status.ready {
    background:
        #292416;

    color:
        var(--gold-light);
}


.status.development {
    background:
        var(--blue-bg);

    color:
        var(--blue);
}


.service-card h3 {
    margin:
        22px 0 9px;

    font-size: 18px;
}


.service-card p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


.service-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: auto;

    padding-top: 22px;

    border-top:
        1px solid rgba(255,255,255,.055);

    color: #8e887a;

    font-size: 10px;
}


.connect-note {
    color: #777165;
}


.card-action {
    color: var(--gold-light);

    font-weight: 700;

    text-decoration: none;
}


.license-section {
    margin-top: 45px;

    padding: 25px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background:
        var(--panel);
}


.license-table {
    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 9px;
}


.license-row {
    display: grid;

    grid-template-columns:
        1fr 1fr 1fr 1fr;

    gap: 15px;

    padding:
        13px 16px;

    border-top:
        1px solid var(--border);

    color: #d5d0c3;

    font-size: 12px;
}


.license-row:first-child {
    border-top: 0;
}


.license-header {
    background:
        #0d0d0d;

    color: var(--muted);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .08em;
}


.mono {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
}


.dashboard-footer {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-top: 55px;

    padding:
        25px 0;

    border-top:
        1px solid var(--border);

    color: var(--muted);

    font-size: 10px;
}


.dashboard-footer strong {
    color: var(--text);

    letter-spacing: .08em;
}


@media (max-width: 1050px) {

    .services-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

}


@media (max-width: 860px) {

    .login-layout {
        grid-template-columns: 1fr;

        gap: 45px;

        padding:
            55px 0;
    }


    .login-hero h1 {
        font-size:
            clamp(40px, 10vw, 60px);
    }


    .customer-summary {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }


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


    .account-state {
        width: 100%;
    }

}


@media (max-width: 620px) {

    .page-shell,
    .dashboard {
        width:
            min(100% - 28px, 1240px);
    }


    .public-header {
        min-height: 74px;
    }


    .security-label {
        display: none;
    }


    .login-layout {
        padding:
            40px 0;
    }


    .login-panel {
        padding:
            28px 23px;
    }


    .public-footer,
    .dashboard-footer {
        flex-direction: column;

        gap: 7px;
    }


    .topbar {
        padding:
            12px 14px;
    }


    .topbar-user > div {
        display: none;
    }


    .services-grid {
        grid-template-columns: 1fr;
    }


    .customer-summary {
        grid-template-columns: 1fr;
    }


    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }


    .license-row {
        grid-template-columns:
            1fr 1fr;

        row-gap: 7px;
    }

}

.brand-mark.image,
.login-panel-icon.image {
    padding: 5px;
    overflow: hidden;
}

.brand-logo,
.panel-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.small-mark {
    width: 40px;
    height: 40px;
}

.login-panel-icon.image {
    width: 72px;
    height: 72px;
    border-radius: 16px;
}


/* =========================================================
   SOFBAC PANEL LANGUAGE SWITCH
   ========================================================= */

.panel-language-switch {
    display: flex;
    align-items: center;
    gap: 5px;
}

.panel-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    height: 28px;
    padding: 0 7px;

    border: 1px solid rgba(215,184,91,.42);
    border-radius: 6px;

    background: #101214;
    color: #d8cda8;

    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.panel-lang:hover {
    border-color: #d7b85b;
    color: #f2d77e;
}

.panel-lang.active {
    background: #d7b85b;
    border-color: #d7b85b;
    color: #080808;
}

.public-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

@media (max-width: 760px) {
    .topbar-user {
        gap: 8px;
    }

    .public-header-actions {
        gap: 8px;
    }

    .panel-lang {
        min-width: 29px;
        padding: 0 5px;
    }
}



/* ============================================================
   SOFBAC context switcher
   ============================================================ */

.context-switcher {
    position: relative;
}

.context-switcher > summary {
    list-style: none;
}

.context-switcher > summary::-webkit-details-marker {
    display: none;
}

.context-current {
    min-width: 130px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    user-select: none;
}

.context-current::after {
    content: "⌄";
    margin-left: 8px;
    opacity: .65;
}

.context-switcher[open] .context-current {
    border-color: rgba(59,130,246,.65);
}

.context-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    z-index: 100;
    min-width: 190px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: #111;
    box-shadow: 0 14px 40px rgba(0,0,0,.4);
}

.context-option {
    display: block;
    padding: 9px 11px;
    border-radius: 7px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: 13px;
}

.context-option:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.context-option.active {
    background: rgba(59,130,246,.14);
    color: #fff;
}

@media (max-width: 760px) {
    .context-current {
        min-width: auto;
    }

    .context-menu {
        right: auto;
        left: 0;
    }
}


/* SOFBAC Pass product icon */
.service-icon.service-icon-image {
    overflow: hidden;
    padding: 4px;
}

.service-icon.service-icon-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
