:root {
  --primary: #6dbd35;
  --primary-dark: #5ca62c;
  --primary-darker: #4c8c23;
  --primary-light: #f0fdf4;
  --primary-glow: rgba(109, 189, 53, 0.28);
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px -2px rgba(0,0,0,0.06), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 30px -4px rgba(0,0,0,0.1), 0 4px 10px -2px rgba(0,0,0,0.05);

  --btn-bg: #f0fdf4;
  --btn-border: #4ade80;
  --btn-text: #15803d;
  --btn-hover-bg: #dcfce7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; 
  color: var(--text-main); 
  background-color: #f8fafc; 
  line-height: 1.55; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease; 
}

/* TABLO YOĞUNLUK SINIFLARI */
body.density-compact .custom-table td, 
body.density-compact .custom-table th { 
  padding: 6px 10px !important; 
  font-size: 12px !important; 
}
body.density-compact .btn-action { 
  padding: 4px 10px !important; 
  font-size: 11.5px !important; 
}
body.density-spacious .custom-table td, 
body.density-spacious .custom-table th { 
  padding: 18px 16px !important; 
  font-size: 14px !important; 
}
body.density-spacious .btn-action { 
  padding: 10px 18px !important; 
  font-size: 13.5px !important; 
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* TOAST BİLDİRİMLERİ */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  background: #1e293b;
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25), 0 8px 10px -6px rgba(0,0,0,0.2);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border-left: 5px solid var(--primary);
  backdrop-filter: blur(8px);
}
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #3b82f6; }
.toast.warning { border-left-color: #f59e0b; }

@keyframes toastSlideIn {
  from { transform: translateX(120%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

/* HEADER & BANNER */
.banner-bar { 
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); 
  color: #fff; 
  padding: 14px 32px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.banner-left, .banner-right { display: flex; align-items: center; gap: 12px; }

.logo-box { 
  background: #ffffff; 
  padding: 6px 14px; 
  border-radius: 8px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}
.logo-box:hover {
  transform: scale(1.04);
}
.logo-img { height: 36px; max-width: 180px; object-fit: contain; display: block; }
.header-title { 
  font-size: 18px; 
  font-weight: 700; 
  color: #fff; 
  letter-spacing: -0.015em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-theme-toggle {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-theme-toggle:hover { 
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1) rotate(15deg);
}

.btn-nav-auth, .btn-nav-login, .btn-header-ext {
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-nav-auth { 
  background: #ef4444; 
  color: #fff; 
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.btn-nav-auth:hover { 
  background: #dc2626;
  transform: translateY(-2px);
}
.btn-nav-login { 
  background: #ffffff; 
  color: #0f172a; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-nav-login:hover { 
  background: #f8fafc;
  transform: translateY(-2px);
}
.btn-header-ext { 
  background: rgba(255, 255, 255, 0.2); 
  color: #fff; 
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn-header-ext:hover { 
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* CONTAINER & KARTLAR */
.container { width: 100%; max-width: 1440px; margin: 24px auto; padding: 0 24px; }
.card { 
  background: var(--card-bg); 
  padding: 28px; 
  border-radius: var(--radius); 
  border: 1px solid var(--border-color); 
  margin-bottom: 28px; 
  box-shadow: var(--shadow-md); 
  animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; 
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SKELETON SHIMMER */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: 4px;
  display: inline-block;
}
.skeleton-row td { padding: 14px !important; }
.skeleton-badge { width: 85px; height: 22px; border-radius: 6px; }
.skeleton-sub { width: 110px; height: 16px; border-radius: 4px; }
.skeleton-title { width: 75%; height: 18px; border-radius: 4px; }
.skeleton-desc { width: 88%; height: 16px; border-radius: 4px; }
.skeleton-btn { width: 140px; height: 32px; border-radius: 6px; }

/* ADMIN PANELİ */
.admin-dashboard { 
  display: grid; 
  grid-template-columns: 250px 1fr; 
  gap: 0; 
  border: 2px solid var(--primary); 
  padding: 0; 
  overflow: hidden; 
  border-radius: 12px;
}
.admin-sidebar { 
  background: #0f172a; 
  color: #fff; 
  padding: 24px 0; 
  border-right: 1px solid #1e293b;
}
.admin-sidebar h3 { 
  padding: 0 24px 14px; 
  font-size: 11.5px; 
  text-transform: uppercase; 
  letter-spacing: 0.05em;
  color: var(--primary); 
  border-bottom: 1px solid #1e293b; 
}
.admin-nav { list-style: none; margin-top: 12px; }
.admin-nav li a { 
  display: flex; 
  align-items: center;
  gap: 10px;
  padding: 12px 24px; 
  color: #94a3b8; 
  text-decoration: none; 
  font-size: 13.5px; 
  font-weight: 500; 
  cursor: pointer; 
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
.admin-nav li a:hover { 
  background: rgba(255,255,255,0.05); 
  color: #f8fafc; 
}
.admin-nav li a.active { 
  background: linear-gradient(90deg, var(--primary-glow) 0%, transparent 100%); 
  color: var(--primary); 
  border-left-color: var(--primary);
  font-weight: 700;
}
.admin-content { padding: 28px; background: #fff; transition: background-color 0.3s; }

/* KPI KARTLARI */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.kpi-info { display: flex; flex-direction: column; }
.kpi-label { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 20px; font-weight: 800; color: var(--text-main); line-height: 1.2; margin-top: 2px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: #475569; }
.form-group input, .form-group select, .form-group textarea { 
  width: 100%; 
  padding: 10px 14px; 
  border: 1.5px solid #cbd5e1; 
  border-radius: 6px; 
  font-size: 13.5px; 
  outline: none; 
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ÇOKLU KATEGORİ SEÇİCİ (MULTI-CAT PICKER) */
.multi-cat-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  min-height: 48px;
  align-items: center;
}
.multi-cat-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-main);
}
.multi-cat-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.multi-cat-chip.selected {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.cat-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* AYARLAR ALT SEKMELERİ (SETTINGS SUBTABS) */
.settings-subtabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}
.settings-subtab-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.settings-subtab-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: translateY(-1px);
}
.settings-subtab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.settings-section-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 22px;
  border-radius: 10px;
  margin-bottom: 18px;
  animation: fadeInUp 0.25s ease-out;
}
.settings-section-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

.dynamic-link-group { background: #f8fafc; border: 1px solid #e2e8f0; padding: 14px; border-radius: 8px; margin-bottom: 16px; }
.dynamic-link-group h4 { font-size: 12.5px; margin-bottom: 10px; color: #475569; display: flex; justify-content: space-between; align-items: center; }

.link-row { display: grid; grid-template-columns: 1.2fr 130px 1.5fr 36px; gap: 10px; margin-bottom: 10px; align-items: center; }
.link-row input, .link-row select { padding: 8px 10px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 6px; width: 100%; }
.btn-del-row { background: #ef4444; color: #fff; border: none; border-radius: 6px; height: 34px; cursor: pointer; font-weight: bold; transition: background 0.15s, transform 0.15s; }
.btn-del-row:hover { background: #dc2626; transform: scale(1.05); }
.btn-add-row { background: #3b82f6; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 11.5px; font-weight: bold; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn-add-row:hover { background: #2563eb; transform: translateY(-1px); }

.editor-toolbar { background: #f1f5f9; border: 1px solid #cbd5e1; border-bottom: none; padding: 8px; border-radius: 6px 6px 0 0; display: flex; gap: 8px; }
.editor-btn { background: #fff; border: 1px solid #cbd5e1; padding: 5px 10px; font-size: 12px; cursor: pointer; border-radius: 4px; font-weight: bold; transition: all 0.15s; }
.editor-btn:hover { background: #e2e8f0; border-color: #94a3b8; }
.editor-area { border: 1px solid #cbd5e1; min-height: 110px; padding: 12px; border-radius: 0 0 6px 6px; outline: none; font-size: 13.5px; }

.btn-submit { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: #fff; 
  border: none; 
  padding: 10px 22px; 
  border-radius: 6px; 
  font-weight: 700; 
  cursor: pointer; 
  font-size: 13.5px; 
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.kategori-tag-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.kategori-card-manage { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 14px; }
.kategori-card-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; margin-bottom: 10px; }
.subkategori-tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.subkat-chip { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 5px 10px; border-radius: 6px; font-size: 12px; display: flex; align-items: center; gap: 8px; }

/* KATEGORİ PİLL BUTONLARI & SAYAÇLAR */
.kategori-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.kategori-btn { 
  background: #fff; 
  border: 1px solid #cbd5e1; 
  border-radius: 9999px; 
  padding: 7px 16px; 
  font-size: 12.5px; 
  font-weight: 600; 
  cursor: pointer; 
  user-select: none; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); 
  color: var(--text-main); 
}
.kategori-btn:hover { 
  border-color: var(--primary); 
  color: var(--primary-darker); 
  background: var(--primary-light); 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}
.kategori-btn.aktif { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: #fff; 
  border-color: var(--primary); 
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow); 
}
.cat-count-badge {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  transition: background 0.2s;
}
.kategori-btn.aktif .cat-count-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.subkategori-grid { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  margin: 6px 0 18px 0; 
  padding: 10px 16px; 
  background: linear-gradient(90deg, var(--primary-glow) 0%, rgba(248, 250, 252, 0.8) 100%); 
  border-radius: 10px; 
  border-left: 4px solid var(--primary); 
  animation: fadeInDown 0.25s ease-out;
}
.subkategori-btn { 
  background: #fff; 
  border: 1px solid #cbd5e1; 
  border-radius: 9999px; 
  padding: 5px 12px; 
  font-size: 11.5px; 
  font-weight: 600; 
  cursor: pointer; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
}
.subkategori-btn:hover { 
  border-color: var(--primary); 
  color: var(--primary-darker); 
  transform: translateY(-1px);
}
.subkategori-btn.aktif { 
  background: var(--primary-darker); 
  color: #fff; 
  border-color: var(--primary-darker); 
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.subkategori-btn.aktif .cat-count-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* KONTROLLER & ARAMA */
.controls-bar { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 16px; 
  font-size: 12.5px; 
  gap: 12px; 
  flex-wrap: wrap; 
}
.controls-bar select { 
  padding: 7px 10px; 
  border-radius: 6px; 
  border: 1.5px solid #cbd5e1; 
  outline: none;
  transition: border-color 0.2s;
}
.controls-bar select:focus { border-color: var(--primary); }

.search-input-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 320px;
}
.search-input { 
  padding: 8px 34px 8px 14px; 
  border-radius: 8px; 
  border: 1.5px solid #cbd5e1; 
  font-size: 13px; 
  outline: none; 
  width: 100%; 
  background: #fff;
  transition: all 0.22s ease; 
}
.search-input:focus { 
  border-color: var(--primary); 
  box-shadow: 0 0 0 3.5px var(--primary-glow);
}
.search-clear-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  display: none;
  transition: color 0.15s, transform 0.15s;
}
.search-clear-btn:hover { 
  color: #ef4444; 
  transform: scale(1.15);
}

/* TABLO & YAPIŞKAN (STICKY) BAŞLIK */
.table-responsive { 
  width: 100%; 
  border-radius: var(--radius); 
  border: 1px solid var(--border-color); 
  overflow-x: hidden !important; 
  background: #fff; 
  min-height: 240px; 
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s; 
  position: relative;
}
.custom-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; min-width: 0 !important; }
.custom-table thead th { 
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); 
  color: #fff; 
  padding: 13px 14px; 
  text-align: left; 
  white-space: nowrap; 
  vertical-align: middle; 
  box-sizing: border-box; 
  font-weight: 700;
  letter-spacing: -0.01em;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.custom-table th.sortable { cursor: pointer; user-select: none; transition: background 0.18s; }
.custom-table th.sortable:hover { background: var(--primary-darker); }
.custom-table td { 
  border-top: 1px solid var(--border-color); 
  padding: 12px 14px; 
  vertical-align: middle; 
  background: #fff; 
  word-wrap: break-word; 
  overflow-wrap: break-word; 
  word-break: break-word; 
  box-sizing: border-box; 
  transition: background-color 0.18s ease; 
}
.custom-table tbody tr:hover td { background-color: var(--primary-light); }

.search-highlight {
  background-color: #fef08a;
  color: #854d0e;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}
.btn-copy-link {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.55;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-copy-link:hover {
  opacity: 1;
  background: #f1f5f9;
  transform: scale(1.2) rotate(10deg);
}

/* EMPTY STATE */
.empty-state-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px 20px;
  text-align: center;
  animation: fadeInUp 0.3s ease-out;
}
.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  animation: pulseEmptyIcon 2.5s infinite ease-in-out;
}
@keyframes pulseEmptyIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.btn-empty-reset {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-empty-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* AKILLI DOSYA BUTONLARI & DİNAMİK LİSTE / IZGARA MOTORU */
.btn-list-wrapper {
  width: 100%;
}
.btn-list-wrapper.layout-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
  gap: 8px !important;
}
.btn-list-wrapper.layout-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.doc-btn-group { display: flex; width: 100%; }

.btn-action { 
  display: inline-flex !important; 
  align-items: center !important; 
  gap: 8px !important; 
  padding: 7px 14px !important; 
  border-radius: 6px !important; 
  text-decoration: none !important; 
  font-weight: 600 !important; 
  font-size: 12.5px !important; 
  cursor: pointer !important; 
  border: 1.5px solid var(--btn-border) !important; 
  background: var(--btn-bg) !important; 
  color: var(--btn-text) !important; 
  white-space: normal !important; 
  word-break: break-word !important; 
  box-sizing: border-box !important; 
  line-height: 1.4 !important; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.btn-list-wrapper.layout-grid .btn-action {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
}
.btn-list-wrapper.layout-column .btn-action {
  width: fit-content !important;
  max-width: 100% !important;
  justify-content: flex-start !important;
}

.btn-action:hover { 
  background: var(--btn-hover-bg) !important; 
  border-color: var(--btn-border) !important; 
  color: var(--btn-text) !important; 
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}
body.dark-mode .btn-action { 
  background: rgba(255, 255, 255, 0.06) !important; 
  color: var(--btn-border) !important; 
  border: 1.5px solid var(--btn-border) !important; 
}
body.dark-mode .btn-action:hover { 
  background: rgba(255, 255, 255, 0.14) !important; 
  box-shadow: 0 4px 14px rgba(0,0,0,0.4) !important;
}

.badge-cat { 
  display: inline-block; 
  background: #f1f5f9; 
  color: #334155; 
  padding: 3px 8px; 
  border-radius: 6px; 
  font-size: 11px; 
  font-weight: 600; 
  margin-right: 4px; 
  margin-bottom: 2px; 
}

/* LINK CHECKER & DURUM ROZETLERİ */
.badge-health-ok {
  background: #dcfce7;
  color: #15803d;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-health-broken {
  background: #fee2e2;
  color: #b91c1c;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.linkcheck-progress-wrapper {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin: 14px 0 8px 0;
  display: none;
}
.linkcheck-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, var(--primary));
  border-radius: 9999px;
  transition: width 0.2s ease;
}

.pagination-bar { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-top: 18px; 
  margin-bottom: 0; 
  font-size: 12.5px; 
  color: var(--text-muted); 
  flex-wrap: wrap; 
  gap: 10px; 
}
.pagination-btns { display: flex; gap: 6px; align-items: center; }
.page-btn { 
  padding: 6px 14px; 
  border: 1.5px solid #cbd5e1; 
  background: #fff; 
  border-radius: 6px; 
  cursor: pointer; 
  font-size: 12.5px; 
  font-weight: 600; 
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
}
.page-btn:hover:not(:disabled) { 
  background: var(--primary-light); 
  border-color: var(--primary); 
  color: var(--primary-darker);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.page-btn.active { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: #fff; 
  border-color: var(--primary); 
  font-weight: 700; 
  box-shadow: 0 2px 8px var(--primary-glow);
}
.page-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* MODAL */
.modal { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(15, 23, 42, 0.7); 
  backdrop-filter: blur(8px);
  align-items: center; 
  justify-content: center; 
  z-index: 2000; 
  padding: 15px; 
}
.modal-content { 
  background: #fff; 
  padding: 24px; 
  border-radius: var(--radius); 
  width: 100%; 
  max-width: 420px; 
  border-top: 5px solid var(--primary); 
  box-shadow: 0 20px 35px -5px rgba(0,0,0,0.25); 
  animation: modalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.flex-form-row { display: flex; gap: 8px; }
.btn-mini { padding: 4px 8px; font-size: 11px; border-radius: 5px; border: none; cursor: pointer; font-weight: bold; transition: all 0.15s; }
.btn-mini:hover { transform: translateY(-1px); }
.btn-mini-edit { background: #3b82f6; color: #fff; }
.btn-mini-move { background: #eab308; color: #fff; }
.btn-mini-del { background: #ef4444; color: #fff; }

/* KARANLIK MOD */
body.dark-mode {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
}
body.dark-mode ::-webkit-scrollbar-track { background: #0f172a; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #334155; }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: #475569; }

body.dark-mode .banner-bar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.6) !important;
  border-bottom: 1px solid var(--primary);
}
body.dark-mode .card {
  background: #111827 !important;
  border-color: #1f2937 !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.4) !important;
}
body.dark-mode .table-responsive {
  background: #111827 !important;
  border-color: #1f2937 !important;
}
body.dark-mode .custom-table thead th {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  color: #ffffff !important;
  border-bottom: 2px solid var(--primary);
}
body.dark-mode .custom-table td {
  background: #111827 !important;
  border-top-color: #1f2937 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .custom-table tbody tr:hover td {
  background-color: #1a2333 !important;
}
body.dark-mode .kategori-btn {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
body.dark-mode .kategori-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: #0f172a !important;
}
body.dark-mode .kategori-btn.aktif {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
body.dark-mode .subkategori-grid {
  background: #0f172a !important;
  border-left-color: var(--primary) !important;
}
body.dark-mode .subkategori-btn {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}
body.dark-mode .subkategori-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
body.dark-mode .subkategori-btn.aktif {
  background: var(--primary-darker) !important;
  color: #fff !important;
  border-color: var(--primary-darker) !important;
}
body.dark-mode .search-input,
body.dark-mode .controls-bar select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
body.dark-mode .page-btn {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}
body.dark-mode .page-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: #fff !important;
}
body.dark-mode .admin-dashboard { border-color: #334155 !important; }
body.dark-mode .admin-sidebar { background: #0b0f19 !important; border-right-color: #1f2937 !important; }
body.dark-mode .admin-content { background: #111827 !important; color: #f8fafc !important; }
body.dark-mode .kpi-card { background: #0f172a !important; border-color: #1f2937 !important; }
body.dark-mode .kpi-label { color: #94a3b8 !important; }
body.dark-mode .kpi-value { color: #f8fafc !important; }
body.dark-mode .settings-subtabs-bar { border-bottom-color: #1f2937 !important; }
body.dark-mode .settings-subtab-btn { background: #1e293b !important; color: #cbd5e1 !important; border-color: #334155 !important; }
body.dark-mode .settings-subtab-btn:hover { background: #334155 !important; color: #fff !important; }
body.dark-mode .settings-subtab-btn.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; color: #fff !important; }
body.dark-mode .dynamic-link-group,
body.dark-mode .kategori-card-manage,
body.dark-mode #bulkActionBar,
body.dark-mode #tabKategori > div,
body.dark-mode .settings-section-card,
body.dark-mode #tabUyeler > div,
body.dark-mode .multi-cat-container {
  background: #0f172a !important;
  border-color: #1f2937 !important;
}
body.dark-mode .multi-cat-chip {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .multi-cat-chip.selected {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
body.dark-mode .kategori-card-header,
body.dark-mode .settings-section-title { border-bottom-color: #1f2937 !important; color: #f8fafc !important; }
body.dark-mode .subkat-chip { background: #1e293b !important; border-color: #334155 !important; color: #f1f5f9 !important; }
body.dark-mode .editor-toolbar { background: #0f172a !important; border-color: #1f2937 !important; }
body.dark-mode .editor-btn { background: #1e293b !important; color: #e2e8f0 !important; border-color: #334155 !important; }
body.dark-mode .editor-area { background: #0f172a !important; border-color: #1f2937 !important; color: #f8fafc !important; }
body.dark-mode .form-group label, body.dark-mode .dynamic-link-group h4 { color: #cbd5e1 !important; }
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .link-row input,
body.dark-mode .link-row select,
body.dark-mode #newKatInput,
body.dark-mode #parentKatSelect,
body.dark-mode #newSubKatInput,
body.dark-mode #bulkTargetKat,
body.dark-mode #bulkTargetSubKat,
body.dark-mode #newUsername,
body.dark-mode #newUserEmail,
body.dark-mode #newUserPass,
body.dark-mode #faviconUrlInput,
body.dark-mode #logoUrlInput,
body.dark-mode #headerTitleInput,
body.dark-mode #mainCardTitleInput,
body.dark-mode #searchPlaceholderInput,
body.dark-mode #footerCopyrightInput,
body.dark-mode #headerHomeTextInput,
body.dark-mode #headerHomeUrlInput,
body.dark-mode #pageSizeOptionsInput,
body.dark-mode #tableDensitySelect,
body.dark-mode #buttonLayoutSelect,
body.dark-mode #autoLogoutMinutesSelect,
body.dark-mode #adminShortcutInput,
body.dark-mode #actionModalInput {
  background: #0b0f19 !important;
  color: #f8fafc !important;
  border: 1.5px solid #334155 !important;
}
body.dark-mode .link-row { background: #0f172a !important; }
body.dark-mode #tabLinkcheck > div:nth-child(2) > div { background: #0f172a !important; border-color: #1f2937 !important; }
body.dark-mode #lcTotalCount, body.dark-mode #lcScannedCount { color: #f8fafc !important; }
body.dark-mode .modal-content { background: #111827 !important; border-color: #1f2937 !important; color: #f8fafc !important; }

/* QUICK PREVIEW & VIDEO MODAL */
.preview-modal-content {
  background: #1e293b;
  width: 96%;
  max-width: 1300px;
  height: 92vh;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -12px rgba(0,0,0,0.6);
  border: 1px solid #334155;
  overflow: hidden;
  animation: modalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.preview-modal-content.video-modal-size {
  max-width: 1060px;
  height: 80vh;
}
.preview-header {
  padding: 14px 22px;
  background: #0f172a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  z-index: 20;
  gap: 14px;
}
.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  max-width: none !important;
  line-height: 1.3;
}
.preview-actions { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  flex-shrink: 0;
}
.btn-preview-download {
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}
.btn-preview-download:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-preview-ext {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}
.btn-preview-ext:hover { background: rgba(255,255,255,0.24); transform: translateY(-1px); }
.btn-preview-close {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-preview-close:hover { background: #dc2626; transform: scale(1.05); }

.preview-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000000;
  overflow-x: hidden !important;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}
.preview-canvas {
  width: 100%;
  height: 100%;
  background: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.preview-canvas iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000000;
  flex: 1;
}
.preview-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13.5px;
  z-index: 25;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid rgba(109, 189, 53, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media screen and (max-width: 768px) {
  body { -webkit-tap-highlight-color: transparent; }
  .container { padding: 0 12px; margin: 12px auto; }
  .card { padding: 16px; margin-bottom: 16px; }
  .banner-bar { padding: 12px 14px; flex-direction: row; }
  .header-title { font-size: 14px; }
  .logo-img { height: 28px; }

  .admin-dashboard { grid-template-columns: 1fr; border-width: 1px; }
  .admin-sidebar { padding: 10px 0; border-bottom: 1px solid #2d3748; }
  .admin-sidebar h3 { display: none; }
  .admin-nav { display: flex; overflow-x: hidden !important; padding: 0 10px; gap: 8px; margin-top: 0; }
  .admin-nav li a { padding: 7px 14px; font-size: 12px; border-radius: 6px; background: #1e293b; white-space: nowrap; }
  .admin-nav li a.active { background: var(--primary); color: #fff; }

  .admin-content { padding: 14px; }
  .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .link-row { grid-template-columns: 1fr; gap: 8px; background: #fff; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; }
  .flex-form-row { flex-direction: column; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .search-input-wrapper { min-width: 100%; }
  .btn-action { width: fit-content !important; justify-content: flex-start !important; padding: 7px 14px !important; font-size: 12px !important; }
  #toastContainer { left: 14px; right: 14px; bottom: 14px; }
  .preview-canvas { width: 100% !important; min-width: 100% !important; }
}

/* VİDEO PORTALINA ÖZEL KOMPAKT BUTON VE GENİŞ BAŞLIK */
.video-btn-compact {
  padding: 6px 16px !important;
  font-size: 12px !important;
  width: auto !important;
  min-width: 90px !important;
  max-width: 140px !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 auto !important;
}
.custom-table td:nth-child(3) {
  font-size: 13.5px;
  line-height: 1.5;
}

/* VİDEO PORTALI TABLO GENİŞLİK VE SCROLLBAR DÜZELTMESİ */
.custom-table {
  min-width: 0 !important;
  width: 100% !important;
}
.table-responsive {
  min-height: 180px;
  overflow-x: hidden !important;
}
.video-btn-compact {
  padding: 5px 14px !important;
  font-size: 12px !important;
  width: auto !important;
  min-width: 80px !important;
  max-width: 110px !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 auto !important;
}

/* SABİT VE FERAH TABLO DÜZENİ - TÜM SATIRLAR EKSİKSİZ VE DÜZGÜN */
.controls-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
  min-height: 38px;
}
.table-responsive {
  min-height: 290px;
  overflow-x: hidden !important;
  overflow-y: visible;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-sizing: border-box;
  margin-bottom: 4px;
}
.custom-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}
.custom-table thead th {
  padding: 11px 12px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.custom-table tbody td {
  padding: 9px 12px;
  box-sizing: border-box;
  vertical-align: middle;
  border-top: 1px solid var(--border-color);
}
.custom-table tbody tr {
  transition: background-color 0.15s ease;
}
.custom-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}
.custom-table tbody tr.placeholder-row {
  border: none !important;
  background: transparent !important;
  cursor: default !important;
  pointer-events: none !important;
  height: 48px !important;
}
.custom-table tbody tr.placeholder-row td {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
}
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  min-height: 40px;
}
.cat-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}
.badge-cat {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}


.page-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 12px !important;
  border: 1px solid var(--border-color) !important;
  background: #fff !important;
  color: var(--text-main) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  user-select: none !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.15s ease !important;
}
.page-btn:hover:not(:disabled) {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary-darker) !important;
}
.page-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary-dark) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px var(--primary-glow) !important;
}
.page-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
}
