/**
 * Panel Styles - Unified CSS for Admin Panel
 * Combines: mebStyles.css + makale-yonetim.css + meb-kaynaklar.css
 *
 * Table of Contents:
 * 1. Global Resets & Variables
 * 2. Admin Tab System
 * 3. Filters & Search (Unified Chip Design)
 * 4. Stats Grid & Cards
 * 5. Tables
 * 6. Badges & Status
 * 7. Ders Talepleri (Request Management)
 * 8. MEB Sidebar
 * 9. MEB Table View & Pagination
 * 10. MEB Table Grid & Filters
 * 11. MEB Container & Dashboard
 * 12. MEB Kaynaklar (Resources Tab)
 * 13. Makale Yönetimi (Article Management)
 * 14. Makale Editor
 * 15. Responsive Media Queries
 *
 * @version 1.5.1
 * @date 2025-10-23
 */

/* ========================================
   1. GLOBAL RESETS & VARIABLES
   ======================================== */

/* Material Icons - Self-hosted */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/material-icons/MaterialIcons-Regular.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

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

body {
    font-family: sans-serif;
    min-height: 100vh;
    color: #1e1e1e;
}

/* Body background for MEB pages - Simple background image */
body.meb-page {
    background: url('/assets/gradient.usehall.jpg') center/cover fixed no-repeat;
    min-height: 100vh;
}
/* standart input select ve text area */
input, select, textarea{
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    transition: border-color 0.1s ease-in-out;
}

/* Scrolll bar */
::-webkit-scrollbar {
    width: 25px;
}
 
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    border-radius: 0px;
}
 
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

/* ========================================
   2. ADMIN TAB SYSTEM
   ======================================== */

.admin-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 5px;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.admin-tabs::-webkit-scrollbar {
    height: 6px;
}

.admin-tabs::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.admin-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.admin-tabs::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.admin-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-tab-button:hover {
    background: #ececec;
    color: #1976d2;
}

.admin-tab-button.active {
    background: #fff;
    color: #1976d2;
    border-bottom-color: #1976d2;
    border-radius: 5px;
}

.admin-tab-button .material-icons {
    font-size: 20px;
}

.admin-tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease-in;
}

.admin-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   3. FILTERS & SEARCH (Unified Chip Design)
   ======================================== */

.makale-filters,
.talep-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    align-items: center;
}

/* Filter Search (Sol taraf - Input veya Select) */
.filter-search {
    flex: 1;
    min-width: 250px;
}

.filter-search input,
.filter-search select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.filter-search input:focus,
.filter-search select:focus {
    outline: none;
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Filter Chips (Orta - Durum filtreleri) */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: #1976d2;
    color: #1976d2;
    background: #f0f7ff;
}

.filter-chip.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.filter-chip.active:hover {
    background: #1565c0;
    border-color: #1565c0;
}

/* Filter Actions (Sağ taraf - Email gönder vb.) */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.selected-info {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.makale-content {
    padding: 0;
}

/* ========================================
   4. STATS GRID & CARDS
   ======================================== */

/* Stats Grid - Unified Design */
.stats,
.talep-stats,
.meb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* Stat Card - Simple & Clean Design (like Article tab) */
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border-left: 3px solid #1976d2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Stat Card Variants */
.stat-card.total {
    border-left-color: #1976d2;
}

.stat-card.pending {
    border-left-color: #ff9800;
}

.stat-card.completed {
    border-left-color: #4caf50;
}

/* Stat Card Title - Unified (h3 for all tabs) */
.stat-card h3 {
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

/* Stat Card Value - Unified (.value for all tabs) */
.stat-card .value {
    font-size: 20px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

/* ========================================
   5. TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

thead {
    background: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
}

th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

tbody tr:hover {
    background: #f9f9f9;
}

.truncate {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   6. BADGES & STATUS
   ======================================== */

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-taslak {
    background: #fef3c7;
    color: #92400e;
}

.badge-yayinda {
    background: #d1fae5;
    color: #065f46;
}

.badge-arsiv {
    background: #e5e7eb;
    color: #374151;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.yayinda {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.taslak {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.arsiv {
    background: #e5e7eb;
    color: #374151;
}

.kategori-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kategori-tag {
    padding: 3px 8px;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 10px;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: transform 0.1s ease;
}

.icon-btn:hover {
    transform: scale(1.2);
}

.sinif-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* ========================================
   7. DERS TALEPLERİ (Request Management)
   ======================================== */

.talep-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.talep-table {
    width: 100%;
    border-collapse: collapse;
}

.talep-table thead {
    background: #f9f9f9;
}

.talep-table th,
.talep-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.talep-table th {
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.talep-table tbody tr:hover {
    background: #f9f9f9;
}

.status-beklemede {
    background: #fff3e0;
    color: #f57c00;
}

.status-eklendi {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-reddedildi {
    background: #ffebee;
    color: #c62828;
}

.talep-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.email-sent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.mui-field-helper {
    margin-top: 3px;
    margin-left: 0;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.66;
    font-family: sans-serif;
}

/* MEB Sidebar Styles */
.meb-sidebar {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    max-width: 600px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease, width 0.3s ease;
    z-index: 21; /* Layer 20-29: Sidebar main */
    display: flex;
    flex-direction: column;
}

.meb-sidebar.open {
    right: 0;
}

.meb-sidebar-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    gap: 12px;
}

.meb-sidebar-back-btn,
.meb-sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.meb-sidebar-back-btn:hover,
.meb-sidebar-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Navigation buttons styles */
.meb-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.meb-nav-btn {
    background: white;
    border: 1px solid #dee2e6;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    position: relative; /* For shortcut badge positioning */
}

.meb-nav-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.meb-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.meb-nav-btn .material-icons {
    font-size: 20px;
    color: #495057;
}

.meb-nav-btn:disabled .material-icons {
    color: #adb5bd;
}

.meb-course-id {
    font-weight: 600;
    color: #495057;
    padding: 0 8px;
    min-width: 40px;
    text-align: center;
}

.meb-sidebar-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #333;
}

.meb-sidebar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meb-format-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.meb-format-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.meb-format-btn.inactive {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.meb-format-btn.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.meb-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0; /* Important: allows flex child to shrink below content size */
}

.meb-form-section {
    margin-bottom: 20px;
}

.meb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    padding: 10px;
}

.meb-form-row .mui-textfield-container {
    flex: 1;
    min-width: 0;
}

.meb-sidebar-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0; /* Prevent footer from shrinking */
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.meb-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.meb-btn-primary {
    background: #28a745;
    color: white;
}

.meb-btn-primary:hover {
    background: #218838;
}

.meb-btn-secondary {
    background: #6c757d;
    color: white;
}

.meb-btn-secondary:hover {
    background: #5a6268;
}

.meb-btn .material-icons {
    font-size: 18px;
}

/* MEB Grade Level Button Group */
.meb-sinif-group {
    display: flex;
    gap: 0;
    padding: 8px 0;
    margin-top: 4px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.meb-sinif-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-right: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #333;
    outline: none;
    position: relative;
}

.meb-sinif-btn:last-child {
    border-right: none;
}

.meb-sinif-btn:hover {
    background: #f5f5f5;
    z-index: 1;
}

.meb-sinif-btn:focus {
    box-shadow: inset 0 0 0 2px #1976d2;
    z-index: 2;
}

.meb-sinif-btn.active {
    background: #1976d2;
    color: white;
    font-weight: 600;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.meb-sinif-btn.active:hover {
    background: #1565c0;
}

.meb-sinif-btn:active {
    transform: scale(0.98);
}

/* First button with "H" needs special attention */
.meb-sinif-btn[data-sinif="13"] {
    font-weight: 600;
    min-width: 40px;
}

/* Disabled state if needed */
.meb-sinif-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.meb-sinif-btn:disabled:hover {
    background: #f5f5f5;
}

/* Old item-input-field for backward compatibility */
.item-input-field {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    background-color: #f9f9f9;
}

.item-input-field:focus {
    outline: none;
    border-color: #95a5a6;
    background-color: white;
}

/* Sidebar utility: shortcut badge */
.meb-nav-btn .shortcut-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    font-family: monospace;
    pointer-events: none;
}

/* DBF Dosya Bilgisi Stilleri - Minimal */
.dbf-file-info-minimal {
    margin-top: 12px;
    display: inline-block;
}


/* JSON Title Header with Paste Button */
.json-title-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.json-title-header p {
    margin: 0;
    font-weight: 500;
}

.paste-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
}

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

.paste-btn:active {
    transform: translateY(0);
}

.paste-btn .material-icons {
    font-size: 18px;
}

.paste-btn:hover .material-icons {
    color: #007302;
}

/* Dal Seçimi Multi-Select Styles */
#mebDalMultipleContainer {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 30px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: text;
}

#mebDalMultipleContainer:focus-within {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

#mebDalSelectedChips {
    display: inline-block;
    margin-right: 4px;
}

#mebDalSelectedChips .chip {
    display: inline-flex;
    align-items: center;
    margin: 2px 4px 2px 0;
    padding: 4px 8px;
    background-color: #e0e0e0;
    border-radius: 16px;
}

#mebDalSelectedChips .chip .chip-remove {
    margin-left: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #666;
}

#mebDalSelectedChips .chip .chip-remove:hover {
    color: #f44336;
}

#mebDalSearch {
    border: none;
    outline: none;
    min-width: 150px;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
}

#mebDalDropdown {
    display: none;
    position: absolute;
    z-index: 22; /* Layer 20-29: Sidebar dropdowns */
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    margin-top: 2px;
}

#mebDalDropdown .dal-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#mebDalDropdown .dal-option:hover {
    background-color: #f5f5f5;
}

#mebDalDropdown .dal-option.selected {
    background-color: #e3f2fd;
    font-weight: 500;
}

/* Curriculum Preview Styles */
.curriculum-section {
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.curriculum-section h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1976d2;
}

/* Ders Amacı Styles */
.curriculum-amac {
    background-color: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.amac-text {
    margin: 0;
    padding: 8px 0;
    line-height: 1.5;
    color: #424242;
}

.amac-text:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

/* Chips Container */
.curriculum-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Chip Base Style */
.curriculum-chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
    border: 1px solid transparent;
}

/* Ortam Chip (Yeşil) */
.curriculum-chip.ortam-chip {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-color: #4caf50;
}

/* Donanım Chip (Mavi) */
.curriculum-chip.donanim-chip {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #2196f3;
}

/* Ölçme Chip (Turuncu) */
.curriculum-chip.olcme-chip {
    background-color: #fff3e0;
    color: #f57c00;
    border-color: #ff9800;
}

/* Chip Hover Effects */
.curriculum-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* MEB Curriculum Preview */
.meb-curriculum-preview {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
}

.meb-preview-header {
    padding: 16px;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.meb-preview-header h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

.meb-preview-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    margin-top: 4px;
}

.meb-preview-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
}

.curriculum-ders-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #1976d2;
}

.curriculum-ders-info h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1976d2;
    font-weight: 600;
}

.curriculum-birim {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.curriculum-birim-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #dee2e6;
}

.curriculum-birim-header:hover {
    background: #e9ecef;
}

.curriculum-birim-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.curriculum-birim-content {
    display: none;
    padding: 16px;
    background: white;
}

.curriculum-birim-content.expanded {
    display: block;
}

.curriculum-konu {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.curriculum-konu-adi {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.meb-kazanimlar-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.curriculum-kazanimlar {
    padding-left: 16px;
}

.curriculum-kazanim {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
    color: #6c757d;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.curriculum-kazanim:last-child {
    margin-bottom: 0;
}

.birim-toggle-icon {
    font-size: 20px;
    transition: transform 0.2s;
    margin-right: 8px;
    color: #6c757d;
}

.birim-toggle-icon.expanded {
    transform: rotate(180deg);
}

.ders-info-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ders-info-details span {
    color: #34495e;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.item-sira {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    flex-shrink: 0;
}

.ders-saati-badge {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    margin-left: auto;
}

/* ========================================
   9. MEB TABLE VIEW & PAGINATION
   ======================================== */

.meb-table-view {
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    padding: 0px;
}

#mebTableView {
    transition: all 0.3s ease;
    position: relative;
}

#mebTableContainer {
    background: transparent;
    padding: 0px;
}

.meb-edit-btn {
    padding: 4px 8px;
    background: #ffc107;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.meb-edit-btn:hover {
    background: #ffb300;
}

.meb-edit-btn .material-icons {
    font-size: 16px !important;
}

.meb-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(248, 249, 250, 0.9);
    border-radius: 10px;
}

.footer-stats {
    display: flex;
    gap: 10px;
}

.meb-pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
}

.meb-page-item {
    display: inline-block;
}

.meb-page-item.disabled .meb-page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.meb-page-item.active .meb-page-link {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.meb-page-link {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 28px;
    text-align: center;
}

.meb-page-link:hover:not(.meb-page-item.disabled .meb-page-link) {
    background: #f0f0f0;
    border-color: #3498db;
}

/* ========================================
   10. MEB TABLE GRID & FILTERS
   ======================================== */

.meb-container-grid {
    /* 9 Sütun: ID, Alan, Dal, Ders, Sınıf, Süre, ÖB, Araç, Ölçme */
    --plan-columns:
        minmax(50px, 60px)
        minmax(140px, 1.5fr)
        minmax(140px, 1.5fr)
        minmax(180px, 2fr)
        minmax(45px, 60px)
        minmax(45px, 70px)
        minmax(40px, 60px)
        minmax(40px, 60px)
        minmax(40px, 60px);
    width: 100%;
    min-width: 1100px;
}

/* Hafta Header ve Item Grid */
.hafta-header,
.hafta-item {
    display: grid;
    grid-template-columns: var(--plan-columns);
    gap: 8px;
    padding: 10px 15px;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.hafta-header {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hafta-header > div {
    font-weight: 600;
    color: #495057;
}

.hafta-item {
    background: white;
    transition: background 0.2s ease;
}

.hafta-item:hover {
    background: #f8f9fa;
}

.hafta-item.clickable-row:hover {
    background: #e3f2fd;
    cursor: pointer;
}

.hafta-item.has-ob {
    background: #96b983;
}

.hafta-item.has-ob:hover {
    background: #c8e6c9;
}

.hafta-item > div {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meb-container-grid .hafta-header,
.meb-container-grid .hafta-item {
    grid-template-columns: var(--plan-columns);
}

/* MEB Table Header Font Weight */
.meb-container-grid .hafta-header > div {
    font-weight: 600; /* Make table headers bold */
}

.meb-container-grid .hafta-item.meb-filter-row input,
.meb-container-grid .hafta-item.meb-filter-row select {
    width: 100%;
    padding: 4px 6px;
    font-family: sans-serif;
    border: none;
    border-radius: 6px;
    background: transparent;
}

.meb-container-grid .hafta-item.meb-filter-row input:focus,
.meb-container-grid .hafta-item.meb-filter-row select:focus {
    outline: none;
    background-color: #ffffff70;
}

.meb-container-grid .hafta-item.meb-filter-row .meb-edit-btn {
    padding: 4px 8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.meb-container-grid .hafta-item.meb-filter-row .meb-edit-btn:hover {
    background: #c82333;
    transform: none;
}

.meb-container-grid .hafta-item.meb-filter-row .meb-edit-btn .material-icons {
    font-size: 16px !important;
}

.meb-container-grid .sortable {
    cursor: pointer;
    user-select: none;
}

.meb-container-grid .sortable:hover {
    background: rgb(255, 255, 255);
}

.meb-container-grid .sortable i {
    vertical-align: middle;
    margin-left: 4px;
    color: #999;
}

/* ========================================
   11. MEB CONTAINER & DASHBOARD
   ======================================== */

.meb-container {
    background: linear-gradient(to top, #E7E9BB, #aad9ff);
    min-height: 100vh;
    font-family: sans-serif;
    padding-top: env(safe-area-inset-top, 0);
}

.meb-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.meb-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.meb-back-button:hover {
    background: #2980b9;
}

.meb-back-button .material-icons {
    font-size: 20px;
}

.meb-progress-area {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.meb-progress-area h3 {
    margin: 0 0 10px 0;
}

.meb-progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.meb-progress-fill {
    height: 100%;
    background: #3498db;
    width: 0;
    transition: width 0.3s ease;
}

.meb-progress-text {
    color: #6c757d;
    margin-top: 8px;
}

.meb-progress-log {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.meb-log-entry {
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.meb-log-entry.meb-log-error {
    background: #fdecea;
    color: #c62828;
}

.meb-log-entry.meb-log-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.meb-log-entry.meb-log-info {
    background: #e3f2fd;
    color: #1565c0;
}

.meb-action-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meb-action-card:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-1px);
}

.meb-action-card .material-icons {
    color: #3498db;
}

.meb-action-card span {
    font-weight: 500;
    color: #2c3e50;
}

.meb-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 51; /* Layer 50+: Loading overlays */
}

.meb-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #3498db;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.meb-loading-text {
    color: #2c3e50;
    margin-top: 10px;
    font-weight: 500;
}

.meb-icon-button {
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meb-icon-button:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.meb-icon-button .material-icons {
    color: #3498db;
}

.meb-document-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.meb-selector-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meb-selector-group label {
    color: #6c757d;
}

.meb-select {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.meb-select:hover:not(:disabled) {
    border-color: #3498db;
}

.meb-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.meb-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.meb-table th {
    background: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
    border: none;
}

.meb-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.meb-table tbody tr:hover {
    background: #f8f9fa;
}

.meb-table tbody tr:last-child td {
    border-bottom: none;
}

#mebKaynaklariView .sidebar-menu {
    padding: 0 !important;
}

#mebKaynaklariView .menu-item-text {
    flex: 1;
}

#mebKaynaklariView .menu-item-stat {
    color: #999;
    font-weight: normal;
    margin-left: auto;
}

/* MEB Editor Sidebar specific */
#mebEditorSidebar {
    width: 450px;
    position: relative;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

/* MEB Document Viewer (additional) */
.meb-document-viewer {
    flex: 1;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========================================
   12. MEB KAYNAKLAR (Resources Tab)
   ======================================== */

.meb-kaynaklar-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.meb-kaynaklar-header {
    margin-bottom: 32px;
}

.meb-kaynaklar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.meb-kaynaklar-header p {
    color: #6b7280;
    margin: 0;
}

/* MEB Actions List */
.meb-actions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meb-action-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.meb-action-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* Icon */
.meb-action-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.meb-action-icon .material-icons {
    font-size: 20px;
    color: white;
}

/* Content */
.meb-action-content {
    flex: 1;
}

.meb-action-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.meb-action-content p {
    color: #6b7280;
    margin: 0 0 8px 0;
}

.meb-action-stat {
    display: inline-block;
    font-weight: 500;
    color: #3b82f6;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Button */
.meb-action-button {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meb-action-button:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.meb-action-button:active {
    transform: scale(0.98);
}

.meb-action-button .material-icons {
    font-size: 20px;
}

/* Processing State */
.meb-action-item.processing {
    border-color: #f59e0b;
    background: #fffbeb;
}

.meb-action-item.processing .meb-action-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation: pulse 2s ease-in-out infinite;
}

.meb-action-item.processing .meb-action-button {
    background: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

/* Success State */
.meb-action-item.success {
    border-color: #10b981;
    background: #f0fdf4;
}

.meb-action-item.success .meb-action-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Error State */
.meb-action-item.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.meb-action-item.error .meb-action-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   13. MAKALE YÖNETİMİ (Article Management)
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.header {
    padding: 30px;
    justify-content: space-between;
    align-items: center;
}

/* Heading styles globally defined (h1-h6: serif, bold) */

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1e1e1e;
}

.btn:hover {
    border-color: #949494;
}

.btn-primary {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.btn-secondary {
    background: #f0f0f0;
    color: #1e1e1e;
    border-color: #dcdcdc;
}

.btn-secondary:hover {
    background: #e0e0e0;
    border-color: #949494;
}

.btn-danger {
    background: #cc1818;
    color: white;
    border-color: #cc1818;
}

.btn-danger:hover {
    background: #a01313;
    border-color: #a01313;
}

.btn-success {
    background: #00a32a;
    color: white;
    border-color: #00a32a;
}

.btn-success:hover {
    background: #008a20;
    border-color: #008a20;
}

.btn-info {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.btn-info:hover {
    background: #0284c7;
    border-color: #0284c7;
}

.btn-warning {
    background: #f0b849;
    color: #1e1e1e;
    border-color: #f0b849;
}

.btn-warning:hover {
    background: #dda73a;
    border-color: #dda73a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-small {
    padding: 6px 12px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
    color: #6b7280;
}

.tab:hover {
    background: #f3f4f6;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.content {
    padding: 30px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========================================
   14. MAKALE EDITOR
   ======================================== */

body.editor-page {
    background: #fff;
    padding: 0;
    margin: 0;
}

.editor-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* İKİ KOLONLU LAYOUT - Gutenberg Style */
.editor-layout {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    align-items: start;
}

/* Sol Kolon - Ana İçerik */
.editor-main {
    background: white;
    padding: 20px 20px;
    min-height: 100vh;
}

/* Sağ Sidebar - Minimal Gutenberg Style */
.editor-sidebar {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 0;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.sidebar-header h2 {
    font-weight: 600;
    margin: 0;
    color: #1e1e1e;
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-weight: 600;
    color: #757575;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}

.btn-sm {
    padding: 6px 10px;
}

.editor-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e1e1e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    font-family: inherit;
    transition: border-color 0.1s ease-in-out;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.sidebar-section .form-group {
    margin-bottom: 0;
}

.sidebar-section .form-group input,
.sidebar-section .form-group textarea {
    padding: 6px 10px;
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-hint {
    color: #6b7280;
    margin-top: 5px;
}

/* Quill Editor Styling - Gutenberg Style */
.quill-container {
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    margin-top: 40px;
}

#editor {
    min-height: 500px;
    background: white;
}

.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #dcdcdc !important;
    background: #fff;
    padding: 12px !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ql-container {
    border: none !important;
    font-family: serif;
}

.ql-editor {
    min-height: 500px;
    padding: 20px 24px;
    line-height: 1.8;
}

.ql-editor.ql-blank::before {
    color: #949494;
    font-style: normal;
}

.ql-editor p {
    margin-bottom: 1em;
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.3;
}

.ql-editor h1 { font-size: 20px; }
.ql-editor h2 { font-size: 18px; }
.ql-editor h3 { font-size: 16px; }
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 { font-size: 14px; }

/* Quill Table Better Stilleri */
.ql-editor table {
    border-collapse: collapse;
    margin: 1.5em 0;
    width: 100%;
}

.ql-editor table td,
.ql-editor table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
    vertical-align: top;
}

.ql-editor table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.ql-editor table tr:hover {
    background-color: #fafafa;
}

/* Tablo hücre seçimi */
.ql-editor .qlbt-cell-selected {
    background-color: #e3f2fd !important;
}

/* Tablo menü butonları */
.ql-snow .ql-picker.ql-table-better {
    width: 120px;
}

.ql-snow .ql-picker.ql-table-better .ql-picker-label::before {
    content: 'Tablo Ekle';
}

/* Image Upload Dropzone */
.image-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.image-upload.dragover {
    border-color: #667eea;
    background: #ede9fe;
}

.image-preview {
    margin-top: 15px;
    display: none;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: block;
}

.image-preview-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Multi-Select Kategoriler */
.kategori-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.kategori-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 16px;
}

.kategori-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.kategori-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kategori-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.1s;
}

.kategori-checkbox:hover {
    opacity: 0.8;
}

.kategori-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #007cba;
}

.kategori-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    flex: 1;
    color: #1e1e1e;
}

.kategori-checkbox input[type="checkbox"]:checked + label {
    font-weight: 500;
}

/* Helper Text & Slug Preview */
.help-text {
    color: #6b7280;
    margin-top: 5px;
}


.char-count {
    color: #6b7280;
    margin-top: 5px;
    text-align: right;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
}

/* Input with Button Layout */
.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-button input {
    flex: 1;
}

.input-with-button .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ========================================
   15. ADDITIONAL UTILITY CLASSES
   ======================================== */

/* MUI Fields + Chips */
.mui-field-multiline {
    width: 100%;
    margin-bottom: 16px;
}


.mui-multiline-input {
    width: 100%;
    min-height: 3em;
    height: auto;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 16px;
    resize: vertical;
    background-color: transparent;
    box-sizing: border-box;
    transition: border-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}

.mui-multiline-input:focus {
    outline: none;
    border-color: #1976d2;
    border-width: 2px;
}

.mui-multiline-input:focus + label,
.mui-multiline-input:not(:placeholder-shown) + label {
    transform: translate(0px, -10px) scale(0.8);
    background-color: white;
    padding: 0;
    color: #1976d2;
}

.mui-field-multiline label {
    position: absolute;
    left: 14px;
    top: 12px;
    transform: translate(0, 0) scale(1);
}

.mui-field-helper {
    margin-top: 3px;
    margin-left: 0;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.66;
    font-family: sans-serif;
}

.mui-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 16px;
    background: white;
    appearance: none;
}

.mui-field select:focus {
    outline: none;
    border-color: #1976d2;
    border-width: 2px;
}

.mui-field select:focus + label,
.mui-field select:not([value=""]):not(:invalid) + label {
    transform: translate(0px, -10px) scale(0.8);
    background: white;
    padding: 0;
    color: #1976d2;
}

.mui-field label {
    position: absolute;
    left: 14px;
    top: 0px;
    transform: translate(0, 0) scale(1);
    transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
    color: rgba(0, 0, 0, 0.6);
    background: transparent;
    pointer-events: none;
}

.mui-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #90caf9;
    border-radius: 16px;
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mui-chip-label {
    line-height: 1;
}

.mui-chip-delete {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mui-chip-delete:hover {
    background: rgba(25, 118, 210, 0.2);
}

.mui-chip-delete::before {
    content: '✕';
    line-height: 1;
}

.mui-chip-ortam {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.mui-chip-ortam .mui-chip-delete {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.mui-chip-ortam .mui-chip-delete:hover {
    background-color: rgba(46, 125, 50, 0.2);
}

.mui-chip-clickable .mui-chip-label {
    cursor: pointer;
    transition: all 0.2s ease;
}

.mui-chip-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mui-chip-clickable:not(.mui-chip-ortam):hover {
    background-color: #bbdefb;
    border-color: #90caf9;
}

.mui-chip-clickable.mui-chip-ortam:hover {
    background-color: #c8e6c9;
    border-color: #81c784;
}

/* AUTOCOMPLETE STYLES */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 2px;
}

.autocomplete-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item.no-results {
    color: #999;
    cursor: default;
    font-style: italic;
}

.autocomplete-item.no-results:hover {
    background: white;
}

.autocomplete-item strong {
    color: #1976d2;
    font-weight: 500;
}

/* ========================================
   16. RESPONSIVE MEDIA QUERIES
   ======================================== */

/* Responsive width adjustments for MEB Sidebar */
@media (max-width: 1000px) {
    .meb-sidebar {
        width: 50%;
        min-width: 400px;
    }
}

@media (max-width: 800px) {
    .meb-sidebar {
        width: 400px;
        min-width: 400px;
    }
}

@media (max-width: 400px) {
    .meb-sidebar {
        width: 100%;
        min-width: 100%;
        right: -100%;
    }
}

/* MEB Sidebar Active Layout */
@media (min-width: 600px) {
    body.meb-sidebar-active .container {
        margin-right: 600px;
        width: calc(100% - 600px);
    }
}

@media (max-width: 1000px) and (min-width: 600px) {
    body.meb-sidebar-active .container {
        margin-right: 50%;
        width: 50%;
    }
}

@media (max-width: 800px) and (min-width: 600px) {
    body.meb-sidebar-active .container {
        margin-right: 400px;
        width: calc(100% - 400px);
    }
}

/* MEB Table Grid Responsive */
@media (max-width: 1300px) {
    .meb-container-grid {
        --plan-columns:
            45px
            minmax(110px, 1fr)
            minmax(110px, 1fr)
            minmax(140px, 1.6fr)
            40px
            45px
            40px
            40px
            40px;
    }
    .meb-container-grid .hafta-item.meb-filter-row input,
    .meb-container-grid .hafta-item.meb-filter-row select,
    .meb-container-grid .hafta-item.meb-filter-row .meb-edit-btn {
    }
}

@media (max-width: 1000px) {
    .meb-container-grid {
        --plan-columns:
            30px
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            35px
            35px
            35px
            35px
            35px;
    }
    .meb-container-grid .hafta-item.meb-filter-row input,
    .meb-container-grid .hafta-item.meb-filter-row select,
    .meb-container-grid .hafta-item.meb-filter-row .meb-edit-btn {
        padding: 2px 3px;
    }
}

/* General Admin Panel Responsive */
@media (max-width: 768px) {
    .admin-tabs {
        overflow-x: auto;
    }

    .admin-tab-button {
        padding: 12px 16px;
        white-space: nowrap;
    }

    .admin-tab-content {
        padding: 15px;
    }

    .makale-filters,
    .talep-filters {
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }

    .filter-search {
        width: 100%;
        min-width: 100%;
    }

    .filter-chips {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .stats,
    .talep-stats,
    .meb-stats {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card .value {
        font-size: 18px;
    }

    .stat-card h3 {
    }

    table,
    .talep-table {
    }

    th, td {
        padding: 8px 10px;
    }

    .truncate {
        max-width: 150px;
    }

    .curriculum-section {
        padding: 12px;
        margin-bottom: 16px;
    }

    .curriculum-chip {
        padding: 4px 8px;
    }

    .meb-preview-stats {
        justify-content: space-around;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
    }

    .meb-dashboard {
        padding: 20px;
        margin: 10px;
    }

    .meb-stats-grid {
        grid-template-columns: 1fr;
    }

    .meb-action-buttons {
        grid-template-columns: 1fr;
    }

    .meb-quick-actions {
        flex-direction: column;
    }

    .meb-document-selector {
        flex-direction: column;
    }

    .meb-selector-group {
        width: 100%;
    }

    .table-filters {
        flex-direction: column;
    }

    .table-filters select,
    .table-filters input {
        width: 100%;
    }

    .meb-action-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .meb-action-content h3 {
        font-size: 16px;
        font-weight: 700;
    }

    .meb-action-content p {
    }

    .meb-action-button {
        width: 100%;
        justify-content: center;
    }
}

/* Makale Editor Responsive */
@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar {
        position: static;
        height: auto;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .editor-main {
        padding: 20px 20px;
    }
}

@media (max-width: 768px) {
    body.editor-page {
        padding: 0;
    }

    .editor-main {
        padding: 10px 10px;
    }

    .sidebar-section {
        padding: 12px 16px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .filters {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .form-group-inline {
        grid-template-columns: 1fr;
    }

    .table-container {
    }

    .action-buttons {
        flex-direction: column;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
        padding: 15px 20px;
    }
}

/* ========================================
   16. MAKALE EDITOR (WORDPRESS STYLE)
   ======================================== */

/* Editor Header (Sticky Top Bar) */
.editor-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 20px;
    margin: -20px -20px 20px -20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header-actions-right {
    display: flex;
    gap: 10px;
}

/* Title Input (WordPress Style) */
.title-input {
    width: 100%;
    font-size: 2.5rem;
    font-weight: 600;
    border: none;
    outline: none;
    padding: 20px 0;
    color: #1e293b;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.title-input::placeholder {
    color: #94a3b8;
}

.title-input:focus {
    outline: none;
}

/* Image Upload Area (Drag-Drop) */
.image-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-placeholder {
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-placeholder:hover {
    background: #f1f5f9;
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.upload-placeholder p {
    margin: 8px 0;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.upload-hint {
    font-size: 13px;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

.image-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.btn-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-remove-image:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

/* URL Input */
.url-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Slug Preview */
.slug-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    font-family: monospace;
    word-break: break-all;
    line-height: 1.5;
}

/* Page Type Select */
.page-type-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-type-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #334155;
}

/* Custom Field Row */
.custom-field-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.custom-field-key,
.custom-field-value {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
}

.custom-field-key:focus,
.custom-field-value:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Quill Container (Full Height) */
.quill-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quill-container #editor {
    flex: 1;
    min-height: 500px;
    background: white;
}

/* Editor Sidebar Tweaks */
.editor-sidebar .sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.editor-sidebar .sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Char Count */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Help Text */
.help-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

/* Responsive Tweaks */
@media (max-width: 1024px) {
    .title-input {
        font-size: 2rem;
    }

    .editor-header {
        padding: 10px 15px;
    }

    .header-actions {
        flex-direction: column;
        gap: 10px;
    }

    .header-actions-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ========================================
   END OF PANEL STYLES

/* WebP support - Simple background image */
@supports (background-image: -webkit-image-set(url('/assets/gradient.usehall.webp') 1x)) or
          (background-image: image-set(url('/assets/gradient.usehall.webp') 1x)) {
    body.meb-page {
        background: url('/assets/gradient.usehall.webp') center/cover fixed no-repeat;
    }
}

/* AVIF support - Simple background image */
@supports (background-image: -webkit-image-set(url('/assets/gradient.usehall.avif') type('image/avif'))) or
          (background-image: image-set(url('/assets/gradient.usehall.avif') type('image/avif'))) {
    body.meb-page {
        background: url('/assets/gradient.usehall.avif') center/cover fixed no-repeat;
    }
}

/* ========================================
   16. REDIRECT YÖNETİMİ (Redirect Management)
   ======================================== */

/* Redirect Stats Grid */
.redirect-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.redirect-stats .stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Tıklanabilir stat kartları */
.redirect-stats .stat-card.clickable {
    cursor: pointer;
    border: 2px solid transparent;
}

.redirect-stats .stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Aktif (seçili) stat kartı */
.redirect-stats .stat-card.clickable.active {
    border-color: #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.redirect-stats .stat-card.clickable.active.matched {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.redirect-stats .stat-card.clickable.active.unmatched {
    border-color: #ff9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.redirect-stats .stat-card.clickable.active.inactive {
    border-color: #9e9e9e;
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.3);
}

.redirect-stats .stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.redirect-stats .stat-card .value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.redirect-stats .stat-card.total .value { color: #1976d2; }
.redirect-stats .stat-card.matched .value { color: #4caf50; }
.redirect-stats .stat-card.unmatched .value { color: #ff9800; }
.redirect-stats .stat-card.inactive .value { color: #9e9e9e; }

/* Redirect Filters */
.redirect-filters {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.redirect-filters .filter-search {
    flex: 1;
    min-width: 200px;
}

.redirect-filters .filter-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.redirect-filters .filter-sort {
    display: flex;
    gap: 10px;
}

.redirect-filters .filter-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.redirect-filters .filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.redirect-filters .selected-info {
    color: #666;
    font-size: 14px;
}

/* Redirect Content */
.redirect-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Redirect Table */
.redirect-table {
    width: 100%;
    border-collapse: collapse;
}

.redirect-table thead {
    background: #f5f5f5;
}

.redirect-table th,
.redirect-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.redirect-table th {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
}

.redirect-table tbody tr:hover {
    background: #f9f9f9;
}

.redirect-table .url-cell {
    font-family: monospace;
    font-size: 13px;
    color: #1976d2;
    /* Truncate kaldırıldı - tam URL göster */
    white-space: normal;
    word-break: break-all;
}

.redirect-table .url-cell .url-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.redirect-table .url-cell .url-meta-separator {
    color: #c7c7c7;
    font-size: 10px;
}

.redirect-table .hit-cell {
    font-weight: 600;
    color: #333;
    text-align: center;
}

.redirect-table .redirect-url-cell {
    font-family: monospace;
    font-size: 13px;
    color: #4caf50;
    /* Truncate kaldırıldı - tam URL göster */
    white-space: normal;
    word-break: break-all;
}

.redirect-table .no-redirect {
    color: #999;
}

.redirect-table .action-cell {
    white-space: nowrap;
}

/* Action Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: background 0.2s;
}

.btn-icon .material-icons {
    font-size: 18px;
}

.btn-icon.btn-match {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-icon.btn-match:hover {
    background: #bbdefb;
}

.btn-icon.btn-delete {
    background: #ffebee;
    color: #d32f2f;
}

.btn-icon.btn-delete:hover {
    background: #ffcdd2;
}

/* Status Badges */
.status-badge.status-matched {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-unmatched {
    background: #fff3e0;
    color: #ef6c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-inactive {
    background: #f5f5f5;
    color: #757575;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Pagination */
.redirect-pagination {
    padding: 15px 20px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #f5f5f5;
    border-color: #1976d2;
}

.pagination-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.pagination-dots {
    padding: 0 5px;
    color: #999;
}

.pagination-info {
    margin-left: 15px;
    color: #666;
    font-size: 14px;
}

/* Redirect Match Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.redirect-match-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Redirect Info */
.redirect-info {
    margin-bottom: 20px;
}

.redirect-info label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.redirect-url-display {
    font-family: monospace;
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 4px;
    word-break: break-all;
    color: #1976d2;
}

/* Ders Search Container */
.ders-search-container {
    margin-bottom: 20px;
}

.ders-search-container label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.ders-search-container input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ders-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.ders-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.ders-result-item:hover {
    background: #f5f5f5;
}

.ders-result-item:last-child {
    border-bottom: none;
}

.ders-result-item strong {
    display: block;
    color: #333;
    margin-bottom: 3px;
}

.ders-result-item .ders-info {
    font-size: 12px;
    color: #666;
}

.ders-search-results .no-results {
    padding: 15px;
    text-align: center;
    color: #999;
}

/* Selected Ders Container */
.selected-ders-container {
    margin-top: 20px;
}

.selected-ders-container label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.selected-ders-display {
    background: #e8f5e9;
    padding: 10px 15px;
    border-radius: 4px;
    color: #2e7d32;
    font-weight: 500;
}

/* Redirect Checkbox */
.redirect-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .redirect-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .redirect-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .redirect-filters .filter-search {
        width: 100%;
    }

    .redirect-filters .filter-sort {
        width: 100%;
    }

    .redirect-filters .filter-sort select {
        flex: 1;
    }

    .redirect-table {
        font-size: 13px;
    }

    /* URL'ler tam görünür - truncate yok */
}

/* ========================================
   17. INLINE SEARCH (Redirect Table)
   ======================================== */

/* Inline Search Container */
.inline-search-container {
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.redirect-url-text {
    color: #4caf50;
    font-family: monospace;
    font-size: 13px;
    cursor: pointer;
}

.redirect-url-text:hover {
    text-decoration: underline;
}

.no-redirect-placeholder {
    color: #999;
    font-style: italic;
    cursor: pointer;
    padding: 4px 8px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ddd;
    font-size: 13px;
}

.no-redirect-placeholder:hover {
    background: #f0f0f0;
    border-color: #1976d2;
    color: #1976d2;
}

/* Inline Search Wrapper */
.inline-search-wrapper {
    width: 100%;
}

.inline-ders-search {
    width: 100%;
    padding: 8px 12px !important;
    border: 2px solid #1976d2 !important;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.inline-ders-search:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

/* Inline Search Results */
.inline-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

/* Dropdown yukarı açılırken */
.inline-search-results.dropdown-above {
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.inline-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.inline-result-item:hover {
    background: #e3f2fd;
}

.inline-result-item:last-child {
    border-bottom: none;
}

.inline-result-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.inline-result-info {
    font-size: 12px;
    color: #666;
}

.inline-no-results,
.inline-search-error {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.inline-search-error {
    color: #d32f2f;
}

/* Redirect URL Cell - clickable */
.redirect-url-cell {
    cursor: pointer;
    position: relative;
    overflow: visible !important;
}

.redirect-url-cell:hover {
    background: #f5f5f5;
}

/* Active inline search - high z-index to overlay other rows */
.redirect-url-cell.inline-search-active {
    z-index: 1000;
}

/* ========================================
   18. BULK MATCH MODAL
   ======================================== */

.bulk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.bulk-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bulk-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
}

.bulk-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.bulk-modal-body {
    padding: 20px;
}

.bulk-modal-info {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
}

.bulk-modal-info span {
    font-weight: 600;
    color: #1976d2;
}

/* Bulk Search Container */
.bulk-search-container {
    position: relative;
}

.bulk-ders-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.bulk-ders-search:focus {
    outline: none;
    border-color: #1976d2;
}

.bulk-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bulk-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.bulk-result-item:hover {
    background: #e3f2fd;
}

.bulk-result-item:last-child {
    border-bottom: none;
}

.bulk-result-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.bulk-result-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.bulk-result-url {
    font-size: 11px;
    color: #1976d2;
    font-family: monospace;
}

.bulk-no-results,
.bulk-search-error {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.bulk-search-error {
    color: #d32f2f;
}

/* Selected Ders Display */
.bulk-selected-ders {
    margin-top: 16px;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-selected-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

#bulkSelectedDersName {
    flex: 1;
    font-weight: 600;
    color: #2e7d32;
    font-size: 14px;
    word-break: break-all;
}

.bulk-clear-selection {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.bulk-clear-selection:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.bulk-clear-selection .material-icons {
    font-size: 18px;
}

/* Modal Footer */
.bulk-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========================================
   16. EMAIL PANEL
   ======================================== */

/* Email Stats */
.email-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.email-stats .stat-card.info {
    border-left: 4px solid #2196f3;
}

.email-stats .stat-card.info .value {
    color: #1976d2;
}

/* Email Filters */
.email-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.email-filters .filter-search {
    flex: 1;
    min-width: 200px;
}

.email-filters .filter-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.email-filters .filter-search input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.email-filters .filter-type select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.email-filters .filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* Email Content */
.email-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* Email Logs Table */
.email-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.email-logs-table th,
.email-logs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.email-logs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-logs-table tr:hover {
    background: #f8f9fa;
}

.email-recipient {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.email-recipient .email {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.email-recipient .name {
    font-size: 12px;
    color: #666;
}

.email-subject {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.email-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.email-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.email-status .material-icons {
    font-size: 16px;
}

.email-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.email-status.error {
    background: #ffebee;
    color: #c62828;
}

.email-status.info {
    background: #e3f2fd;
    color: #1565c0;
}

.email-date {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

/* Email Modal */
.email-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.email-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.email-modal.email-modal-small {
    max-width: 400px;
}

.email-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.email-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.email-modal-header .btn-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.email-modal-header .btn-close:hover {
    background: #f0f0f0;
}

.email-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.email-modal-body .form-group {
    margin-bottom: 20px;
}

.email-modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.email-modal-body .form-group input,
.email-modal-body .form-group textarea,
.email-modal-body .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.email-modal-body .form-group input:focus,
.email-modal-body .form-group textarea:focus,
.email-modal-body .form-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.email-modal-body .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.email-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    padding: 16px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #1976d2;
}

.pagination-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn .material-icons {
    font-size: 20px;
}

.pagination-dots {
    padding: 0 8px;
    color: #999;
}

/* Button Icon */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #666;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #1976d2;
}

/* Empty State */
#email-tab-content .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

#email-tab-content .empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

#email-tab-content .empty-state h3 {
    margin: 0 0 8px;
    color: #333;
}

#email-tab-content .empty-state p {
    margin: 0 0 20px;
}

#email-tab-content .empty-state.error i {
    color: #f44336;
}

/* Email Tab Responsive */
@media (max-width: 768px) {
    .email-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .email-filters .filter-actions {
        margin-left: 0;
        justify-content: flex-end;
    }

    .email-logs-table {
        font-size: 13px;
    }

    .email-logs-table th,
    .email-logs-table td {
        padding: 10px 12px;
    }

    .email-subject {
        max-width: 150px;
    }

    .email-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* ========================================
   EMAIL TEMPLATE EDITOR
   ======================================== */

/* Section Toggle */
.email-section-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.email-section-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.email-section-btn:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.email-section-btn.active {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.email-section-btn i {
    font-size: 20px;
}

/* Template Section */
.email-templates-section {
    display: none;
}

.email-templates-section.active {
    display: block;
}

.email-logs-section {
    display: block;
}

.email-logs-section:not(.active) {
    display: none;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.template-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.template-card:hover {
    border-color: #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
    transform: translateY(-2px);
}

.template-card.inactive {
    opacity: 0.6;
}

.template-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.template-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.template-card-icon.user {
    background: linear-gradient(135deg, #257dff, #1d4ed8);
}

.template-card-icon.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.template-card-icon.system {
    background: linear-gradient(135deg, #10b981, #059669);
}

.template-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}

.template-card-key {
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

.template-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.template-card-subject {
    font-size: 13px;
    color: #333;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-card-subject i {
    font-size: 16px;
    color: #999;
}

.template-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.template-card:hover .template-card-actions {
    opacity: 1;
}

.template-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.template-action-btn:hover {
    background: #1976d2;
    color: white;
}

.template-action-btn.preview:hover {
    background: #10b981;
}

/* Template Editor Modal */
.template-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.template-editor-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-editor-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.template-editor-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.template-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.template-editor-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.template-editor-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
}

.template-editor-preview h3 {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-preview-frame {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.template-preview-frame iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.template-editor-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.template-editor-footer .btn-group {
    display: flex;
    gap: 12px;
}

/* Form Groups in Editor */
.template-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.template-form-group input,
.template-form-group select,
.template-form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.template-form-group input:focus,
.template-form-group select:focus,
.template-form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
}

.template-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Quill Editor Container */
.quill-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.quill-container .ql-toolbar {
    border: none;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.quill-container .ql-container {
    border: none;
    font-size: 14px;
    min-height: 200px;
}

.quill-container .ql-editor {
    min-height: 200px;
}

/* Variable Chips */
.variable-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.variable-chip {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: monospace;
}

.variable-chip:hover {
    background: #1976d2;
    color: white;
}

/* Header Settings Collapsible */
.header-settings-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.header-settings-toggle i {
    transition: transform 0.2s;
}

.header-settings-toggle.expanded i {
    transform: rotate(180deg);
}

.header-settings-content {
    display: none;
    padding: 16px;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.header-settings-content.expanded {
    display: block;
}

/* Template Editor Responsive */
@media (max-width: 1024px) {
    .template-editor-body {
        grid-template-columns: 1fr;
    }

    .template-editor-preview {
        order: -1;
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: 1fr;
    }

    .email-section-toggle {
        flex-direction: column;
    }

    .template-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   17. VERITABANI TAB (Database Management)
   ======================================== */

.veritabani-content {
    padding: 20px 0;
}

.veritabani-header {
    margin-bottom: 30px;
}

.veritabani-header h2 {
    font-size: 1.5rem;
    color: #1e1e1e;
    margin-bottom: 8px;
}

.veritabani-header p {
    color: #666;
    font-size: 0.95rem;
}

.veritabani-actions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.veritabani-action-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.veritabani-action-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.veritabani-action-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    border-radius: 12px;
    flex-shrink: 0;
}

.veritabani-action-icon i {
    color: white;
    font-size: 28px;
}

.veritabani-action-content {
    flex: 1;
}

.veritabani-action-content h3 {
    font-size: 1.1rem;
    color: #1e1e1e;
    margin-bottom: 6px;
    font-weight: 600;
}

.veritabani-action-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.veritabani-action-stat {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.veritabani-action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.veritabani-action-button:hover {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    transform: scale(1.02);
}

.veritabani-action-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.veritabani-action-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.veritabani-action-button.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Veritabanı Warning Box */
.veritabani-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    margin-bottom: 24px;
}

.veritabani-warning i {
    color: #f57c00;
    font-size: 24px;
    flex-shrink: 0;
}

.veritabani-warning-content h4 {
    color: #e65100;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.veritabani-warning-content p {
    color: #bf360c;
    font-size: 0.85rem;
    margin: 0;
}

/* Veritabani Sync Progress */
.veritabani-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    display: none;
}

.veritabani-progress.active {
    display: block;
}

.veritabani-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.veritabani-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.veritabani-progress-text {
    color: #666;
    font-size: 0.9rem;
}

.veritabani-progress-log {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    background: #1e1e1e;
    color: #4caf50;
    padding: 12px;
    border-radius: 6px;
}

.veritabani-progress-log .log-line {
    margin-bottom: 4px;
}

.veritabani-progress-log .log-error {
    color: #f44336;
}

.veritabani-progress-log .log-success {
    color: #4caf50;
}

.veritabani-progress-log .log-info {
    color: #2196f3;
}

/* Veritabani Table Comparison */
.veritabani-comparison {
    margin: 24px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.veritabani-comparison .loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.veritabani-comparison .error {
    padding: 20px;
    color: #d32f2f;
    text-align: center;
}

.veritabani-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 12px;
}

.veritabani-env-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.veritabani-env-badge.production {
    background: #e3f2fd;
    color: #1565c0;
}

.veritabani-env-badge.development {
    background: #e8f5e9;
    color: #2e7d32;
}

.veritabani-env-badge i {
    font-size: 18px;
}

.veritabani-connections {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.veritabani-connections span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.veritabani-connections span i {
    font-size: 16px;
}

.veritabani-connections .connected {
    color: #2e7d32;
}

.veritabani-connections .disconnected {
    color: #d32f2f;
}

.veritabani-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.veritabani-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.veritabani-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    background: #fafafa;
    border-bottom: 2px solid #e0e0e0;
}

.veritabani-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.veritabani-table tbody tr:hover {
    background: #f8f9fa;
}

.veritabani-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', Monaco, monospace;
}

.veritabani-table .text-right {
    text-align: right;
}

.veritabani-table .text-center {
    text-align: center;
}

.veritabani-table tfoot td {
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
}

/* Diff column colors */
.veritabani-table .diff-positive {
    color: #d32f2f;
    font-weight: 500;
}

.veritabani-table .diff-negative {
    color: #2e7d32;
    font-weight: 500;
}

.veritabani-table .diff-zero {
    color: #666;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.status-synced {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.status-behind {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.status-ahead {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.status-missing {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-prod-only {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-badge.status-unknown {
    background: #eeeeee;
    color: #616161;
}

/* Veritabani Responsive */
@media (max-width: 768px) {
    .veritabani-action-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .veritabani-action-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   18. MOBILE TABLE SCROLL CONTAINERS
   ======================================== */

/* Generic table wrapper for horizontal scroll */
.table-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
}

/* Talep table scroll */
.talep-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Makale table scroll */
.makale-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Redirect table scroll */
.redirect-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Email logs scroll */
.email-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure tables have min-width on mobile */
@media (max-width: 768px) {
    .talep-table,
    #makaleTable,
    .redirect-table,
    .email-logs-table {
        min-width: 600px;
    }

    .meb-container-grid {
        min-width: 800px;
    }

    /* MEB Table View scroll */
    .meb-table-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
