:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --success: #059669;
    --error: #dc2626;
    --text: #1e293b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 40px 30px 35px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: #ffffff;
    border-radius: 50% 50% 0 0;
}

.login-header h1 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-body { padding: 15px 35px 35px; }

/* Logo positioned beautifully in the white area */
.form-logo {
    height: 85px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
}

.welcome-text { text-align: center; margin-bottom: 25px; }
.welcome-text h2 { color: var(--text); font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.welcome-text p { color: #64748b; font-size: 0.9rem; }

.form-group { margin-bottom: 20px; position: relative; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: #475569; margin-bottom: 8px;
}

.input-wrapper { position: relative; }
.input-wrapper i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: #94a3b8;
    font-size: 16px; transition: color 0.2s;
}

.form-group input {
    width: 100%; padding: 14px 14px 14px 44px;
    border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 15px; color: var(--text);
    transition: all 0.2s; background: #f8fafc;
}
.form-group input:focus {
    outline: none; border-color: var(--primary);
    background: #ffffff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.form-group input:focus + i, .form-group input:focus ~ i { color: var(--primary); }

.login-btn {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #ffffff; border: none; border-radius: 12px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    transition: all 0.3s; margin-top: 10px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-btn:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
}
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.create-account-prompt {
    text-align: center; margin-top: 16px; font-size: 0.9rem; color: #64748b;
}
.create-account-prompt a {
    color: var(--primary); font-weight: 600; text-decoration: none;
}
.create-account-prompt a:hover { text-decoration: underline; }

.login-msg {
    text-align: center; margin-top: 15px; padding: 12px;
    border-radius: 10px; font-size: 0.9rem; font-weight: 600; display: none;
}
.login-msg.err { display: block; background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.login-msg.ok { display: block; background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }

.login-footer { text-align: center; padding: 0 35px 30px; }

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

.contact-info {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 16px;
}
.contact-info .academy-name { font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; margin-bottom: 8px; }
.contact-row { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 0.85rem; margin-top: 6px; }
.contact-row i { color: var(--primary); width: 18px; text-align: center; }
.contact-row a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
.contact-row a:hover { color: var(--primary-dark); text-decoration: underline; }
.contact-row span { text-align: left; line-height: 1.4; }

.spinner-small {
    display: inline-block; width: 18px; height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .login-body { padding: 15px 25px 30px; }
    .login-footer { padding: 0 25px 25px; }
    .login-header { padding: 30px 20px; }
    .login-header h1 { font-size: 1.5rem; }
}