/* ============================================================================
   Modern Minimalistic Authentication Styles
   ============================================================================ */

:root {
    --auth-primary: #6366f1;
    --auth-primary-dark: #4f46e5;
    --auth-bg: #fafafa;
    --auth-card-bg: #ffffff;
    --auth-text: #18181b;
    --auth-text-light: #71717a;
    --auth-border: #e4e4e7;
    --auth-input-bg: #ffffff;
    --auth-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --auth-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-card {
    background: var(--auth-card-bg);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: cardFadeIn 0.5s ease-out;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.auth-header h1 strong {
    font-weight: 600;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--auth-text-light);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
}

.auth-form {
    padding: 0.5rem 2rem 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--auth-text);
    letter-spacing: -0.01em;
}

.form-group label .material-icons {
    font-size: 18px;
    color: var(--auth-text-light);
    transition: var(--auth-transition);
}

.form-group:focus-within label .material-icons {
    color: var(--auth-primary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    border-radius: 16px;
    transition: var(--auth-transition);
    outline: none;
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.form-control::placeholder {
    color: #a1a1aa;
    font-weight: 300;
    font-size: 0.875rem;
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.form-error {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #ef4444;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--auth-text-light);
    padding: 0.25rem;
    border-radius: 8px;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--auth-primary);
    background: rgba(99, 102, 241, 0.04);
}

.password-toggle .material-icons {
    font-size: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--auth-text-light);
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    border-radius: 5px;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

.forgot-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--auth-transition);
    border-bottom: 1px solid transparent;
}

.forgot-link:hover {
    border-bottom-color: var(--auth-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--auth-transition);
    width: 100%;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, #4338ca 100%);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-primary .material-icons {
    font-size: 20px;
}

.auth-footer {
    padding: 1.5rem 2rem;
    background: var(--auth-bg);
    text-align: center;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    color: var(--auth-text-light);
    font-size: 0.875rem;
    font-weight: 400;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--auth-transition);
    border-bottom: 1px solid transparent;
}

.auth-footer a:hover {
    border-bottom-color: var(--auth-primary);
}

.auth-meta {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #a1a1aa;
    font-weight: 300;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        border-radius: 24px;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .auth-form {
        padding: 0.5rem 1.5rem 1.5rem;
    }
    
    .auth-footer {
        padding: 1.25rem 1.5rem;
    }
}

/* Loading state */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Alert messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
