:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --accent-color: #4cc9f0;
    --light-bg: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    margin: 0;
    color: var(--text-dark);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,50 Q25,40 50,50 T100,50" stroke="rgba(67, 97, 238, 0.05)" fill="none" stroke-width="2"/><path d="M0,70 Q25,60 50,70 T100,70" stroke="rgba(114, 9, 183, 0.05)" fill="none" stroke-width="2"/><path d="M0,30 Q25,20 50,30 T100,30" stroke="rgba(76, 201, 240, 0.05)" fill="none" stroke-width="2"/></svg>');
    z-index: -1;
}

.centered-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.centered-auth-box {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2.5rem 3rem;
    width: 100%;
    max-width: 450px;
    margin: 1rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.centered-auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-width: 80px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.auth-header h2 {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-control {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    height: auto;
    color: var(--text-dark);
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.8rem;
    color: var(--text-light);
    font-size: 1rem;
    z-index: 10;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.8rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    z-index: 10;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 0.5rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
}

@media (max-width: 576px) {
    .centered-auth-box {
        padding: 2rem 1.5rem 2.5rem;
        margin: 0.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-primary.loading .loading-spinner {
    display: inline-block;
}

.brand-text {
    color: var(--primary-color);
    font-weight: 700;
}