/* Critical shell styles for module selection, VS Cargo hub, login, and auth pages. */

html:has(.page-landing),
html:has(.page-login),
body:has(.page-landing),
body:has(.page-login) {
    background: var(--vs-bg-secondary);
}

.vs-login-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

.vs-login-logo .vs-logo-image {
    background: #000;
    border-radius: inherit;
}

.vs-logo-image,
.vs-brand-logo-image {
    width: 100%;
    height: 100%;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
    display: block;
}

.vs-brand-logo-image {
    background: #000;
    border-radius: 50%;
}

.vs-role-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--vs-accent-soft);
    color: var(--vs-accent-hover);
}

.vs-role-icon svg {
    width: 26px;
    height: 26px;
}

.vs-role-icon--brand,
.vs-role-icon.vs-role-icon--brand {
    padding: 0;
    background: #000;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px #000;
}

.page-landing {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 3rem;
    gap: 2.5rem;
    background: var(--vs-bg-secondary);
}

.page-login {
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vs-bg-secondary);
    padding: 1rem;
}

.vs-login-header {
    text-align: center;
    max-width: 520px;
}

.vs-login-header .vs-login-logo {
    margin: 0 auto 1rem;
}

.vs-login-roles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    width: min(1100px, 100%);
}

.vs-login-roles--five,
.vs-login-roles--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vs-role-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: var(--vs-bg-card);
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    padding: 1.5rem;
    min-height: 260px;
    width: 100%;
    font-family: inherit;
    color: inherit;
}

.page-portal-login .vs-login-brand-panel .vs-login-logo {
    width: 56px;
    height: 56px;
}

.page-portal-login .vs-portal-login-shell {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 420px);
    width: min(920px, 100%);
}

@media (max-width: 900px) {
    .vs-login-roles,
    .vs-login-roles--five,
    .vs-login-roles--six {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .vs-role-card {
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .page-portal-login .vs-portal-login-shell {
        grid-template-columns: 1fr;
    }
}
