:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg-color: #0f172a;
  --bg-color-light: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --accent: #0ea5e9;
  --accent-light: rgba(14, 165, 233, 0.2);
  --nav-bg: rgba(15, 23, 42, 0.8);
  --input-bg: rgba(15, 23, 42, 0.5);
  --card-bg: rgba(30, 41, 59, 0.5);
  --card-hover: rgba(30, 41, 59, 0.8);
  --chip-idle: rgba(255, 255, 255, 0.03);
  --chip-hover: rgba(255, 255, 255, 0.06);
  --icon-bg: rgba(0, 0, 0, 0.2);
  --icon-border: rgba(255, 255, 255, 0.2);
  --h1-grad-start: #f8fafc;
  --h1-grad-end: #cbd5e1;
}

[data-theme="light"] {
  --bg-color: #cbd5e1;
  --bg-color-light: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
  --accent: #0284c7;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --input-bg: rgba(255, 255, 255, 0.9);
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-hover: rgba(255, 255, 255, 1);
  --chip-idle: rgba(0, 0, 0, 0.03);
  --chip-hover: rgba(0, 0, 0, 0.06);
  --icon-bg: rgba(255, 255, 255, 0.8);
  --icon-border: rgba(0, 0, 0, 0.15);
  --h1-grad-start: #0f172a;
  --h1-grad-end: #334155;
}

/* Light Theme Blob adjustments */
[data-theme="light"] .blob-1 { background: rgba(14, 165, 233, 0.4); filter: blur(140px); }
[data-theme="light"] .blob-2 { background: rgba(139, 92, 246, 0.35); filter: blur(150px); }
[data-theme="light"] .blob-3 { background: rgba(236, 72, 153, 0.3); filter: blur(140px); }
[data-theme="light"] .blob { opacity: 0.8; }


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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Blobs */
.bg-layer {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}
.blob-1 {
  width: 600px; height: 600px;
  background: #3730a3;
  top: -200px; left: -100px;
}
.blob-2 {
  width: 500px; height: 500px;
  background: #0c4a6e;
  bottom: -150px; right: -50px;
  animation-delay: -5s;
}
.blob-3 {
  width: 400px; height: 400px;
  background: #4c1d95;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
  opacity: 0.3;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Navigation */
.premium-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-back:hover {
  color: var(--text-main);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}

.theme-btn {
  background: var(--chip-idle);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover {
  background: var(--chip-hover);
  transform: scale(1.05);
}
.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* Main Layout */
.dashboard {
  max-width: 1600px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 3rem;
}
.dashboard-header h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.1;
  background: linear-gradient(to right, var(--h1-grad-start), var(--h1-grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dashboard-header p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

/* Sidebar & Glass Cards */
.filter-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  position: sticky;
  top: 100px;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: var(--accent);
}
.filter-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.filter-block {
  margin-bottom: 1.5rem;
}
.filter-block > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Range Inputs */
.range-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.range-inputs span {
  color: var(--text-muted);
  font-weight: bold;
}
.range-inputs input {
  width: 100%;
  appearance: none;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}
.range-inputs input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Custom Selects */
.custom-select {
  position: relative;
}
.custom-select select {
  width: 100%;
  appearance: none;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.custom-select select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.custom-select select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.custom-select select option {
  background: var(--bg-color);
  color: var(--text-main);
}
.select-arrow {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}

/* Type Chips (School Types) */
.type-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.5rem;
}

.type-list::-webkit-scrollbar {
  width: 4px;
}
.type-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.type-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.type-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: var(--chip-idle);
  border: 1px solid var(--border);
  border-left: 4px solid currentColor;
  position: relative;
  user-select: none;
}
.type-chip:hover {
  background: var(--chip-hover);
}

.type-chip input {
  display: none;
}

.chip-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: var(--icon-bg);
}
.chip-icon svg {
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.type-chip span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.3;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s;
}

/* Checked State */
.type-chip.selected {
  background: var(--chip-bg);
  border-color: var(--chip-border);
}
.type-chip.selected .chip-icon {
  border-color: var(--chip-color);
  background: rgba(0, 0, 0, 0.4);
}
.type-chip.selected .chip-icon svg {
  opacity: 1;
  transform: scale(1);
}
.type-chip.selected span {
  color: inherit;
  font-weight: 800;
}

/* Results Area */
.dashboard-results {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.results-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.results-top h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.badge-count {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Grid & Cards */
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.school-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.school-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.school-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  border-color: var(--border);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
}
.school-card:hover::before {
  opacity: 1;
}

.card-loc {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.school-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.meta-tag {
  background: var(--chip-idle);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Elegant Pastel Colors for Tags (Dark Mode) */
.tag-color-0 { color: #fca5a5; background: rgba(252, 165, 165, 0.12); border-color: rgba(252, 165, 165, 0.3); } /* Soft Red */
.tag-color-1 { color: #fdba74; background: rgba(253, 186, 116, 0.12); border-color: rgba(253, 186, 116, 0.3); } /* Soft Orange */
.tag-color-2 { color: #fde047; background: rgba(253, 224, 71, 0.12); border-color: rgba(253, 224, 71, 0.3); } /* Soft Yellow */
.tag-color-3 { color: #86efac; background: rgba(134, 239, 172, 0.12); border-color: rgba(134, 239, 172, 0.3); } /* Soft Green */
.tag-color-4 { color: #6ee7b7; background: rgba(110, 231, 183, 0.12); border-color: rgba(110, 231, 183, 0.3); } /* Soft Emerald */
.tag-color-5 { color: #7dd3fc; background: rgba(125, 211, 252, 0.12); border-color: rgba(125, 211, 252, 0.3); } /* Soft Sky */
.tag-color-6 { color: #93c5fd; background: rgba(147, 197, 253, 0.12); border-color: rgba(147, 197, 253, 0.3); } /* Soft Blue */
.tag-color-7 { color: #c4b5fd; background: rgba(196, 181, 253, 0.12); border-color: rgba(196, 181, 253, 0.3); } /* Soft Violet */
.tag-color-8 { color: #d8b4fe; background: rgba(216, 180, 254, 0.12); border-color: rgba(216, 180, 254, 0.3); } /* Soft Purple */
.tag-color-9 { color: #f9a8d4; background: rgba(249, 168, 212, 0.12); border-color: rgba(249, 168, 212, 0.3); } /* Soft Pink */

/* Elegant Pastel Colors for Tags (Light Mode) */
[data-theme="light"] .tag-color-0 { color: #b91c1c; background: rgba(254, 226, 226, 0.8); border-color: #fca5a5; }
[data-theme="light"] .tag-color-1 { color: #c2410c; background: rgba(255, 237, 213, 0.8); border-color: #fdba74; }
[data-theme="light"] .tag-color-2 { color: #a16207; background: rgba(254, 252, 232, 0.8); border-color: #fde047; }
[data-theme="light"] .tag-color-3 { color: #15803d; background: rgba(220, 252, 231, 0.8); border-color: #86efac; }
[data-theme="light"] .tag-color-4 { color: #047857; background: rgba(209, 250, 229, 0.8); border-color: #6ee7b7; }
[data-theme="light"] .tag-color-5 { color: #0369a1; background: rgba(224, 242, 254, 0.8); border-color: #7dd3fc; }
[data-theme="light"] .tag-color-6 { color: #1d4ed8; background: rgba(219, 234, 254, 0.8); border-color: #93c5fd; }
[data-theme="light"] .tag-color-7 { color: #4338ca; background: rgba(237, 233, 254, 0.8); border-color: #c4b5fd; }
[data-theme="light"] .tag-color-8 { color: #7e22ce; background: rgba(243, 232, 255, 0.8); border-color: #d8b4fe; }
[data-theme="light"] .tag-color-9 { color: #be185d; background: rgba(252, 231, 243, 0.8); border-color: #f9a8d4; }

.card-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.score-col {
  display: flex;
  flex-direction: column;
}
.score-col span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.score-col strong {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.perc-badge {
  background: rgba(79, 70, 229, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(79, 70, 229, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 800;
}

[data-theme="light"] .perc-badge {
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
  border-color: rgba(79, 70, 229, 0.25);
}

/* Loaders & Empty State */
.premium-loader {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  gap: 1.5rem;
}
.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.premium-loader span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.empty-view {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem 2rem;
  background: var(--glass-bg);
  border-radius: 20px;
  border: 1px dashed var(--border);
}
.empty-view h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.empty-view p {
  color: var(--text-muted);
}

.loading-pulse {
  width: 100%;
  height: 20px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* Tercih Modu Toggle */
.results-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Tercih Modu Toggle */
.results-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.pref-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.pref-mode-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}
.pref-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: color 0.3s;
}
body.pref-mode-active .pref-label {
  color: var(--primary);
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* Kartlardaki Ekle Butonu */
.btn-add-pref {
  margin-top: 1rem;
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}
body.pref-mode-active .btn-add-pref {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.btn-add-pref:hover {
  background: var(--primary);
  color: white;
}
.btn-add-pref.added {
  background: var(--success, #10b981);
  border-color: var(--success, #10b981);
  color: white;
}

/* Seyyar Pencere */
.pref-window {
  position: fixed;
  top: 100px;
  right: 2rem;
  width: 340px;
  background: var(--bg-color-light);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 0.3s, transform 0.3s;
}
.pref-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.pref-header {
  padding: 1rem;
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: grab;
  user-select: none;
}
.pref-header:active {
  cursor: grabbing;
}
.pref-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.pref-body {
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
  background: var(--card-bg);
}
.pref-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}
.pref-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
}
.pref-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pref-item-info strong {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.pref-item-info span {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.btn-remove-pref {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}
.btn-remove-pref:hover {
  background: rgba(239, 68, 68, 0.1);
}
.pref-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 0 0 16px 16px;
}
.btn-create-pdf {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-create-pdf:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* PDF Template (Gizli) */
.pdf-template {
  width: 718px; /* A4 Genişliği eksi kenar boşlukları (190mm) */
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px;
  background: white;
  color: black;
  font-family: Arial, sans-serif;
}
.pdf-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 3px solid #3b82f6;
  padding-bottom: 15px;
}
.pdf-header h1 {
  font-size: 24px;
  color: #1e3a8a;
  margin: 0 0 8px 0;
}
.pdf-header h2 {
  font-size: 16px;
  color: #3b82f6;
  margin: 0 0 8px 0;
}
.pdf-header p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}
.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  table-layout: fixed;
}
.pdf-table th:first-child, .pdf-table td:first-child {
  width: 45px;
  text-align: center;
}
.pdf-table th, .pdf-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: left;
  font-size: 11px;
  word-wrap: break-word;
}
.pdf-table th {
  background-color: #3b82f6;
  font-weight: bold;
  color: #ffffff;
}
.pdf-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}
.pdf-footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}
}

/* Mobil Görünüm: Seyyar Pencere (Bottom Drawer) ve Başlıklar */
@media (max-width: 768px) {
  .results-top {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .results-title-group {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .results-title-group h2 {
    font-size: 1.3rem;
  }
  .pref-mode-toggle {
    align-self: flex-start;
    padding: 0.4rem 0.8rem;
  }
  .pref-label {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .pref-window {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    transform: none !important; /* JS drag komutlarını ezer */
    max-height: 85vh !important;
  }
  .pref-window.hidden {
    transform: translateY(100%) !important;
  }
  .pref-header {
    border-radius: 24px 24px 0 0 !important;
    cursor: default !important; /* Mobilde sürükleme iptal */
  }
  .pref-body {
    max-height: calc(85vh - 140px) !important;
  }
}
