/* ===================================
   Login Pages - Clean Professional
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
}
a { text-decoration: none; color: #4f46e5; }
a:hover { color: #4338ca; }

.login-page {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 500;
}
.back-link:hover { color: #1e293b; }
.back-link svg { width: 16px; height: 16px; }

.login-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    width: 500px;
}
.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}
.login-icon.teacher { background: #eef2ff; }
.login-icon.student { background: #f0fdf4; }
.login-icon.admin { background: #fee2e2; color: #ef4444; }
.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.login-header p {
    font-size: 14px;
    color: #94a3b8;
}

.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 42px; }
.toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.toggle-pass:hover { color: #64748b; }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}
.form-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    cursor: pointer;
}
.form-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #4f46e5;
}
.form-row a { color: #4f46e5; font-weight: 500; }

.login-btn {
    width: 100%;
    padding: 12px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-btn:hover { background: #4338ca; }
.login-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.login-btn .loader {
    display: none;
}
.login-btn.loading .btn-text { display: none; }
.login-btn.loading .loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.login-btn.loading .loader span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: dotBounce 1.2s infinite;
}
.login-btn.loading .loader span:nth-child(2) { animation-delay: 0.15s; }
.login-btn.loading .loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.switch-text {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}
.switch-text a { font-weight: 600; }

.demo-box {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
}
.demo-box strong {
    display: block;
    color: #4f46e5;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.demo-box code {
    background: #eef2ff;
    color: #4f46e5;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

@media (max-width: 480px) {
    .login-card { padding: 28px 20px; }
    .form-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
