﻿/* ========================================
   EMLAK AI ASISTAN v2 - CLEAN CORE STYLES
   ======================================== */

/* ========== CSS VARIABLES (Light Theme) ========== */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #6b7280;
    --color-secondary-hover: #4b5563;
    --color-success: #16a34a;
    --color-warning: #eab308;
    --color-danger: #dc2626;
    --color-info: #0ea5e9;
    --color-purple: #8b5cf6;
    --color-whatsapp: #25D366;

    /* Backgrounds */
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-header: #1f2937;
    --bg-code: #1e1e1e;

    /* Text */
    --text-main: #111827;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    --text-muted: #9ca3af;
    --text-code: #d4d4d4;

    /* Borders */
    --border-color: #e5e7eb;
    --border-radius: 8px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Typography */
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-mono: 'Consolas', 'Monaco', monospace;

    /* Z-Index Scale (UPDATED) */
    --z-header: 100;
    --z-fab: 200;

    --z-modal-overlay: 900;
    /* Karartma Perdesi */
    --z-modal: 1000;
    /* Pencerenin Kendisi */

    /* BÄ°LDÄ°RÄ°MLERÄ° EN ÃœSTE TAÅI (ModallarÄ± Ezmeli) */
    --z-toast: 2000;
    /* 800'den 2000'e Ã§Ä±karÄ±ldÄ± */
    --z-whatsapp: 2100;
    /* 850'den 2100'e Ã§Ä±karÄ±ldÄ± */

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* ========== EYE-CARE DARK MODE ========== */
[data-theme="dark"] {
    /* Midnight Blue Palette - Eye-Friendly */
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-header: #0f172a;
    --bg-code: #1e1e2e;

    /* Card Accent (slightly lighter) */
    --bg-card-accent: #334155;

    /* Text - Soft White (no contrast explosion) */
    --text-main: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-code: #a5b4fc;

    /* Borders */
    --border-color: #334155;

    /* Primary adjustment for dark */
    --color-primary: #3b82f6;
    --color-primary-hover: #60a5fa;
}

/* Dark Mode - Body */
[data-theme="dark"] body {
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Dark Mode - Header */
[data-theme="dark"] .header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
}

/* Dark Mode - Cards */
[data-theme="dark"] .card {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

[data-theme="dark"] .card h3 {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

/* Dark Mode - Campaign Status */
[data-theme="dark"] .campaign-status {
    background: var(--bg-card-accent);
    color: var(--text-secondary);
}

/* Dark Mode - Accordion */
[data-theme="dark"] .accordion-header {
    background: var(--bg-card-accent);
}

[data-theme="dark"] .accordion-header:hover {
    background: #3f4f66;
}

[data-theme="dark"] .accordion-item.expanded .accordion-header {
    background: #2d4a6f;
}

[data-theme="dark"] .accordion-content {
    background: var(--bg-surface);
}

[data-theme="dark"] .ai-note {
    background: #2e1f4d;
    border-left-color: var(--color-purple);
}

/* Dark Mode - Modals */
[data-theme="dark"] .modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-header h2 {
    color: var(--text-main);
}

[data-theme="dark"] .modal-close {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-close:hover {
    color: var(--text-main);
}

/* Dark Mode - Forms */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] select.form-input,
[data-theme="dark"] textarea.form-input {
    background: var(--bg-card-accent);
    border-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .form-input::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .form-group label {
    color: var(--text-secondary);
}

/* Dark Mode - JSON Viewer */
[data-theme="dark"] .json-viewer {
    background: var(--bg-code);
    color: var(--text-code);
}

/* Dark Mode - Activity List */
[data-theme="dark"] .activity-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .activity-item:hover {
    background: var(--bg-card-accent);
}

/* Dark Mode - Toast */
[data-theme="dark"] .toast {
    background: var(--bg-surface);
    color: var(--text-main);
}

/* Dark Mode - Live Call */
[data-theme="dark"] .livecall-active-panel {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
}

/* Dark Mode - Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-body);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Dark Mode - History List */
[data-theme="dark"] .history-list li {
    border-bottom-color: var(--border-color);
}

/* Dark Mode - Empty State */
[data-theme="dark"] .empty-state {
    color: var(--text-muted) !important;
}

/* ========== RESET ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-header);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    z-index: var(--z-header);
    transition: background-color 0.3s ease;
}

.header-left .logo {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.header-center .clock {
    font-size: var(--font-size-lg);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.currency-ticker {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.ticker-item .value {
    font-weight: 600;
}

.ticker-item .arrow {
    font-size: 10px;
}

.ticker-item .arrow.up {
    color: var(--color-success);
}

.ticker-item .arrow.down {
    color: var(--color-danger);
}

.status-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.status-dot.green {
    background: var(--color-success);
}

.status-dot.yellow {
    background: var(--color-warning);
}

.status-dot.red {
    background: var(--color-danger);
}

.status-dot.pulse-active {
    box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.8);
    transform: scale(1.2);
}

.icon-btn {
    font-size: 20px;
    padding: var(--spacing-xs);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== DASHBOARD LAYOUT ========== */
.dashboard {
    margin-top: 60px;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.row {
    display: grid;
    gap: var(--spacing-lg);
}

.row-1 {
    grid-template-columns: 200px 260px 1fr;
}

.row-2 {
    grid-template-columns: 1fr 1fr 1fr;
}

.row-3 {
    grid-template-columns: 1fr;
}

/* ========== CARD ========== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    /* Ensure content clip */
    display: flex;
    flex-direction: column;
}

/* Card Live Call Specific Override */
.card-livecall {
    padding: 0 !important;
}

.card-livecall .card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.card-livecall .card-header-flex h3 {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.live-timer-badge {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    padding: 4px 12px;
    border-radius: 12px;
    transition: opacity 0.3s ease;
}

.live-timer-badge.hidden {
    opacity: 0;
}

.card h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.card-header-with-action h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.btn-icon-small {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon-small:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ========== SHIFT CARD ========== */
.card-shift {
    display: flex;
    flex-direction: column;
}

.card-shift h3 {
    flex-shrink: 0;
}

.shift-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex: 1;
    /* Fill remaining space */
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: var(--transition-fast);
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

input:checked+.slider {
    background-color: var(--color-success);
}

input:checked+.slider::before {
    transform: translateX(24px);
}

.shift-status {
    font-weight: 600;
    color: var(--text-secondary);
}

.shift-status.active {
    color: var(--color-success);
}

/* ========== BALANCE CARD ========== */
.card-balance {
    display: flex;
    flex-direction: column;
}

.card-balance h3 {
    flex-shrink: 0;
}

.balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
    /* Fill remaining space */
    align-items: center;
    /* Vertical center */
    text-align: center;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: center;
}

.balance-item .label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.balance-item .value {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* ========== PERFORMANCE CARD ========== */
.card-performance {
    display: flex;
    flex-direction: column;
}

.card-performance h3 {
    flex-shrink: 0;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    flex: 1;
    /* Fill remaining space */
    align-items: center;
    /* Vertical center */
}

.perf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease;
    min-height: 60px;
    /* Ensure consistent height for centering */
}

.perf-item:hover {
    transform: translateY(-2px);
}

[data-theme="dark"] .perf-item {
    background: rgba(255, 255, 255, 0.05);
}

.perf-item .number {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
}

.perf-item .number.cost-text {
    color: #e11d48;
    /* Rose red */
}

.perf-item .number.success-text {
    color: #059669;
    /* Emerald green */
}

.perf-item .label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

/* ========== CAMPAIGN CARD ========== */
.campaign-status {
    font-size: var(--font-size-lg);
    font-weight: 700;
    text-align: center;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius);
    background: var(--bg-body);
    color: var(--text-secondary);
    transition: background-color 0.3s ease;
}

.campaign-status.active {
    background: var(--color-success);
    color: var(--text-light);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--text-light);
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-sm);
}

/* ========== CARD ========== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    /* Ensure content clip */
    display: flex;
    flex-direction: column;
}

/* Card Live Call Specific Override */
.card-livecall {
    padding: 0 !important;
}

.card-livecall h3 {
    margin: 0 !important;
    padding: var(--spacing-md);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.card h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.campaign-info {
    margin-top: var(--spacing-md);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ========== ACTIVITY CARD ========== */
.activity-list {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    animation: fadeIn 0.3s ease;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: var(--bg-body);
}

.activity-item.calendar {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
    border-left: 2px solid var(--color-primary);
    padding-left: 8px;
    margin-left: 4px;
}

.activity-item.whatsapp {
    color: var(--color-success);
    font-size: 11px;
    font-style: italic;
    border-left: 2px solid var(--color-success);
    padding-left: 8px;
    margin-left: 4px;
}

.activity-item.cleanup {
    color: var(--color-secondary);
    font-style: italic;
    background-color: #f9fafb;
}

.activity-item:last-child {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== LIVE CALL CARD ========== */
.livecall-display {
    min-height: 120px;
    height: 100%;
    flex: 1;
    /* Fill remaining vertical space */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Critical for border radius clipping */
    padding: 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.livecall-idle {
    color: var(--text-secondary);
    font-style: italic;
    z-index: 2;
}

/* Live Call Active State with Audio Visualizer */
.livecall-active-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.95) 0%, rgba(186, 230, 253, 0.95) 100%);
    /* border-radius: var(--border-radius); Removed to fit parent clip */
    animation: fadeIn 0.3s ease;
    box-sizing: border-box;
    border: none;
    margin: 0;
}

/* Main Container (Split Layout) */
.live-monitor-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    gap: 20px;
    background: transparent;
}

/* --- LEFT PANEL (Name & Audio) - CENTERED --- */
.monitor-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertical Center */
    align-items: center;
    /* Horizontal Center */
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
    text-align: center;
    /* Text Center */
}

.monitor-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center text block */
    margin-bottom: 15px;
    /* Gap before visualizer */
}

.m-name {
    font-size: 20px;
    /* Increased font size */
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 4px;
}

.m-status {
    font-size: 13px;
    color: var(--color-success);
    font-weight: 500;
    opacity: 0.9;
}

/* Audio Visualizer (Centered) */
.monitor-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* Center bars */
    gap: 5px;
    height: 28px;
}

.monitor-visualizer .audio-bar {
    width: 4px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: audioWave 1s ease-in-out infinite;
}

.monitor-visualizer .audio-bar:nth-child(1) {
    height: 10px;
    animation-delay: 0.1s;
}

.monitor-visualizer .audio-bar:nth-child(2) {
    height: 20px;
    animation-delay: 0.2s;
}

.monitor-visualizer .audio-bar:nth-child(3) {
    height: 15px;
    animation-delay: 0.3s;
}

.monitor-visualizer .audio-bar:nth-child(4) {
    height: 24px;
    animation-delay: 0.4s;
}

.monitor-visualizer .audio-bar:nth-child(5) {
    height: 12px;
    animation-delay: 0.5s;
}

/* --- RIGHT PANEL (Info Grid) --- */
.monitor-right {
    flex: 1.2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
}

.m-detail-group {
    display: flex;
    flex-direction: column;
}

.m-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.m-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-value.text-success {
    color: var(--color-success);
}

.m-value.font-mono {
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.caller-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.caller-avatar {
    width: 42px;
    height: 42px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.caller-avatar.pulse-anim {
    animation: pulseAvatar 2s infinite;
}

@keyframes pulseAvatar {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.caller-main {
    display: flex;
    flex-direction: column;
}

.caller-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.caller-status {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 500;
}

.call-timer-badge {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
}

/* Live Details Grid */
.live-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.l-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.l-detail-item:hover {
    background: var(--bg-body);
    border-color: var(--color-primary);
}

.l-icon {
    font-size: 16px;
    opacity: 0.8;
}

.l-text {
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.l-text.success {
    color: var(--color-success);
    font-weight: 700;
}

/* Live Footer (Visualizer) */
.live-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.audio-visualizer.large {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 30px;
}

.audio-visualizer.large .audio-bar {
    width: 5px;
    background: var(--color-primary);
    border-radius: 3px;
    animation: audioWave 1s ease-in-out infinite;
}

/* Animation Variations */
.audio-visualizer.large .audio-bar:nth-child(1) {
    height: 12px;
    animation-delay: 0.1s;
}

.audio-visualizer.large .audio-bar:nth-child(2) {
    height: 24px;
    animation-delay: 0.2s;
}

.audio-visualizer.large .audio-bar:nth-child(3) {
    height: 16px;
    animation-delay: 0.3s;
}

.audio-visualizer.large .audio-bar:nth-child(4) {
    height: 28px;
    animation-delay: 0.4s;
}

.audio-visualizer.large .audio-bar:nth-child(5) {
    height: 14px;
    animation-delay: 0.5s;
}

.audio-visualizer.large .audio-bar:nth-child(6) {
    height: 20px;
    animation-delay: 0.6s;
}

@keyframes audioWave {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 1;
    }

    50% {
        transform: scaleY(0.4);
        opacity: 0.7;
    }
}

/* ========== SMART ACCORDION ========== */
.accordion-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
}

.accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    transition: var(--transition-normal);
}

.accordion-item.fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.accordion-header {
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f9fafb;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background: #f3f4f6;
}

.accordion-header-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 0;
}

.id-badge {
    background: var(--text-secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.lead-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-main);
    white-space: nowrap;
}

.lead-prop {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.lead-price {
    font-weight: 600;
    color: var(--color-success);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.accordion-toggle {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-surface);
}

.accordion-body {
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.accordion-item.expanded {
    border-color: var(--color-primary);
}

.accordion-item.expanded .accordion-header {
    border-bottom-color: var(--border-color);
    background: #eff6ff;
}

.accordion-item.expanded .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-item.expanded .accordion-content {
    max-height: 350px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.ai-note {
    background: #fdf2f8;
    padding: var(--spacing-sm);
    border-radius: 4px;
    border-left: 3px solid var(--color-purple);
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.accordion-actions {
    display: flex;
    justify-content: flex-end;
}

/* ========== History List ========== */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.history-list li {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.history-list li:last-child {
    border-bottom: none;
}

.history-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-name {
    font-weight: 600;
    color: var(--text-main);
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== FAB ========== */
.fab {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--text-light);
    font-size: 28px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: var(--z-fab);
    transition: var(--transition-fast);
}

.fab:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

/* ========== MODAL SCROLL FIX (FLEXBOX LAYOUT) ========== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-overlay);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Penceresi (Kapsayıcı) */
.modal {
    background: var(--bg-surface);
    width: 500px;
    max-width: 90%;

    /* Yükseklik ve Scroll Ayarı */
    max-height: 85vh;
    /* Ekranın %85'inden büyük olamaz */
    display: flex;
    /* İçeriği esnek kutu yap */
    flex-direction: column;
    /* Alt alta diz */

    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: var(--z-modal);
    transform: scale(0.95);
    transition: var(--transition-normal), background-color 0.3s ease;
}

.modal-lg {
    max-width: 650px;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* Modal Header (Sabit) */
.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    /* Asla küçülme */
}

.modal-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-main);
}

/* Modal Body (Kaydırılabilir Alan) */
.modal-body {
    padding: 20px;
    overflow-y: auto;
    /* Sadece burası scroll olsun */
    flex: 1;
    /* Kalan tüm boşluğu doldur */

    /* Scrollbar Güzelleştirme */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--bg-body);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--color-secondary);
    border-radius: 10px;
}

/* Modal Footer (Sabit) */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    /* İçerik kayınca altta kalsın diye */
    flex-shrink: 0;
    /* Asla küçülme */
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 12px 12px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: var(--bg-surface);
    color: var(--text-main);
    transition: var(--transition-fast), background-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.form-input.error {
    border-color: var(--color-danger);
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* Pro Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* JSON Viewer */
.json-viewer {
    background: var(--bg-code);
    color: var(--text-code);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: var(--z-toast);
}

.toast {
    background: #252526;
    /* VS Code EditÃ¶r Grisi */
    color: #f8f8f2;
    /* Off-White */
    padding: 12px 16px;
    margin-bottom: var(--spacing-sm);
    border-radius: 4px;
    /* Keskin kÃ¶ÅŸeler */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #3e3e42;
    border-left: 4px solid #3794ff;
    /* Default Info Blue */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    min-width: 250px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: #4ec9b0;
    /* VS Code Teal */
}

.toast.error {
    border-left-color: #f14c4c;
    /* VS Code Red */
    background: #2d2020;
    /* Subtle Red Bg */
}

.toast.warning {
    border-left-color: #cca700;
    /* Dark Yellow */
}

/* ========== WHATSAPP TOAST ========== */
.whatsapp-toast {
    /* position: fixed; <-- REMOVED */
    /* bottom/left <-- REMOVED */
    background: var(--color-whatsapp);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    /* Stack spacing */
    opacity: 0;
    transform: translateX(100%);
    /* Enter from right */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    /* Adapt to container width */
    pointer-events: auto;
}

.whatsapp-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-icon {
    font-size: 24px;
    background: white;
    color: var(--color-whatsapp);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.whatsapp-content {
    display: flex;
    flex-direction: column;
}

.whatsapp-title {
    font-weight: 700;
    font-size: 13px;
}

.whatsapp-message {
    font-size: 12px;
    opacity: 0.9;
}

/* ========== UTILITY ========== */
.flash {
    animation: flash 0.3s ease;
}

@keyframes flash {
    0% {
        background-color: rgba(37, 99, 235, 0.3);
    }

    100% {
        background-color: transparent;
    }
}

/* ========== HISTORY CARD (ARCHIVE) ========== */
.history-card-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.history-card-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.history-checkbox {
    transform: scale(1.3);
    margin-top: 8px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.h-card-content {
    flex: 1;
}

.h-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-sm);
}

.h-lead-name {
    font-weight: 700;
    color: var(--text-main);
}

.h-badge {
    font-size: 10px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.h-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
}

.h-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.h-info-row span:last-child {
    color: var(--text-main);
    font-weight: 500;
}

.text-success {
    color: var(--color-success) !important;
    font-weight: 700 !important;
}

.h-card-footer {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-xs);
    border-top: 1px dashed var(--border-color);
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
}

/* ========== INLINE SUCCESS MSG ========== */
.inline-success {
    color: var(--color-success);
    font-weight: 600;
    font-size: 14px;
    margin-right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inline-success.show {
    opacity: 1;
}

.inline-success.error {
    color: var(--color-danger, #ef4444) !important;
    /* Force red for delete actions */
}

/* ========== LEAD MANAGER MODAL ========== */
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--bg-surface);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.lead-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-base);
}

.lead-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lead-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.lead-list-item:last-child {
    border-bottom: none;
}

.lead-list-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.lead-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lead-name-main {
    font-weight: 600;
    color: var(--text-main);
}

.lead-prop-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.list-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: var(--color-primary);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: scale(1.1);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

.modal-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
}

/* ========== LEAD CARD VIEW ========== */
.lead-card-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lead-card-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
}

.lead-card-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lead-id {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 2px 8px;
    border-radius: 4px;
}

.lead-card-header .lead-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
}

.lead-source-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.lead-card-body {
    padding: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 15px;
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.info-row span:first-child {
    font-size: 14px;
}

.info-row .link-text {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.info-row .link-text:hover {
    text-decoration: underline;
}

.lead-note {
    background: rgba(255, 193, 7, 0.08);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid rgba(255, 193, 7, 0.5);
}

.lead-note strong {
    font-style: normal;
    color: var(--text-main);
}

.lead-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-action.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
}

.btn-action.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.btn-action.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-action.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

/* =================================================================
   MOBÄ°L UYUMLULUK VE SON RÃ–TUÅLAR (RESPONSIVE & POLISH)
   ================================================================= */

/* 1. Ã–ZEL SCROLLBAR (Daha Modern GÃ¶rÃ¼nÃ¼m) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* 2. MOBÄ°L DÃœZEN (Max-Width: 768px - Tablet ve Telefon) */
@media (max-width: 768px) {

    /* Genel Layout: Paddingleri Daralt */
    .dashboard {
        padding: 15px;
        gap: 15px;
        margin-top: 100px;
        /* Header yÃ¼kseldiÄŸi iÃ§in iÃ§eriÄŸi it */
    }

    /* Grid YapÄ±sÄ±nÄ± Tek SÃ¼tuna DÃ¼ÅŸÃ¼r (Alt Alta Diz) */
    .row-1,
    .row-2,
    .row-3 {
        grid-template-columns: 1fr !important;
    }

    /* Header'Ä± Mobil Uyumlu Yap */
    .header {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 10px;
        justify-content: center;
    }

    .header-left {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: flex;
    }

    .header-center {
        display: none;
        /* Mobilde saati gizle, yer kaplamasÄ±n */
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    /* DÃ¶viz Kurunu Mobilde KaydÄ±rÄ±labilir Yap */
    .currency-ticker {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        max-width: 200px;
    }

    /* KartlarÄ±n Ä°Ã§indeki Gridleri Mobilde Tek SÃ¼tun Yap */
    .balance-grid,
    .performance-grid {
        grid-template-columns: 1fr 1fr;
        /* Mobilde 2 sÃ¼tun kalsÄ±n, Ã§ok daralmasÄ±n */
        gap: 10px;
    }

    /* Form Gridleri Tek SÃ¼tun */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* ModallarÄ± Tam Ekran Yap (Daha kolay kullanÄ±m iÃ§in) */
    /* MOBÄ°L MODAL DÃœZENLEMESÄ° (DÃœZELTÄ°LMÄ°Å VERSÄ°YON) */
    .modal {
        /* SADECE Boyut ve KaydÄ±rma AyarlarÄ± */
        width: 95%;
        /* EkranÄ± yatayda doldur */
        max-height: 90vh;
        /* Ekran boyunun %90'Ä±nÄ± geÃ§me */
        overflow-y: auto;
        /* Ä°Ã§erik sÄ±ÄŸmazsa kendi iÃ§inde kaydÄ±r */

        /* DÄ°KKAT: top, left, transform komutlarÄ± BURADAN KALDIRILDI. */
        /* Ana CSS'teki global ayar kullanÄ±lacak. */

        padding: 15px;
        /* Ä°Ã§ boÅŸluÄŸu biraz daralt */
        padding-bottom: 30px;
        /* Alttaki butonlar iÃ§in gÃ¼venli boÅŸluk */
        border-radius: 12px;
        /* Mobilde daha yuvarlak kÃ¶ÅŸeler */

        /* iOS iÃ§in yumuÅŸak kaydÄ±rma */
        -webkit-overflow-scrolling: touch;
    }

    /* Modal iÃ§indeki form gridlerini tek sÃ¼tuna dÃ¼ÅŸÃ¼r */
    .modal .form-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    /* Buton grubunu mobilde her zaman gÃ¶rÃ¼nÃ¼r kÄ±l */
    .modal-actions {
        margin-top: 20px;
        padding-bottom: 10px;
    }

    /* FAB Butonunu Biraz YukarÄ± Al (Mobil tarayÄ±cÄ± alt barÄ± engellemesin) */
    .fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* 3. Ä°NCE DETAYLAR (GÃ¶rsel Ä°yileÅŸtirme) */

/* YazÄ±larÄ±n daha net gÃ¶rÃ¼nmesini saÄŸlar */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobilde inputlara tÄ±klayÄ±nca zoom yapmasÄ±nÄ± engeller (iOS Fix) */
input,
select,
textarea {
    font-size: 16px !important;
}

/* =================================================================
   DARK MODE TOAST (CLEAN CODE STYLE)
   ================================================================= */

/* 1. Sade ve Net GÃ¶vde */
[data-theme="dark"] .toast {
    background: #252526;
    /* VS Code EditÃ¶r Grisi */
    color: #f8f8f2;
    /* Off-White (GÃ¶z yormayan beyaz) */
    border: 1px solid #3e3e42;
    /* Ä°nce, keskin Ã§erÃ§eve */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    /* Net gÃ¶lge, yayvan deÄŸil */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    border-radius: 4px;
    /* Keskin kÃ¶ÅŸeler */
    padding: 12px 16px;
}

/* 2. Sol Åerit (Accent Stripe) - Glow YOK, Net Renk VAR */
[data-theme="dark"] .toast.info {
    border-left: 4px solid #3794ff;
    /* CanlÄ± Mavi */
}

[data-theme="dark"] .toast.success {
    border-left: 4px solid #4ec9b0;
    /* VS Code YeÅŸil/Teal */
}

[data-theme="dark"] .toast.error {
    border-left: 4px solid #f14c4c;
    /* VS Code Hata KÄ±rmÄ±zÄ±sÄ± */
    background: #2d2020;
    /* Hafif kÄ±rmÄ±zÄ±msÄ± arka plan (Hata farkÄ±ndalÄ±ÄŸÄ±) */
}

[data-theme="dark"] .toast.warning {
    border-left: 4px solid #cca700;
    /* Koyu SarÄ± */
}

/* =================================================================
   DARK MODE TOAST - NEON GLOW (High Visibility - ENHANCED)
   ================================================================= */

/* 1. Genel Toast YapÄ±sÄ± (Koyu Mod) */
[data-theme="dark"] .toast {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    /* Daha derin gÃ¶lge */
}

/* 2. HATA (Error) - KÄ±rmÄ±zÄ± Neon (GÃœÃ‡LÃœ) */
[data-theme="dark"] .toast.error {
    border-left: 4px solid #ef4444;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.6);
    /* ArttÄ±rÄ±lmÄ±ÅŸ saÃ§Ä±lma */
}

/* 3. BAÅARI (Success) - YeÅŸil Neon (GÃœÃ‡LÃœ) */
[data-theme="dark"] .toast.success {
    border-left: 4px solid #22c55e;
    box-shadow: 0 0 35px rgba(34, 197, 94, 0.6);
    /* ArttÄ±rÄ±lmÄ±ÅŸ saÃ§Ä±lma */
}

/* 4. BÄ°LGÄ° (Info) - Mavi Neon (GÃœÃ‡LÃœ) */
[data-theme="dark"] .toast.info {
    border-left: 4px solid #3b82f6;
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.6);
    /* ArttÄ±rÄ±lmÄ±ÅŸ saÃ§Ä±lma */
}

/* 5. UYARI (Warning) - SarÄ± Neon (GÃœÃ‡LÃœ) */
[data-theme="dark"] .toast.warning {
    border-left: 4px solid #eab308;
    box-shadow: 0 0 35px rgba(234, 179, 8, 0.6);
    /* ArttÄ±rÄ±lmÄ±ÅŸ saÃ§Ä±lma */
}

/* 6. WHATSAPP - YeÅŸil Neon (GÃœÃ‡LÃœ) */
[data-theme="dark"] .whatsapp-toast {
    box-shadow: 0 0 35px rgba(37, 211, 102, 0.6);
    /* WhatsApp YeÅŸili SaÃ§Ä±lma */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =================================================================
   CAMPAIGN CONTROL PANEL (Advanced)
   ================================================================= */

/* 1. Header Badge Counter */
.badge-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

/* 2. Status Box Base */
.status-box {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

/* 3. Status Variants */

/* Closed (KapalÄ±) - Pulse Red */
.status-box.closed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s infinite;
}

/* Ready (HazÄ±r) - Green */
.status-box.ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Preparing (HazÄ±rlanÄ±yor) - Blue */
.status-box.preparing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Running (Ã‡alÄ±ÅŸÄ±yor) - Gold/Yellow */
.status-box.running {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
}

/* 4. Animations */
@keyframes pulse-red {
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        opacity: 1;
    }
}

/* =================================================================
   THEME SWITCHER (Settings Modal)
   ================================================================= */

.theme-switcher-group {
    display: flex;
    gap: 10px;
    background: var(--bg-body);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.btn-theme-option {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.btn-theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Aktif Buton Stili */
.btn-theme-option.active {
    background: var(--bg-surface);
    color: var(--color-primary);
    border-color: var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

/* Dark Mode Uyumu */
[data-theme="dark"] .btn-theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-theme-option.active {
    background: #334155;
    /* Daha belirgin koyu gri */
    color: #fff;
}

/* =================================================================
   HEADER REDESIGN (Branding & Date/Time)
   ================================================================= */

/* MARKA ALANI (Sol) */
.brand-container {
    display: flex;
    flex-direction: column;
    /* Alt alta diz */
    justify-content: center;
    line-height: 1.1;
}

.brand-container h1 {
    font-size: 20px;
    margin: 0;
    letter-spacing: -0.5px;
}

.powered-text {
    font-size: 11px;
    color: #facc15;
    /* AltÄ±n SarÄ±sÄ± (White Title'dan ayrÄ±ÅŸsÄ±n) */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
    /* AltÄ±n IÅŸÄ±ma */
    margin-top: 2px;
}

/* SAAT VE TARÄ°H (SaÄŸ) */
.datetime-group {
    display: flex;
    flex-direction: column;
    /* Alt alta */
    align-items: flex-end;
    /* SaÄŸa yasla */
    margin-right: 15px;
    /* Butonla arasÄ±na boÅŸluk koy */
    border-right: 1px solid var(--border-color);
    /* Hafif ayraÃ§ Ã§izgisi */
    padding-right: 15px;
}

.h-time {
    font-size: 20px;
    /* 18px -> 20px (Daha okunaklÄ±) */
    font-weight: 700;
    font-family: var(--font-mono);
    color: #ffffff !important;
    /* Ã–NEMLÄ°: Temadan baÄŸÄ±msÄ±z BEYAZ */
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.h-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7) !important;
    /* YarÄ± saydam beyaz */
    font-weight: 500;
    margin-top: 4px;
}

/* --- INPUT ICONS --- */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
    /* TÄ±klamayÄ± engelle */
}

.input-with-icon input {
    padding-left: 30px;
    /* Ä°kon iÃ§in yer aÃ§ */
    font-family: var(--font-mono);
    /* SayÄ±lar iÃ§in mono font */
    font-weight: 600;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* --- AYARLAR KİLİT MEKANİZMASI & UYARI --- */

/* Uyarı Kutusu */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.4;
}

.alert-box.warning {
    background: rgba(234, 179, 8, 0.15);
    /* Sarı Zemin */
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #b45309;
}

[data-theme='dark'] .alert-box.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #fcd34d;
}

.alert-icon {
    font-size: 18px;
}

/* Form Kilitli (Disabled) Durumu */
#settingsForm.locked {
    opacity: 0.6;
    pointer-events: none;
    /* Tıklamayı engelle */
    filter: grayscale(0.5);
}

/* Disabled Slider Görünümü */
input[type=range]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


/* ============================================
   AYARLAR MENÜSÜ - PRO DESIGN (V3 FINAL)
   ============================================ */

/* 1. Grup Kartları - Daha Kompakt ve Belirgin */
/* 1. Grup Kartları - Temiz Kutu */
.settings-group {
    background: #ffffff;
    padding: 16px;
    /* İç boşluk */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
    /* İçerik taşmasını önle */
}

[data-theme="dark"] .settings-group {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

/* 2. Başlıklar - Basit ve Net (Kutu/Şerit Görünümü İptal) */
.group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    /* Vurgu rengi */
    margin: 0 0 12px 0;
    /* Sadece alta boşluk bırak */
    padding: 0;
    display: block;
    letter-spacing: 0.8px;
    opacity: 1;
    background: transparent;
    /* Arka plan yok */
    border: none;
    /* Çizgi yok */
}

[data-theme="dark"] .group-title {
    color: var(--text-secondary);
    /* Koyu modda daha yumuşak renk */
    opacity: 0.8;
}

/* 3. Slider Alanı - Hizalı */
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.value-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.range-slider {
    width: 100%;
    height: 4px;
    /* Daha ince çizgi */
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    /* Standart özellik */
    cursor: pointer;
    margin: 10px 0;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: grab;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 4. Inputlar ve İkonlar */
.form-group {
    margin-bottom: 10px;
    /* Inputlar birbirine yaklaşsın */
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-input {
    height: 36px;
    /* Daha kibar yükseklik */
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.2s;
}

/* İkonlu inputlarda soldan boşluk bırak */
.input-with-icon .form-input {
    padding-left: 32px;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Limitsiz placeholder stili */
.form-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

/* 5. Alt Bilgi (Hint) Metinleri */
.hint {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

/* 6. Buton Grubu - Footer */
.form-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-table-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 12px;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-table-link:hover {
    background: rgba(37, 99, 235, 0.2);
}

/* Card Link Styling */
.lead-details .lead-row {
    display: flex;
    justify-content: space-between;
    /* Push Price to left, Link to right */
    align-items: center;
}

.lead-origin-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    background: rgba(37, 99, 235, 0.1);
    /* Light Blue bg */
    padding: 3px 8px;
    border-radius: 12px;
    /* Pill shape */
    transition: background 0.2s;
}

.lead-origin-link:hover {
    background: rgba(37, 99, 235, 0.2);
    text-decoration: none;
}

/* Full Width Utility for Grid Forms */
.form-grid .full-width {
    grid-column: 1 / -1;
}

/* ========== GOOGLE AUTH STYLES ========== */
.auth-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    position: relative;
}

.btn-google:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

/* Dark Mode Google Button */
[data-theme="dark"] .btn-google {
    background-color: #2d2d30;
    color: #ffffff;
    border-color: #3e3e42;
}

[data-theme="dark"] .btn-google:hover {
    background-color: #3e3e42;
}

/* Connected User Card */
.google-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    animation: fadeIn 0.4s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #16a34a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}

.user-email {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-disconnect {
    font-size: 11px;
    color: var(--color-danger);
    text-decoration: underline;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
}

.btn-disconnect:hover {
    opacity: 1;
}

/* Loading Spinner */
.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

[data-theme="dark"] .spinner-sm {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}