/* ============================================================
   AUTH PAGES — Premium styling for login & signup
   Covers: student-login, student-signup, lecturer-login, lecturer-signup
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset & base ───────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Page shell ──────────────────────────────────────────────── */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #f0fdf4 100%);
}

/* ── Two-column layout wrapper ───────────────────────────────── */
.auth-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── LEFT PANEL (decorative) ─────────────────────────────────── */
.auth-left-panel {
    background: linear-gradient(160deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

.auth-left-panel::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

.auth-left-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -80px;
    right: -80px;
}

.auth-left-panel .auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    z-index: 1;
}

.auth-left-panel .auth-brand img {
    height: 42px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.auth-left-panel .auth-brand span {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-left-panel .auth-panel-text {
    z-index: 1;
    text-align: center;
}

.auth-left-panel .auth-panel-text h1 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.auth-left-panel .auth-panel-text p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 340px;
}

/* Info notice */
.auth-left-panel .auth-notice {
    z-index: 1;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 340px;
}

.auth-left-panel .auth-notice i {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.auth-left-panel .auth-notice p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    line-height: 1.6;
}

.auth-left-panel .auth-notice span.highlight {
    color: #fff;
    font-weight: 700;
}

/* Feature bullets */
.auth-features {
    z-index: 1;
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 340px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
}

.auth-feature-item .auth-feature-icon {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: #fff;
}

/* ── RIGHT PANEL (form) ──────────────────────────────────────── */
.auth-right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    overflow-y: auto;
}

.auth-form-card {
    width: 100%;
    max-width: 500px;
}

.auth-form-card .auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e1b4b;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    text-transform: capitalize;
}

.auth-form-card .auth-form-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Role badge */
.auth-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-role-badge.student-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.auth-role-badge.lecturer-badge {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Form rows ───────────────────────────────────────────────── */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.auth-form-row.single {
    grid-template-columns: 1fr;
}

.auth-form-row.triple {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ── Field group ─────────────────────────────────────────────── */
.auth-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-field label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-field input,
.auth-field select {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Inter', sans-serif;
    appearance: none;
    -webkit-appearance: none;
}

.auth-field input::placeholder {
    color: #94a3b8;
    font-size: 0.88rem;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fafbff;
}

.auth-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 38px;
    cursor: pointer;
}

/* Email domain hint */
.auth-email-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 0.73rem;
    color: #6366f1;
    font-weight: 600;
}

.auth-email-hint i {
    font-size: 0.7rem;
}

/* Multi-select (courses) */
.auth-field select[multiple] {
    height: auto;
    min-height: 90px;
    padding: 8px 12px;
    background-image: none;
}

.auth-field select[multiple] option:checked {
    background: #6366f1;
    color: #fff;
}

/* ── Submit button ───────────────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    margin-top: 24px;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn.student-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.auth-submit-btn.student-btn:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.auth-submit-btn.lecturer-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.auth-submit-btn.lecturer-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Loading pulse overlay */
.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-submit-btn:active::after {
    opacity: 1;
}

/* ── Footer link ─────────────────────────────────────────────── */
.auth-footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

.auth-footer-link a {
    font-weight: 700;
    text-decoration: none;
    margin: 0 4px;
}

.auth-footer-link a.student-link {
    color: #4f46e5;
}

.auth-footer-link a.lecturer-link {
    color: #dc2626;
}

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

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-page-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left-panel {
        padding: 40px 24px;
        min-height: auto;
    }

    .auth-left-panel .auth-panel-text h1 {
        font-size: 1.6rem;
    }

    .auth-features {
        display: none;
    }

    .auth-right-panel {
        padding: 36px 20px;
    }
}

@media (max-width: 600px) {

    .auth-form-row,
    .auth-form-row.triple {
        grid-template-columns: 1fr;
    }
}