/**
 * Auth Pages Styles - Snelnotuleren
 * Modern authentication pages design
 * v2.0 - Complete redesign matching dashboard aesthetic
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --auth-bg-primary: #f8fafc;
    --auth-bg-secondary: #e2e8f0;
    --auth-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    --auth-card-bg: #ffffff;
    --auth-accent: #00BBFF;
    --auth-accent-hover: #0099DD;
    --auth-accent-glow: rgba(0, 187, 255, 0.15);
    --auth-text-primary: #121826;
    --auth-text-secondary: #6B7280;
    --auth-text-muted: #9CA3AF;
    --auth-border: #E5E7EB;
    --auth-border-focus: #00BBFF;
    --auth-input-bg: #F9FAFB;
    --auth-error: #EF4444;
    --auth-success: #10B981;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.auth-page {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg-gradient);
    overflow-x: hidden;
}

/* Left side - Branding panel */
.auth-branding {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45%;
    min-width: 400px;
    padding: 60px;
    background: var(--auth-bg-gradient);
    position: relative;
    overflow: hidden;
}

/* Pattern overlay */
.auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Animated gradient orbs */
.auth-branding::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 187, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.auth-branding-logo {
    height: 28px;
    width: auto;
    margin-bottom: 32px;
}

.auth-branding h2 {
    font-family: 'Urbanist', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #121826;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.auth-branding p {
    font-size: 1.1rem;
    color: #6B7280;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4B5563;
    font-size: 0.95rem;
}

.auth-feature-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 187, 255, 0.15);
    border-radius: 6px;
    color: var(--auth-accent);
    flex-shrink: 0;
}

.auth-feature-icon svg {
    width: 14px;
    height: 14px;
}

/* Right side - Form panel */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    background: var(--auth-card-bg);
    min-height: 100vh;
}

/* ============================================
   AUTH CARD
   ============================================ */
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 0;
}

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

.auth-mobile-logo {
    height: 22px;
    width: auto;
    margin-bottom: 24px;
}

.auth-card-header h1 {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 8px 0;
}

.auth-card-header p {
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
    margin: 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-primary);
}

.auth-form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--auth-text-primary);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.auth-form-input:hover {
    border-color: #D1D5DB;
}

.auth-form-input:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--auth-accent-glow);
}

.auth-form-input::placeholder {
    color: var(--auth-text-muted);
}

/* Select styling */
.auth-form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--auth-text-primary);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 44px;
}

.auth-form-select:hover {
    border-color: #D1D5DB;
}

.auth-form-select:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--auth-accent-glow);
}

/* Checkbox styling */
.auth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-form-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: var(--auth-text-secondary);
    line-height: 1.5;
}

.auth-checkbox-label a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-checkbox-label a:hover {
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.auth-btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-hover) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-top: 8px;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--auth-accent-glow);
}

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

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   DIVIDER
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider-text {
    font-size: 0.85rem;
    color: var(--auth-text-muted);
    white-space: nowrap;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */
.auth-btn-google {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    background: #ffffff;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-btn-google:hover {
    background: var(--auth-input-bg);
    border-color: #D1D5DB;
}

.auth-btn-google img {
    width: 20px;
    height: 20px;
}

/* ============================================
   LINKS & FOOTER
   ============================================ */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.auth-link {
    font-size: 0.875rem;
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--auth-text-secondary);
    margin: 0;
}

.auth-footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   HELPER TEXT & NOTICES
   ============================================ */
.auth-helper-text {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-top: 4px;
    display: block;
}

.auth-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 187, 255, 0.08);
    border: 1px solid rgba(0, 187, 255, 0.2);
    border-radius: 10px;
    margin-top: 8px;
}

.auth-notice-icon {
    width: 18px;
    height: 18px;
    color: var(--auth-accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-notice-text {
    font-size: 0.8rem;
    color: var(--auth-text-secondary);
    line-height: 1.5;
}

/* ============================================
   BUSINESS FIELDS SECTION
   ============================================ */
.auth-business-section {
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}

.auth-business-section .auth-form-group {
    margin-bottom: 16px;
}

.auth-business-section .auth-form-group:last-child {
    margin-bottom: 0;
}

.auth-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--auth-border);
}

/* Signature pad container */
.auth-signature-container {
    margin-top: 16px;
}

.auth-signature-pad {
    width: 100%;
    height: 150px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #ffffff;
    cursor: crosshair;
}

.auth-signature-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.auth-btn-secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
    background: #ffffff;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-btn-secondary:hover {
    background: var(--auth-input-bg);
    border-color: #D1D5DB;
}

/* ============================================
   PASSWORD STRENGTH (optional enhancement)
   ============================================ */
.auth-password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.auth-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.auth-strength-bar.weak { background: var(--auth-error); }
.auth-strength-bar.medium { background: #F59E0B; }
.auth-strength-bar.strong { background: var(--auth-success); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large screens - show branding panel */
@media (min-width: 1024px) {
    .auth-branding {
        display: flex;
    }

    .auth-mobile-logo {
        display: none;
    }

    .auth-form-panel {
        border-radius: 0;
    }
}

/* Medium screens */
@media (max-width: 1023px) {
    .auth-page {
        background: var(--auth-card-bg);
    }

    .auth-form-panel {
        padding: 32px 20px;
        min-height: 100vh;
    }

    .auth-card {
        max-width: 400px;
    }

    .auth-mobile-logo {
        display: block;
    }
}

/* Small screens */
@media (max-width: 640px) {
    .auth-form-panel {
        padding: 24px 16px;
    }

    .auth-card {
        max-width: 100%;
    }

    .auth-card-header h1 {
        font-size: 1.5rem;
    }

    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .auth-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .auth-btn-primary {
        padding: 12px 20px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .auth-form-panel {
        padding: 20px 12px;
    }

    .auth-card-header {
        margin-bottom: 24px;
    }

    .auth-form {
        gap: 16px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: fadeIn 0.4s ease-out;
}

/* Loading state for buttons */
.auth-btn-primary.loading {
    position: relative;
    color: transparent;
}

.auth-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

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