/* =============================================================
   auth.css
   Login, Student Registration, Teacher Request tabs
   ============================================================= */

*,*::before,*::after { box-sizing: border-box; }

.auth-wrapper {
    font-family: 'Nunito', sans-serif;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 .75rem 3rem;
}

/* ── Header ─────────────────────────────────────────────────── */
.auth-header {
    background: linear-gradient(135deg, #1a6fc4 0%, #1a9650 100%);
    border-radius: 0 0 24px 24px;
    padding: 1.75rem 1.5rem 2rem;
    margin: 0 -.75rem 1.5rem;
    box-shadow: 0 6px 24px rgba(26,111,196,.25);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-logo {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 8px rgba(255,255,255,.3));
}

.auth-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: #fff;
    margin: 0;
    text-shadow: 1px 2px 0 rgba(0,0,0,.15);
}

.auth-subtitle {
    font-size: .78rem;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    margin: 2px 0 0;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: #f0f4f8;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 1.25rem;
}

.auth-tab {
    flex: 1;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .82rem;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: .55rem .5rem;
    cursor: pointer;
    color: #6c757d;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.auth-tab:hover { background: rgba(255,255,255,.7); color: #495057; }

.auth-tab-active {
    background: #fff;
    color: #1a6fc4;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ── Panels ─────────────────────────────────────────────────── */
.auth-panel { animation: auth-fade .2s ease; }
.auth-panel-hidden { display: none; }

@keyframes auth-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Alerts ─────────────────────────────────────────────────── */
.auth-alert {
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-alert-error {
    background: #fff5f5;
    border: 2px solid #e74c3c;
    color: #c0392b;
}

/* ── Fields ─────────────────────────────────────────────────── */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: .9rem;
}

.auth-label {
    font-weight: 800;
    font-size: .83rem;
    color: #495057;
}

.auth-input {
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: .5rem .75rem;
    outline: none;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}

.auth-input:focus {
    border-color: #1a6fc4;
    box-shadow: 0 0 0 3px rgba(26,111,196,.12);
}

.auth-textarea {
    resize: vertical;
    min-height: 70px;
}

.auth-error {
    font-size: .75rem;
    font-weight: 700;
    color: #e74c3c;
}

.auth-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

/* ── Remember me ────────────────────────────────────────────── */
.auth-remember { margin-bottom: 1rem; }

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    font-weight: 700;
    color: #495057;
    cursor: pointer;
}

/* ── Buttons ────────────────────────────────────────────────── */
.auth-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    padding: .65rem 2rem;
    cursor: pointer;
    width: 100%;
    transition: transform .12s, box-shadow .12s;
    display: block;
    text-align: center;
}

.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }

.auth-btn-primary {
    background: linear-gradient(135deg, #1a6fc4, #1a9650);
    color: #fff;
}

.auth-btn-teacher {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
}

/* ── Links ──────────────────────────────────────────────────── */
.auth-links {
    margin-top: .75rem;
    text-align: center;
    font-size: .82rem;
    font-weight: 700;
}

.auth-links a {
    color: #1a6fc4;
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

/* ── Section title ──────────────────────────────────────────── */
.auth-section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    color: #495057;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-section-hint {
    font-family: 'Nunito', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    color: #adb5bd;
}

/* ── Teacher request intro box ──────────────────────────────── */
.teacher-request-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0f4f8;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    font-size: .85rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.5;
}

.tr-icon { font-size: 2rem; flex-shrink: 0; }

/* ── Dynamic class rows ─────────────────────────────────────── */
.class-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: .6rem;
    background: #f8f9fa;
    border-radius: 10px;
    padding: .75rem;
}

.flex1 { flex: 1; min-width: 0; }
.w120  { width: 130px; flex-shrink: 0; }

.remove-class-btn {
    font-family: 'Nunito', sans-serif;
    font-size: .8rem;
    font-weight: 900;
    background: #fff;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s;
}

.remove-class-btn:hover { background: #e74c3c; color: #fff; }

.add-class-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .85rem;
    background: #fff;
    border: 2px solid #1a6fc4;
    color: #1a6fc4;
    border-radius: 50px;
    padding: .4rem 1.25rem;
    cursor: pointer;
    transition: background .12s, color .12s;
    margin-bottom: .5rem;
}

.add-class-btn:hover { background: #1a6fc4; color: #fff; }

/* ── Success notice ─────────────────────────────────────────── */
.auth-success {
    background: #e8f5ee;
    border: 2px solid #1a9650;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    font-weight: 700;
    color: #1a6650;
    margin-bottom: 1rem;
}
