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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container { width: 100%; max-width: 400px; }

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.login-header h1 { font-size: 1.3rem; margin-bottom: 5px; }
.login-header p { opacity: 0.9; font-size: 0.9rem; }

.login-body { padding: 30px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.info-message {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
}

.login-footer {
    text-align: center;
    padding: 20px 30px 30px;
    border-top: 1px solid #f3f4f6;
}

.login-footer p { font-size: 12px; color: #9ca3af; }

.input-icon { position: relative; }
.input-icon input { padding-left: 48px; }
.input-icon .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #2d5a87;
    text-decoration: none;
    font-size: 14px;
}

.forgot-link:hover { text-decoration: underline; }

.back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover { color: #374151; }

@media (max-width: 480px) {
    .login-body { padding: 30px 20px; }
    .login-header { padding: 25px 20px; }
}

.btn-login.loading { pointer-events: none; opacity: 0.8; }

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
