/* OdamiDonat Theme System - CSS Variables */

:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    
    /* Brand Colors */
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    
    /* Table Colors */
    --table-bg: #ffffff;
    --table-stripe: #f8f9fa;
    --table-hover: #e9ecef;
    --table-border: #dee2e6;
    
    /* Card Colors */
    --card-bg: #ffffff;
    --card-border: #dee2e6;
    --card-shadow: rgba(0, 0, 0, 0.1);
    
    /* Modal Colors */
    --modal-bg: #ffffff;
    --modal-backdrop: rgba(0, 0, 0, 0.5);
    
    /* Form Colors */
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --input-focus: #86b7fe;
}

[data-theme="dark"] {
    /* Dark Theme Colors - Siyah & Gold */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #333333;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-lg: rgba(0, 0, 0, 0.7);
    
    /* Gold Colors */
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8940f;
    
    /* Table Colors */
    --table-bg: #1a1a1a;
    --table-stripe: #151515;
    --table-hover: #252525;
    --table-border: #333333;
    
    /* Card Colors */
    --card-bg: #1a1a1a;
    --card-border: #333333;
    --card-shadow: rgba(0, 0, 0, 0.5);
    
    /* Modal Colors */
    --modal-bg: #1a1a1a;
    --modal-backdrop: rgba(0, 0, 0, 0.8);
    
    /* Form Colors */
    --input-bg: #151515;
    --input-border: #333333;
    --input-focus: #d4af37;
}

/* Apply Theme Variables */
body {
    background-color: #0a0a0a;
    color: #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dashboard-layout {
    background-color: #0a0a0a;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Tables */
.table {
    background-color: var(--table-bg);
    color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--table-stripe);
}

.table-hover > tbody > tr:hover > td {
    background-color: var(--table-hover);
}

.table-bordered {
    border-color: var(--table-border);
}

.table-bordered td,
.table-bordered th {
    border-color: var(--table-border);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    box-shadow: 0 0.125rem 0.25rem var(--card-shadow);
    color: #ffffff !important;
}

.card-body {
    color: #ffffff !important;
}

.card-body strong {
    color: #ffffff !important;
    font-weight: 600;
}

.card-body dd {
    color: #ffffff !important;
}

.card-header {
    background-color: var(--bg-secondary);
    border-bottom-color: var(--border-color);
    color: #ffffff !important;
}

/* Modals */
.modal-content {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.modal-header {
    background-color: #1a1a1a !important;
    border-bottom-color: #333333 !important;
    color: #ffffff !important;
}

.modal-header .modal-title {
    color: #ffffff !important;
}

.modal-body {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.modal-body .form-label {
    color: #ffffff !important;
}

.modal-body .form-check-label {
    color: #ffffff !important;
}

.modal-body small.text-muted {
    color: #adb5bd !important;
}

.modal-footer {
    background-color: #1a1a1a !important;
    border-top-color: #333333 !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Modal form elements */
.modal .form-control,
.modal .form-select {
    background-color: #151515 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.modal .form-control:focus,
.modal .form-select:focus {
    background-color: #151515 !important;
    border-color: #d4af37 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

.modal .form-check-input {
    background-color: #151515 !important;
    border-color: #333333 !important;
}

.modal .form-check-input:checked {
    background-color: #d4af37 !important;
    border-color: #d4af37 !important;
}

.modal .form-check-input:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

.modal .alert-info {
    background-color: rgba(13, 110, 253, 0.2) !important;
    border-color: rgba(13, 110, 253, 0.3) !important;
    color: #b3d9ff !important;
}

.modal hr.border-secondary {
    border-color: #333333 !important;
}

/* Forms */
.form-control,
.form-select,
textarea.form-control {
    background-color: #151515 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    background-color: #151515 !important;
    border-color: #d4af37 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

.form-control::placeholder,
.form-select option:first-child {
    color: #808080 !important;
}

.form-select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Form Labels */
.form-label {
    color: #ffffff !important;
}

.form-check-label {
    color: #ffffff !important;
}

textarea.form-control {
    resize: vertical;
}

.form-label {
    color: #b0b0b0 !important;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-label.small {
    font-size: 0.8rem;
}

/* Form control small */
.form-control-sm,
.form-select-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Alert for validation */
.alert-danger {
    background-color: #2d1a1a !important;
    border-color: #dc3545 !important;
    color: #ff6b6b !important;
}

.text-danger {
    color: #ff6b6b !important;
}

/* HR line */
hr {
    border-color: #333333 !important;
    opacity: 1;
}

/* Override Bootstrap body variables for dark theme */
[data-theme="dark"] {
    --bs-body-bg: #0a0a0a;
    --bs-body-color: #ffffff;
    --bs-border-color: #333333;
    --bs-secondary-color: #808080;
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Navbar */
.navbar-dark {
    background-color: var(--primary) !important;
}

/* Responsive Tables - Card View on Mobile - Moved to mobile section below */

/* DataTables Dark Theme Support */
[data-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: var(--text-primary);
}

[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="dark"] .page-link {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .page-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Dashboard Layout - Sidebar */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.sidebar {
    width: 280px;
    background-color: #0a0a0a;
    color: #ffffff;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #333333;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .logo {
    max-width: 50px;
    padding: 0.5rem;
}

.sidebar.collapsed .logo-img {
    width: 100%;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.5rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-footer .d-flex span,
.sidebar.collapsed .sidebar-footer .btn {
    display: none;
}

.sidebar.collapsed .sidebar-footer .d-flex {
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer .d-flex i {
    font-size: 1.5rem;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-toggle:hover {
    background-color: #252525;
    color: #d4af37;
}

.sidebar.collapsed .sidebar-toggle {
    right: 0.5rem;
    left: auto;
}

.sidebar.collapsed .sidebar-toggle i.bi-chevron-left {
    transform: rotate(180deg);
}

.logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.logo-text h4 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
}

.logo-text small {
    color: #b0b0b0;
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.275rem 0.5rem;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background-color: #1a1a1a;
    color: #ffffff;
    border-left-color: #d4af37;
}

.nav-item.active {
    background-color: #1a1a1a;
    color: #d4af37;
    border-left-color: #d4af37;
    font-weight: 500;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid #333333;
    background-color: #0a0a0a;
    text-align: center;
}

.sidebar-footer p,
.sidebar-footer small {
    color: #808080;
    font-size: 0.75rem;
    display: block;
    margin: 0.25rem 0;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    background-color: #0a0a0a;
    min-height: 100vh;
    padding: 2rem;
    color: #ffffff;
    width: calc(100% - 280px);
    box-sizing: border-box;
    overflow-x: hidden;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Dashboard Cards */
.dashboard-card {
    background-color: #0f0f0f;
    border: 1px solid #252525;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: #ffffff;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
    border-color: #2d2d2d;
}

.dashboard-card h5 {
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 1rem;
}

.dashboard-card-title {
    font-size: 0.875rem;
    color: #9a9a9a;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dashboard-card-description {
    font-size: 0.75rem;
    color: #6a6a6a;
}

/* Gold Accent Buttons */
.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    color: #0a0a0a;
    font-weight: 600;
    padding: 0.325rem 1.3rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    color: #0a0a0a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-dark-gold {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    color: #ffffff;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-dark-gold:hover {
    background-color: #252525;
    border-color: #d4af37;
    color: #d4af37;
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: 8px;
    width: 100%;
}

.search-bar input:focus {
    background-color: #1a1a1a;
    border-color: #d4af37;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #808080;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #0f0f0f 0%, #151515 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #252525;
}

.dashboard-header h1 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Compact Cards */
.compact-card {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff !important;
}

.compact-card .card-body {
    padding: 1rem !important;
    color: #ffffff !important;
}

.compact-card .card-body strong {
    color: #ffffff !important;
    font-weight: 600;
}

.compact-card .card-body dd {
    color: #ffffff !important;
}

.compact-header {
    background-color: #151515 !important;
    border-bottom: 1px solid #333333 !important;
    padding: 0.75rem 1rem !important;
}

.compact-header h5,
.compact-header h6 {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* Compact Tables */
.compact-table {
    font-size: 0.875rem;
    margin-bottom: 0;
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    max-width: 100%;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    display: block;
    position: relative;
}

/* Ensure table-responsive doesn't break layout */
.table-responsive:has(.table) {
    overflow-x: auto !important;
}

.compact-table thead th {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333333;
    background-color: #151515;
    color: #b0b0b0;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
}

.compact-table thead th.text-center {
    text-align: center;
}

.compact-table tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #252525;
    word-wrap: break-word;
    text-align: left;
}

.compact-table tbody td.text-center {
    text-align: center;
}

.compact-table tbody td.text-right {
    text-align: right;
}

.compact-table tbody tr:hover {
    background-color: #252525;
}

.compact-table tfoot td {
    padding: 0.75rem;
    border-top: 2px solid #333333;
    background-color: #151515;
    vertical-align: middle;
    font-weight: 600;
}

.compact-table tfoot td:first-child {
    text-align: left;
}

.compact-table tfoot td:last-child {
    text-align: right;
    color: #d4af37;
    font-size: 1rem;
}

/* Product thumbnail in tables */
.product-thumbnail-small {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #333333;
}

.product-thumbnail-placeholder-small {
    width: 50px;
    height: 50px;
    background-color: #252525;
    border: 1px solid #333333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #808080;
    font-size: 1.25rem;
}

/* Dark Table Styles */
.table-dark {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #333333;
}

.table-dark thead th {
    background-color: #151515;
    color: #b0b0b0;
    border-color: #333333;
}

.table-dark tbody td {
    border-color: #252525;
    color: #ffffff;
}

.table-dark.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #151515;
}

.table-dark.table-hover > tbody > tr:hover > td {
    background-color: #252525;
}

.table-dark.table-danger {
    background-color: #2d1a1a;
}

.table-dark.table-danger td {
    background-color: #2d1a1a;
    border-color: #3d2a2a;
}

.table-dark.table-danger:hover td {
    background-color: #3d2a2a;
}

/* Compact Tabs */
.compact-tabs {
    border-bottom: 2px solid #333333;
    margin-bottom: 0;
}

.compact-tabs .nav-item {
    margin-right: 0.25rem;
}

.compact-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #b0b0b0;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    background-color: transparent;
}

.compact-tabs .nav-link i {
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.compact-tabs .nav-link:hover {
    color: #ffffff;
    background-color: #1a1a1a;
    border-bottom-color: #555555;
}

.compact-tabs .nav-link.active {
    color: #d4af37;
    background-color: transparent;
    border-bottom-color: #d4af37;
    font-weight: 600;
}

/* Nav Tabs Dark Theme */
.nav-tabs {
    border-bottom: 2px solid #333333;
}

.nav-tabs .nav-link {
    color: #b0b0b0;
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    color: #ffffff;
    border-bottom-color: #555555;
}

.nav-tabs .nav-link.active {
    color: #d4af37;
    background-color: transparent;
    border-bottom-color: #d4af37;
}

/* Card Header Tabs - Standard Tab Design */
.card-header-tabs {
    border-bottom: none;
    margin-bottom: 0;
}

.card-header-tabs .nav-link {
    color: #b0b0b0;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.card-header-tabs .nav-link i {
    margin-right: 0.25rem;
}

.card-header-tabs .nav-link:hover {
    color: #ffffff;
    border-bottom-color: #555555;
    background-color: transparent;
}

.card-header-tabs .nav-link.active {
    color: #d4af37;
    background-color: transparent;
    border-bottom-color: #d4af37;
    font-weight: 600;
}

.card-header-tabs .nav-link .badge {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* Badge Status */
.badge-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-weight: 500;
}

/* Action Buttons */
.btn-action {
    background-color: #252525;
    border: 1px solid #333333;
    color: #d4af37;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background-color: #333333;
    border-color: #d4af37;
    color: #f4d03f;
}

/* DataTables Dark Theme - Enhanced */
.dataTables_wrapper {
    color: #ffffff;
    width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #b0b0b0;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

/* Fix DataTables table width issues */
.dataTables_wrapper {
    position: relative;
    clear: both;
    width: 100%;
    max-width: 100%;
}

.dataTables_wrapper .table {
    width: 100% !important;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0;
}

/* Desktop: normal table width */
@media (min-width: 768px) {
    .dataTables_wrapper .table {
        width: 100% !important;
    }
}

.dataTables_wrapper .table thead th {
    white-space: nowrap;
    vertical-align: middle;
    position: relative;
}

.dataTables_wrapper .table tbody td {
    vertical-align: middle;
    word-wrap: break-word;
    position: relative;
}

/* Fix column alignment */
.dataTables_wrapper .table tbody td,
.dataTables_wrapper .table thead th {
    padding: 0.5rem 0.75rem;
}

/* Prevent DataTables from breaking layout */
.dataTables_wrapper .dataTables_scroll {
    overflow-x: auto;
    overflow-y: visible;
}

.dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto;
    overflow-y: visible;
}

/* Fix for tables without scroll */
.dataTables_wrapper:not(.dataTables_scroll) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper:not(.dataTables_scroll) .table {
    display: table;
}

/* Mobile: ensure wrapper has scroll */
@media (max-width: 767.98px) {
    .dataTables_wrapper:not(.dataTables_scroll) {
        overflow-x: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Ensure proper column widths */
.dataTables_wrapper .table colgroup {
    display: none;
}

/* Prevent DataTables from adding extra wrapper elements */
.dataTables_wrapper .dataTables_scroll {
    width: 100%;
}

.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody {
    width: 100% !important;
}

.dataTables_wrapper .dataTables_scrollHead table,
.dataTables_wrapper .dataTables_scrollBody table {
    width: 100% !important;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_filter input {
    background-color: #151515;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    background-color: #151515;
    border-color: #d4af37;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.dataTables_wrapper .dataTables_length select {
    background-color: #151515;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    border-radius: 4px;
    margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.dataTables_wrapper .dataTables_paginate .pagination {
    margin-top: 0.5rem;
}

.dataTables_wrapper .page-link {
    background-color: #151515;
    border-color: #333333;
    color: #b0b0b0;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .page-link:hover {
    background-color: #252525;
    border-color: #d4af37;
    color: #d4af37;
}

.dataTables_wrapper .page-item.active .page-link {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #0a0a0a;
    font-weight: 600;
}

.dataTables_wrapper .page-item.disabled .page-link {
    background-color: #151515;
    border-color: #333333;
    color: #555555;
    cursor: not-allowed;
}

/* Compact Headings */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Compact spacing utilities */
.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

/* Text colors for dark theme */
.text-muted {
    color: #808080 !important;
}

.text-success {
    color: #28a745 !important;
}

/* Card body compact */
.card-body {
    padding: 1rem;
    color: #ffffff !important;
}

.compact-card .card-body {
    padding: 0.75rem !important;
    color: #ffffff !important;
}

/* Ensure all text in cards is readable */
.card strong,
.card-body strong,
.compact-card strong {
    color: #ffffff !important;
}

.card dd,
.card-body dd,
.compact-card dd {
    color: #ffffff !important;
}

.card dt,
.card-body dt,
.compact-card dt {
    color: #b0b0b0 !important;
}

/* Override Bootstrap card color variable */
[data-theme="dark"] {
    --bs-card-color: #ffffff;
}

/* Description lists */
dl.row dt {
    color: #b0b0b0 !important;
}

dl.row dd {
    color: #ffffff !important;
}

.card dl.row dt,
.compact-card dl.row dt {
    color: #b0b0b0 !important;
}

.card dl.row dd,
.compact-card dl.row dd {
    color: #ffffff !important;
}

/* Small text labels */
.card small,
.card-body small,
.compact-card small {
    color: #b0b0b0 !important;
}

.card small.text-muted,
.card-body small.text-muted,
.compact-card small.text-muted {
    color: #808080 !important;
}

/* ============================================
   MOBİL TASARIM - SIFIRDAN TASARLANDI
   ============================================ */

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333333;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 100%;
}

.mobile-header-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-header-title i {
    font-size: 1rem;
    color: #d4af37;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    background-color: transparent;
    border: 1px solid #333333;
    color: #d4af37;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background-color: #252525;
    border-color: #d4af37;
    transform: scale(1.05);
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Sidebar Close Button */
.sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background-color: #252525;
    color: #d4af37;
}

/* Responsive - Mobile First Approach */
@media (max-width: 767.98px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Sidebar - Mobile */
    .sidebar {
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .sidebar-nav {
        padding: 0.5rem 0;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-item i {
        font-size: 1.1rem;
        width: 20px;
    }
    
    /* Main Content - Mobile */
    .main-content {
        margin-left: 0 !important;
        padding: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 4rem !important; /* Space for mobile header */
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Sidebar toggle - hide on mobile */
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar.collapsed {
        width: 280px;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Card body overflow fix - allow table scroll */
    .card-body,
    .compact-card .card-body {
        overflow-x: visible;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* But allow table-responsive inside cards to scroll */
    .card-body .table-responsive,
    .compact-card .card-body .table-responsive {
        overflow-x: auto !important;
        overflow-y: visible !important;
        max-width: 100%;
        width: 100%;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    /* DataTables wrapper inside cards - fixed controls, scrollable table */
    .card-body .dataTables_wrapper,
    .compact-card .card-body .dataTables_wrapper {
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-width: 100%;
        width: 100%;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Card view for DataTables inside cards */
    .card-body .dataTables_wrapper .table-responsive,
    .compact-card .card-body .dataTables_wrapper .table-responsive {
        overflow-x: visible !important;
        overflow-y: visible !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    /* Cards are 100% width */
    .card-body .dataTables_wrapper .table-responsive .table,
    .compact-card .card-body .dataTables_wrapper .table-responsive .table {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure cards are full width */
    .card-body .dataTables_wrapper .table-responsive .table tbody tr,
    .compact-card .card-body .dataTables_wrapper .table-responsive .table tbody tr {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* DataTables wrapper that contains table-responsive */
    .dataTables_wrapper .table-responsive {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Hide desktop page headers on mobile (using mobile header instead) */
    .d-flex.justify-content-between.align-items-center.mb-3 h2,
    .dashboard-header h1,
    h1:not(.mobile-header-title),
    h2:not(.mobile-header-title) {
        display: none !important;
    }
    
    /* Show mobile header */
    .mobile-header {
        display: block !important;
    }
    
    /* Page Headers - Mobile */
    .mobile-header-title {
        font-size: 1.125rem !important;
    }
    
    /* Tab content spacing */
    .tab-content {
        margin-top: 0.5rem;
    }
    
    .tab-pane {
        padding: 0;
    }
    
    /* Action buttons in header area - hide on mobile (shown below) */
    .d-flex.justify-content-between.align-items-center.mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-3 .btn {
        display: none !important;
    }
    
    /* Mobile create buttons */
    .d-md-none.mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .d-md-none.mb-3 .btn {
        width: 100%;
        margin-bottom: 0;
        padding: 0.625rem 1rem;
    }
    
    /* Ensure mobile buttons are visible */
    .d-md-none {
        display: block !important;
    }
    
    /* Cards - Mobile */
    .card,
    .dashboard-card,
    .compact-card {
        margin-bottom: 0.75rem;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .card-body,
    .dashboard-card {
        padding: 0.75rem !important;
        overflow-x: visible;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for tables inside card body */
    .card-body .table-responsive {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        width: calc(100% + 1.5rem);
    }
    
    .compact-card .card-body {
        padding: 0.5rem !important;
        overflow-x: visible;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Override p-3, p-2 classes on mobile for more space */
    .compact-card .card-body.p-3,
    .compact-card .card-body.p-2 {
        padding: 0.5rem !important;
    }
    
    /* Fix for tables inside compact cards - minimal margin */
    .compact-card .card-body .table-responsive {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        width: calc(100% + 1rem);
    }
    
    /* DataTables wrapper inside compact cards */
    .compact-card .card-body .dataTables_wrapper {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* But table-responsive inside DataTables wrapper should use full width */
    .compact-card .card-body .dataTables_wrapper .table-responsive {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }
    
    /* Dashboard Cards Grid - Mobile - Reduced spacing */
    .row.g-3 {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .row.g-3 > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .dashboard-card-value {
        font-size: 1.25rem !important;
        line-height: 1.2;
    }
    
    .dashboard-card-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.375rem;
    }
    
    .dashboard-card-title i {
        font-size: 0.875rem !important;
    }
    
    .dashboard-card {
        padding: 0.625rem 0.5rem !important;
        min-height: auto;
    }
    
    /* Compact card mobile adjustments */
    .card.compact-card .card-body {
        padding: 0.75rem 0.5rem !important;
    }
    
    .card.compact-card .card-body h3 {
        font-size: 1.25rem !important;
    }
    
    .card.compact-card .card-body h6 {
        font-size: 0.75rem !important;
    }
    
    /* Dashboard charts on mobile */
    .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        min-height: 200px;
    }
    
    /* Small charts in analytics - mobile */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Chart containers - mobile */
    [style*="position: relative; height:"] {
        max-width: 100% !important;
        overflow: hidden;
    }
    
    /* Ensure chart cards don't overflow */
    .card.compact-card .card-body {
        overflow-x: hidden;
        padding: 0.75rem 0.5rem !important;
    }
    
    .card.compact-card .card-body > div[style*="position: relative"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Forms - Mobile */
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
        min-height: 44px; /* Touch target size */
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
        font-weight: 500;
    }
    
    /* Form groups spacing */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Input groups */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .input-group-text {
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }
    
    .input-group .form-control {
        border-radius: 0 0 8px 8px;
        border-top: none;
    }
    
    /* Select2 on mobile */
    .select2-container {
        width: 100% !important;
    }
    
    .select2-container--default .select2-selection--single {
        min-height: 44px !important;
        height: 44px !important;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 44px !important;
        font-size: 16px !important;
        padding-right: 55px !important; /* Clear butonu için yeterli alan (mobil) */
    }
    /* Mobil için clear butonu konumu */
    .select2-container--default .select2-selection--single .select2-selection__clear {
        right: 26px !important; /* Arrow'un solunda */
        z-index: 3 !important; /* Arrow'dan üstte */
    }
    
    /* Form Groups - Mobile */
    .row.g-3 > .col-md-4,
    .row.g-3 > .col-md-6,
    .row.g-3 > .col-lg-3,
    .row.g-3 > .col-lg-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Buttons - Mobile */
    .btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
        min-height: 44px; /* Touch target size */
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 36px;
    }
    
    .btn-group .btn,
    .btn-group-vertical .btn {
        width: auto;
        margin-bottom: 0;
    }
    
    /* Button Groups - Mobile */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .d-flex.justify-content-between .btn {
        width: 100%;
    }
    
    /* Inline button groups should stack on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .btn-group .btn:first-child {
        border-top-left-radius: 0.375rem !important;
        border-top-right-radius: 0.375rem !important;
        border-bottom-left-radius: 0.375rem !important;
        border-bottom-right-radius: 0.375rem !important;
    }
    
    .btn-group .btn:last-child {
        border-top-left-radius: 0.375rem !important;
        border-top-right-radius: 0.375rem !important;
        border-bottom-left-radius: 0.375rem !important;
        border-bottom-right-radius: 0.375rem !important;
    }
    
    /* Tables - Mobile - Keep Table View with Horizontal Scroll */
    .table-responsive {
        border: none;
        margin: 0;
        padding: 0;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
        box-sizing: border-box;
    }
    
    .table {
        font-size: 0.75rem;
        margin-bottom: 0;
        width: auto !important;
        min-width: 600px !important; /* Minimum width to prevent too much compression */
        max-width: none !important;
        table-layout: auto;
        display: table !important;
    }
    
    /* Keep table structure on mobile - no card conversion */
    .table thead {
        display: table-header-group !important;
    }
    
    .table tbody {
        display: table-row-group !important;
    }
    
    .table tfoot {
        display: table-footer-group !important;
    }
    
    .table tr {
        display: table-row !important;
    }
    
    .table th,
    .table td {
        display: table-cell !important;
        padding: 0.5rem 0.5rem;
        white-space: nowrap;
        vertical-align: middle;
    }
    
    /* Allow text wrapping for specific columns */
    .table td:has(strong),
    .table td:has(.badge),
    .table td:has(.btn) {
        white-space: normal;
    }
    
    /* DataTables specific fixes - keep table view with scroll */
    /* Wrapper itself doesn't scroll - controls stay fixed */
    .dataTables_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        position: relative;
    }
    
    /* Only table-responsive scrolls */
    .dataTables_wrapper .table-responsive {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Table inside table-responsive can be wider than container */
    .dataTables_wrapper .table-responsive .table {
        width: auto !important;
        min-width: 600px !important;
        max-width: none !important;
        display: table !important;
        margin: 0 !important;
    }
    
    /* If table is directly in wrapper (no table-responsive), wrapper scrolls */
    .dataTables_wrapper:not(:has(.table-responsive)) {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .dataTables_wrapper:not(:has(.table-responsive)) .table {
        width: auto !important;
        min-width: 600px !important;
        max-width: none !important;
        display: table !important;
        margin: 0 !important;
    }
    
    /* Ensure table structure is preserved */
    .dataTables_wrapper .table thead {
        display: table-header-group !important;
    }
    
    .dataTables_wrapper .table tbody {
        display: table-row-group !important;
    }
    
    .dataTables_wrapper .table tfoot {
        display: table-footer-group !important;
    }
    
    /* Fix for DataTables scroll containers */
    .dataTables_wrapper .dataTables_scroll {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100% !important;
        display: block;
    }
    
    .dataTables_wrapper .dataTables_scrollHead,
    .dataTables_wrapper .dataTables_scrollBody {
        overflow-x: auto !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block;
    }
    
    /* Ensure table inside scroll containers can scroll */
    .dataTables_wrapper .dataTables_scrollHead table,
    .dataTables_wrapper .dataTables_scrollBody table {
        width: auto !important;
        min-width: 600px !important;
    }
    
    /* Ensure DataTables wrapper doesn't overflow */
    .dataTables_wrapper > * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Remove data-label pseudo-elements - not needed for table view */
    .dataTables_wrapper .table tbody td::before {
        display: none !important;
        content: none !important;
    }
    
    /* Compact table cells on mobile - reduced padding */
    .table thead th {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .table tbody td {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .table tfoot td {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
        font-weight: 600;
    }
    
    /* Smaller badges and buttons on mobile */
    .table .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .table .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Product thumbnails smaller on mobile */
    .table .product-thumbnail-small,
    .table .product-thumbnail-placeholder-small {
        width: 40px;
        height: 40px;
    }
    
    /* Special handling for important fields */
    .table tbody td strong {
        font-weight: 600;
        color: #ffffff;
    }
    
    .table tbody td .text-success {
        color: #28a745 !important;
    }
    
    .table tbody td .text-danger {
        color: #dc3545 !important;
    }
    
    /* Scroll indicator for mobile tables */
    .table-responsive::-webkit-scrollbar,
    .dataTables_wrapper::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-track,
    .dataTables_wrapper::-webkit-scrollbar-track {
        background: #1a1a1a;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb,
    .dataTables_wrapper::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover,
    .dataTables_wrapper::-webkit-scrollbar-thumb:hover {
        background: #444444;
    }
    
    /* Firefox scrollbar */
    .table-responsive,
    .dataTables_wrapper {
        scrollbar-width: thin;
        scrollbar-color: #333333 #1a1a1a;
    }
    
    /* Mobile summary card - keep for order items */
    .table-summary-mobile {
        display: block !important;
        background-color: #1a1a1a;
        border: 1px solid #333333;
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .table-summary-mobile .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .table-summary-mobile .summary-row:last-child {
        border-bottom: none;
        font-weight: 700;
        font-size: 1.1rem;
        color: #d4af37;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 2px solid #333333;
    }
    
    .table-summary-mobile .summary-label {
        color: #b0b0b0;
        font-size: 0.875rem;
        font-weight: 500;
    }
    
    .table-summary-mobile .summary-value {
        color: #ffffff;
        font-weight: 600;
        font-size: 1rem;
    }
    
    .table-summary-mobile .summary-row:last-child .summary-value {
        color: #d4af37;
        font-size: 1.1rem;
    }
    
    /* Mobile summary card - reduced padding */
    .table-summary-mobile {
        padding: 0.75rem !important;
        margin-top: 0.5rem !important;
    }
    
    .table-summary-mobile .summary-row {
        padding: 0.5rem 0 !important;
    }
    
    .table-summary-mobile .summary-row:last-child {
        padding-top: 0.75rem !important;
        margin-top: 0.25rem !important;
        font-size: 1rem !important;
    }
    
    .table-summary-mobile .summary-label {
        font-size: 0.8rem !important;
    }
    
    .table-summary-mobile .summary-value {
        font-size: 0.9rem !important;
    }
    
    .table-summary-mobile .summary-row:last-child .summary-value {
        font-size: 1.1rem !important;
    }
    
    /* Text color utilities for mobile summary */
    .table-summary-mobile .summary-value.text-success {
        color: #28a745 !important;
    }
    
    .table-summary-mobile .summary-value.text-danger {
        color: #dc3545 !important;
    }
    
    /* Order Items Table specific fixes - keep table structure */
    .table .product-thumbnail-small,
    .table .product-thumbnail-placeholder-small {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    /* Action buttons in order items */
    .table tbody td.text-center {
        text-align: center;
    }
    
    .table tbody td .btn-group {
        display: inline-flex;
        gap: 0.25rem;
    }
    
    /* DataTables - Mobile - Fixed Controls, Scrollable Table */
    .dataTables_wrapper {
        overflow-x: visible !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        position: relative;
    }
    
    /* Hide length control on mobile */
    .dataTables_wrapper .dataTables_length {
        display: none !important;
    }
    
    /* Compact controls row - single line, fixed */
    .dataTables_wrapper > .row:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0.25rem 0 !important;
        flex-wrap: nowrap !important;
        position: relative;
        z-index: 10;
        background-color: #0a0a0a;
    }
    
    .dataTables_wrapper > .row:first-child > div {
        flex: 0 0 auto !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* Filter control - compact inline, fixed */
    .dataTables_wrapper .dataTables_filter {
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        text-align: left !important;
    }
    
    .dataTables_wrapper .dataTables_filter label {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        font-size: 0.8rem !important;
        color: #b0b0b0 !important;
    }
    
    .dataTables_wrapper .dataTables_filter label span {
        display: inline !important;
        white-space: nowrap !important;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0.375rem 0.75rem !important;
        min-height: 36px !important;
        font-size: 0.875rem !important;
        background-color: #151515 !important;
        border: 1px solid #333333 !important;
        color: #ffffff !important;
        border-radius: 6px !important;
    }
    
    .dataTables_wrapper .dataTables_filter input:focus {
        border-color: #d4af37;
        box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    }
    
    /* DataTables wrapper - no scroll, controls stay fixed */
    .dataTables_wrapper {
        overflow-x: visible !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }
    
    /* Card view container - no scroll needed */
    .dataTables_wrapper .table-responsive {
        overflow-x: visible !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        position: relative;
    }
    
    /* Hide table header on mobile for card view */
    .dataTables_wrapper .table-responsive .table thead {
        display: none !important;
    }
    
    /* Card view for table rows */
    .dataTables_wrapper .table-responsive .table {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border: none !important;
        display: block !important;
    }
    
    /* Each row becomes a card */
    .dataTables_wrapper .table-responsive .table tbody {
        display: block !important;
        width: 100% !important;
    }
    
    .dataTables_wrapper .table-responsive .table tbody tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.75rem !important;
        background-color: #1a1a1a !important;
        border: 1px solid #333333 !important;
        border-radius: 8px !important;
        padding: 0.75rem !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        box-sizing: border-box;
    }
    
    /* Each cell becomes a row in the card */
    .dataTables_wrapper .table-responsive .table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding: 0.5rem 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    /* Last cell in each row - no border */
    .dataTables_wrapper .table-responsive .table tbody tr td:last-child {
        border-bottom: none !important;
    }
    
    /* Label (from header) - only show if data-label exists and is not empty */
    .dataTables_wrapper .table-responsive .table tbody td[data-label]:not([data-label=""])::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #d4af37 !important;
        margin-right: 0.75rem !important;
        flex-shrink: 0 !important;
        min-width: 100px !important;
        font-size: 0.8rem !important;
    }
    
    /* No label for empty data-label */
    .dataTables_wrapper .table-responsive .table tbody td[data-label=""]::before {
        content: '' !important;
        display: none !important;
    }
    
    /* Value */
    .dataTables_wrapper .table-responsive .table tbody td {
        color: #ffffff !important;
        font-size: 0.875rem !important;
        text-align: right !important;
        flex: 1 !important;
    }
    
    /* Hide empty cells - JavaScript will handle hiding cells with dash */
    .dataTables_wrapper .table-responsive .table tbody td:empty {
        display: none !important;
    }
    
    /* Hide cells with empty data-label (except action buttons) */
    .dataTables_wrapper .table-responsive .table tbody td[data-label=""]:not(:has(.btn)) {
        display: none !important;
    }
    
    /* Show action buttons even if label is empty */
    .dataTables_wrapper .table-responsive .table tbody td:has(.btn) {
        display: flex !important;
        justify-content: flex-end !important;
    }
    
    .dataTables_wrapper .table-responsive .table tbody td:has(.btn)::before {
        content: '' !important;
        display: none !important;
    }
    
    /* Hide cells that only contain dash - handled by JavaScript */
    .dataTables_wrapper .table-responsive .table tbody td.dash-only {
        display: none !important;
    }
    
    /* Action buttons in cards - full width row */
    .dataTables_wrapper .table-responsive .table tbody td:has(.btn) {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding-top: 0.75rem !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-bottom: none !important;
    }
    
    .dataTables_wrapper .table-responsive .table tbody td .btn {
        width: auto !important;
        margin: 0 0.25rem !important;
        padding: 0.375rem 0.75rem !important;
        min-width: 44px !important;
    }
    
    /* Badge styling in cards */
    .dataTables_wrapper .table-responsive .table tbody td .badge {
        margin: 0 !important;
        display: inline-block !important;
    }
    
    /* Strong text in cards */
    .dataTables_wrapper .table-responsive .table tbody td strong {
        font-weight: 600 !important;
        color: #ffffff !important;
    }
    
    /* Text colors in cards */
    .dataTables_wrapper .table-responsive .table tbody td .text-success {
        color: #28a745 !important;
    }
    
    .dataTables_wrapper .table-responsive .table tbody td .text-danger {
        color: #dc3545 !important;
    }
    
    /* Hide footer on mobile */
    .dataTables_wrapper .table-responsive .table tfoot {
        display: none !important;
    }
    
    /* DataTables scroll body (if using scrollX) */
    .dataTables_wrapper .dataTables_scrollBody {
        overflow-x: auto !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* If table is directly in wrapper without table-responsive, wrapper scrolls */
    .dataTables_wrapper:not(:has(.table-responsive)) {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .dataTables_wrapper:not(:has(.table-responsive)) > .table {
        width: auto !important;
        min-width: 600px !important;
        max-width: none !important;
        display: table !important;
        margin: 0 !important;
    }
    
    /* Info - compact, fixed */
    .dataTables_wrapper .dataTables_info {
        font-size: 0.7rem;
        margin: 0.5rem 0 !important;
        padding: 0.375rem 0 !important;
        text-align: center;
        color: #b0b0b0;
    }
    
    /* Pagination - compact, fixed */
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
        padding: 0.25rem 0 !important;
        display: flex;
        justify-content: center;
        position: relative;
        z-index: 10;
        background-color: #0a0a0a;
    }
    
    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin: 0;
    }
    
    .dataTables_wrapper .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide DataTables wrapper padding on mobile */
    .dataTables_wrapper .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .dataTables_wrapper .row > * {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Ensure table itself can scroll */
    .dataTables_wrapper .table {
        box-sizing: content-box;
        margin: 0;
    }
    
    /* Prevent wrapper from scrolling */
    .dataTables_wrapper:not(.dataTables_scroll) {
        overflow-x: visible !important;
    }
    
    /* Tabs - Mobile */
    .nav-tabs,
    .compact-tabs {
        flex-wrap: nowrap;
        border-bottom: 2px solid #333333;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-bottom: 0.5rem !important;
    }
    
    .nav-tabs::-webkit-scrollbar,
    .compact-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-item,
    .compact-tabs .nav-item {
        flex: 0 0 auto;
        min-width: 100px;
    }
    
    .nav-tabs .nav-link,
    .compact-tabs .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-tabs .nav-link i,
    .compact-tabs .nav-link i {
        font-size: 0.9rem;
    }
    
    /* Modals - Mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .modal-content {
        border-radius: 8px;
        max-height: calc(100vh - 1rem);
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 1rem 0.75rem;
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: 1rem 0.75rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 1rem 0.75rem;
        flex-shrink: 0;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Search Bar - Mobile */
    .search-bar {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Charts - Mobile */
    .chart-container {
        height: 250px !important;
    }
    
    /* Badges - Mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Spacing Utilities - Mobile - Reduced */
    .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    .mt-3 {
        margin-top: 0.5rem !important;
    }
    
    .mt-4 {
        margin-top: 0.75rem !important;
    }
    
    /* Grid System - Mobile - Reduced padding */
    .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .row > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Reduce gap in grid */
    .row.g-3 {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .row.g-3 > * {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Product Thumbnail - Mobile */
    .product-thumbnail,
    .product-thumbnail-placeholder {
        width: 40px;
        height: 40px;
    }
    
    /* Action Buttons in Tables - Mobile */
    .btn-action {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Footer - Mobile */
    .sidebar-footer {
        position: relative;
        padding: 1rem;
        border-top: 1px solid #333333;
        margin-top: auto;
    }
    
    /* Sidebar scroll on mobile */
    .sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Logo on mobile */
    .logo {
        max-width: 150px;
    }
    
    .logo-img {
        max-width: 100%;
    }
    
    /* Text Sizes - Mobile */
    .small {
        font-size: 0.8rem !important;
    }
    
    /* Compact Header - Mobile */
    .compact-header {
        padding: 0.625rem 0.75rem !important;
    }
    
    .compact-header h5,
    .compact-header h6 {
        font-size: 0.85rem !important;
    }
    
    /* Prevent text selection on touch devices for better UX */
    .btn,
    .nav-item {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
        user-select: none;
    }
    
    /* Better touch targets */
    a, button, input, select, textarea {
        touch-action: manipulation;
    }
    
    /* Smooth scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix iOS input zoom */
    @supports (-webkit-touch-callout: none) {
        input[type="text"],
        input[type="email"],
        input[type="number"],
        input[type="tel"],
        input[type="url"],
        input[type="search"],
        textarea,
        select {
            font-size: 16px !important;
        }
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 1.5rem;
    }
    
    .dashboard-card-value {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
}

/* Select2 Dark Theme - Global Styles */
.select2-container--default .select2-selection--single {
    background-color: #151515 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
    height: 38px !important;
    position: relative !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    line-height: 38px !important;
    padding-left: 12px !important;
    padding-right: 55px !important; /* Clear butonu (20px) + boşluk (5px) + arrow (20px) + güvenlik (10px) */
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    position: absolute !important;
    top: 1px !important;
    right: 1px !important;
    width: 20px !important;
}

.select2-dropdown {
    background-color: #1a1a1a !important;
    border-color: #333333 !important;
}

.select2-results__option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.select2-results__option--highlighted {
    background-color: #252525 !important;
    color: #d4af37 !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #151515 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

/* Select2 Clear Button - Fixed Alignment */
/* Clear butonu arrow'un solunda konumlandırıldı: arrow (right: 1px, width: 20px) = 1-21px arası */
/* Clear butonu (width: 20px) arrow'un solunda olmalı: right: 26px (arrow'un solunda 5px boşlukla) */
.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #ffffff !important;
    cursor: pointer !important;
    font-weight: bold !important;
    position: absolute !important;
    right: 26px !important; /* Arrow'un solunda (arrow right: 1px, width: 20px, clear width: 20px, boşluk: 5px) */
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    height: 20px !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 3 !important; /* Arrow'dan (z-index: 1) üstte olmalı */
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #d4af37 !important;
}

/* Select2 for product selection (smaller) */
.select2-container--sm .select2-selection--single {
    height: 31px !important;
    position: relative !important;
}

.select2-container--sm .select2-selection--single .select2-selection__rendered {
    line-height: 31px !important;
    font-size: 0.875rem !important;
    padding-left: 8px !important;
    padding-right: 45px !important; /* Clear butonu (15px) + boşluk (5px) + arrow (15px) + güvenlik (10px) */
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    height: 31px !important;
}

.select2-container--sm .select2-selection--single .select2-selection__arrow {
    height: 29px !important;
    position: absolute !important;
    top: 1px !important;
    right: 1px !important;
    width: 15px !important;
}

.select2-container--sm .select2-selection--single .select2-selection__clear {
    right: 21px !important; /* Arrow'un solunda (arrow right: 1px, width: 15px, clear width: 15px, boşluk: 5px) */
    font-size: 0.875rem !important;
    width: 15px !important;
    height: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    padding: 0 !important;
    z-index: 3 !important; /* Arrow'dan üstte olmalı */
}

