/* ============================================================
   CreatorPanel Tasarım Sistemi
   - Tema: CSS değişkenleri; html.dark koyu temayı devreye alır.
   - CDN yok: yerleşim utility'leri dosya sonundaki "Yerleşim
     yardımcıları" statik setindedir (yalnız kullanılan sınıflar).
   ============================================================ */

/* ---------- Yerel Inter (değişken font, 100-900) — CDN'siz ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tasarım token'ları ---------- */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Yüzeyler */
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f8;

  /* Çizgiler */
  --border: #e6e8f2;
  --border-strong: #d5d9ea;

  /* Metin */
  --text: #14161f;
  --text-2: #494f63;
  --muted: #7b829b;

  /* Marka */
  --brand: #5b5bd6;
  --brand-strong: #4a48c8;
  --brand-soft: #ecebfc;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --ring: rgba(99, 102, 241, 0.35);

  /* Durum renkleri */
  --success: #16a34a;
  --success-soft: #e7f6ec;
  --warning: #d97706;
  --warning-soft: #fdf3e3;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --info: #0284c7;
  --info-soft: #e6f4fb;

  /* Gölgeler */
  --shadow-sm: 0 1px 2px rgba(18, 22, 41, 0.05);
  --shadow-card: 0 1px 2px rgba(18, 22, 41, 0.04), 0 4px 16px -6px rgba(18, 22, 41, 0.07);
  --shadow-pop: 0 10px 40px -8px rgba(18, 22, 41, 0.22);
  --shadow-btn: 0 1px 2px rgba(79, 70, 229, 0.28), 0 4px 12px -4px rgba(79, 70, 229, 0.45);

  --radius: 12px;
  --radius-lg: 16px;

  --sidebar-w: 264px;
  --topbar-h: 64px;
}

html.dark {
  --bg: #0b0d14;
  --surface: #12141d;
  --surface-2: #171a26;
  --surface-3: #1d2130;

  --border: #232737;
  --border-strong: #303650;

  --text: #eceef6;
  --text-2: #b8bed1;
  --muted: #818aa6;

  --brand: #7c7ff0;
  --brand-strong: #9396f5;
  --brand-soft: rgba(99, 102, 241, 0.16);
  --ring: rgba(124, 127, 240, 0.4);

  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 12px 48px -8px rgba(0, 0, 0, 0.65);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px -4px rgba(99, 102, 241, 0.5);
}

/* ---------- Taban ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand-soft); color: var(--text); }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }

h1, h2, h3, h4 { color: var(--text); font-weight: 600; letter-spacing: -0.01em; margin: 0; }

[x-cloak] { display: none !important; }

/* İnce kaydırma çubukları */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Tema geçişi yumuşatma */
body, .card, .input, .btn, .sidebar, .topbar, .modal-panel, table, .badge {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all .15s ease;
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn:disabled, .btn[data-loading] { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); color: #fff; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--brand); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }

.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 9px; }
.btn-icon svg { width: 18px; height: 18px; }

/* Yüklenme animasyonlu düğme */
.btn .spinner { display: none; }
.btn[data-loading] .spinner { display: inline-block; }
.btn[data-loading] .btn-label { opacity: .75; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formlar ---------- */
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.error-text { font-size: 12.5px; color: var(--danger); margin-top: 5px; font-weight: 500; }

.input, .select, .textarea {
  width: 100%;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
.input.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus, .textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }

.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b829b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Anahtar (toggle switch) */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 40px; height: 23px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: all .18s ease;
  flex: none;
}
.switch .thumb {
  position: absolute; left: 3px; top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: all .18s ease;
}
.switch input:checked ~ .track { background: var(--brand); border-color: var(--brand); }
.switch input:checked ~ .thumb { left: 20px; }
.switch input:focus-visible ~ .track { box-shadow: 0 0 0 3px var(--ring); }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 20px 22px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14.5px; font-weight: 600; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- KPI kartı ---------- */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); line-height: 1.15; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--muted); }
.kpi-delta svg { width: 13px; height: 13px; }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-neutral  { background: var(--surface-3); color: var(--text-2); }
.badge-brand    { background: var(--brand-soft); color: var(--brand); }
.badge-success  { background: var(--success-soft); color: var(--success); }
.badge-warning  { background: var(--warning-soft); color: var(--warning); }
.badge-danger   { background: var(--danger-soft); color: var(--danger); }
.badge-info     { background: var(--info-soft); color: var(--info); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--surface-2); }
td .primary-cell { color: var(--text); font-weight: 500; }

/* ---------- Yerleşim: sidebar + topbar ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .22s ease;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: var(--shadow-btn);
  flex: none;
}
.logo-mark svg { width: 19px; height: 19px; }
.logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.logo-text span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-group { padding: 7px 12px 2px; }
.nav-group-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  font-size: 10.5px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .09em;
  padding: 8px 10px 4px;
  border-radius: 7px;
  transition: color .13s ease;
}
.nav-group-label:hover { color: var(--text-2); }
.nav-group-label svg { width: 12px; height: 12px; flex: none; opacity: .55; transition: transform .16s ease; }
.nav-group-label:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 9px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-2);
  transition: all .13s ease;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .75; transition: opacity .13s ease; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: '';
  position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--brand-grad);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }

/* ---------- Yönetim paneli kabuğu (bağımsız) ---------- */
.sidebar-admin { border-top: 3px solid transparent; border-image: linear-gradient(90deg, #f59e0b, #ef4444) 1; }
.logo-mark-admin { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.admin-wordmark {
  display: block;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: .14em;
  color: var(--warning);
  margin-top: 2px;
}
.admin-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--warning-soft); color: var(--warning);
  flex: none;
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  transition: background .13s ease;
}
.user-chip:hover { background: var(--surface-3); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  flex: none;
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }

.content { padding: 26px 28px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* Mobil */
.sidebar-backdrop { display: none; }
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .sidebar-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(8, 10, 18, .55);
    backdrop-filter: blur(2px);
    z-index: 39;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
}

/* ---------- İlerleme çubuğu ---------- */
.progress { height: 9px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: var(--brand-grad);
  border-radius: 999px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
  min-width: 0;
}
.progress-bar.success { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* ---------- ÖZEL MODAL SİSTEMİ (tarayıcı popup'ı YOK) ---------- */
.modal-root { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 10, 18, .6);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.modal-panel {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  padding: 24px;
  animation: popIn .22s cubic-bezier(.34, 1.4, .64, 1);
}
.modal-panel.wide { max-width: 640px; }
.modal-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.modal-icon svg { width: 22px; height: 22px; }
.modal-icon.default { background: var(--brand-soft); color: var(--brand); }
.modal-icon.danger  { background: var(--danger-soft); color: var(--danger); }
.modal-icon.warning { background: var(--warning-soft); color: var(--warning); }
.modal-icon.success { background: var(--success-soft); color: var(--success); }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.modal-message { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-leaving .modal-backdrop { animation: fadeOut .16s ease forwards; }
.modal-leaving .modal-panel { animation: popOut .16s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popOut { to { opacity: 0; transform: scale(.95) translateY(6px); } }

/* ---------- TOAST bildirimleri ---------- */
.toast-root {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-pop);
  animation: toastIn .28s cubic-bezier(.34, 1.3, .64, 1);
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3.5px;
}
.toast.success::before { background: var(--success); }
.toast.error::before   { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast.info::before    { background: var(--info); }
.toast-icon { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon   { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon    { color: var(--info); }
.toast-body { flex: 1; font-size: 13px; color: var(--text); line-height: 1.5; padding-top: 1px; }
.toast-close {
  flex: none;
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  padding: 2px; border-radius: 6px;
  transition: all .12s ease;
}
.toast-close:hover { color: var(--text); background: var(--surface-3); }
.toast-close svg { width: 14px; height: 14px; display: block; }
.toast.leaving { animation: toastOut .2s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px) scale(.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.97); } }

/* ---------- Açılır menü ---------- */
.dropdown-menu {
  position: absolute;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  padding: 6px;
  z-index: 50;
  animation: popIn .16s cubic-bezier(.34, 1.4, .64, 1);
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 11px;
  border: none; background: none; cursor: pointer;
  border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-2);
  text-align: left;
  transition: all .12s ease;
}
.dropdown-item:hover { background: var(--surface-3); color: var(--text); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown-item svg { width: 15px; height: 15px; flex: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: 5px 4px; }
/* Dar ekranda açılır menü viewport'u taşmasın (bildirim zili + kanal değiştirici). */
@media (max-width: 480px) {
  .dropdown-menu { max-width: calc(100vw - 24px); }
}

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 9px 15px;
  font-size: 13.5px; font-weight: 600;
  color: var(--muted);
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: all .14s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Segment kontrol (grafik aralık seçici) — hem button hem link tabanlı */
.segment { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.segment a {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all .14s ease;
}
.segment a:hover { color: var(--text); }
.segment a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segment button {
  padding: 5px 12px;
  border: none; background: none; cursor: pointer;
  border-radius: 7px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted);
  transition: all .14s ease;
}
.segment button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segment button:focus-visible, .segment a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
/* Sınıfsız düz butonlar (ör. akordeon başlıkları) klavye odağında sistem halkası alır */
.guide-head:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ring); border-radius: 14px; }

/* ---------- Sihirbaz adımları (Studio) ---------- */
.wizard { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.wstep { display: flex; align-items: center; flex: none; }
.wstep-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface-3);
  color: var(--muted);
  border: 2px solid transparent;
  transition: all .2s ease;
  flex: none;
}
.wstep-dot svg { width: 14px; height: 14px; }
.wstep-label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 10px 0 8px; white-space: nowrap; }
.wstep-line { width: 26px; height: 2px; background: var(--border-strong); border-radius: 2px; margin-right: 10px; flex: none; }
.wstep.done .wstep-dot { background: var(--success-soft); color: var(--success); }
.wstep.done .wstep-line { background: var(--success); opacity: .4; }
.wstep.current .wstep-dot { background: var(--brand-grad); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.wstep.current .wstep-label { color: var(--text); }

/* ---------- Takvim ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-head { background: var(--surface-2); padding: 9px 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-cell { background: var(--surface); min-height: 96px; padding: 7px 8px; position: relative; }
.cal-cell.other { background: var(--surface-2); }
.cal-cell .day-num { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-cell.today .day-num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--brand-grad); color: #fff;
  border-radius: 50%;
}
.cal-event {
  display: block;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.cal-event.scheduled { background: var(--brand-soft); color: var(--brand); }
.cal-event.published { background: var(--success-soft); color: var(--success); }
.cal-event.idea      { background: var(--warning-soft); color: var(--warning); }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 52px 24px; }
.empty-icon {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--muted);
  display: grid; place-items: center;
}
.empty-icon svg { width: 25px; height: 25px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-text { font-size: 13px; color: var(--muted); max-width: 380px; margin: 6px auto 18px; line-height: 1.6; }

/* ---------- İskelet yükleme ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Makale içeriği (Markdown çıktısı) ---------- */
.prose { font-size: 14.5px; line-height: 1.75; color: var(--text-2); max-width: 760px; }
.prose h2 { font-size: 20px; margin: 32px 0 12px; color: var(--text); }
.prose h3 { font-size: 16.5px; margin: 26px 0 10px; color: var(--text); }
.prose h4 { font-size: 14.5px; margin: 20px 0 8px; color: var(--text); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  background: var(--surface-3);
  padding: 2px 6px; border-radius: 5px;
  font-size: 12.5px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  color: var(--brand);
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.prose pre code { background: none; padding: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
.prose blockquote {
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 10px 10px 0;
  padding: 10px 16px;
  margin: 0 0 16px;
}
.prose blockquote p { margin: 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 26px 0; }
.prose table { font-size: 13px; margin-bottom: 16px; }
.prose .table-wrap { border: 1px solid var(--border); margin-bottom: 16px; }

/* ---------- Ufak yardımcılar ---------- */
.divider { height: 1px; background: var(--border); border: none; margin: 18px 0; }
.text-muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.green  { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.status-dot.red    { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* Değerlendirme kutusu vurgusu */
.eval-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.eval-item:last-child { border-bottom: none; }
.eval-actions { margin-top: 6px; padding-left: 16px; }
.eval-actions li { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; list-style: disc; }

/* Guest (giriş) sayfaları */
.auth-bg {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 15% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(800px 400px at 110% 110%, var(--brand-soft), transparent 55%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 410px; }

/* Görsel yumuşatma: sayfa girişte hafif yükselir */
.fade-up { animation: fadeUp .35s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Landing ---------- */
/* Kaydırmayla görünür olunca .fade-up eklenir (landing içi minik script) */
.reveal { opacity: 0; }

.landing-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  max-width: 1120px; margin: 0 auto;
  height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.landing-nav-links { display: none; align-items: center; gap: 2px; }
.landing-nav-links a {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-2);
  transition: all .13s ease;
}
.landing-nav-links a:hover { background: var(--surface-3); color: var(--text); }
@media (min-width: 768px) { .landing-nav-links { display: flex; } }
@media (max-width: 420px) { .landing-nav .logo-text { display: none; } }

.landing-section { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.landing-block { padding: clamp(64px, 9vw, 108px) 0; }

.landing-hero {
  padding: clamp(56px, 8vw, 92px) 0 clamp(48px, 6vw, 76px);
  background:
    radial-gradient(1100px 540px at 50% -20%, var(--brand-soft), transparent 62%),
    radial-gradient(700px 380px at 108% 24%, var(--brand-soft), transparent 58%);
}
.hero-title {
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 18px auto 0;
  max-width: 840px;
}
.hero-sub {
  font-size: clamp(15px, 1.8vw, 17.5px);
  line-height: 1.7;
  color: var(--text-2);
  max-width: 640px;
  margin: 18px auto 0;
}
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand);
}

/* Tarayıcı çerçeveli dashboard mockup'ı (tamamı kod, görsel yok) */
.browser-frame {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  text-align: left;
}
.browser-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); flex: none; }
.browser-url {
  flex: 1; max-width: 300px; margin-left: 10px;
  padding: 4px 12px;
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-shell { display: flex; background: var(--bg); }
.mock-side {
  width: 168px; flex: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.mock-logo { display: flex; align-items: center; gap: 8px; padding: 2px 6px 12px; }
.mock-logo-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-grad); flex: none; }
.mock-nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; }
.mock-nav-item.active { background: var(--brand-soft); }
.mock-nav-item.active .mock-ico { background: var(--brand); }
.mock-ico { width: 13px; height: 13px; border-radius: 4px; background: var(--border-strong); flex: none; }
.mock-bar { height: 7px; border-radius: 999px; background: var(--border); }
.mock-main { flex: 1; min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mock-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.browser-frame .kpi { padding: 12px 14px; gap: 3px; }
.browser-frame .kpi-label { font-size: 10.5px; }
.browser-frame .kpi-value { font-size: 18px; }
.browser-frame .kpi-delta { font-size: 11.5px; }
@media (max-width: 700px) {
  .mock-side { display: none; }
  .mock-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* Bölüm başlığı (ortalanmış) */
.section-head { text-align: center; max-width: 640px; margin: 0 auto; }
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 12px;
}
.section-head p { color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 12px 0 0; }

/* Özellik kartları */
.feature-card { padding: 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: var(--border-strong); }
.feature-card h3 { font-size: 15.5px; margin: 0 0 8px; }
.feature-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin: 0; }

/* Nasıl çalışır — numaralı adımlar */
.steps { display: grid; grid-template-columns: 1fr; gap: 34px; }
.step-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.step-circle {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800;
  box-shadow: var(--shadow-btn);
  flex: none;
}
.step-line { flex: 1; height: 2px; min-width: 24px; border-radius: 2px; background: var(--border-strong); display: none; }
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin: 0; max-width: 300px; }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .step-line { display: block; }
  .step:last-child .step-line { display: none; }
}

/* Son çağrı bandı */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--brand-grad);
  border-radius: 24px;
  padding: clamp(44px, 7vw, 78px) 28px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(620px 280px at 82% -30%, rgba(255, 255, 255, .22), transparent 60%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.cta-band p { color: rgba(255, 255, 255, .85); font-size: 15px; line-height: 1.65; max-width: 520px; margin: 12px auto 26px; }
.btn-light { background: #fff; color: var(--brand-strong); box-shadow: 0 2px 10px rgba(10, 10, 30, .18); }
.btn-light:hover { filter: brightness(.96); color: var(--brand-strong); transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* Landing footer */
.landing-footer { border-top: 1px solid var(--border); padding: 34px 0; }
.landing-footer .foot-links { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.landing-footer .foot-links a { color: var(--text-2); font-weight: 500; }
.landing-footer .foot-links a:hover { color: var(--brand); }

/* ============================================================
   Yerleşim yardımcıları — Tailwind CDN'in yerini alan statik set.
   Yalnızca projede gerçekten kullanılan sınıflar üretilmiştir;
   değerler Tailwind varsayılanlarıyla birebir aynıdır.
   ============================================================ */
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-2\.5 { gap: 10px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-10 { gap: 40px; }
.gap-x-6 { column-gap: 24px; }
.gap-x-8 { column-gap: 32px; }
.gap-x-10 { column-gap: 40px; }
.gap-y-3 { row-gap: 12px; }
.gap-y-4 { row-gap: 16px; }
.gap-y-6 { row-gap: 24px; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .xl\:col-span-2 { grid-column: span 2 / span 2; }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---- Erişilebilirlik yardımcıları ---- */
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;padding:10px 16px;background:var(--brand);color:#fff;border-radius:0 0 10px 0;font-weight:600}
.skip-link:focus{left:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- v13: Admin yüklemeli site logosu ------------------------------------------------ */
/* render_brand_logo() helper'ı basar; iki varyant yüklüyse tema sınıfıyla değişir. */
.brand-logo-img { display: block; height: var(--brand-logo-h, 30px); width: auto; max-width: 240px; object-fit: contain; }
.brand-logo-light { display: block; }
html.dark .brand-logo-light { display: none; }
.brand-logo-dark { display: none; }
html.dark .brand-logo-dark { display: block; }
