:root {
    --primary: #2c7be5;
    --primary-dark: #1a5bb5;
    --success: #00d97e;
    --danger: #e63757;
    --warning: #f6c343;
    --info: #39afd1;
    --dark: #12263f;
    --gray-100: #f9f9fb;
    --gray-200: #edf2f6;
    --gray-300: #d1d9e6;
    --gray-400: #b0bec5;
    --gray-500: #78909c;
    --gray-600: #546e7a;
    --gray-700: #37474f;
    --sidebar-width: 260px;
    --header-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f7f6;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #12263f 0%, #2c7be5 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
}

.login-card .logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-card .logo span {
    color: var(--primary);
}

.login-card .subtitle {
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 14px;
}

.login-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.login-card .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,123,229,0.1);
}

.login-card .btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-card .btn-login:hover {
    background: var(--primary-dark);
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    color: #94a3b8;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header .brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.sidebar-header .brand span {
    color: var(--primary);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin: 16px 12px 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link svg {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--primary);
    font-weight: 600;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-area {
    padding: 28px;
    flex: 1;
}

/* Cards & Components */
.card-custom {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 24px;
}

.card-custom .card-header {
    padding: 18px 24px;
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
}

.card-metric {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    padding: 20px 24px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Table */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 16px;
}

.table-custom td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
}

/* Badge Utilities */
.badge-kunye {
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
}

.badge-stok {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Feather Icon Global Safe Styles */
svg.feather, .btn svg, button svg, a svg {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

.btn-sm svg, .btn-icon svg {
    width: 14px;
    height: 14px;
}

/* Font Size Helpers */
.fs-7 { font-size: 13px !important; }
.fs-8 { font-size: 12px !important; }
.fs-9 { font-size: 10px !important; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Select2 Bootstrap 5 & Modal Uyumluluk Stilleri */
.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid var(--gray-300, #dee2e6);
    border-radius: 8px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    background-color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 26px;
    padding-left: 0;
    padding-right: 20px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 8px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary, #2c7be5);
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.15);
    outline: 0;
}

.select2-dropdown {
    border: 1px solid var(--gray-300, #dee2e6);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1070 !important;
}

.select2-container {
    z-index: 1;
}

.select2-container--open {
    z-index: 1070 !important;
}

.modal .select2-container--open,
.modal .select2-dropdown {
    z-index: 1080 !important;
}

body.modal-open .select2-container:not(.modal .select2-container) {
    z-index: 1 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--gray-300, #dee2e6);
    border-radius: 6px;
    padding: 6px 10px;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary, #2c7be5);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary, #2c7be5);
    color: white;
}

.select2-container--default .select2-results__option--selected {
    background-color: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

.select2-dropdown--above {
    border-bottom: 1px solid var(--gray-300, #dee2e6) !important;
    border-radius: 8px !important;
    margin-top: -3px;
}

.select2-dropdown--below {
    border-top: 1px solid var(--gray-300, #dee2e6) !important;
    border-radius: 8px !important;
    margin-top: 3px;
}

/* Filtre Kartı Select2 & Arama Alanları Stilleri */
select.select2-filter + .select2-container--default .select2-selection--single {
    height: 32px;
    border: 1px solid var(--gray-300, #dee2e6);
    border-radius: 6px;
    padding: 2px 10px;
    display: flex;
    align-items: center;
    background-color: #fff;
    font-size: 0.8125rem;
}

select.select2-filter + .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 26px;
    padding-left: 0;
    padding-right: 18px;
    font-size: 0.8125rem;
}

select.select2-filter + .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px;
    right: 6px;
}

.filter-search-input {
    height: 32px !important;
    font-size: 0.8125rem !important;
    border-radius: 6px !important;
}

.filter-reset-btn {
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8125rem !important;
    border-radius: 6px !important;
}

/* Tablo başındaki yinelenen DataTables arama kutusunu filtre kartı varken gizle */
#ipGirisTable_filter,
#ormeIsEmirleriTable_filter,
#kaliteKontrolTable_filter,
#boyahaneTable_filter {
    display: none;
}



