/* Authentication Pages */
:root {
    /* Apple-inspired Color Palette */
    --system-blue: #007AFF;
    --system-green: #34C759;
    --system-red: #FF3B30;
    --system-orange: #FF9500;
    --system-gray: #8E8E93;
    --system-gray2: #AEAEB2;
    --system-gray3: #C7C7CC;
    --system-gray4: #D1D1D6;
    --system-gray5: #E5E5EA;
    --system-gray6: #F2F2F7;
    
    /* Typography */
    --font-sf: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    margin-top: 60px;
    margin-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--system-blue);
}

.auth-logo i {
    font-size: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--system-gray);
    margin: 0;
}

/* Form Styles */
.auth-form {
    margin-bottom: 32px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #1D1D1F;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--system-gray4);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-sf);
    background: white;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--system-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--system-gray);
    font-size: 16px;
}

.input-with-icon .form-input {
    padding-left: 48px;
}

.password-toggle {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--system-gray);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.password-toggle:hover {
    color: #1D1D1F;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font-sf);
}

.btn-primary {
    background: var(--system-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--system-gray);
    user-select: none;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--system-gray4);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox input:checked ~ .checkmark {
    background: var(--system-blue);
    border-color: var(--system-blue);
}

.checkbox input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.text-link {
    color: var(--system-blue);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.text-link:hover {
    opacity: 0.8;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: var(--system-gray3);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--system-gray5);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 14px;
}

/* Footer */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--system-gray);
    margin-bottom: 16px;
}

.auth-terms {
    font-size: 12px;
    color: var(--system-gray2);
    line-height: 1.4;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.strength-meter {
    flex: 1;
    height: 4px;
    background: var(--system-gray5);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: var(--system-red);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--system-red);
}

/* Password Hints */
.password-hints {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 4px;
}

.password-hints li {
    font-size: 12px;
    color: var(--system-gray);
    display: flex;
    align-items: center;
}

.password-hints li::before {
    content: '•';
    margin-right: 6px;
}

/* Password Match */
.password-match {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--system-green);
}

.password-match i {
    font-size: 10px;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.flash-message {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--system-blue);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    border-left-color: var(--system-green);
}

.flash-error {
    border-left-color: var(--system-red);
}

.flash-info {
    border-left-color: var(--system-blue);
}

.flash-text {
    flex: 1;
    font-size: 14px;
    color: #1D1D1F;
}

.flash-close {
    background: none;
    border: none;
    color: var(--system-gray);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    margin-left: 12px;
}

.flash-close:hover {
    color: #1D1D1F;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .auth-logo h1 {
        font-size: 24px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
    
    .auth-content {
        padding: 16px;
    }
}