/**
 * SaaS Platform - Auth Styles
 * Login, Register, Forgot Password pages
 *
 * @requires theme.css
 * @version 1.0.0
 * @since 2026-01-21
 */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --auth-primary: var(--color-primary, #1E3A5F);
    --auth-primary-dark: var(--color-primary-dark, #152A45);
    --auth-accent: var(--color-accent, #3B82F6);
    --auth-accent-light: var(--color-accent-light, #60A5FA);
}

/* ============================================
   BASE LAYOUT - Split Screen
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFFFFF;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   LEFT PANEL - Branding
   ============================================ */
.auth-brand {
    flex: 0 0 45%;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    overflow: hidden;
}

/* Animated Background Pattern */
.auth-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Grid Pattern Overlay */
.auth-brand::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

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

.auth-brand-logo {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-brand-logo i {
    font-size: 48px;
    color: #fff;
}

.auth-brand-logo img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

/* Features List */
.auth-features {
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature:last-child {
    border-bottom: none;
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-feature-icon i {
    font-size: 1.1rem;
    color: var(--auth-accent-light);
}

.auth-feature-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.auth-feature-text p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* ============================================
   RIGHT PANEL - Form
   ============================================ */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: #f8fafc;
    position: relative;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Header */
.auth-form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-form-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.auth-form-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
    margin-bottom: 0.35rem;
}

.auth-form-header p {
    color: var(--gray-500, #6B7280);
    font-size: 0.85rem;
    margin: 0;
}

/* Form Styling */
.auth-form {
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600, #4B5563);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    color: var(--gray-900, #111827);
    background: #fff;
    border: 1.5px solid var(--gray-200, #E5E7EB);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400, #9CA3AF);
}

.form-control.is-invalid {
    border-color: var(--color-danger, #EF4444);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
    color: var(--color-danger, #EF4444);
    font-size: 0.8rem;
    margin-top: 0.375rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400, #9CA3AF);
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.form-control.has-icon {
    padding-left: 2.75rem;
}

.form-control.has-toggle {
    padding-right: 3rem;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400, #9CA3AF);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.password-toggle:hover {
    color: var(--gray-600, #4B5563);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid var(--gray-300, #D1D5DB);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--auth-accent);
    border-color: var(--auth-accent);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--gray-600, #4B5563);
    cursor: pointer;
}

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

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

/* Submit Button */
.btn-auth {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--auth-accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}

.btn-auth:hover {
    background: var(--auth-accent-light);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-auth:active {
    transform: translateY(0);
    box-shadow: none;
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-400, #9CA3AF);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200, #E5E7EB);
}

/* Footer */
.auth-form-footer {
    text-align: center;
    color: var(--gray-500, #6B7280);
    font-size: 0.875rem;
}

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

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

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.1rem;
    margin-top: 1px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #B91C1C;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .auth-brand {
        flex: 0 0 40%;
    }

    .auth-brand-title {
        font-size: 1.75rem;
    }

    .auth-features {
        display: none;
    }
}

@media (max-width: 767px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-brand {
        flex: none;
        min-height: 200px;
        padding: 2rem;
    }

    .auth-brand-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

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

    .auth-brand-title {
        font-size: 1.5rem;
    }

    .auth-brand-subtitle {
        font-size: 0.95rem;
        margin-bottom: 0;
    }

    .auth-form-panel {
        padding: 1.5rem 1rem;
    }

    .auth-form-container {
        padding: 1.75rem;
        border-radius: 16px;
    }
}

/* ============================================
   SPINNER
   ============================================ */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Kullanıcı sistem tercihine göre aktif olur */
    /* Şimdilik light mode varsayılan */
}
