/* MedyAjans Theme System - Light/Dark Toggle */

/* CSS Variables for theme system */
:root {
    /* Dark theme (default) */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-container: #1e1e2f;
    --bg-header: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%);
    --bg-card: #252545;
    --bg-modal: rgba(0, 0, 0, 0.8);
    
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-primary: #334155;
    --border-secondary: rgba(255, 255, 255, 0.1);
    
    --shadow-primary: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.2);
    
    --accent-primary: #4facfe;
    --accent-success: #43e97b;
    --accent-danger: #fa709a;
    --accent-warning: #fbbf24;
}

/* Light theme variables */
body.light-theme {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --bg-container: #ffffff;
    --bg-header: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --bg-card: #f8fafc;
    --bg-modal: rgba(0, 0, 0, 0.4);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border-primary: #cbd5e1;
    --border-secondary: rgba(0, 0, 0, 0.1);
    
    --shadow-primary: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
    
    --accent-primary: #3b82f6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
}

/* Apply theme variables */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.container {
    background: var(--bg-container) !important;
    border-color: var(--border-primary) !important;
    box-shadow: var(--shadow-primary) !important;
}

/* Header theme */
.sticky-header,
.header-wrapper .sticky-header {
    background: var(--bg-header) !important;
    border-color: var(--border-primary) !important;
}

.header-title,
.header-title .title-text {
    color: var(--text-primary) !important;
}

.header-subtitle {
    color: var(--text-secondary) !important;
}

/* Light theme specific header styles */
body.light-theme .sticky-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .header-title,
body.light-theme .header-title .title-text {
    color: #1e293b !important;
}

body.light-theme .header-subtitle {
    color: #64748b !important;
}

/* Card theme */
.company-item,
.revenue-card,
.action-card,
.summary-card,
.feature-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-container) 100%) !important;
    border-color: var(--border-primary) !important;
    box-shadow: var(--shadow-card) !important;
}

/* Light theme specific card styles */
body.light-theme .company-item,
body.light-theme .revenue-card,
body.light-theme .action-card,
body.light-theme .summary-card,
body.light-theme .feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    color: #1e293b !important;
}

/* Content sections */
body.light-theme .dashboard,
body.light-theme #dashboard,
body.light-theme .dashboard-content,
body.light-theme .section-header {
    background: transparent !important;
    color: #1e293b !important;
}

body.light-theme .section-header h2,
body.light-theme .section-header h3,
body.light-theme h1, body.light-theme h2, body.light-theme h3, body.light-theme h4 {
    color: #1e293b !important;
}

/* Stats and info sections */
body.light-theme .stats-item,
body.light-theme .info-item {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

/* Button theme adjustments - preserve gradients but adjust for light theme */
body.light-theme .btn-modern {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-card);
}

body.light-theme .header-actions .btn-settings {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

body.light-theme .header-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}


/* Modal theme */
.modal-overlay {
    background: var(--bg-modal);
}

.modal,
.settings-modal-container {
    background: var(--bg-container);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

/* Form elements theme */
input,
textarea,
select {
    background: var(--bg-container);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

body.light-theme input,
body.light-theme textarea,
body.light-theme select {
    background: #f8fafc;
    border-color: var(--border-primary);
    color: var(--text-primary);
}

body.light-theme input:focus,
body.light-theme textarea:focus,
body.light-theme select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toast theme */
body.light-theme .toast {
    background: var(--bg-container);
    border-color: var(--border-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

/* Specific elements from screenshot that need light theme */

/* Feature Management Cards - "Özellik Yönetimi" section */
body.light-theme .feature-management-container,
body.light-theme .feature-management-card,
body.light-theme .feature-card-content,
body.light-theme .wizard-card,
body.light-theme .feature-card,
body.light-theme .feature-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-theme .feature-management-title,
body.light-theme .feature-management-header {
    color: #1e293b !important;
    background: transparent !important;
}

/* System feature cards like "Yoklama Sistemi", "Departman Yönetimi", "Raporlama" */
body.light-theme .system-feature-card,
body.light-theme .feature-status-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

/* Button badges and status indicators */
body.light-theme .feature-status,
body.light-theme .status-badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* "PASIF" badges - keep red but adjust for light theme */
body.light-theme .status-passive,
body.light-theme .badge-passive {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

/* "AKTİF" badges - keep green but adjust for light theme */
body.light-theme .status-active,
body.light-theme .badge-active {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0 !important;
}

/* Stats numbers and text */
body.light-theme .stats-number,
body.light-theme .feature-version {
    color: #374151 !important;
}

/* Secondary text in cards */
body.light-theme .card-subtitle,
body.light-theme .feature-description {
    color: #6b7280 !important;
}

/* Content areas and panels */
body.light-theme .content-panel,
body.light-theme .dashboard-panel {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
}

/* Generic text elements */
body.light-theme p,
body.light-theme span:not(.btn-icon):not(.emoji),
body.light-theme div:not(.btn):not(.header-actions) {
    color: #374151 !important;
}

/* Transition for smooth theme switching */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}