/* ============================================
   THELINKS KENYA - AUTHENTICATION STYLES
   Classic Royal Crimson: #C2185B
   ============================================ */

:root {
    --primary: #C2185B;
    --primary-dark: #880E4F;
    --primary-light: #FCE4EC;
    --primary-gradient: linear-gradient(135deg, #C2185B 0%, #880E4F 100%);
    --secondary: #1a1a1a;
    --success: #2E7D32;
    --error: #D32F2F;
    --warning: #F57C00;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #eaeaea;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--white);
    overflow: hidden;
}

/* Left Side - Brand */
.auth-left {
    flex: 1;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.brand-logo p {
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 2px;
}

.brand-message {
    margin: 4rem 0 3rem;
}

.brand-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-message p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.feature i {
    font-size: 1.1rem;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Right Side - Auth Card */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
}

.auth-card {
    max-width: 480px;
    width: 100%;
}

/* Mobile Header */
.mobile-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.mobile-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-light);
    padding: 0.3rem;
    border-radius: 60px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: transparent;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tab-btn i {
    font-size: 0.9rem;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.form-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-btn.google {
    color: #DB4437;
}

.social-btn.google:hover {
    border-color: #DB4437;
    background: #FFF5F5;
}

.social-btn.facebook {
    color: #4267B2;
}

.social-btn.facebook:hover {
    border-color: #4267B2;
    background: #F0F2FF;
}

.social-btn span {
    font-size: 0.85rem;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 50px);
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--white);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Row Inputs (First/Last Name) */
.row-inputs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group.half {
    flex: 1;
    margin-bottom: 0;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.3s;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194,24,91,0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 1.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 10px;
}

.checkbox-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-loader {
    display: none;
}

.auth-btn.loading .btn-text {
    display: none;
}

.auth-btn.loading .btn-loader {
    display: inline-block;
}

/* Back to Login */
.back-to-login {
    text-align: center;
    margin-top: 1.5rem;
}

.back-to-login a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.back-to-login a:hover {
    color: var(--primary);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: var(--white);
    font-weight: 500;
    font-size: 0.85rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.info {
    background: var(--primary);
}

/* Field Error */
.field-error {
    color: var(--error);
    font-size: 0.7rem;
    margin-top: 0.3rem;
    margin-left: 0.5rem;
}

/* Desktop Only */
.desktop-only {
    display: flex;
}

/* Mobile Only */
.mobile-only {
    display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .auth-container {
        flex-direction: column;
    }
    
    .auth-right {
        align-items: flex-start;
        padding: 1.5rem;
        min-height: 100vh;
    }
    
    .auth-card {
        max-width: 100%;
    }
    
    .auth-tabs {
        margin-bottom: 1.5rem;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-btn i {
        font-size: 1.2rem;
    }
    
    .social-btn span {
        display: none;
    }
    
    .social-btn {
        padding: 0.8rem;
    }
    
    .social-btn i {
        font-size: 1.2rem;
    }
    
    .row-inputs {
        flex-direction: column;
        gap: 0;
    }
    
    .input-group.half {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .checkbox-text {
        font-size: 0.7rem;
    }
    
    .toast {
        white-space: normal;
        text-align: center;
        max-width: 90%;
        font-size: 0.75rem;
    }
}