:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0,0,0,0.15);
    
    /* Brand Colors */
    --primary: #0d6efd;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
}

[data-theme="dark"] {
    --bg-primary: #1a1d20;
    --bg-secondary: #212529;
    --bg-tertiary: #2c3034;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --border-color: #495057;
    --shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.3);
    --shadow-lg: 0 0.5rem 1rem rgba(0,0,0,0.5);
}

/* Global Styles - Light Theme */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #212529;
    line-height: 1.4;
    min-height: 100vh;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Form Controls - Light Theme */
.form-control,
.form-select {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    color: #212529;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.form-select option {
    background-color: #ffffff;
    color: #212529;
    padding: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: #0d6efd;
    color: #212529;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
}

.form-label {
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
}

/* Compact Buttons */
.btn {
    padding: 0.425rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cards - Light Theme */
.card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    margin-bottom: 1rem;
}

/* Modern Stat Cards */
.stat-card-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card-modern .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-modern .stat-icon i {
    font-size: 1.75rem;
    color: #ffffff;
}

.stat-card-modern .stat-content {
    flex: 1;
}

.stat-card-modern .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card-modern .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-card-modern small {
    font-size: 0.75rem;
    display: block;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.card-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #1a1d29 0%, #0f1118 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.9375rem;
    color: #ffffff;
}

.card-header i {
    color: #ffffff;
}

.card-header .btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.card-header .btn i {
    color: #ffffff;
}

.card-header .btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.card-body {
    padding: 1rem;
    color: #212529;
}

.card-footer {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
}

/* Tables - Light Theme */
.table {
    font-size: 0.875rem;
    color: #212529;
}

.table th {
    padding: 0.625rem 0.75rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
}

.table td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
    border-color: #dee2e6;
    color: #212529;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

.table-bordered {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar - Modern Dark Design */
/* Sidebar - Dark Theme (Varsayılan) */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #1a1d29 0%, #0f1118 100%);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar .sidebar-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1rem;
}

.sidebar .sidebar-logo {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sidebar .sidebar-logo i {
    color: #0d6efd;
    font-size: 1.5rem;
}

.sidebar .sidebar-menu {
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
}

.sidebar .sidebar-menu-item {
    margin: 0.15rem 0.75rem;
}

.sidebar .sidebar-menu-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .sidebar-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #0d6efd;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar .sidebar-menu-link:hover {
    background: rgba(13, 110, 253, 0.15);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar .sidebar-menu-link:hover::before {
    transform: scaleY(1);
}

.sidebar .sidebar-menu-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.sidebar .sidebar-menu-link.active::before {
    transform: scaleY(1);
    background: white;
}

.sidebar .sidebar-menu-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar .sidebar-menu-link:hover i {
    transform: scale(1.1);
}

.sidebar .sidebar-menu-link .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Scrollbar Style */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.5);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 1rem;
    min-height: 100vh;
}

/* Navbar - Modern Light Design */
.navbar-custom {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 0.875rem 1.5rem;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 0 0 8px 8px;
}

.navbar-custom h5 {
    color: #212529;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-custom h5::before {
    content: '';
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 2px;
}

.navbar-custom .text-muted {
    color: #6c757d !important;
    background: rgba(108, 117, 125, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

.navbar-custom .text-muted i {
    color: #0d6efd;
    font-size: 0.875rem;
}

/* Badges - Compact */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

/* Alerts - Compact */
.alert {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-dismissible .btn-close {
    padding: 0.875rem;
}

/* Modal - Dark Mode */
.modal-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1e2124;
}

.modal-body {
    padding: 1rem;
    background-color: #1a1d20;
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1e2124;
}

.modal-content {
    background-color: #1a1d20;
    color: #f8f9fa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: #f8f9fa;
}

/* Input Groups - Dark Mode */
.input-group-text {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #adb5bd;
}

/* Pagination - Compact */
.pagination {
    font-size: 0.875rem;
}

.page-link {
    padding: 0.375rem 0.625rem;
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.page-link:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Dropdown - Dark Mode */
.dropdown-menu {
    background-color: #1e2124;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 0.875rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #e4e6eb;
}

.dropdown-item:hover {
    background-color: rgba(77, 163, 255, 0.1);
    color: #fff;
}

/* Alert - Dark Mode */
.alert {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75b798;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.3);
    color: #6edff6;
}

/* Text Colors - Dark Mode */
.text-muted {
    color: #adb5bd !important;
}

.text-primary {
    color: #6ea8fe !important;
}

.text-success {
    color: #75b798 !important;
}

.text-danger {
    color: #ea868f !important;
}

.text-warning {
    color: #ffda6a !important;
}

/* Badge - Dark Mode */
.badge {
    font-weight: 500;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.dropdown-divider {
    border-top-color: var(--border-color);
}

/* Stats Cards */
.stat-card {
    padding: 1.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    color: white;
    border: none;
}

.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .table {
        font-size: 0.8125rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Quote Preview */
.quote-preview {
    background-color: white;
    color: #212529;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Utilities */
.text-muted {
    color: var(--text-secondary) !important;
}

.bg-light {
    background-color: var(--bg-secondary) !important;
}

.border {
    border-color: var(--border-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.shadow {
    box-shadow: var(--shadow-lg) !important;
}

/* Autocomplete Styles */
.autocomplete-results {
    position: relative;
}

.autocomplete-results .list-group {
    margin-top: 2px;
    border-radius: 0.375rem;
}

.autocomplete-results .list-group-item {
    cursor: pointer;
    padding: 0.625rem;
    border-color: #dee2e6;
}

.autocomplete-results .list-group-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-results .list-group-item strong {
    color: #212529;
}

/* Modal Light Theme Override */
.modal-content {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.modal-header,
.modal-footer {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.modal-body {
    background-color: #ffffff !important;
}

.modal-title {
    color: #212529 !important;
}

.modal label,
.modal .form-label {
    color: #212529 !important;
}

.modal .form-control,
.modal .form-select {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

.modal .alert-info {
    background-color: #cfe2ff !important;
    border-color: #9ec5fe !important;
    color: #084298 !important;
}

/* Select2 Modal Styling */
.select2-container--bootstrap-5 .select2-selection {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    color: #212529 !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Dark Tabs */
.nav-tabs-dark {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs-dark .nav-link {
    color: rgba(255, 255, 255, 0.7);
    background: linear-gradient(180deg, #2a2d39 0%, #1f2128 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    margin-right: 0.25rem;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs-dark .nav-link:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #343743 0%, #292c38 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-tabs-dark .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.nav-tabs-dark .nav-link i {
    margin-right: 0.5rem;
}
