/* ════════════════════════════════════════════════════════════════
   HazırBetoncu – Auth Pages Styles
   Kırmızı + Füme Palette | Single Dark Theme
   ════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* Brand — Kırmızı Vurgu */
    --primary: #D62F36;
    --primary-dark: #C0242A;
    --primary-light: #E84850;
    --primary-glow: rgba(214, 47, 54, 0.22);
    --primary-subtle: rgba(214, 47, 54, 0.08);

    /* Füme Zeminler */
    --bg-body: #141416;
    --bg-card: #1F1F23;
    --bg-input: #2A2A30;
    --bg-input-focus: #38383F;

    /* Metinler */
    --text-primary: #E2DFE8;
    --text-secondary: #B0ADB8;
    --text-tertiary: #6B6B75;
    --text-inverse: #141416;

    /* Border */
    --border: #38383F;
    --border-focus: var(--primary);
    --border-error: #ef4444;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography & Transitions */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg-body); color: var(--text-primary); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ── Auth Wrapper ──────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Brand Panel (Left) ────────────────────────────────────── */
.auth-brand-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 40%;
    height: 100vh;
    background: linear-gradient(145deg, #1F1F23 0%, #141416 50%, #0E0E10 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

/* When has inline background-image, brand-pattern acts as dark overlay */
.auth-brand-panel[style*="background-image"] .brand-pattern {
    background: linear-gradient(
        180deg,
        rgba(20, 20, 22, 0.75) 0%,
        rgba(20, 20, 22, 0.50) 30%,
        rgba(20, 20, 22, 0.60) 70%,
        rgba(20, 20, 22, 0.85) 100%
    ) !important;
    opacity: 1 !important;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 420px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.brand-logo-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.brand-text em {
    font-style: normal;
    color: var(--primary);
}

.brand-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.brand-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 40px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary-glow);
    flex-shrink: 0;
}

/* Background pattern */
.brand-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.04;
    background-image:
        radial-gradient(circle at 20% 80%, var(--primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--primary-light) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 80px);
}

/* ── Form Panel (Right) ───────────────────────────────────── */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 40%;
    background: var(--bg-body);
    overflow-y: auto;
}

.auth-form-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 40px;
}

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

.auth-form-footer p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.auth-payment-band {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 14px;
}

.auth-payment-band img {
    height: 22px;
    width: auto;
    opacity: 0.45;
    transition: opacity 0.3s ease;
    filter: grayscale(30%);
}

.auth-payment-band:hover img {
    opacity: 0.75;
    filter: grayscale(0%);
}

/* ── Form Card ─────────────────────────────────────────────── */
.form-card {
    width: 100%;
    max-width: 620px;
}

.form-card.wide {
    max-width: 680px;
}

.form-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.form-card .form-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ── Form Groups ───────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    cursor: pointer;
    pointer-events: all;
    background: none;
    border: none;
    padding: 0;
    z-index: 2;
}

.input-wrapper .toggle-password:hover {
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control.no-icon {
    padding-left: 14px;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

select.form-control {
    padding-left: 42px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B75' d='M6 8.825a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 0 1 .708-.707L6 7.618l3.646-3.646a.5.5 0 0 1 .708.707l-4 4A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    cursor: pointer;
}

textarea.form-control {
    padding-left: 14px;
    min-height: 80px;
    resize: vertical;
}

.form-error {
    font-size: 0.75rem;
    color: var(--border-error);
    margin-top: 4px;
    display: none;
}

.form-group.has-error .form-control {
    border-color: var(--border-error);
}

.form-group.has-error .form-error {
    display: block;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ── Checkbox / Terms ──────────────────────────────────────── */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.form-check label a {
    color: var(--primary);
    font-weight: 600;
}

.form-check label a:hover {
    text-decoration: underline;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

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

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

.btn-primary .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-primary.loading .spinner { display: block; }
.btn-primary.loading .btn-text { display: none; }

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

/* ── Divider ───────────────────────────────────────────────── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

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

.form-divider span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ── Links ─────────────────────────────────────────────────── */
.form-links {
    text-align: center;
    margin-top: 24px;
}

.form-links p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-links a {
    color: var(--primary);
    font-weight: 600;
}

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

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 24px;
    margin-top: -12px;
}

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

/* ── Section Divider (in forms) ────────────────────────────── */
.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 8px;
    margin-bottom: 20px;
    margin-top: 8px;
    border-bottom: 2px solid var(--primary-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Steps Indicator ───────────────────────────────────────── */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.step-dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    width: 28px;
    border-radius: 5px;
}

.step-dot.completed {
    background: var(--primary);
}

/* ── Alert Messages ────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .auth-brand-panel {
        width: 35%;
        padding: 40px;
    }
    .auth-form-panel {
        margin-left: 35%;
    }
    .brand-hero h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }
    .auth-brand-panel {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 40px 24px;
    }
    .auth-form-panel {
        margin-left: 0;
    }
    .brand-hero h1 {
        font-size: 1.5rem;
    }
    .brand-features {
        display: none;
    }
    .auth-form-container {
        padding: 20px 20px 40px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-card {
        max-width: 100%;
    }
}
