/* School Master login selector — explicit global stylesheet so production does not depend on CSS isolation. */
.sm-login-dashboard-shell {
    min-width: 0;
}

.sm-login-home-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.sm-login-selector-panel {
    margin: 12px 0 14px;
    padding: 13px;
    border: 1px solid var(--sm-border);
    border-radius: 15px;
    background: linear-gradient(145deg, var(--sm-surface), color-mix(in srgb, #6d39d0 3%, var(--sm-surface)));
    box-shadow: var(--sm-shadow);
}

.sm-login-selector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.sm-login-selector-head > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.sm-login-selector-head span {
    color: #6d39d0;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .11em;
}

.sm-login-selector-head strong {
    color: var(--sm-text);
    font-size: 14px;
}

.sm-login-selector-head > small {
    color: var(--sm-muted);
    font-size: 9px;
    white-space: nowrap;
}

.sm-login-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.sm-login-choice {
    min-width: 0;
    min-height: 94px;
    padding: 11px 8px;
    border: 1px solid var(--sm-border);
    border-radius: 13px;
    background: var(--sm-surface);
    color: var(--sm-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.sm-login-choice:hover {
    transform: translateY(-1px);
    border-color: #b7a4ef;
    box-shadow: 0 8px 20px rgba(85, 33, 201, .09);
}

.sm-login-choice.active {
    border-color: #7040d7;
    background: linear-gradient(145deg, color-mix(in srgb, #6d39d0 8%, var(--sm-surface)), color-mix(in srgb, #ff7a18 4%, var(--sm-surface)));
    box-shadow: 0 8px 22px rgba(85, 33, 201, .14), inset 0 0 0 1px rgba(109, 57, 208, .12);
}

.sm-login-choice-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, #6d39d0 9%, var(--sm-surface));
    color: #6330c8;
    font-size: 17px;
    font-weight: 900;
}

.sm-login-choice.active .sm-login-choice-icon {
    background: linear-gradient(135deg, #5b25cc, #833de7);
    color: #fff;
}

.sm-login-choice strong {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.15;
}

.sm-login-choice small {
    color: var(--sm-muted);
    font-size: 8px;
    line-height: 1.2;
}

.sm-login-choice.active small {
    color: #6d39d0;
    font-weight: 750;
}

.sm-login-active-card {
    padding: 15px;
    border: 1px solid var(--sm-border);
    border-radius: 15px;
    background: var(--sm-surface);
    box-shadow: 0 9px 24px rgba(41, 36, 89, .06);
}

.sm-login-active-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.sm-login-active-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: color-mix(in srgb, #6d39d0 9%, var(--sm-surface));
    color: #6530ce;
    font-size: 18px;
    font-weight: 900;
}

.sm-login-active-head > div {
    min-width: 0;
}

.sm-login-active-head small {
    display: block;
    color: var(--sm-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .08em;
}

.sm-login-active-head h3 {
    margin: 2px 0 0;
    color: var(--sm-text);
    font-size: 16px;
    line-height: 1.15;
}

.sm-login-state {
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: color-mix(in srgb, #f59e0b 13%, var(--sm-surface));
    color: #a16207;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .05em;
    white-space: nowrap;
}

.sm-login-state.ready {
    background: color-mix(in srgb, #22c55e 12%, var(--sm-surface));
    color: #15803d;
}

.sm-login-active-copy {
    margin: 0 0 12px;
    color: var(--sm-muted);
    font-size: 10px;
    line-height: 1.5;
}

.sm-login-active-card label {
    display: block;
    margin: 9px 0 5px;
    color: var(--sm-text);
    font-size: 10px;
    font-weight: 750;
}

.sm-login-method-note {
    display: block;
    margin-top: 8px;
    color: var(--sm-muted);
    font-size: 8px;
    line-height: 1.4;
}

.sm-login-otp-box {
    margin-top: 9px;
}

.sm-login-workspace-list {
    display: grid;
    gap: 7px;
}

.sm-login-message {
    margin-top: 12px;
}

@media (max-width: 900px) {
    .sm-login-dashboard-shell {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .sm-login-selector-panel,
    .sm-login-active-card {
        padding: 11px;
        border-radius: 13px;
    }

    .sm-login-choice-grid {
        gap: 6px;
    }

    .sm-login-choice {
        min-height: 84px;
        padding: 9px 5px;
        border-radius: 11px;
    }

    .sm-login-choice-icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .sm-login-choice strong {
        font-size: 10px;
    }

    .sm-login-choice small {
        font-size: 7px;
    }

    .sm-login-active-head {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .sm-login-active-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .sm-login-state {
        grid-column: 2;
        justify-self: start;
    }
}
