:root {
    /* Primary Colors */
    --color-primary: #2F1C6A;
    --color-primary-hover: #5830CE;
    --color-secondary: #673DE6;
    
    /* Backgrounds */
    --bg-main: #FFFFFF;
    --bg-page: #F3F2EE;
    --bg-section: #FAFAFA;
    
    /* Text */
    --text-primary: #2F1C6A;
    --text-secondary: #673DE6;
    --text-body: #4A4A4A;
    --text-muted: #8A8A8A;
    --text-white: #FFFFFF;
    
    /* Borders */
    --border-light: #E8E7E3;
    --border-medium: #D4D3CF;
    --border-dark: rgba(47, 28, 106, 0.2);
    --border-focus: #673DE6;
    
    /* Status Colors */
    --color-success: #2E7D32;
    --color-warning: #ED6C02;
    --color-error: #D32F2F;
    --color-info: #0288D1;
    
    /* Status Backgrounds */
    --bg-success: rgba(46, 125, 50, 0.1);
    --bg-warning: rgba(237, 108, 2, 0.1);
    --bg-error: rgba(211, 47, 47, 0.1);
    --bg-info: rgba(2, 136, 209, 0.1);
    
    /* Shadows */
    --shadow-small: 0 2px 4px rgba(47, 28, 106, 0.05);
    --shadow-medium: 0 4px 12px rgba(47, 28, 106, 0.08);
    --shadow-large: 0 8px 24px rgba(47, 28, 106, 0.12);
    
    /* Border Radius */
    --radius-small: 4px;
    --radius-medium: 8px;
    --radius-large: 12px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Arial, sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Fixed size auth card for all pages */
.auth-card {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 440px;
    min-height: 580px;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
}

.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    max-height: 48px;
    max-width: 180px;
}

h1.brand-name {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
}

h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--color-error);
}

.input-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-medium);
    font-size: 16px;
    color: var(--text-body);
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(103, 61, 230, 0.1);
}

.form-input.error {
    border-color: var(--color-error);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
    font-size: 18px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group label {
    color: var(--text-body);
    font-size: 14px;
    cursor: pointer;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 28, 106, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-secondary);
    color: var(--text-white);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-medium);
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.alert-success {
    background: var(--bg-success);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    border-left-width: 4px;
}

.alert-error {
    background: var(--bg-error);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    border-left-width: 4px;
}

.alert-info {
    background: var(--bg-info);
    color: var(--color-info);
    border: 1px solid var(--color-info);
    border-left-width: 4px;
}

.alert-warning {
    background: var(--bg-warning);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
    border-left-width: 4px;
}

/* Professional link layouts */
.form-footer {
    margin-top: auto;
    padding-top: 32px;
}

/* Option 1: Single line with separator */
.auth-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.auth-links a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-links a:hover {
    color: var(--color-primary-hover);
}

.link-separator {
    color: var(--text-muted);
    margin: 0 16px;
    font-size: 14px;
}

/* Option 2: Forgot password as separate link */
.forgot-link {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-link a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

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

/* Option 3: Secondary button for registration */
.auth-actions {
    margin-top: 16px;
}

.divider-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 20px 0;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border-light);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* Mobile responsiveness */
@media (max-width: 480px) {
    .auth-card {
        min-height: auto;
        padding: 32px 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
