/* =============== 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;
}

@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;
}
