/* Servisim — Temalar */
[data-theme="default"] {
  --brand: #0d7377;
  --brand-dark: #095456;
  --brand-soft: #e6f4f4;
  --accent: #c45c26;
  --bg: #f4f6f8;
  --bg-elevated: #ffffff;
  --ink: #0f1c24;
}

[data-theme="dark"] {
  --brand: #14b8a6;
  --brand-dark: #0d9488;
  --brand-soft: rgba(20, 184, 166, 0.15);
  --accent: #f59e0b;
  --bg: #0f1720;
  --bg-elevated: #162028;
  --ink: #e8eef2;
  --ink-muted: #9eb0bb;
  --line: rgba(255, 255, 255, 0.08);
}

[data-theme="ocean"] {
  --brand: #0077b6;
  --brand-dark: #005f92;
  --brand-soft: #e0f4ff;
  --accent: #00b4d8;
}

[data-theme="sunset"] {
  --brand: #c45c26;
  --brand-dark: #9a4518;
  --brand-soft: #fef3eb;
  --accent: #e07a3a;
}

[data-theme="forest"] {
  --brand: #16803c;
  --brand-dark: #116530;
  --brand-soft: #ecfdf3;
  --accent: #22c55e;
}

[data-theme="violet"] {
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --brand-soft: #f3e8ff;
  --accent: #a78bfa;
}

[data-theme="midnight"] {
  --brand: #6366f1;
  --brand-dark: #4f46e5;
  --brand-soft: rgba(99, 102, 241, 0.15);
  --accent: #818cf8;
  --bg: #0a0e1a;
  --bg-elevated: #121829;
  --ink: #e8eaf6;
  --ink-muted: #a5b4cb;
  --line: rgba(255, 255, 255, 0.08);
}

[style*="--brand-custom"] {
  --brand: var(--brand-custom);
  --brand-dark: color-mix(in srgb, var(--brand-custom) 80%, #000);
  --brand-soft: color-mix(in srgb, var(--brand-custom) 12%, #fff);
}

[data-theme="dark"] .topbar,
[data-theme="midnight"] .topbar {
  background: var(--bg-elevated);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .card,
[data-theme="midnight"] .card {
  background: var(--bg-elevated);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] body.app-mode,
[data-theme="midnight"] body.app-mode {
  background: var(--bg);
  color: var(--ink);
}

[data-theme="dark"] .form-control,
[data-theme="midnight"] .form-control {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--ink);
}

[data-density="compact"] .stat { padding: 0.75rem; }
[data-density="compact"] .panel-content { padding: 1rem; }
[data-density="compact"] .card { padding: 1rem; }

[data-compact="1"] .sidebar { --sidebar: 240px; }

[data-font-size="small"] { font-size: 14px; }
[data-font-size="large"] { font-size: 17px; }

/* Tema seçici */
.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.25rem;
}

.theme-swatch span.dot {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 3px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, border-color 0.15s;
}

.theme-swatch input { display: none; }
.theme-swatch input:checked + span.dot {
  border-color: var(--ink);
  transform: scale(1.08);
}

.theme-swatch small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.settings-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.55rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, #e9eef3 0%, #f3f6f9 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.settings-tab,
.settings-tabs button,
.settings-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.5rem 0.95rem 0.5rem 0.55rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.settings-tab .ico,
.settings-tabs button .ico,
.settings-tabs a .ico {
  --ico-size: 34px;
  border-radius: 10px;
  opacity: 0.72;
  filter: saturate(0.75);
  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.settings-tab__label {
  white-space: nowrap;
}

.settings-tab:hover,
.settings-tabs button:hover,
.settings-tabs a:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--ink);
}

.settings-tab:hover .ico,
.settings-tabs button:hover .ico,
.settings-tabs a:hover .ico {
  opacity: 0.92;
  filter: saturate(1);
}

.settings-tab.active,
.settings-tabs button.active,
.settings-tabs a.active {
  background: #fff;
  border-color: rgba(13, 115, 119, 0.28);
  color: var(--brand-dark);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 6px 16px rgba(13, 115, 119, 0.14),
    0 2px 4px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.settings-tab.active::after,
.settings-tabs button.active::after,
.settings-tabs a.active::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--brand), #14919b);
  box-shadow: 0 0 8px rgba(13, 115, 119, 0.45);
}

.settings-tab.active .ico,
.settings-tabs button.active .ico,
.settings-tabs a.active .ico {
  opacity: 1;
  filter: none;
  transform: scale(1.08) translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 6px rgba(0, 0, 0, 0.15) inset,
    0 8px 18px var(--ico-glow),
    0 3px 6px rgba(0, 0, 0, 0.12);
}

.settings-tab.active .settings-tab__label,
.settings-tabs button.active .settings-tab__label {
  font-weight: 700;
  color: var(--ink);
}

.settings-panels {
  min-height: 200px;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
  animation: settings-tab-in 0.2s ease;
}

@keyframes settings-tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-section { scroll-margin-top: 5rem; }

.logo-preview {
  margin-bottom: 0.65rem;
}

.logo-preview__img {
  display: block;
  max-width: 160px;
  max-height: 100px;
  object-fit: contain;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.logo-upload .logo-remove {
  display: block;
  margin-bottom: 0.65rem;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #ecfdf3;
  color: #16803c;
}

.dashboard-theme-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-elevated));
  border: 1px solid var(--line);
}

.dashboard-theme-bar .theme-picker { gap: 0.45rem; }
.dashboard-theme-bar .theme-swatch span.dot { width: 32px; height: 32px; border-radius: 10px; }
