:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --error-color: #dc2626;
    --success-color: #16a34a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #dbe4f3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.auth-logo {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
}

.auth-body {
    padding: 40px 30px;
}

.auth-welcome {
    text-align: center;
    margin-bottom: 30px;
}

.auth-welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.auth-welcome p {
    color: var(--text-color);
    opacity: 0.8;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-control-wrapper {
    position: relative;
}

.form-control-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.5;
    font-size: 1.1rem;
}

.form-control-custom {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-color);
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.form-control-custom::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth i {
    font-size: 1.1rem;
}

.auth-links {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auth-link {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-link i {
    margin-right: 5px;
}

.auth-footer {
    background: var(--light-color);
    padding: 20px 30px;
    text-align: center;
}

.auth-footer p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert-custom {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: var(--error-color);
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: var(--success-color);
}

.alert-custom i {
    font-size: 1.3rem;
}

.alert-custom .alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.alert-close:hover {
    opacity: 1;
}

.back-to-home {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(53 115 223);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-to-home:hover {
    background: rgba(10, 127, 243, 0.87);
    transform: translateX(-5px);
    color: white;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 15px;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Loading state */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-body {
        padding: 30px 20px;
    }
    
    .auth-footer {
        padding: 20px;
    }
    
    .back-to-home {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }
}