/* =============== MERKEZI PATIKA UI SİSTEMİ =============== */
/* UX ÇALIŞMASI: Standardize edilmiş, responsive, merkezi tasarım sistemi */
/* FORM VE TABLO STANDARDİZASYONU İÇİN TEK KAYNAK */

:root {
 /* Layout Variables */
 --sidebar-width: 240px;
 --sidebar-width-mini: 70px;
 --navbar-height: 60px;
 --border-radius: 8px;
 --transition-speed: 0.3s;
 --shadow: 0 2px 8px rgba(0,0,0,0.1);
 
 /* STANDARDIZED COLOR PALETTE */
 --primary-color: #007bff;
 --secondary-color: #6c757d;
 --success-color: #28a745;
 --danger-color: #dc3545;
 --warning-color: #ffc107;
 --info-color: #17a2b8;
 
 /* FORM STANDARDIZATION */
 --form-input-padding: 0.75rem 1rem;
 --form-button-padding: 0.75rem 1.5rem;
 --form-border-radius: var(--border-radius);
 
 /* TABLE STANDARDIZATION */
 --table-header-bg: #f8f9fa;
 --table-border-color: #dee2e6;
 --table-hover-bg: rgba(0,123,255,0.1);
}

/* =============== PATIKA FORM CARD STANDARDİZASYONU =============== */
/* KULLANIM: Tüm formlarda aynı görünüm ve yapı */

.patika-form-card {
 background: #ffffff;
 border-radius: var(--border-radius);
 box-shadow: var(--shadow);
 margin-bottom: 2rem;
 overflow: hidden;
}

.patika-form-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 1.5rem 2rem;
 background-color: var(--table-header-bg);
 border-bottom: 1px solid var(--table-border-color);
}

.patika-form-header h5 {
 margin: 0;
 font-weight: 600;
 color: #333;
}

.patika-form-actions {
 display: flex;
 gap: 0.5rem;
 flex-wrap: wrap;
}

.patika-form-body {
 padding: 2rem;
}

.section-title {
 color: #333;
 font-weight: 600;
 margin-bottom: 1rem;
 display: flex;
 align-items: center;
 border-bottom: 1px solid var(--table-border-color);
 padding-bottom: 0.5rem;
}

.form-fields-section {
 background-color: #f8f9fa;
 padding: 1.5rem;
 border-radius: var(--border-radius);
 border: 1px solid var(--table-border-color);
}

.ahp-matrix-section {
 margin-top: 2rem;
}

/* =============== MERKEZI FORM STANDARDİZASYONU =============== */
/* KULLANIM: Tüm formlarda tutarlı görünüm ve davranış */

/* Form Container - Tüm formlar için standart yapı */
.patika-form-container {
 background: #ffffff;
 border-radius: var(--form-border-radius);
 box-shadow: var(--shadow);
 padding: 2rem;
 margin-bottom: 2rem;
}

/* Form Input Standardization */
.form-control, .form-select {
 padding: var(--form-input-padding);
 border: 1px solid var(--table-border-color);
 border-radius: var(--form-border-radius);
 font-size: 0.95rem;
 transition: all var(--transition-speed) ease;
}

.form-control:focus, .form-select:focus {
 border-color: var(--primary-color);
 box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
 outline: none;
}

/* Form Button Standardization - SAĞ ALTTA AYNİ YERDE */
.patika-form-buttons {
 display: flex;
 justify-content: flex-end;
 gap: 0.75rem;
 margin-top: 2rem;
 padding-top: 1.5rem;
 border-top: 1px solid var(--table-border-color);
}

.patika-form-buttons .btn {
 padding: var(--form-button-padding);
 min-width: 120px;
 font-weight: 600;
 border-radius: var(--form-border-radius);
}

/* Standard form button order: İptal (secondary) → Kaydet (primary) */
.patika-form-buttons .btn-secondary {
 order: 1;
 background-color: var(--secondary-color);
 border-color: var(--secondary-color);
 color: white;
}

.patika-form-buttons .btn-primary {
 order: 2;
 background-color: var(--primary-color);
 border-color: var(--primary-color);
 color: white;
}

/* =============== MERKEZI TABLO STANDARDİZASYONU =============== */
/* KULLANIM: Tüm tablolarda tutarlı görünüm ve responsive davranış */

/* Table Container - Tüm tablolar için standart yapı */
.patika-table-container {
 background: #ffffff;
 border-radius: var(--form-border-radius);
 box-shadow: var(--shadow);
 margin-bottom: 2rem;
 overflow: hidden;
}

/* Table Header - SAĞ ÜSTTE BUTONLAR İÇİN */
.patika-table-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 1.5rem 2rem;
 background-color: var(--table-header-bg);
 border-bottom: 1px solid var(--table-border-color);
}

.patika-table-header h5 {
 margin: 0;
 font-weight: 600;
 color: #333;
}

/* Table Action Buttons - SAĞ ÜSTTE AYNİ YERDE AYNİ SIRDA */
.patika-table-actions {
 display: flex;
 gap: 0.5rem;
 flex-wrap: wrap;
}

.patika-table-actions .btn {
 padding: 0.5rem 1rem;
 font-size: 0.875rem;
 border-radius: var(--form-border-radius);
}

/* Standard table button order: Export → Print → Filter → Refresh → Add */
.patika-table-actions .btn-success { order: 1; } /* Export */
.patika-table-actions .btn-info { order: 2; } /* Print */
.patika-table-actions .btn-secondary { order: 3; } /* Filter */
.patika-table-actions .btn-warning { order: 4; } /* Refresh */
.patika-table-actions .btn-primary { order: 5; } /* Add New */

/* Table Responsive Wrapper */
.patika-table-responsive {
 width: 100%;
 overflow-x: auto;
 -webkit-overflow-scrolling: touch;
}

/* Table Standardization */
.patika-table {
 width: 100%;
 margin-bottom: 0;
 background-color: #ffffff;
 border-collapse: collapse;
}

.patika-table th {
 background-color: var(--table-header-bg);
 border: 1px solid var(--table-border-color);
 padding: 1rem;
 font-weight: 600;
 text-align: left;
 color: #333;
 white-space: nowrap;
}

.patika-table td {
 border: 1px solid var(--table-border-color);
 padding: 0.75rem 1rem;
 vertical-align: middle;
}

.patika-table tbody tr:hover {
 background-color: var(--table-hover-bg);
}

/* =============== BADGE REMOVAL CLASS =============== */
/* KULLANIM: Sol üsteki gereksiz badge'leri gizlemek için */
.patika-remove-top-badges {
 display: none !important;
}

/* =============== RESPONSIVE DESIGN STANDARDİZASYONU =============== */
/* KULLANIM: Tüm cihazlarda optimum görünüm için responsive kurallar */

/* Mobile First: Form ve Table Responsive Rules */
@media (max-width: 768px) {
 /* Form Responsive */
 .patika-form-container,
 .patika-form-card {
 padding: 1.5rem 1rem;
 margin: 0.5rem;
 }
 
 .patika-form-header {
 flex-direction: column;
 gap: 1rem;
 text-align: center;
 }
 
 .patika-form-actions {
 justify-content: center;
 width: 100%;
 }
 
 .patika-form-body {
 padding: 1.5rem 1rem;
 }
 
 .patika-form-buttons {
 flex-direction: column;
 gap: 0.5rem;
 }
 
 .patika-form-buttons .btn {
 width: 100%;
 min-width: auto;
 }
 
 /* Table Responsive */
 .patika-table-header {
 flex-direction: column;
 gap: 1rem;
 text-align: center;
 }
 
 .patika-table-actions {
 justify-content: center;
 width: 100%;
 }
 
 .patika-table-actions .btn {
 flex: 1;
 min-width: 0;
 }
 
 .patika-table th:nth-child(n+5),
 .patika-table td:nth-child(n+5) {
 display: none;
 }
}

@media (min-width: 768px) and (max-width: 992px) {
 .patika-table-actions .btn {
 padding: 0.4rem 0.8rem;
 font-size: 0.8rem;
 }
}

/* === FLEXBOX ANA LAYOUT === */
body {
 display: flex;
 flex-direction: column;
 min-height: 100vh;
 margin: 0;
 padding: 0;
 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 background-color: #f8f9fa;
 color: #333;
 overflow-x: hidden;
 line-height: 1.6;
}

/* Layout wrapper for sidebar and main content */
.layout-wrapper {
 display: flex;
 flex-direction: row;
 flex: 1;
 min-height: calc(100vh - var(--navbar-height));
 margin-top: var(--navbar-height);
}

.container-fluid > .row {
 display: flex;
 flex-direction: row;
 min-height: 100vh;
 width: 100%;
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

.sidebar {
 flex: 0 0 var(--sidebar-width);
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
 height: calc(100vh - var(--navbar-height));
 background: linear-gradient(135deg, #343a40 0%, #495057 100%);
 color: #fff;
 overflow-y: auto;
 overflow-x: hidden;
 padding: 1.5rem 1rem;
 transition: all var(--transition-speed) ease;
 z-index: 999;
 position: relative;
 box-shadow: var(--shadow);
}

.main-content {
 flex: 1;
 padding: 2rem;
 box-sizing: border-box;
 min-width: 0;
 background: #ffffff;
 min-height: calc(100vh - var(--navbar-height));
 overflow-x: auto;
 border-radius: var(--border-radius) 0 0 0;
 margin-left: 4px;
}

.navbar {
 background: linear-gradient(135deg, #495057 0%, #343a40 100%);
 color: white;
 width: 100%;
 z-index: 1050;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 display: flex !important;
 align-items: center;
 height: var(--navbar-height);
 min-height: var(--navbar-height);
 box-sizing: border-box;
 padding: 0 1.5rem;
 box-shadow: var(--shadow);
 border-bottom: 3px solid #007bff;
}

/* RESPONSIVE DESIGN - STANDARDIZED */
@media (max-width: 992px) {
 .layout-wrapper {
 flex-direction: row; /* Keep row layout */
 }
 .sidebar {
 position: fixed;
 top: var(--navbar-height);
 left: 0;
 width: var(--sidebar-width);
 height: calc(100vh - var(--navbar-height));
 transform: translateX(-100%);
 z-index: 1040;
 box-shadow: 2px 0 10px rgba(0,0,0,0.15);
 }
 .sidebar.show {
 transform: translateX(0);
 }
 .main-content {
 width: 100%;
 padding: 1.5rem;
 margin-left: 0;
 border-radius: 0;
 }
}

@media (max-width: 767.98px) {
 .navbar {
 min-height: 56px;
 height: 56px;
 padding: 0 1rem;
 }
 :root {
 --navbar-height: 56px;
 }
 .main-content {
 padding: 1rem;
 }
 .sidebar {
 width: calc(100vw - 20px);
 max-width: var(--sidebar-width);
 }
}

/* WEB Genel Stiller */
/* Navbar ve sidebar için genel stil ayarları */
.navbar {
 background-color: #424242;
 color: white;
 width: 100%;
 z-index: 1050;
 position: fixed;
 top: 0;
 left: 0;
 display: flex !important;
 align-items: center;
 justify-content: space-between;
 height: var(--navbar-height);
 min-height: var(--navbar-height);
 padding: 0.5rem 1rem;
}

/* Mobil dikey ekranlar için navbar'ı göster */
@media (max-width: 992px) and (orientation: portrait) {
 .navbar {
 display: flex !important;
 height: var(--navbar-height);
 min-height: var(--navbar-height);
 }
}

.sidebar.sidebar-mini {
 width: var(--sidebar-width-mini);
 min-width: var(--sidebar-width-mini);
 max-width: var(--sidebar-width-mini);
}
.sidebar.sidebar-expanded {
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
}

/* Sağ Sidebar için Stiller - COMPLETELY DISABLED */
#rightSidebar {
 display: none !important;
 visibility: hidden !important;
 width: 0 !important;
 height: 0 !important;
 position: absolute !important;
 left: -9999px !important;
 top: -9999px !important;
 z-index: -1 !important;
}

/* Sağ Sidebar Gösterme - DISABLED */
#rightSidebar.show {
 display: none !important;
 visibility: hidden !important;
 right: -9999px !important;
}

/* Mobil Sidebar ve Sağ Sidebar Stilleri */
@media (max-width: 992px) {
 .sidebar {
 transform: translateX(-100%);
 width: var(--sidebar-width);
 left: 0;
 top: var(--navbar-height);
 height: calc(100% - var(--navbar-height));
 z-index: 1050;
 }
 .sidebar.show {
 transform: translateX(0);
 }

 #calendar {
 left: var(--content-margin);
 right: var(--content-margin);
 top: calc(var(--navbar-height) + var(--content-margin));
 }

 .container-fluid {
 margin-left: 0;
 width: 100%;
 padding-top: var(--navbar-height);
 }
}

/* WEB Modal Stilleri */
/* Web görünümü için modal ayarları */
.modal-dialog {
 max-width: 60%; /* Modal genişliğini ekranın %60'ı ile sınırlandır */
 width: auto; /* Otomatik genişlik ayarı */
 margin: 1.75rem auto; /* Modal'ın etrafına boşluk bırak */
 display: flex;
 flex-direction: column;
}

.modal-content {
 display: flex;
 flex-direction: column;
 height: auto; /* İçeriğin yüksekliğine göre ayarla */
 max-height: 90vh; /* İçeriğin yüksekliğini ekranın %90'ı ile sınırlandır */
 overflow-y: auto; /* İçeriğin taşması durumunda dikey kaydırma çubuğu ekle */
 border-radius: 0.3rem; /* Köşe yuvarlama */
 padding: 1rem; /* İçerik kenar boşlukları */
}

.modal-body {
 flex-grow: 1;
 overflow-y: auto; /* İçeriğin taşması durumunda dikey kaydırma çubuğu ekle */
 padding-bottom: 60px; /* Footer ile içerik arasında boşluk */
}

.modal-footer {
 position: sticky; /* Footer'ı içerik sonuna yapışkan olarak ayarla */
 bottom: 0;
 background-color: white;
 z-index: 10;
 padding: 10px 15px;
 box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
 display: flex;
 justify-content: flex-end;
 width: 100%;
}

/* Mobil Modal Stilleri */
/* Mobil görünüm için modal ayarları */
@media (max-width: 768px) {
 .modal-dialog {
 max-width: 100%;
 margin: 0;
 height: 100%;
 display: flex;
 flex-direction: column;
 justify-content: center;
 }

 .modal-content {
 height: 100%;
 border-radius: 0;
 display: flex;
 flex-direction: column;
 justify-content: center;
 }

 .modal-body {
 flex-grow: 1;
 overflow-y: auto;
 }

 .modal-footer {
 position: static;
 bottom: 0;
 width: 100%;
 }
}

/* WEB Calendar (Takvim) Stilleri */
/* Web görünümü için takvim konumlandırması ve stil ayarları */
#calendar {
 position: absolute;
 top: calc(var(--navbar-height) + var(--content-margin));
 left: calc(var(--sidebar-width) + var(--content-margin));
 right: var(--content-margin);
 bottom: var(--content-margin);
}

/* Mobil Calendar (Takvim) Stilleri */
/* Mobil görünüm için takvim ayarları */
@media (max-width: 992px) {
 #calendar {
 left: 0; /* Sağ ve sol boşlukları kaldır */
 right: 0;
 bottom: var(--content-margin);
 width: calc(100% - 10px); /* Takvim genişliğini %100 yap ve kenarlarda 5px boşluk bırak */
 margin: 0 5px; /* Sağ ve sol kenarlarda 5px boşluk */
 }

 /* Dikey ekran (portrait) için üst boşluk ayarı */
 @media (orientation: portrait) {
 #calendar {
 top: calc(var(--navbar-height) + 10px); /* Dikey modda navbar yüksekliği + 10px boşluk */
 }
 }

 /* Yatay ekran (landscape) için üst boşluk ayarı */
 @media (orientation: landscape) {
 #calendar {
 top: 10px; /* Yatay modda 10px boşluk */
 }
 }

 .fc-toolbar {
 flex-direction: row; /* Butonları tek satırda göster */
 justify-content: space-between; /* Butonlar arasında boşluk bırak */
 align-items: center; /* Butonları ortala */
 margin-bottom: 10px;
 padding: 0 5px; /* Sağ ve sol tarafta 5px boşluk bırak */
 }

 .fc-toolbar .fc-left,
 .fc-toolbar .fc-center,
 .fc-toolbar .fc-right {
 display: flex;
 flex-wrap: nowrap; /* Tek satırda sarma */
 justify-content: center; /* Butonları ortala */
 align-items: center; /* Butonları ortala */
 }

 .fc-toolbar .fc-left button,
 .fc-toolbar .fc-center h2,
 .fc-toolbar .fc-right button {
 font-size: 0.8rem; /* Buton ve başlık boyutunu daha da küçült */
 padding: 0.1rem 0.3rem; /* Butonlara daha az boşluk ekle */
 margin: 0 2px; /* Butonlar arasındaki boşluğu küçült */
 }

 .container-fluid {
 margin-left: 0; /* Mobilde sol boşluk yok */
 width: calc(100% - 10px); /* Genişliği %100 yap ve kenarlarda 5px boşluk bırak */
 padding-top: 10px; /* Varsayılan üst boşluk */
 padding-left: 5px; /* Sol tarafta 5px boşluk bırak */
 padding-right: 5px; /* Sağ tarafta 5px boşluk bırak */
 }

 .fc-button-group {
 display: flex; /* Buton grubunu yatayda düzenle */
 gap: 2px; /* Butonlar arasında 2px boşluk bırak */
 }
}

/* Tarih Seçici Widget (Datetime Picker) Stilleri */
.bootstrap-datetimepicker-widget .datepicker-days table tbody tr td.weekend {
 background-color: #d2fdfc;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
 background-color: #007bff;
 border-radius: 50%;
 color: white;
}

.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
 padding: 4px;
 width: 30px;
 height: 30px;
 text-align: center;
 vertical-align: middle;
}

/* Tarih ve Saat Input Stilleri */
.datetime-input {
 font-size: 16px;
 font-weight: bold;
 color: #333;
 border: 2px solid #666;
 padding: 8px 10px;
 border-radius: 4px;
}

.datetime-input:focus {
 border-color: #0056b3;
 box-shadow: 0 0 8px rgba(0, 86, 179, 0.8);
}

/* İkon Stilleri */
.text-success {
 color: green !important;
}

.text-danger {
 color: red !important;
}

/* Sidebar toggle butonu için stil (navbar'da hamburger) */
.sidebar-toggle-btn {
 position: fixed;
 top: 8px;
 left: 8px;
 z-index: 1055;
 background: #424242;
 color: white;
 border: none;
 padding: 8px 10px;
 border-radius: 4px;
 cursor: pointer;
 display: none;
 transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
 background: #555;
}

.sidebar-overlay {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background-color: rgba(0, 0, 0, 0.5);
 z-index: 1030;
 display: none;
 opacity: 0;
 transition: opacity 0.3s ease;
}

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

/* Enhanced sidebar mobile functionality */
@media (max-width: 767.98px) {
 .sidebar {
 transform: translateX(-100%);
 transition: transform 0.3s ease;
 }
 
 .sidebar.show {
 transform: translateX(0);
 }
 
 body.sidebar-open {
 overflow: hidden;
 }
}

@media (max-width: 992px) {
 .sidebar-toggle-btn {
 display: block;
 }
}

/* Sidebar menüde ikon ve metin hizalaması */
.sidebar .nav-link i {
 margin-right: 0.7em;
}
.sidebar.sidebar-mini .nav-link i {
 margin-right: 0;
}

/* Sidebar mini modda tooltip gösterimi için */
.sidebar.sidebar-mini .nav-link[title]:hover::after {
 content: attr(title);
 position: absolute;
 left: 60px;
 background: #222;
 color: #fff;
 padding: 2px 8px;
 border-radius: 4px;
 font-size: 0.9em;
 white-space: nowrap;
 z-index: 2000;
}

/* Açıklama: Bu eklemeler sadece özel class'lar ile çalışır, Bootstrap grid ve layout override edilmez. */

/* Badge ve navbar badge alanı için iyileştirme */
.badge {
 font-size: 0.8rem;
 padding: 0.25em 0.6em;
 margin-right: 0.4em;
 border-radius: 0.5rem;
 font-weight: 500;
 vertical-align: middle;
}
.badge-role-admin {
 background-color: #007bff;
 color: #fff;
}
.badge-role-user {
 background-color: #28a745;
 color: #fff;
}
.navbar-user-info {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 white-space: nowrap;
}
@media (max-width: 768px) {
 .navbar .badge,
 .navbar .me-3,
 .navbar .me-2,
 .navbar-user-info {
 display: none !important;
 }
}

/* Navbar içindeki badge, kullanıcı adı ve diğer metinler için küçük font ve dar padding */
.navbar .badge,
.navbar .me-3,
.navbar .me-2,
.navbar .btn {
 font-size: 0.92rem;
 padding: 0.2em 0.5em;
 margin-right: 0.3em;
}
.navbar .navbar-brand span {
 font-size: 1.1rem;
}

/* Mobilde navbar badge ve ek bilgileri gizle, sadece logo ve çıkış kalsın */
@media (max-width: 768px) {
 .navbar .badge {
 display: none !important;
 }
 .navbar .navbar-brand span {
 font-size: 1rem;
 }
 .navbar-user-info span:not(.btn) {
 display: none !important;
 }
}

/* Tablet için badge ve yazı boyutunu biraz küçült */
@media (min-width: 769px) and (max-width: 1200px) {
 .navbar .badge,
 .navbar .me-3,
 .navbar .me-2 {
 font-size: 0.85rem;
 padding: 0.15em 0.4em;
 }
 .navbar .navbar-brand span {
 font-size: 1rem;
 }
}

/* === SIDEBAR AÇILIR-KAPANIR ve DARALTILABİLİR (MINI) === */

/* Sidebar geniş (expanded) mod: tam menü ve yazılar görünür */
.sidebar.sidebar-expanded {
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
 transition: width 0.3s;
}

/* Sidebar daraltılmış (mini) mod: sadece ikonlar görünür, yazılar gizlenir */
.sidebar.sidebar-mini {
 width: var(--sidebar-width-mini);
 min-width: var(--sidebar-width-mini);
 max-width: var(--sidebar-width-mini);
 transition: width 0.3s;
 overflow-x: hidden;
}
.sidebar.sidebar-mini .nav-link span,
.sidebar.sidebar-mini .nav-link .menu-text {
 display: none !important;
}
.sidebar.sidebar-mini .nav-link i {
 margin-right: 0;
 font-size: 1.2em;
}

/* Sidebar açılır (show) mod: mobilde tam ekran kaplar */
/* Mobile responsive - simplified */
@media (max-width: 768px) {
 .main-content {
 padding: 16px 12px;
 }
}

/* Tablet: Sidebar daraltılabilir, ana içerik genişler */
@media (min-width: 769px) and (max-width: 1200px) {
 .sidebar.sidebar-mini {
 width: 50px;
 min-width: 50px;
 max-width: 50px;
 }
}

/* Navbar ve sidebar spacing düzeltmesi */
@media (min-width: 768px) {
 .main-content {
 margin-top: 56px; /* Navbar yüksekliği */
 margin-left: 0; /* Sadece padding ile spacing sağlanacak */
 padding-top: 0;
 }
 .sidebar {
 width: 220px;
 min-width: 220px;
 max-width: 220px;
 }
}
@media (max-width: 991.98px) {
 .navbar .container-fluid {
 justify-content: center;
 align-items: center;
 }
 .navbar-user-info {
 width: auto;
 min-width: 180px;
 flex-shrink: 0;
 margin-left: auto;
 }
 .main-content {
 margin: 0 auto;
 display: flex;
 flex-direction: column;
 align-items: center;
 }
 .main-content .btn-group, .main-content .badge-group {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 gap: 0.5rem;
 }
 .navbar {
 flex-wrap: wrap;
 gap: 0.5rem;
 min-width: 0;
 padding-left: 0.5rem;
 padding-right: 0.5rem;
 justify-content: space-between;
 }
 .main-content {
 margin-top: 56px;
 margin-bottom: 1.5rem;
 padding: 1rem 0.5rem;
 }
 .main-content .btn, .main-content .badge, .main-content .menu-text {
 margin-bottom: 0.5rem;
 margin-right: 0.5rem;
 }
 .sidebar {
 width: 100%;
 min-width: 0;
 max-width: 100%;
 }
 .sidebar.sidebar-expanded,
 .sidebar.show {
 display: block !important;
 }
}
@media (max-width: 767.98px) {
 .main-content {
 margin-top: 48px;
 margin-left: 0;
 padding-top: 0;
 }
 .sidebar {
 width: 100%;
 min-width: 0;
 max-width: 100%;
 }
 .sidebar .nav-link i {
 display: inline-block !important;
 }
 .sidebar .nav-link .menu-text {
 display: none !important;
 }
 .sidebar-toggle-btn {
 display: block !important;
 width: 48px !important;
 height: 48px !important;
 position: fixed !important;
 top: 12px !important;
 left: 12px !important;
 z-index: 3001 !important;
 opacity: 1 !important;
 background: #333 !important;
 color: #fff !important;
 border-radius: 8px !important;
 border: none !important;
 }
}

@media (max-width: 768px) {
 .navbar .container-fluid {
 justify-content: center;
 align-items: center;
 }
 .navbar-user-info {
 width: auto;
 min-width: 140px;
 flex-shrink: 0;
 margin-left: auto;
 }
 .main-content {
 margin: 0 auto;
 display: flex;
 flex-direction: column;
 align-items: center;
 }
 .main-content .btn-group, .main-content .badge-group {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 gap: 0.3rem;
 }
 .main-content {
 margin-top: 48px;
 margin-bottom: 1rem;
 padding: 0.5rem 0.2rem;
 }
 .main-content .btn, .main-content .badge, .main-content .menu-text {
 margin-bottom: 0.3rem;
 margin-right: 0.3rem;
 }
}

/* Grafik Kartlarının Stilleri */
.card {
 box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); /* Hafif gölge ekler */
 width: 100%; /* Kartları tam genişlikte yap */
 height: auto; /* Yüksekliği içeriğe göre ayarlar */
 margin-bottom: 0.2rem; /* Kartlar arasında alt boşluk bırak */
 padding: 0.2rem; /* Kart içeriği etrafında boşluk */
 flex-grow: 1; /* Kartların aynı yükseklikte olmasını sağlar */
}

/* Grafikler İçin Canvas Ayarları */
.card-body canvas {
 width: 100% !important; /* Canvas genişliğini tam yap */
 height: 400px; /* Yüksekliği artırarak grafiği büyütün */
}

/* Mobilde Grafik Kartları için Ayarlar */
@media (max-width: 768px) {
 /* Kartlar */
 .card {
 width: 100%; /* Kartlar tam genişlikte olsun */
 margin-bottom: 1rem; /* Kartlar arasında yeterli boşluk bırak */
 padding: 0.5rem; /* Kart içi boşluğu biraz artır */
 }

 /* Canvas Ayarları */
 .card-body canvas {
 height: 250px !important; /* Mobilde grafikleri biraz küçült */
 width: 100% !important; /* Grafik genişliğini tam yap */
 }

 /* Container Ayarları */
 .container-fluid {
 padding-left: 10px; /* Sol ve sağdaki boşlukları biraz azalt */
 padding-right: 10px;
 margin-left: 0; /* Mobilde sidebar yerine tam ekran kullanımı */
 width: 100%; /* Genişliği tam ekran yap */
 }
}

/* WEB DataTables Stilleri */
.table-responsive {
 width: 100%;
 overflow-x: auto; /* Mobil cihazlarda yatay kaydırma */
}

.table {
 table-layout: auto; /* Sabit tablo düzeni yerine otomatik düzen */
 width: 100%;
 margin-bottom: 0;
}

.table th, .table td {
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 padding: 4px 8px;
}

/* Radio buton kolonu için stil ayarları */
table input[type="radio"] {
 display: block;
 margin: 0 auto; 
 height: 1rem;
 width: 1rem;
}

/* Esnek düzen ayarları */
.card-body .row {
 flex-wrap: nowrap;
}

/* Form grubu için boşluk ayarları */
.form-inline .form-group {
 margin-right: 10px;
}

/* Ekstra Form ve Tablo Stilleri */
#todo_list, #customers_list, #users_list, #charges_list, #documents_list, #add_todo {
 padding: 8px;
 margin-bottom: 10px;
 border: 1px solid #ccc;
 background-color: #f9f9f9;
}

/* Tablolardaki genel stil ayarları */
#customers_list th, #customers_list td,
#todo_list th, #todo_list td,
#users_list th, #users_list td,
#charges_list th, #charges_list td,
#documents_list th, #documents_list td {
 max-width: 150px;
 padding: 4px 8px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

/* Global Weights Tablosu Stilleri */
#global_weights_table {
 width: 100%;
 margin-bottom: 1rem;
 background-color: #fff;
 border-collapse: collapse;
}

#global_weights_table th {
 background-color: #f8f9fa;
 font-weight: bold;
 text-align: center;
 padding: 12px;
 border: 1px solid #dee2e6;
}

#global_weights_table td {
 padding: 8px;
 text-align: center;
 border: 1px solid #dee2e6;
}

/* Ana Kriter Renk Kodlaması */
.functionality-row {
 background-color: #e3f2fd;
}

.reference-row {
 background-color: #fff3e0;
}

.cost-row {
 background-color: #ffebee;
}

.support-row {
 background-color: #e8f5e9;
}

/* Yazdırma Stilleri */
@media print {
 .btn-group {
 display: none !important;
 }
 
 .card {
 border: none !important;
 box-shadow: none !important;
 }
 
 #global_weights_table {
 width: 100% !important;
 page-break-inside: avoid;
 }
}

/* --- NAVBAR & SIDEBAR ÇAKIŞMASI ÖNLEME (Sadece Masaüstü) --- */
@media (min-width: 992px) {
 .sidebar {
 position: fixed;
 top: var(--navbar-height);
 left: 0;
 height: calc(100vh - var(--navbar-height));
 z-index: 1040;
 }
 .main-content {
 margin-left: var(--sidebar-width);
 margin-top: var(--navbar-height);
 min-width: 0;
 transition: margin-left 0.3s;
 }
 .sidebar.sidebar-mini ~ .main-content {
 margin-left: var(--sidebar-width-mini);
 }
}
/* --- Responsive: Tablet/Mobilde sidebar üstte, main-content tam genişlikte --- */
@media (max-width: 991.98px) {
 .sidebar {
 position: static;
 top: auto;
 left: auto;
 height: auto;
 margin-left: 0;
 margin-top: 0;
 }
 .main-content {
 margin-left: 0;
 margin-top: var(--navbar-height);
 }
}
/* Açıklama: Bu blok sadece çakışmayı önler, mevcut flex ve grid yapısını bozmaz. */

@media (min-width: 768px) and (max-width: 1200px) {
 .sidebar.sidebar-mini {
 width: var(--sidebar-width-mini);
 min-width: var(--sidebar-width-mini);
 max-width: var(--sidebar-width-mini);
 transition: width 0.3s;
 overflow-x: hidden;
 }
 .sidebar.sidebar-expanded {
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
 transition: width 0.3s;
 }
 .sidebar.sidebar-mini .nav-link span,
 .sidebar.sidebar-mini .nav-link .menu-text {
 display: none !important;
 }
 .sidebar.sidebar-mini .nav-link i {
 margin-right: 0;
 font-size: 1.2em;
 }
}
@media (max-width: 767.98px) {
 .sidebar .nav-link i {
 display: none !important;
 }
 .sidebar .nav-link .menu-text {
 display: inline-block !important;
 }
}

/* --- SIDEBAR RESPONSIVE DÜZELTME --- */
@media (min-width: 768px) {
 .sidebar {
 position: fixed;
 top: var(--navbar-height);
 left: 0;
 height: calc(100vh - var(--navbar-height));
 z-index: 1040;
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
 transition: width 0.3s;
 transform: none !important;
 box-shadow: 2px 0 8px rgba(0,0,0,0.04);
 }
 .sidebar.sidebar-mini {
 width: var(--sidebar-width-mini);
 min-width: var(--sidebar-width-mini);
 max-width: var(--sidebar-width-mini);
 }
 .sidebar.sidebar-expanded {
 width: var(--sidebar-width);
 min-width: var(--sidebar-width);
 max-width: var(--sidebar-width);
 }
 .main-content {
 margin-left: var(--sidebar-width);
 margin-top: var(--navbar-height);
 transition: margin-left 0.3s;
 }
 .sidebar.sidebar-mini ~ .main-content {
 margin-left: var(--sidebar-width-mini);
 }
}
@media (max-width: 767.98px) {
 .sidebar {
 position: fixed;
 left: 0;
 top: var(--navbar-height);
 height: calc(100vh - var(--navbar-height));
 width: 0;
 min-width: 0;
 max-width: 0;
 overflow-x: hidden;
 z-index: 2000;
 background: #333;
 color: #fff;
 transition: width 0.3s;
 box-shadow: none;
 }
 .sidebar.show {
 width: 80vw;
 min-width: 80vw;
 max-width: 80vw;
 box-shadow: 2px 0 16px rgba(0,0,0,0.3);
 }
 .sidebar.sidebar-mini,
 .sidebar.sidebar-expanded {
 width: 0 !important;
 min-width: 0 !important;
 max-width: 0 !important;
 }
 .sidebar.show.sidebar-mini,
 .sidebar.show.sidebar-expanded {
 width: 80vw !important;
 min-width: 80vw !important;
 max-width: 80vw !important;
 }
 .main-content {
 margin-left: 0 !important;
 margin-top: var(--navbar-height);
 width: 100vw !important;
 padding-left: 0 !important;
 padding-right: 0 !important;
 }
 .sidebar-toggle-btn {
 display: block !important;
 width: 48px !important;
 height: 48px !important;
 position: fixed !important;
 top: 12px !important;
 left: 12px !important;
 z-index: 3001 !important;
 opacity: 1 !important;
 background: #333 !important;
 color: #fff !important;
 border-radius: 8px !important;
 border: none !important;
 }
 .sidebar-overlay {
 display: block;
 position: fixed;
 z-index: 1999;
 top: 0; left: 0; width: 100vw; height: 100vh;
 background: rgba(0,0,0,0.35);
 transition: opacity 0.2s;
 }
}

.sidebar-overlay {
 z-index: 9998 !important;
 position: fixed !important;
 top: 0 !important;
 left: 0 !important;
 width: 100vw !important;
 height: 100vh !important;
 background: rgba(0,0,0,0.35) !important;
 display: block !important;
}

/* === AHP MATRIX RADIO/CHECKBOX GROUP STILLERI === */
/* Decisions Add ve Edit sayfaları için uyumlu radio button stilleri */

/* Bootstrap btn-group için gelişmiş stiller (decisions_add.html) */
.ahp-radio-group .btn-group-vertical {
 display: flex !important;
 flex-direction: row !important;
 flex-wrap: wrap !important;
 justify-content: center !important;
 align-items: center !important;
 gap: 0.25rem !important;
 max-width: 100%;
 min-height: auto;
}

.ahp-radio-group .btn-group-vertical .btn {
 min-width: 40px !important;
 max-width: 50px !important;
 padding: 0.375rem 0.25rem !important;
 font-size: 0.75rem !important;
 border-radius: 0.375rem !important;
 margin: 0.125rem !important;
 flex: 0 0 auto !important;
 white-space: nowrap !important;
}

.ahp-radio-group .btn-group-vertical .btn:first-child,
.ahp-radio-group .btn-group-vertical .btn:last-child {
 border-radius: 0.375rem !important;
}

.radio-group.text-center .btn-group {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 gap: 0.25rem;
 max-width: 100%;
}

.radio-group.text-center .btn-group .btn {
 min-width: 40px;
 padding: 0.375rem 0.5rem;
 font-size: 0.8rem;
 border-radius: 0.375rem;
 margin: 0.125rem;
 flex: 0 0 auto;
}

.radio-group.text-center .btn-group .btn-outline-primary:checked,
.radio-group.text-center .btn-group .btn-outline-primary.active {
 background-color: #0d6efd;
 border-color: #0d6efd;
 color: #fff;
 box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.radio-group.text-center .btn-group .btn-outline-success:checked,
.radio-group.text-center .btn-group .btn-outline-success.active {
 background-color: #198754;
 border-color: #198754;
 color: #fff;
 box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

/* Responsive behaviour for btn-group */
@media (max-width: 768px) {
 .radio-group.text-center .btn-group {
 flex-direction: column;
 align-items: center;
 }
 
 .radio-group.text-center .btn-group .btn {
 min-width: 35px;
 padding: 0.25rem 0.4rem;
 font-size: 0.75rem;
 margin: 0.1rem;
 }
}

/* Custom radio-group için gelişmiş stiller (decisions_edit.html) */
.comparison-radio {
 flex: 2;
 padding: 0 1rem;
 display: flex;
 justify-content: center;
 align-items: center;
}

.radio-group {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 0.75rem;
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 border-radius: 0.75rem;
 border: 1px solid #dee2e6;
 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
 min-width: 100%;
 flex-wrap: wrap;
 gap: 0.5rem;
}

.radio-option {
 display: flex;
 flex-direction: column;
 align-items: center;
 margin: 0.25rem;
 padding: 0.25rem;
 border-radius: 0.5rem;
 transition: all 0.2s ease;
 cursor: pointer;
 min-width: 35px;
}

.radio-option:hover {
 background-color: rgba(13, 110, 253, 0.1);
 transform: translateY(-1px);
}

.radio-option input[type="radio"] {
 margin-bottom: 0.4rem;
 cursor: pointer;
 width: 16px;
 height: 16px;
 accent-color: #0d6efd;
}

.radio-option label {
 font-size: 0.8rem;
 color: #495057;
 cursor: pointer;
 font-weight: 500;
 text-align: center;
 white-space: nowrap;
}

.radio-option input[type="radio"]:checked + label,
.radio-option input[type="radio"]:checked ~ label {
 color: #0d6efd;
 font-weight: 700;
}

/* Comparison row iyileştirmeleri */
.comparison-row {
 background: #ffffff;
 border: 1px solid #e9ecef;
 margin-bottom: 1rem;
 padding: 1.5rem;
 border-radius: 1rem;
 display: flex;
 align-items: center;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
 transition: all 0.3s ease;
}

.comparison-row:hover {
 box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
 transform: translateY(-2px);
}

.criterion-cell {
 flex: 1;
 padding: 0.75rem;
 text-align: center;
}

.criterion-cell h6 {
 margin-bottom: 0;
 color: #343a40;
 font-weight: 600;
}

/* Responsive design için iyileştirmeler */
@media (max-width: 992px) {
 .radio-group {
 flex-direction: column;
 gap: 0.75rem;
 padding: 1rem;
 }
 
 .radio-option {
 flex-direction: row;
 gap: 0.5rem;
 min-width: auto;
 width: 100%;
 justify-content: center;
 }
 
 .radio-option input[type="radio"] {
 margin-bottom: 0;
 margin-right: 0.5rem;
 }
 
 .comparison-row {
 flex-direction: column;
 text-align: center;
 padding: 1rem;
 }
 
 .comparison-radio {
 order: 2;
 margin: 1rem 0;
 padding: 0;
 }
 
 .criterion-cell {
 flex: none;
 width: 100%;
 padding: 0.5rem;
 }
}

@media (max-width: 576px) {
 .radio-group {
 gap: 0.5rem;
 padding: 0.75rem;
 }
 
 .radio-option {
 min-width: 30px;
 padding: 0.2rem;
 }
 
 .radio-option label {
 font-size: 0.7rem;
 }
 
 .comparison-row {
 padding: 0.75rem;
 margin-bottom: 0.75rem;
 }
}

/* Validation için gelişmiş stiller */
.invalid-comparison {
 border-color: #dc3545;
 box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-comparison .radio-group {
 border-color: #dc3545;
 background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.validation-message {
 color: #dc3545;
 font-size: 0.875rem;
 margin-top: 0.5rem;
 font-weight: 500;
}

/* Criteria section başlıkları için iyileştirmeler */
.criteria-section {
 margin-bottom: 2rem;
 border-radius: 1rem;
 overflow: hidden;
 box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.section-header {
 padding: 1.25rem 1.5rem;
 background: linear-gradient(45deg, #2196F3, #1976D2);
 color: white;
 border-bottom: none;
}

.sub-criteria .section-header {
 background: linear-gradient(45deg, #607D8B, #455A64);
}

.criteria-content {
 padding: 1.5rem;
 background: #ffffff;
}

/* AHP matrix için grid layout iyileştirmesi */
.comparison-matrix {
 display: flex;
 flex-direction: column;
 gap: 2rem;
}

/* === MODERN AHP MATRIX LAYOUT (Excel benzeri) === */
.ahp-matrix-container {
 margin-top: 2rem;
}

.modern-matrix-container {
 background: white;
 border-radius: 12px;
 padding: 1.5rem;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
 margin-bottom: 2rem;
 overflow-x: auto;
}

.comparison-matrix-table {
 margin-bottom: 0;
 border-collapse: separate;
 border-spacing: 0;
 width: 100%;
 min-width: 800px;
 background: white;
}

.comparison-matrix-table th,
.comparison-matrix-table td {
 border: 1px solid #e9ecef;
 vertical-align: middle;
 text-align: center;
 position: relative;
}

.comparison-matrix-table thead th {
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 color: white;
 font-weight: 600;
 padding: 12px 8px;
 font-size: 0.9rem;
}

.sub-criteria .comparison-matrix-table thead th {
 background: linear-gradient(135deg, #667eea 0%, #43cea2 100%);
}

.criteria-label {
 min-width: 120px;
 writing-mode: horizontal-tb;
}

.scale-header {
 position: relative;
 padding: 8px 4px;
}

.scale-labels {
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-size: 0.75rem;
 margin-bottom: 4px;
 opacity: 0.9;
}

.scale-labels span {
 flex: 1;
 text-align: center;
 font-weight: 500;
}

.scale-values {
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-size: 0.8rem;
 font-weight: 700;
 letter-spacing: 0.5px;
}

.scale-values span {
 flex: 1;
 text-align: center;
 background: rgba(255, 255, 255, 0.2);
 border-radius: 4px;
 padding: 2px 4px;
 margin: 0 1px;
}

.criteria-cell {
 background: #f8f9fa;
 font-weight: 600;
 color: #495057;
 padding: 16px 12px;
 min-width: 140px;
}

.base-criteria,
.benchmark-criteria {
 background: #ffffff;
 padding: 12px;
 min-width: 140px;
 border-left: 4px solid #007bff;
}

.benchmark-criteria {
 border-left-color: #28a745;
}

.criteria-box {
 text-align: left;
}

.criteria-name {
 font-weight: 600;
 color: #2c3e50;
 display: block;
 margin-bottom: 4px;
 font-size: 0.9rem;
 line-height: 1.3;
}

.criteria-attributes {
 margin-top: 6px;
}

.criteria-attributes .badge {
 font-size: 0.7rem;
 margin: 1px 2px;
 padding: 2px 6px;
}

.radio-cell {
 width: 60px;
 min-width: 60px;
 padding: 8px 4px;
 background: #fdfdfd;
 transition: all 0.2s ease;
 position: relative;
 cursor: pointer;
}

.radio-cell:hover {
 background: #e8f4f8;
 transform: scale(1.02);
}

.radio-cell.equal-cell {
 background: #fff3cd;
 border-left: 2px solid #ffc107;
 border-right: 2px solid #ffc107;
}

.radio-cell.equal-cell:hover {
 background: #ffebaa;
}

.ahp-radio {
 display: none;
}

.radio-label {
 display: block;
 width: 100%;
 height: 40px;
 line-height: 40px;
 margin: 0;
 cursor: pointer;
 font-weight: 600;
 font-size: 0.9rem;
 color: #495057;
 border-radius: 8px;
 transition: all 0.3s ease;
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 border: 2px solid transparent;
 position: relative;
 overflow: hidden;
}

.radio-label:hover {
 color: #007bff;
 background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
 border-color: #007bff;
 transform: translateY(-1px);
 box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.ahp-radio:checked + .radio-label {
 background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
 color: white;
 border-color: #004085;
 box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
 transform: scale(1.05);
 z-index: 2;
}

.equal-label {
 background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
 color: #212529 !important;
 font-weight: 700;
}

.ahp-radio:checked + .equal-label {
 background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
 color: white !important;
 box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.comparison-row {
 transition: all 0.2s ease;
}

.comparison-row:hover {
 background: rgba(0, 123, 255, 0.02);
}

.comparison-row:hover .criteria-cell {
 background: #e8f4f8;
}

/* Responsive Design */
@media (max-width: 1200px) {
 .modern-matrix-container {
 padding: 1rem;
 margin-left: -15px;
 margin-right: -15px;
 border-radius: 0;
 }
 
 .scale-labels span {
 font-size: 0.65rem;
 }
 
 .criteria-name {
 font-size: 0.8rem;
 }
}

@media (max-width: 768px) {
 .ahp-matrix-container {
 margin-left: -15px;
 margin-right: -15px;
 }
 
 .modern-matrix-container {
 padding: 0.5rem;
 box-shadow: none;
 border: 1px solid #dee2e6;
 }
 
 .comparison-matrix-table {
 min-width: 700px;
 font-size: 0.8rem;
 }
 
 .radio-cell {
 width: 45px;
 min-width: 45px;
 padding: 4px 2px;
 }
 
 .radio-label {
 height: 32px;
 line-height: 32px;
 font-size: 0.8rem;
 }
 
 .criteria-cell,
 .base-criteria,
 .benchmark-criteria {
 min-width: 100px;
 padding: 8px;
 font-size: 0.8rem;
 }
 
 .scale-labels {
 display: none;
 }
 
 .scale-values span {
 font-size: 0.7rem;
 padding: 1px 2px;
 }
}

/* Ana ve Alt Kriter Section Stilleri */
.criteria-section {
 background: transparent;
 border-radius: 16px;
 overflow: visible;
 margin-bottom: 2.5rem;
 box-shadow: none;
}

.criteria-section .section-header {
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 color: white;
 padding: 1.2rem 1.5rem;
 border-radius: 12px 12px 0 0;
 box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sub-criteria .section-header {
 background: linear-gradient(135deg, #667eea 0%, #43cea2 100%);
 box-shadow: 0 4px 15px rgba(67, 206, 162, 0.3);
}

.section-header h6 {
 margin-bottom: 4px;
 font-weight: 700;
 letter-spacing: 0.5px;
}

.section-header small {
 opacity: 0.9;
 font-style: italic;
}

/* Form Validation Stilleri */
.invalid-comparison {
 animation: shake 0.5s ease-in-out;
 border-left: 4px solid #dc3545 !important;
}

.invalid-comparison .radio-cell {
 background: #ffeaa7 !important;
 border-color: #e17055 !important;
}

@keyframes shake {
 0%, 100% { transform: translateX(0); }
 25% { transform: translateX(-5px); }
 75% { transform: translateX(5px); }
}

/* Loading ve Success States */
.matrix-processing {
 opacity: 0.7;
 pointer-events: none;
 position: relative;
}

.matrix-processing::after {
 content: "İşleniyor...";
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 background: rgba(0, 123, 255, 0.9);
 color: white;
 padding: 8px 16px;
 border-radius: 20px;
 font-weight: 600;
 z-index: 10;
}

/* =================== DECISION FORMS - MODERN AHP MATRIX STYLES =================== */

/* Card Design Enhancement for Decision Forms */
.card {
 background: rgba(255, 255, 255, 0.95);
 backdrop-filter: blur(10px);
 border: none;
 border-radius: 1rem;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
 transition: all 0.3s ease;
}

/* Form Input Groups */
.input-group {
 transition: all 0.3s ease;
}

.input-group:focus-within {
 box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.input-group-text {
 font-size: 1.2rem;
}

/* Custom Switch */
.custom-switch {
 background: #f8f9fa;
 padding: 0.5rem 1rem;
 border-radius: 0.5rem;
 display: inline-flex;
 align-items: center;
 transition: all 0.3s ease;
}

.form-check-input {
 width: 2.5em;
 height: 1.25em;
 margin-right: 0.5rem;
 cursor: pointer;
}

/* AHP Matrix Container */
.ahp-matrix-container {
 margin-top: 1.5rem;
}

.ahp-matrix-container.matrix-processing {
 opacity: 0.7;
 pointer-events: none;
}

/* Criteria Section Headers */
.criteria-section {
 margin-bottom: 2rem;
}

.section-header {
 text-align: center;
 margin-bottom: 1rem;
 padding: 0.75rem 1rem;
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 color: white;
 border-radius: 0.5rem;
 box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.sub-criteria .section-header {
 background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
 box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

.section-header h6 {
 font-weight: 600;
 margin: 0;
}

.section-header small {
 opacity: 0.9;
 font-size: 0.85rem;
}

/* Modern Matrix Container with Scroll */
.modern-matrix-container {
 overflow-x: auto;
 overflow-y: visible;
 padding: 0.5rem;
 background: white;
 border-radius: 0.75rem;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
 transition: box-shadow 0.3s ease;
}

.modern-matrix-container:hover {
 box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* Comparison Matrix Table */
.comparison-matrix-table {
 margin-bottom: 0;
 min-width: 1200px;
 border-collapse: separate;
 border-spacing: 0;
 background: white;
}

.comparison-matrix-table th,
.comparison-matrix-table td {
 text-align: center;
 vertical-align: middle;
 border: 1px solid #e9ecef;
 position: relative;
}

/* Scale Header Styling */
.scale-header {
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 padding: 0.75rem 0.5rem;
 border-bottom: 2px solid #dee2e6;
}

.scale-labels {
 display: flex;
 justify-content: space-between;
 font-size: 0.75rem;
 font-weight: 600;
 color: #495057;
 margin-bottom: 0.25rem;
}

.scale-values {
 display: flex;
 justify-content: space-between;
 font-size: 0.9rem;
 font-weight: 700;
 color: #007bff;
}

.scale-extreme { color: #dc3545; }
.scale-high { color: #fd7e14; }
.scale-slight { color: #ffc107; }
.scale-equal { color: #28a745; font-weight: 700; }

/* Criteria Labels */
.criteria-label {
 background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
 color: white;
 font-weight: 600;
 padding: 0.75rem 0.5rem;
 text-transform: uppercase;
 font-size: 0.8rem;
 letter-spacing: 0.5px;
}

/* Criteria Cells */
.criteria-cell {
 background: #f8f9fa;
 font-weight: 600;
 color: #495057;
 padding: 0.75rem 0.5rem;
 min-width: 120px;
}

/* Criteria Boxes */
.criteria-box {
 padding: 0.75rem;
 border-radius: 0.5rem;
 text-align: center;
 min-height: 80px;
 display: flex;
 flex-direction: column;
 justify-content: center;
 transition: all 0.3s ease;
}

.base-box {
 background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
 border: 2px solid #2196f3;
 color: #1565c0;
}

.benchmark-box {
 background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
 border: 2px solid #4caf50;
 color: #2e7d32;
}

.criteria-name {
 font-weight: 700;
 font-size: 0.9rem;
 margin-bottom: 0.25rem;
 display: block;
}

.criteria-attributes {
 margin-top: 0.5rem;
}

.criteria-attributes .badge {
 font-size: 0.7rem;
 margin: 0.1rem;
}

/* Radio Cells - Excel Style */
.radio-cell {
 width: 60px;
 height: 60px;
 padding: 0;
 position: relative;
 background: #f8f9fa;
 transition: all 0.2s ease;
}

.radio-cell:hover {
 background: #e9ecef;
 transform: scale(1.05);
}

.radio-cell.equal-cell {
 background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
 border: 2px solid #fbc02d;
}

.radio-cell.equal-cell:hover {
 background: linear-gradient(135deg, #fff59d 0%, #fff176 100%);
}

/* Hidden Radio Inputs */
.ahp-radio {
 position: absolute;
 opacity: 0;
 width: 100%;
 height: 100%;
 margin: 0;
 cursor: pointer;
}

/* Radio Labels - Excel Style Buttons */
.radio-label {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-weight: 700;
 font-size: 0.9rem;
 color: #495057;
 cursor: pointer;
 transition: all 0.3s ease;
 border-radius: 0.25rem;
 margin: 0;
}

.radio-label:hover {
 background: rgba(0, 123, 255, 0.1);
 color: #007bff;
 transform: scale(1.1);
}

/* Selected Radio Button */
.ahp-radio:checked + .radio-label {
 background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
 color: white;
 box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
 transform: scale(1.05);
 z-index: 10;
}

.equal-cell .ahp-radio:checked + .radio-label {
 background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
 box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Comparison Row States */
.comparison-row {
 transition: all 0.3s ease;
}

.comparison-row:hover {
 background: rgba(0, 123, 255, 0.05);
}

.comparison-row.invalid-comparison {
 background: rgba(220, 53, 69, 0.1);
 border-left: 4px solid #dc3545;
}

/* Responsive Scrolling */
.modern-matrix-container::-webkit-scrollbar {
 height: 8px;
}

.modern-matrix-container::-webkit-scrollbar-track {
 background: #f1f1f1;
 border-radius: 4px;
}

.modern-matrix-container::-webkit-scrollbar-thumb {
 background: #888;
 border-radius: 4px;
 transition: background 0.3s ease;
}

.modern-matrix-container::-webkit-scrollbar-thumb:hover {
 background: #555;
}

/* Loading States */
.matrix-processing .ahp-radio {
 pointer-events: none;
}

.matrix-processing .radio-label {
 opacity: 0.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
 .comparison-matrix-table {
 min-width: 800px;
 font-size: 0.8rem;
 }
 
 .radio-cell {
 width: 45px;
 height: 45px;
 }
 
 .radio-label {
 font-size: 0.8rem;
 }
 
 .criteria-box {
 min-height: 60px;
 padding: 0.5rem;
 }
 
 .criteria-name {
 font-size: 0.8rem;
 }
 
 .scale-labels {
 font-size: 0.65rem;
 }
 
 .scale-values {
 font-size: 0.8rem;
 }
}

@media (max-width: 576px) {
 .modern-matrix-container {
 padding: 0.25rem;
 }
 
 .comparison-matrix-table {
 min-width: 600px;
 font-size: 0.75rem;
 }
 
 .radio-cell {
 width: 40px;
 height: 40px;
 }
 
 .radio-label {
 font-size: 0.7rem;
 }
}

/* Animation for selection feedback */
@keyframes pulse {
 0% { transform: scale(1); }
 50% { transform: scale(1.1); }
 100% { transform: scale(1); }
}

.ahp-radio:checked + .radio-label {
 animation: pulse 0.3s ease-in-out;
}

/* Visual feedback for completed comparisons */
.comparison-row.completed {
 background: rgba(40, 167, 69, 0.05);
 border-left: 3px solid #28a745;
}

/* =================== END DECISION FORMS STYLES =================== */

/* =============== MERKEZI DATATABLE SİSTEMİ =============== */
/* KULLANIM: Tüm tablolar için Excel benzeri DataTable özellikleri */
/* UX İMPROVEMENT: Kolon resize, kart yapısı, arama/filtreleme */

/* DataTable Card Container - Tüm tablolar kart içinde olmalı */
.patika-datatable-card {
 background: #ffffff;
 border-radius: var(--border-radius);
 box-shadow: var(--shadow);
 margin-bottom: 2rem;
 overflow: hidden;
 border: 1px solid #dee2e6;
}

/* DataTable Header Enhancement */
.patika-datatable-card .patika-table-header {
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 border-bottom: 2px solid #dee2e6;
 padding: 1.5rem 2rem;
}

/* DataTable Configuration - Excel benzeri özellikler */
.patika-datatable {
 width: 100% !important;
 border-collapse: separate;
 border-spacing: 0;
 background: #ffffff;
}

.patika-datatable thead th {
 background: #f8f9fa;
 color: #495057;
 font-weight: 600;
 border-bottom: 2px solid #dee2e6;
 padding: 12px 8px;
 text-align: left;
 position: relative;
 cursor: pointer;
 
 /* Excel benzeri kolon resize özelliği */
 border-right: 1px solid #dee2e6;
 min-width: 80px;
 user-select: none;
}

.patika-datatable thead th:hover {
 background: #e2e6ea;
}

/* Resize handle görünümü */
.patika-datatable thead th::after {
 content: '';
 position: absolute;
 top: 0;
 right: 0;
 width: 4px;
 height: 100%;
 cursor: col-resize;
 background: transparent;
 z-index: 10;
}

.patika-datatable thead th:hover::after {
 background: #007bff;
}

/* DataTable Cell Styling */
.patika-datatable tbody td {
 padding: 10px 8px;
 border-bottom: 1px solid #dee2e6;
 border-right: 1px solid #f8f9fa;
 vertical-align: middle;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 max-width: 200px;
}

.patika-datatable tbody tr:hover {
 background-color: rgba(0,123,255,0.05);
}

.patika-datatable tbody tr:nth-child(even) {
 background-color: #f8f9fa;
}

.patika-datatable tbody tr:nth-child(even):hover {
 background-color: rgba(0,123,255,0.08);
}

/* DataTable Controls Styling */
.dataTables_wrapper {
 padding: 1.5rem 2rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
 margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 font-weight: 500;
 color: #495057;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
 border: 1px solid #ced4da;
 border-radius: var(--border-radius);
 padding: 0.375rem 0.75rem;
 font-size: 0.875rem;
 margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input {
 min-width: 200px;
}

/* DataTable Info ve Pagination */
.dataTables_wrapper .dataTables_info {
 color: #6c757d;
 font-size: 0.875rem;
 margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
 margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
 padding: 0.375rem 0.75rem;
 margin: 0 2px;
 border-radius: var(--border-radius);
 border: 1px solid #dee2e6;
 background: #ffffff;
 color: #495057;
 text-decoration: none;
 font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
 background: #007bff;
 color: #ffffff;
 border-color: #007bff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
 background: #007bff;
 color: #ffffff;
 border-color: #007bff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
 background: #f8f9fa;
 color: #6c757d;
 cursor: not-allowed;
}

/* DataTable Sorting Icons */
.patika-datatable thead th.sorting:after,
.patika-datatable thead th.sorting_asc:after,
.patika-datatable thead th.sorting_desc:after {
 opacity: 0.7;
 font-family: "Font Awesome 6 Free";
 font-weight: 900;
 position: absolute;
 right: 8px;
 top: 50%;
 transform: translateY(-50%);
}

.patika-datatable thead th.sorting:after {
 content: "\f0dc";
}

.patika-datatable thead th.sorting_asc:after {
 content: "\f0de";
}

.patika-datatable thead th.sorting_desc:after {
 content: "\f0dd";
}

/* Mobile DataTable Optimization */
@media (max-width: 768px) {
 .patika-datatable-card {
 margin: 0.5rem;
 border-radius: 8px;
 }
 
 .patika-datatable-card .patika-table-header {
 padding: 1rem;
 flex-direction: column;
 gap: 1rem;
 }
 
 .dataTables_wrapper {
 padding: 1rem;
 }
 
 .dataTables_wrapper .dataTables_length,
 .dataTables_wrapper .dataTables_filter {
 text-align: center;
 }
 
 .dataTables_wrapper .dataTables_filter input {
 min-width: 150px;
 width: 100%;
 }
 
 .patika-datatable thead th {
 font-size: 0.75rem;
 padding: 8px 4px;
 min-width: 60px;
 }
 
 .patika-datatable tbody td {
 font-size: 0.75rem;
 padding: 8px 4px;
 max-width: 120px;
 }
 
 .dataTables_wrapper .dataTables_paginate .paginate_button {
 padding: 0.25rem 0.5rem;
 font-size: 0.75rem;
 }
}

/* =============== PATIKA DATATABLE İNİT SİSTEMİ =============== */
/* KULLANIM: DataTable'ların otomatik başlatılması için */

/* DataTable için temel ayarlar JavaScript'ten yüklenecek */
.patika-datatable-init {
 display: none;
}

.patika-datatable-init.loaded {
 display: table;
}

/* =============== MERKEZI PATIKA CRUD YÖNETİMİ =============== */
/* TASK 1: Tek ve toplu satır seçimi için standardize CSS */
/* TASK 2: Sağ üstte aynı yerde aynı sırada CRUD butonları */

/* Row Selection - Checkbox standardization */
.patika-select-checkbox {
 width: 18px;
 height: 18px;
 cursor: pointer;
 margin: 0;
 vertical-align: middle;
}

.patika-select-all-header {
 text-align: center;
 width: 50px;
 padding: 0.5rem 0.25rem !important;
}

.patika-select-cell {
 text-align: center;
 width: 50px;
 padding: 0.5rem 0.25rem !important;
}

/* Row selection states */
.row-selected {
 background-color: rgba(0, 123, 255, 0.1) !important;
 border-left: 3px solid var(--primary-color);
}

.row-selected:hover {
 background-color: rgba(0, 123, 255, 0.2) !important;
}

/* CRUD Action Buttons - Standardized order and styling */
.patika-crud-actions {
 display: flex;
 gap: 0.5rem;
 flex-wrap: wrap;
 justify-content: flex-end;
}

/* CRUD button standardization - Pastel renkler */
.patika-crud-btn {
 padding: 0.5rem 1rem;
 font-size: 0.875rem;
 border-radius: var(--form-border-radius);
 border: none;
 font-weight: 600;
 transition: all var(--transition-speed) ease;
 min-width: 100px;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 0.5rem;
}

/* CRUD Button Colors - Pastel Palette */
.patika-crud-add {
 background-color: #a8e6cf; /* Pastel green */
 color: #2d5a3d;
 order: 1;
}

.patika-crud-add:hover {
 background-color: #88d8a3;
 color: #1a3b2a;
 transform: translateY(-1px);
 box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.patika-crud-edit {
 background-color: #ffd3a5; /* Pastel orange */
 color: #8b4513;
 order: 2;
}

.patika-crud-edit:hover {
 background-color: #ffb347;
 color: #5d2f0c;
 transform: translateY(-1px);
 box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.patika-crud-delete {
 background-color: #ffaaa5; /* Pastel red */
 color: #8b0000;
 order: 3;
}

.patika-crud-delete:hover {
 background-color: #ff8a80;
 color: #660000;
 transform: translateY(-1px);
 box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* CRUD button disabled state */
.patika-crud-btn:disabled {
 opacity: 0.5;
 cursor: not-allowed;
 transform: none !important;
 box-shadow: none !important;
}

/* Selection counter */
.patika-selection-counter {
 font-size: 0.875rem;
 color: var(--primary-color);
 font-weight: 600;
 padding: 0.25rem 0.5rem;
 background-color: rgba(0, 123, 255, 0.1);
 border-radius: 4px;
 margin-right: 1rem;
}

/* Mobile responsive CRUD buttons */
@media (max-width: 768px) {
 .patika-crud-actions {
 flex-direction: column;
 gap: 0.25rem;
 }
 
 .patika-crud-btn {
 width: 100%;
 min-width: unset;
 font-size: 0.75rem;
 padding: 0.375rem 0.75rem;
 }
 
 .patika-selection-counter {
 font-size: 0.75rem;
 margin-right: 0;
 margin-bottom: 0.5rem;
 text-align: center;
 }
}

/* STANDARDIZED PATIKA CRUD BUTTONS - TEK SATIRDA, STANDART RENK/BOYUT */
.patika-crud-container {
 display: inline-flex;
 gap: 0.25rem;
 align-items: center;
 margin: 0 0.5rem;
}

.patika-crud-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 0.375rem 0.75rem;
 font-size: 0.875rem;
 line-height: 1.5;
 border-radius: 0.375rem;
 text-decoration: none;
 border: 1px solid;
 cursor: pointer;
 transition: all 0.15s ease-in-out;
 white-space: nowrap;
 min-width: 80px;
 height: 38px;
}

.patika-crud-btn i {
 margin-right: 0.5rem;
 font-size: 0.875rem;
}

/* STANDARDIZED CRUD BUTTON COLORS */
.patika-crud-add {
 background-color: #28a745;
 border-color: #28a745;
 color: #ffffff;
}

.patika-crud-add:hover {
 background-color: #218838;
 border-color: #1e7e34;
 color: #ffffff;
}

.patika-crud-edit {
 background-color: #ffc107;
 border-color: #ffc107;
 color: #212529;
}

.patika-crud-edit:hover {
 background-color: #e0a800;
 border-color: #d39e00;
 color: #212529;
}

.patika-crud-delete {
 background-color: #dc3545;
 border-color: #dc3545;
 color: #ffffff;
}

.patika-crud-delete:hover {
 background-color: #c82333;
 border-color: #bd2130;
 color: #ffffff;
}

.patika-crud-btn:disabled {
 opacity: 0.6;
 cursor: not-allowed;
 pointer-events: none;
}

/* STANDARDIZED EXPORT BUTTONS - TEK SATIRDA */
.patika-export-container {
 display: inline-flex;
 gap: 0.25rem;
 align-items: center;
 margin-left: 0.5rem;
}

.patika-export-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 0.375rem 0.75rem;
 font-size: 0.875rem;
 line-height: 1.5;
 border-radius: 0.375rem;
 text-decoration: none;
 border: 1px solid;
 cursor: pointer;
 transition: all 0.15s ease-in-out;
 white-space: nowrap;
 min-width: 80px;
 height: 38px;
}

.patika-export-btn i {
 margin-right: 0.5rem;
 font-size: 0.875rem;
}

/* STANDARDIZED EXPORT BUTTON COLORS */
.patika-export-excel {
 background-color: #28a745;
 border-color: #28a745;
 color: #ffffff;
}

.patika-export-excel:hover {
 background-color: #218838;
 border-color: #1e7e34;
 color: #ffffff;
}

.patika-export-print {
 background-color: #17a2b8;
 border-color: #17a2b8;
 color: #ffffff;
}

.patika-export-print:hover {
 background-color: #138496;
 border-color: #117a8b;
 color: #ffffff;
}

/* STANDARDIZED FORM BUTTONS - SAĞ ALTTA */
.patika-form-buttons {
 display: flex;
 justify-content: flex-end;
 gap: 0.5rem;
 margin-top: 1.5rem;
 padding-top: 1rem;
 border-top: 1px solid #dee2e6;
}

.patika-form-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 0.5rem 1rem;
 font-size: 0.875rem;
 line-height: 1.5;
 border-radius: 0.375rem;
 text-decoration: none;
 border: 1px solid;
 cursor: pointer;
 transition: all 0.15s ease-in-out;
 white-space: nowrap;
 min-width: 100px;
 height: 40px;
}

.patika-form-btn i {
 margin-right: 0.5rem;
 font-size: 0.875rem;
}

/* STANDARDIZED FORM BUTTON COLORS */
.patika-form-btn-cancel {
 background-color: #6c757d;
 border-color: #6c757d;
 color: #ffffff;
}

.patika-form-btn-cancel:hover {
 background-color: #5c636a;
 border-color: #565e64;
 color: #ffffff;
}

.patika-form-btn-submit {
 background-color: #0d6efd;
 border-color: #0d6efd;
 color: #ffffff;
}

.patika-form-btn-submit:hover {
 background-color: #0b5ed7;
 border-color: #0a58ca;
 color: #ffffff;
}

.patika-form-btn-back {
 background-color: #6c757d;
 border-color: #6c757d;
 color: #ffffff;
}

.patika-form-btn-back:hover {
 background-color: #5c636a;
 border-color: #565e64;
 color: #ffffff;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
 .patika-crud-container,
 .patika-export-container {
 flex-wrap: wrap;
 gap: 0.25rem;
 }
 
 .patika-crud-btn,
 .patika-export-btn {
 min-width: 70px;
 height: 36px;
 padding: 0.25rem 0.5rem;
 font-size: 0.75rem;
 }
 
 .patika-form-buttons {
 flex-direction: column;
 gap: 0.5rem;
 }
 
 .patika-form-btn {
 width: 100%;
 min-width: auto;
 }
}

/* OVERRIDE BOOTSTRAP BUTTONS IN PATIKA CONTEXT */
.patika-crud-container .btn,
.patika-export-container .btn,
.patika-form-buttons .btn {
 margin: 0;
 box-shadow: none;
}

.patika-crud-container .btn:focus,
.patika-export-container .btn:focus,
.patika-form-buttons .btn:focus {
 box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* PATIKA SELECTION COUNTER - STANDARDIZED */
.patika-selection-counter {
 display: inline-flex;
 align-items: center;
 padding: 0.375rem 0.75rem;
 font-size: 0.875rem;
 color: #6c757d;
 background-color: #f8f9fa;
 border: 1px solid #dee2e6;
 border-radius: 0.375rem;
 margin: 0 0.5rem;
 min-height: 38px;
}

/* =============== MOBILE AHP INPUT SYSTEM - CORPORATE DESIGN =============== */
/* MOBILE AHP DEĞER GİRİŞ SİSTEMİ - KURUMSAL TASARIM */

/* FIXED HORIZONTAL LAYOUT - MOBILE BUTTON MARGIN PROBLEM SOLVED */
.patika-mobile-ahp-input-horizontal {
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0.25rem 0.5rem;
 width: 100% !important;
 max-width: 100% !important;
 overflow: hidden !important;
 margin: 0 !important;
}

.ahp-value-display-horizontal {
 display: flex;
 flex-direction: column;
 align-items: center;
 min-width: 65px !important;
 max-width: 80px !important;
 width: 70px !important;
 padding: 0.5rem 0.25rem !important;
 border-radius: 8px;
 background: #ffffff;
 border: 2px solid #dee2e6;
 transition: all 0.3s ease;
 cursor: pointer;
 user-select: none;
 box-shadow: 0 2px 4px rgba(0,0,0,0.1);
 margin: 0 auto !important;
 overflow: hidden !important;
}

.ahp-value-display-horizontal:hover {
 transform: scale(1.05);
 box-shadow: 0 4px 12px rgba(0,0,0,0.15);
 border-color: #007bff;
}

.ahp-value-display-horizontal:active {
 transform: scale(0.95);
}

/* Legacy Vertical Layout - Keep for compatibility */
.patika-mobile-ahp-input {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 0.5rem;
 padding: 0.5rem;
 background: #ffffff;
 border-radius: 8px;
 margin: 0.25rem 0;
}

.ahp-value-display {
 display: flex;
 flex-direction: column;
 align-items: center;
 min-width: 60px;
 padding: 0.5rem;
 border: 2px solid #dee2e6;
 border-radius: 6px;
 background: #ffffff;
 transition: all 0.3s ease;
 box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ahp-value-number {
 font-size: 1.2rem;
 font-weight: 700;
 line-height: 1;
 color: #212529;
}

.ahp-value-label {
 font-size: 0.7rem;
 color: #6c757d;
 text-align: center;
 margin-top: 0.2rem;
 font-weight: 500;
}

/* AHP Value State Colors - Corporate Branding */
.ahp-left-preference {
 background: #007bff !important;
 color: white !important;
 border-color: #007bff !important;
 box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
}

.ahp-left-preference .ahp-value-number {
 color: white !important;
}

.ahp-left-preference .ahp-value-label {
 color: rgba(255, 255, 255, 0.85) !important;
}

.ahp-right-preference {
 background: #17a2b8 !important;
 color: white !important;
 border-color: #17a2b8 !important;
 box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3) !important;
}

.ahp-right-preference .ahp-value-number {
 color: white !important;
}

.ahp-right-preference .ahp-value-label {
 color: rgba(255, 255, 255, 0.85) !important;
}

.ahp-neutral {
 background: #6c757d !important;
 color: white !important;
 border-color: #6c757d !important;
 box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3) !important;
}

.ahp-neutral .ahp-value-number {
 color: white !important;
}

.ahp-neutral .ahp-value-label {
 color: rgba(255, 255, 255, 0.85) !important;
}

/* Mobile AHP Button Styling */
.patika-mobile-ahp-input .patika-btn-decrease,
.patika-mobile-ahp-input .patika-btn-increase {
 width: 40px;
 height: 40px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 0.9rem;
 font-weight: 600;
 transition: all 0.3s ease;
 border: 2px solid #007bff;
 color: #007bff;
 background: #ffffff;
}

.patika-mobile-ahp-input .patika-btn-decrease:hover,
.patika-mobile-ahp-input .patika-btn-increase:hover {
 background: #007bff;
 color: white;
 transform: scale(1.05);
 box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.patika-mobile-ahp-input .patika-btn-decrease:active,
.patika-mobile-ahp-input .patika-btn-increase:active {
 transform: scale(0.95);
}

/* Mobile Fixed Bottom Buttons - Corporate Style */
.patika-mobile-fixed-bottom {
 position: fixed;
 bottom: 0;
 left: 0;
 right: 0;
 background: #ffffff;
 padding: 1rem;
 box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
 z-index: 1000;
 border-top: 1px solid #dee2e6;
}

/* Mobile Container Padding for Fixed Bottom */
@media (max-width: 768px) {
 .mobile-container {
 padding-bottom: 120px;
 }
 
 .patika-form-buttons {
 display: none !important;
 }
 
 .patika-mobile-fixed-bottom {
 display: block !important;
 }
}

@media (min-width: 769px) {
 .patika-mobile-fixed-bottom {
 display: none !important;
 }
 
 .patika-form-buttons {
 display: block !important;
 }
}

/* Mobile Comparison Row Styling - Enhanced */
.patika-comparison-row {
 margin-bottom: 1rem;
 padding: 1rem;
 background: #ffffff;
 border: 1px solid #dee2e6;
 border-radius: 8px;
 box-shadow: 0 2px 4px rgba(0,0,0,0.1);
 transition: all 0.3s ease;
}

.patika-comparison-row:hover {
 box-shadow: 0 4px 12px rgba(0,0,0,0.15);
 border-color: #007bff;
 transform: translateY(-1px);
}

/* Mobile Criteria Box Styling - Enhanced with Equal Width */
.patika-criteria-box {
 padding: 0.75rem;
 background: #f8f9fa;
 border: 1px solid #dee2e6;
 border-radius: 6px;
 text-align: center;
 min-height: 60px;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: all 0.3s ease;
 flex: 1; /* Eşit genişlik için */
 max-width: none; /* Genişlik sınırını kaldır */
 cursor: pointer; /* Tıklanabilir cursor */
 user-select: none; /* Metin seçilmesini engelle */
}

.patika-criteria-box:hover {
 background: #e9ecef;
 transform: scale(1.02);
 box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.patika-criteria-box:active {
 transform: scale(0.98);
 background: #dee2e6;
}

.patika-criteria-box.left-criteria {
 border-left: 4px solid #007bff;
 margin-right: 0.5rem; /* Sağ margin */
}

.patika-criteria-box.right-criteria {
 border-right: 4px solid #17a2b8;
 margin-left: 0.5rem; /* Sol margin */
}

.criteria-text {
 font-size: 0.9rem;
 font-weight: 600;
 color: #212529;
 line-height: 1.3;
 word-wrap: break-word; /* Uzun kelimeler için */
 hyphens: auto; /* Otomatik tire */
 overflow-wrap: break-word; /* Taşma kontrolü */
}

/* Horizontal Layout Container */
.d-flex.align-items-center.justify-content-between {
 gap: 0.5rem; /* Elementler arası boşluk */
}

.flex-fill {
 flex: 1 1 0; /* Eşit genişlik paylaşımı */
 min-width: 0; /* Flex shrink için */
}

/* CRITICAL SPACING FIX - BUTTON MARGIN SOLUTION */
.mx-2 {
 flex: 0 0 auto !important;
 max-width: 80px !important;
 min-width: 70px !important;
 width: 75px !important;
 margin: 0 0.25rem !important;
 padding: 0 !important;
 overflow: hidden !important;
}

/* RESPONSIVE MOBILE FIXES - BUTTON DISPLAY OPTIMIZED */
@media (max-width: 576px) {
 .patika-comparison-row {
 margin-bottom: 0.75rem;
 padding: 0.5rem 0.25rem !important;
 overflow: hidden !important;
 }
 
 .patika-comparison-row .row {
 margin: 0 !important;
 padding: 0 !important;
 max-width: 100% !important;
 }
 
 .patika-comparison-row .col-5 {
 padding: 0 0.125rem !important;
 max-width: calc(41.666% - 0.25rem) !important;
 flex: 0 0 calc(41.666% - 0.25rem) !important;
 }
 
 .patika-comparison-row .col-2 {
 padding: 0 !important;
 max-width: 16.666% !important;
 flex: 0 0 16.666% !important;
 }
 
 .patika-criteria-box {
 padding: 0.375rem 0.125rem !important;
 min-height: 55px !important;
 margin: 0 !important;
 width: 100% !important;
 max-width: 100% !important;
 overflow: hidden !important;
 }
 
 .criteria-text {
 font-size: 0.85rem !important;
 line-height: 1.1 !important;
 padding: 0.125rem !important;
 word-break: break-word !important;
 overflow-wrap: break-word !important;
 }
 
 .ahp-value-display-horizontal {
 min-width: 50px !important;
 max-width: 60px !important;
 width: 55px !important;
 padding: 0.375rem 0.125rem !important;
 margin: 0 !important;
 }
 
 .ahp-value-number {
 font-size: 0.9rem !important;
 line-height: 1 !important;
 }
 
 .ahp-value-label {
 font-size: 0.55rem !important;
 line-height: 1 !important;
 margin-top: 0.1rem !important;
 }
 
 .mx-2 {
 max-width: 60px !important;
 min-width: 50px !important;
 width: 55px !important;
 flex: 0 0 55px !important;
 margin: 0 0.125rem !important;
 padding: 0 !important;
 }
 
 .patika-mobile-ahp-input-horizontal {
 padding: 0.125rem !important;
 margin: 0 !important;
 width: 100% !important;
 max-width: 100% !important;
 }
}

/* Mobile Section Titles */
.patika-section-title {
 font-size: 1rem;
 font-weight: 700;
 color: #007bff;
 margin-bottom: 1rem;
 padding-bottom: 0.5rem;
 border-bottom: 2px solid #007bff;
 text-align: center;
}

.patika-sub-section {
 margin-top: 1.5rem;
 margin-bottom: 1rem;
}

/* Responsive Mobile Adjustments */
@media (max-width: 576px) {
 .patika-mobile-ahp-input {
 gap: 0.3rem;
 padding: 0.3rem;
 }
 
 .ahp-value-display {
 min-width: 50px;
 padding: 0.4rem;
 }
 
 .ahp-value-number {
 font-size: 1rem;
 }
 
 .ahp-value-label {
 font-size: 0.6rem;
 }
 
 .patika-mobile-ahp-input .patika-btn-decrease,
 .patika-mobile-ahp-input .patika-btn-increase {
 width: 35px;
 height: 35px;
 font-size: 0.8rem;
 }
 
 .criteria-text {
 font-size: 0.8rem;
 }
 
 .patika-criteria-box {
 padding: 0.5rem;
 min-height: 50px;
 }
}

/* ========================================= */
/* 7⃣ FAZ: USER DASHBOARD STYLES - FIX */
/* ========================================= */

/* USER DASHBOARD CONTAINER */
.patika-dashboard-container {
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 min-height: 100vh;
}

/* USER STAT CARDS */
.user-stat-card {
 transition: all 0.3s ease;
 border: none;
 border-radius: 1rem;
 overflow: hidden;
}

.user-stat-card:hover {
 transform: translateY(-5px);
 box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.user-stat-card .card-body {
 padding: 1.5rem;
}

.user-icon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 4rem;
 height: 4rem;
 border-radius: 1rem;
}

/* USER DASHBOARD CHARTS */
#userDecisionsChart {
 max-height: 250px;
}

/* MOBILE DASHBOARD OPTIMIZATIONS */
@media (max-width: 768px) {
 .patika-dashboard-container {
 padding: 2rem 1rem !important;
 }
 
 .user-stat-card .card-body {
 padding: 1rem;
 }
 
 .user-icon {
 width: 3rem;
 height: 3rem;
 }
 
 .user-icon i {
 font-size: 1.5rem !important;
 }
}

/* DASHBOARD QUICK ACTIONS */
.btn-lg.d-flex {
 min-height: 4rem;
 align-items: center;
}

.btn-lg.d-flex:hover {
 transform: translateX(5px);
 transition: all 0.3s ease;
}

/* ========================================= */
/* CRITICAL CSS FIXES - MOBILE COMPATIBILITY */
/* ========================================= */

/* Fix missing mobile button styles */
.mobile-menu-item {
 display: flex;
 align-items: center;
 padding: 0.75rem 1rem;
 color: #495057;
 text-decoration: none;
 transition: all 0.3s ease;
 border-radius: 0.5rem;
 margin: 0.25rem 0.5rem;
}

.mobile-menu-item:hover {
 background-color: #f8f9fa;
 color: #007bff;
 text-decoration: none;
}

.mobile-menu-section {
 margin-bottom: 1.5rem;
}

.mobile-menu-title {
 font-size: 0.9rem;
 font-weight: 600;
 color: #6c757d;
 margin-bottom: 0.5rem;
 padding: 0.5rem 1rem;
 border-bottom: 1px solid #dee2e6;
}

/* Fix form buttons in mobile */
.patika-form-buttons .btn {
 min-width: 120px;
 margin: 0.25rem;
}

@media (max-width: 576px) {
 .patika-form-buttons {
 flex-direction: column;
 }
 
 .patika-form-buttons .btn {
 width: 100%;
 margin: 0.25rem 0;
 }
}

/* ========================================= */
/* 5⃣ FAZ: NAVIGATION & ROUTING FIXES */
/* ========================================= */

/* Ensure all decision links work correctly */
.btn-group a {
 text-decoration: none;
}

.btn-group a:hover {
 text-decoration: none;
}

/* Fix button styling consistency */
.btn-sm {
 padding: 0.375rem 0.75rem;
 font-size: 0.875rem;
}

.btn-group .btn {
 border-radius: 0.375rem;
 margin-right: 0.25rem;
}

.btn-group .btn:last-child {
 margin-right: 0;
}

/* Fix table action buttons */
.table .btn-group {
 white-space: nowrap;
}

.table .btn-group .btn {
 padding: 0.25rem 0.5rem;
 font-size: 0.75rem;
}

/* ========================================= */
/* CRITICAL: MODEL SELECTION FIX */
/* ========================================= */

/* Loading indicator for dynamic model selection */
#model-loading {
 display: none;
 padding: 1rem;
 text-align: center;
}

#model-loading.show {
 display: block;
}

/* Criteria section styling */
#criteria-section {
 margin-top: 2rem;
 border-top: 2px solid #dee2e6;
 padding-top: 2rem;
}

#criteria-section .alert {
 border-radius: 0.5rem;
 border: none;
 box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* AHP Matrix improvements */
.table-responsive {
 border-radius: 0.5rem;
 box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead th {
 background-color: #f8f9fa;
 border-color: #dee2e6;
 font-weight: 600;
 font-size: 0.875rem;
}

/* Form improvements */
.form-select:focus,
.form-control:focus {
 border-color: #007bff;
 box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ========================================= */
/* LAYOUT FIXES */
/* ========================================= */

/* Ensure container spacing */
.container-fluid {
 padding-left: 1rem;
 padding-right: 1rem;
}

/* Card improvements */
.card {
 border: none;
 border-radius: 1rem;
 box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
 transition: all 0.3s ease;
}

.card:hover {
 box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
 background-color: #f8f9fa;
 border-bottom: 1px solid #dee2e6;
 border-radius: 1rem 1rem 0 0 !important;
 padding: 1rem 1.5rem;
}

.card-body {
 padding: 1.5rem;
}

/* Button improvements */
.btn {
 border-radius: 0.5rem;
 transition: all 0.3s ease;
 font-weight: 500;
}

.btn:hover {
 transform: translateY(-1px);
}

.btn-primary {
 background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
 border: none;
}

.btn-success {
 background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
 border: none;
}

.btn-warning {
 background: linear-gradient(135deg, #ffc107 0%, #d39e00 100%);
 border: none;
}

.btn-danger {
 background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
 border: none;
}

/* ========================================= */
/* MOBILE RESPONSIVE FIXES */
/* ========================================= */

@media (max-width: 768px) {
 /* Improve mobile spacing */
 .container-fluid.py-4 {
 padding-top: 1rem !important;
 padding-bottom: 1rem !important;
 }
 
 /* Mobile cards */
 .card {
 margin-bottom: 1rem;
 }
 
 .card-body {
 padding: 1rem;
 }
 
 /* Mobile tables */
 .table-responsive {
 border-radius: 0.5rem;
 margin-bottom: 1rem;
 }
 
 /* Mobile forms */
 .form-control,
 .form-select {
 font-size: 16px; /* Prevent zoom on iOS */
 }
 
 /* Mobile buttons */
 .btn-group {
 display: flex;
 flex-wrap: wrap;
 gap: 0.25rem;
 }
 
 .btn-group .btn {
 flex: 1;
 min-width: auto;
 }
}

@media (max-width: 576px) {
 /* Extra small mobile fixes */
 .col-xl-3,
 .col-lg-6,
 .col-md-6 {
 margin-bottom: 1rem;
 }
 
 /* Full width buttons on small screens */
 .btn-group .btn {
 width: 100%;
 margin-bottom: 0.25rem;
 }
}

/* ========================================= */
/* PRINT STYLES */
/* ========================================= */

@media print {
 .btn,
 .mobile-menu-item,
 .offcanvas,
 #model-loading {
 display: none !important;
 }
 
 .card {
 box-shadow: none;
 border: 1px solid #000;
 }
 
 .container-fluid {
 padding: 0;
 }
}

/* =============== PATIKA FRAMEWORK BASE STYLES - INTEGRATED =============== */
/* MERGED FROM base.css FOR UNIFIED STYLE SYSTEM */

/* Enhanced PATIKA Button Styles */
.patika-btn {
 border-radius: 0.375rem;
 font-weight: 500;
 transition: all 0.15s ease-in-out;
}

.patika-btn-primary {
 background-color: #0e76a8;
 border-color: #0e76a8;
 color: #fff;
}

.patika-btn-primary:hover {
 background-color: #0c5d85;
 border-color: #0c5d85;
}

/* Enhanced Filter Row Styles */
.filter-row select {
 font-size: 0.875rem;
 border: 1px solid #ced4da;
 border-radius: 0.25rem;
}

.filter-row td {
 padding: 0.5rem;
 vertical-align: middle;
}

.filter-row th, .filter-row td {
 background-color: #f8f9fa;
 border-bottom: 1px solid #dee2e6;
}

.filter-row .form-control,
.filter-row .form-select {
 font-size: 0.875rem;
 padding: 0.375rem 0.75rem;
}

/* Enhanced Loading State */
.loading {
 opacity: 0.6;
 pointer-events: none;
 position: relative;
}

.loading::after {
 content: '';
 position: absolute;
 top: 50%;
 left: 50%;
 width: 20px;
 height: 20px;
 margin: -10px 0 0 -10px;
 border: 2px solid #f3f3f3;
 border-top: 2px solid #0e76a8;
 border-radius: 50%;
 animation: spin 1s linear infinite;
}

@keyframes spin {
 0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

/* Enhanced Scrollbar Styles for PATIKA Tables */
.patika-table-responsive::-webkit-scrollbar {
 height: 8px;
}

.patika-table-responsive::-webkit-scrollbar-track {
 background: #f1f1f1;
 border-radius: 10px;
}

.patika-table-responsive::-webkit-scrollbar-thumb {
 background: #c1c1c1;
 border-radius: 10px;
}

.patika-table-responsive::-webkit-scrollbar-thumb:hover {
 background: #a8a8a8;
}

/* PATIKA Core Variables - Integrated */
.main-color {
 background-color: #0e76a8;
}

.strike-through-td {
 text-decoration: line-through;
}

/* PATIKA Enhanced Alert Popup */
.alert-popup {
 position: fixed;
 bottom: 20px;
 right: 20px;
 z-index: 1050;
 display: none;
 background-color: #800000;
 color: white;
 padding: 15px;
 border-radius: 5px;
 box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.alert-popup .copy-button {
 margin-left: 10px;
 cursor: pointer;
 color: white;
 text-decoration: underline;
}

/* PATIKA Unified Animation System */
@keyframes fadeIn {
 from { opacity: 0; transform: translateY(10px); }
 to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Focus States for PATIKA Framework */
.form-control:focus,
.form-select:focus {
 border-color: #0e76a8;
 box-shadow: 0 0 0 0.2rem rgba(14, 118, 168, 0.25);
}

/* Enhanced Table Hover for PATIKA */
.table-hover tbody tr:hover {
 background-color: rgba(14, 118, 168, 0.05);
}

/* Mobile-First Responsive Integration */
@media (max-width: 768px) {
 .container-fluid {
 padding-left: 12px !important;
 padding-right: 12px !important;
 }
 
 .py-1 {
 padding-top: 0.25rem !important;
 padding-bottom: 0.25rem !important;
 }
 
 .py-2 {
 padding-top: 0.5rem !important;
 padding-bottom: 0.5rem !important;
 }
}

/* PATIKA Enhanced Accessibility */
.text-truncate {
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.shadow-sm {
 box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* PATIKA Table Standards - Final Enhancement */
table.inputs td {
 padding: 5px;
}

button.btn-space {
 margin-left: 1em;
}

/* Navbar Content Optimization */
.navbar + * {
 margin-top: 0 !important;
}
