.student-auth-page { min-height: 100vh; background: var(--bg, #04060d); }

.sa-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(4, 6, 13, 0.98);
    border-bottom: 1px solid rgba(99, 102, 241, 0.25);
}

.sa-nav__inner {
    max-width: 480px;
    margin: 0 auto;
    padding: .85rem 1rem;
    padding-inline: max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.sa-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: #f1f5f9;
    min-width: 0;
}

.sa-brand__mark {
    width: 38px;
    height: 38px;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #22d3ee;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.sa-brand strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sa-brand small {
    display: block;
    color: #94a3b8;
    font-size: .68rem;
}

.sa-back {
    flex-shrink: 0;
    padding: .45rem .85rem;
    border-radius: .55rem;
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    text-decoration: none;
    font-size: .78rem;
    white-space: nowrap;
}

.student-auth-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.student-auth-main:has(.auth-card--wide) { max-width: 560px; }

.auth-card {
    padding: 2rem 1.75rem;
    border-radius: 1.15rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.auth-card h1 {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 .5rem;
    color: #f1f5f9;
}

.auth-desc { color: #94a3b8; font-size: .9rem; margin: 0 0 1.5rem; }

.auth-form label {
    display: block;
    font-size: .82rem;
    color: #94a3b8;
    margin-bottom: .35rem;
}

.auth-input {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: .65rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(4, 6, 13, 0.6);
    color: #f1f5f9;
    font-family: var(--font-vazir);
    font-size: .95rem;
    margin-bottom: 1rem;
}

.auth-input:focus {
    outline: none;
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.auth-input--code {
    letter-spacing: .4em;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-submit { width: 100%; border: none; cursor: pointer; margin-top: .5rem; }

.auth-sent { color: #22d3ee; font-size: .85rem; margin-bottom: 1rem; }

.auth-debug {
    background: rgba(34, 211, 238, 0.1);
    border: 1px dashed rgba(34, 211, 238, 0.4);
    padding: .65rem;
    border-radius: .5rem;
    font-size: .85rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.auth-resend { text-align: center; margin-top: 1rem; }

.auth-link-btn {
    background: none;
    border: none;
    color: #818cf8;
    cursor: pointer;
    font-family: var(--font-vazir);
    font-size: .88rem;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

@media (max-width: 480px) { .auth-grid { grid-template-columns: 1fr; } }

.auth-alert {
    padding: .75rem 1rem;
    border-radius: .65rem;
    margin-bottom: 1rem;
    font-size: .88rem;
}

.auth-alert--ok { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; }
.auth-alert--err { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }

.btn-sm { padding: .5rem 1rem !important; font-size: .82rem !important; }

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.dash-header h1 { font-size: 1.4rem; font-weight: 900; margin: 0; color: #f1f5f9; }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-info { list-style: none; padding: 0; margin: 0; }
.dash-info li {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: .88rem;
}
.dash-info span { color: #94a3b8; }

.session-item {
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.session-item strong { display: block; font-size: .92rem; }
.session-item span { font-size: .8rem; color: #94a3b8; }
.session-link { font-size: .8rem; color: #22d3ee; }

.dash-links { display: flex; gap: .65rem; flex-wrap: wrap; }

.student-auth-main:has(.dash-header) { max-width: 720px; }

.auth-card h2 { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; color: #e2e8f0; }

@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem 1.15rem;
    }

    .sa-brand small { display: none; }
}
