* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --bg-main: #f5f5f5;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border: #e0e0e0;
    --success: #43a047;
    --warning: #fb8c00;
    --danger: #e53935;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f5f5f5;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dark Theme */
/* Dark Theme - Lacivert/Navy Blue */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --shadow: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.6);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.theme-toggle:active {
    transform: translateY(-1px) scale(0.98);
}

/* Smooth transition for theme change */
body, .sidebar, .main-content, .kpi-card, .chart-card, .table-card, .report-card, .filter-input, .filter-select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.logo {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-menu {
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: white;
    font-weight: 600;
}

.nav-item .icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
}

.breadcrumb {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.breadcrumb:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#current-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: var(--primary-dark);
}

.export-btn {
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.export-btn:hover {
    background: #059669;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 0.5rem;
    color: white;
}

.kpi-content h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* Table Card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-header h3 {
    font-size: 1.125rem;
}

.view-all-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.view-all-btn:hover {
    color: var(--primary-dark);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    border-bottom: 2px solid var(--border);
}

th {
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--bg-hover);
}

td {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem !important;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Filters Card */
.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-item label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.filter-input, .filter-select {
    width: 100%;
    padding: 0.625rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: var(--primary-dark);
}

.filter-btn-secondary {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.record-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-btn {
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.detail-btn:hover {
    background: var(--primary-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.5rem 0.875rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--bg-hover);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-dots {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background: var(--bg-card);
    margin: 2rem auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Order Detail */
.order-info {
    margin-bottom: 2rem;
}

.order-info h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.order-items h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    background: var(--bg-main);
}

/* Report Cards Grid */
.report-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    cursor: pointer;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

.report-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.report-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.report-icon {
    font-size: 3rem;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.75rem;
}

.report-content {
    flex: 1;
}

.report-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.report-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.report-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 0.375rem;
    font-weight: 600;
}

.stat-item.coming-soon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.report-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.3s;
}

.report-card:hover .report-arrow {
    transform: translateX(5px);
    color: var(--primary);
}

/* Quick Stats Section */
.quick-stats-section {
    margin-top: 2rem;
}

.quick-stats-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.quick-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .report-cards-grid {
        grid-template-columns: 1fr;
    }

    .quick-stats-grid {
        grid-template-columns: 1fr;
    }

}

/* ============================================
   OOS SPECIFIC STYLES
   ============================================ */

/* Alert Card Style */
.kpi-card.alert {
    border-left: 4px solid #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.kpi-card.alert .kpi-icon {
    color: #e74c3c;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.report-card.alert {
    border-left: 4px solid #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.report-card.alert:hover {
    border-left-color: #c0392b;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.2);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-info {
    background-color: #3498db;
    color: white;
}

.badge-secondary {
    background-color: #95a5a6;
    color: white;
}

.badge-success {
    background-color: #2ecc71;
    color: white;
}

/* Chart Container Heights - SABİT YÜKSEKLIK */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.charts-row .chart-card {
    height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.charts-row .chart-card h3 {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.charts-row .chart-card canvas {
    max-height: 320px !important;
    width: 100% !important;
    flex: 1;
}

/* Export Button */
.btn-export {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Text Colors */
.text-danger {
    color: #e74c3c;
    font-weight: bold;
}

/* Loading Error State */
.loading.error {
    color: #e74c3c;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.table-responsive table {
    min-width: 800px;
}

/* Responsive adjustments for OOS page */
@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .charts-row .chart-card {
        height: 350px;
    }
    
    .charts-row .chart-card canvas {
        max-height: 280px !important;
    }
}

/* Page Header Styling */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}



/* KPI Trend Text */
.kpi-trend {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .kpi-icon {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

[data-theme="dark"] .report-icon {
    background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .kpi-card.alert {
    background: linear-gradient(135deg, #450a0a 0%, #1e293b 100%);
}

[data-theme="dark"] .report-card.alert {
    background: linear-gradient(135deg, #450a0a 0%, #1e293b 100%);
}

/* ===== YENİ SIDEBAR STİLLERİ ===== */
.nav-group {
    margin-bottom: 5px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    padding: 12px 20px 6px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.sub {
    padding: 8px 20px 8px 35px;
    font-size: 13px;
    color: #94a3b8;
    display: block;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item.sub:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #e2e8f0;
    border-left-color: #3b82f6;
}

.nav-item.sub.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-left-color: #3b82f6;
    font-weight: 500;
}

/* Sidebar scroll */
.sidebar {
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e293b;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== MOBİL RESPONSIVE ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #1e293b;
    z-index: 1001;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
}

.mobile-header h2 {
    font-size: 16px;
    color: #e2e8f0;
    margin: 0;
}

.hamburger {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}