/* ============================================================
   QUYP — native CSS tasarım sistemi v2 (framework'süz).
   Tipografi: Sora (başlık) + Inter (gövde) — self-host, CDN yok.
   Logical properties kullanılır (RTL hazırlığı — Addendum 3.2).
   ============================================================ */

/* ---- Fontlar (public/assets/fonts, OFL lisanslı, self-host) ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/sora-v17-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/sora-v17-latin_latin-ext-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/sora-v17-latin_latin-ext-800.woff2') format('woff2');
}

/* ---- Tasarım token'ları ---- */
:root {
  --color-primary: #6d5bf6;
  --color-primary-strong: #7f6dff;
  --color-primary-dark: #5949d6;
  --color-accent: #22d3ee;
  --color-bg: #0a0c12;
  --color-bg-raise: #0f1119;
  --color-surface: #141722;
  --color-surface-2: #1b1f2e;
  --color-border: #262b3d;
  --color-border-strong: #343a52;
  --color-text: #eef0f8;
  --color-text-soft: #c3c8da;
  --color-text-muted: #8f96ad;
  --color-success: #34d399;
  --color-error: #f87171;
  --color-info: #60a5fa;
  --grad-brand: linear-gradient(135deg, #8b7bff 0%, #6d5bf6 45%, #22d3ee 120%);
  --grad-text: linear-gradient(92deg, #a99bff 0%, #7f6dff 40%, #38d8f0 100%);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 40px rgba(2, 4, 12, 0.45);
  --shadow-soft: 0 4px 18px rgba(2, 4, 12, 0.3);
  --shadow-glow: 0 0 80px rgba(109, 91, 246, 0.28);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --header-h: 68px;
}

/* Aydınlık (Day) tema token'ları: açık data-theme seçimi öncelikli,
   seçim yoksa işletim sistemi tercihi geçerli. */
:root[data-theme="light"] {
  --color-bg: #f7f8fc;
  --color-bg-raise: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #eef0f8;
  --color-border: #dfe3f0;
  --color-border-strong: #c9cfe3;
  --color-text: #151822;
  --color-text-soft: #3c4258;
  --color-text-muted: #667091;
  --shadow: 0 10px 40px rgba(21, 24, 34, 0.1);
  --shadow-soft: 0 4px 18px rgba(21, 24, 34, 0.07);
  --shadow-glow: 0 0 80px rgba(109, 91, 246, 0.16);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --color-bg: #f7f8fc;
    --color-bg-raise: #ffffff;
    --color-surface: #ffffff;
    --color-surface-2: #eef0f8;
    --color-border: #dfe3f0;
    --color-border-strong: #c9cfe3;
    --color-text: #151822;
    --color-text-soft: #3c4258;
    --color-text-muted: #667091;
    --shadow: 0 10px 40px rgba(21, 24, 34, 0.1);
    --shadow-soft: 0 4px 18px rgba(21, 24, 34, 0.07);
    --shadow-glow: 0 0 80px rgba(109, 91, 246, 0.16);
  }
}

/* ---- Taban ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--color-text-muted); }
.small { font-size: 0.85rem; }
.text-center { text-align: center; }

::selection { background: rgba(109, 91, 246, 0.45); color: #fff; }

/* ---- Header ---- */
.site-header {
  border-block-end: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 78%, transparent);
  position: sticky;
  inset-block-start: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--header-h);
  padding-block: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: none; filter: drop-shadow(0 2px 8px rgba(109, 91, 246, 0.45)); }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.admin-header .brand-word { letter-spacing: 0.1em; }

.header-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ---- Butonlar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
  background: none;
  color: var(--color-text);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(109, 91, 246, 0.4);
}
.btn-primary:hover { background-position: 80% 50%; box-shadow: 0 6px 26px rgba(109, 91, 246, 0.55); }

.btn-outline { border-color: var(--color-border-strong); color: var(--color-text-soft); }
.btn-outline:hover { border-color: var(--color-primary-strong); color: var(--color-text); }
.btn-ghost { color: var(--color-text-soft); }
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-text); }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; border-radius: 8px; gap: 6px; }
.btn-block { width: 100%; }

/* ---- Kartlar ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}

/* ---- Bölüm başlıkları ---- */
.section { padding-block: 72px; }
.section-head { text-align: center; max-width: 680px; margin-inline: auto; margin-block-end: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 10px; }
.section-head p { color: var(--color-text-muted); margin: 0; font-size: 1.05rem; }
.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-block-end: 12px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: 84px 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset-block-start: -220px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 920px;
  height: 560px;
  background:
    radial-gradient(closest-side, rgba(109, 91, 246, 0.32), transparent 70%),
    radial-gradient(closest-side at 70% 20%, rgba(34, 211, 238, 0.14), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 6px 16px;
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 0 22px;
}
.hero-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--color-text-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-block-start: 16px; }

.hero-visual {
  position: relative;
  margin-block-start: 54px;
  padding-inline: 24px;
}
.hero-visual img {
  width: 100%;
  max-width: 1040px;
  display: block;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 46%;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
}

/* ---- İstatistik bandı ---- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-block-start: -36px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-soft);
}
.stat-cell { background: var(--color-surface); padding: 22px 16px; text-align: center; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--color-text-muted); font-size: 0.86rem; margin-block-start: 2px; }

/* ---- Özellik satırları ---- */
.feature-rows { display: flex; flex-direction: column; gap: 68px; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.feature-row.reverse .feature-media { order: 2; }
.feature-media img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow);
}
.feature-copy h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 12px; }
.feature-copy p { color: var(--color-text-muted); font-size: 1.02rem; margin: 0; }
.feature-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-block-end: 16px;
  box-shadow: 0 4px 18px rgba(109, 91, 246, 0.4);
}

/* ---- Nasıl çalışır ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step-card { position: relative; padding-block-start: 30px; }
.step-num {
  position: absolute;
  inset-block-start: -18px;
  inset-inline-start: 24px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(109, 91, 246, 0.45);
}
.step-card h3 { margin: 4px 0 8px; font-size: 1.15rem; }
.step-card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

/* ---- Fiyatlandırma ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 16px;
  margin-block: 10px 22px;
  text-align: start;
  align-items: stretch;
}
.pricing-card { display: flex; flex-direction: column; position: relative; transition: transform 0.18s ease, border-color 0.18s ease; }
.pricing-card:hover { transform: translateY(-4px); border-color: var(--color-border-strong); }
.pricing-card h3 { margin: 0 0 4px; font-size: 1.1rem; }

.pricing-featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    var(--grad-brand) border-box;
  box-shadow: 0 10px 44px rgba(109, 91, 246, 0.3);
}
.popular-badge {
  position: absolute;
  inset-block-start: -13px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(109, 91, 246, 0.5);
}

.price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 8px 0 14px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.price .muted {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-features { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan-features li {
  padding-block: 7px;
  padding-inline-start: 24px;
  position: relative;
  border-block-end: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}
.plan-features li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 2px;
  color: var(--color-success);
  font-weight: 700;
}
.plan-features .highlight { color: var(--color-accent); font-weight: 600; }
.plan-features .highlight::before { content: '★'; color: var(--color-accent); }

/* ---- CTA bandı ---- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  background:
    radial-gradient(circle at 20% 10%, rgba(109, 91, 246, 0.35), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(34, 211, 238, 0.22), transparent 55%),
    var(--color-surface);
}
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 10px; }
.cta-band p { color: var(--color-text-muted); max-width: 540px; margin: 0 auto 26px; }

/* ---- Formlar ---- */
label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 0.9rem; color: var(--color-text-soft); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-2);
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary-strong);
  box-shadow: 0 0 0 3px rgba(109, 91, 246, 0.25);
}
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--color-text-soft); }
.checkbox-label input { width: auto; margin-block-start: 5px; accent-color: var(--color-primary); }
.field-error { color: var(--color-error); font-size: 0.85rem; margin: 5px 0 0; }

/* ---- Auth sayfaları ---- */
.auth-card { max-width: 460px; margin: 60px auto; padding: 34px; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.auth-card .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  margin-block-end: 22px;
}
.auth-card .auth-brand:hover { text-decoration: none; }
.auth-card .btn { margin-block-start: 22px; }
.auth-alt { margin-block-start: 16px; font-size: 0.9rem; color: var(--color-text-muted); }

/* ---- Flash ---- */
.flash {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-block: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  word-break: break-word;
  font-size: 0.93rem;
}
.flash-success { border-color: color-mix(in srgb, var(--color-success) 50%, transparent); color: var(--color-success); }
.flash-error { border-color: color-mix(in srgb, var(--color-error) 50%, transparent); color: var(--color-error); }
.flash-info { border-color: color-mix(in srgb, var(--color-info) 50%, transparent); color: var(--color-info); }
.flash-close {
  background: none; border: none; color: inherit;
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}

/* ---- Dropdown ---- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 8px);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  min-width: 190px;
  box-shadow: var(--shadow);
  z-index: 100;
  overflow: hidden;
  padding-block: 4px;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item { display: block; padding: 9px 16px; color: var(--color-text-soft); font-size: 0.92rem; }
.dropdown-item:hover { background: var(--color-surface-2); color: var(--color-text); text-decoration: none; }
.dropdown-item.active { color: var(--color-accent); font-weight: 600; }

/* ---- Tablolar ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
  padding: 11px 12px;
  text-align: start;
  border-block-end: 1px solid var(--color-border);
}
.data-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.data-table tbody tr:hover { background: color-mix(in srgb, var(--color-surface-2) 60%, transparent); }
.data-table .num { text-align: end; }

/* ---- Dashboard / admin ---- */
.app-body h1 { margin-block: 30px 20px; font-size: 1.6rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.dashboard-grid .card h3, .kpi-card h3 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}
.stat-big { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; margin: 4px 0; }
.usage-list { list-style: none; padding: 0; margin: 0; }
.usage-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-block: 8px;
  border-block-end: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  font-size: 0.93rem;
  color: var(--color-text-soft);
}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.kpi-card { text-align: center; }
.admin-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-block: 20px;
}
.admin-header .badge,
.site-header .badge {
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 20px;
  vertical-align: middle;
  text-transform: uppercase;
}
.badge-active { color: var(--color-success); font-weight: 600; }
.badge-suspended { color: var(--color-error); font-weight: 600; }
.search-form { display: flex; gap: 10px; margin-block-end: 16px; max-width: 420px; }
.admin-plans .card { text-align: start; }
.admin-plans .btn { margin-block-start: 14px; }

/* ============================================================
   DASH kabuğu (dash.quyp.com — ayrı ürün arayüzü)
   ============================================================ */
.dash-body { background: var(--color-bg); }
.auth-body { background: var(--color-bg); }
.auth-footer { margin-block: 10px 40px; }
.auth-footer a { color: var(--color-text-muted); margin-inline: 3px; }
.auth-footer a:hover { color: var(--color-text); }

.dash-shell { display: flex; min-height: 100vh; }

.dash-sidebar {
  width: 248px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  border-inline-end: 1px solid var(--color-border);
  background: var(--color-bg-raise);
  position: sticky;
  inset-block-start: 0;
  height: 100vh;
  overflow-y: auto;
}
.dash-sidebar .brand { padding-inline: 10px; margin-block-end: 4px; }

.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav-bottom { margin-block-start: auto; border-block-start: 1px solid var(--color-border); padding-block-start: 10px; }

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text-soft);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.14s ease, color 0.14s ease;
}
.dash-nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.dash-nav-item:hover { background: var(--color-surface-2); color: var(--color-text); text-decoration: none; }
.dash-nav-item.active {
  background: color-mix(in srgb, var(--color-primary) 16%, transparent);
  color: var(--color-primary-strong);
  font-weight: 600;
}
.dash-nav-item.disabled { color: var(--color-text-muted); cursor: default; opacity: 0.75; }
.dash-nav-item.disabled:hover { background: none; color: var(--color-text-muted); }

.soon-chip {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 28px;
  border-block-end: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
}
.dash-page-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.dash-topbar-actions { display: flex; align-items: center; gap: 8px; }

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  margin-inline-end: 7px;
}

.dropdown-button {
  width: 100%;
  text-align: start;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.dash-content { padding: 26px 28px 56px; max-width: 1180px; width: 100%; }
.dash-welcome { font-size: 1.02rem; color: var(--color-text-muted); margin: 0 0 20px; }

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-block: 30px 16px;
}
.dash-section-head h2 { margin: 0; font-size: 1.15rem; }
.dash-section-head p { margin: 0; }

/* Genel bakış */
.overview-grid, .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.card-label {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.pill-accent { border-color: color-mix(in srgb, var(--color-accent) 50%, transparent); color: var(--color-accent); }

.usage-meters { display: flex; flex-direction: column; gap: 13px; }
.usage-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--color-text-soft);
  margin-block-end: 5px;
}
.meter {
  height: 7px;
  border-radius: 999px;
  background: var(--color-surface-2);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  min-inline-size: 2px;
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding: 7px 0 7px 30px;
  font-size: 0.93rem;
  color: var(--color-text-soft);
  border-block-end: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
}
.checklist li:last-child { border-block-end: none; }
.checklist li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 9px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
}
.checklist li.done { color: var(--color-text-muted); text-decoration: line-through; }
.checklist li.done::before {
  content: '✓';
  border-color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 18%, transparent);
  color: var(--color-success);
  font-size: 0.72rem;
  line-height: 15px;
  text-align: center;
}

/* Karakter kartları */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.character-card {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--color-text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.character-card:hover { text-decoration: none; border-color: var(--color-primary-strong); transform: translateY(-2px); }
.character-card-full { flex-direction: column; align-items: stretch; }
.character-card-top { display: flex; align-items: center; gap: 13px; }
.character-avatar-img {
  object-fit: cover;
  object-position: top;
  background: var(--surface-2);
}

.character-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.character-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.character-meta strong { font-family: var(--font-display); font-size: 1rem; }

/* Genel Bakış: büyük portreli karakter kartları */
.character-grid-portraits { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.character-card-portrait {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: card-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}
.character-card-portrait .character-portrait { aspect-ratio: 4 / 5; }
.character-card-portrait .character-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 8, 14, 0.42) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
a.character-card-portrait:hover .character-portrait::after { opacity: 1; }
a.character-card-portrait:hover .character-portrait img { transform: scale(1.04); }
.character-card-portrait .character-meta { padding: 0 2px; }
.character-card-portrait .character-meta strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.character-card-portrait .character-meta .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.character-niche { margin: 10px 0 14px; }

/* Karakter kutusu (My Characters): büyük portre + ad + hizalı 2x2 eylem ızgarası */
.character-tile {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
}
.character-portrait {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.character-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.25s ease;
}
.character-portrait:hover img { transform: scale(1.03); }
.character-portrait-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
}
.character-portrait .status-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: blur(6px);
}
.character-tile-body { min-width: 0; }
.character-tile-name { margin: 0 0 2px; font-size: 1.05rem; }
.character-tile-name a { color: var(--color-text); }
.character-tile-name a:hover { color: var(--color-primary-strong); text-decoration: none; }
.character-tile-body p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.character-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-block-start: auto;
}
.character-actions form { display: contents; }
.character-actions .btn { width: 100%; white-space: nowrap; }
.character-actions-wide .btn { grid-column: 1 / -1; }
.status-casting { color: var(--color-warning, #d59a2b); border-color: color-mix(in srgb, var(--color-warning, #d59a2b) 55%, transparent); }

.status-chip {
  margin-inline-start: auto;
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.status-active { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 55%, transparent); }
.status-archived { color: var(--color-error); border-color: color-mix(in srgb, var(--color-error) 55%, transparent); }

.btn-danger { color: var(--color-error); }
.btn-danger:hover { background: color-mix(in srgb, var(--color-error) 14%, transparent); }

/* Formlar (dash) */
.form-card { max-width: 860px; }
.form-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  margin: 26px 0 4px;
  padding-block-end: 8px;
  border-block-end: 1px solid var(--color-border);
}
.form-card .form-section-title:first-of-type { margin-block-start: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 22px;
}
.form-actions { display: flex; gap: 10px; margin-block-start: 24px; align-items: center; flex-wrap: wrap; }
.form-grid-full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: 0.7; }
.form-grid .label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 0.9rem; color: var(--color-text-soft); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  font-weight: 500;
  cursor: pointer;
}
.check-pill input { width: auto; margin: 0; }
.format-pill { flex: none; white-space: nowrap; }
.format-pill .muted { font-weight: 400; }
.check-pill:has(input:checked) {
  border-color: var(--color-primary-strong);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-text);
}

/* ---- Content Manager ---- */
.content-character-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 18px; }
.content-character-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-soft);
  font-weight: 600;
  font-size: 0.9rem;
}
.content-character-tab:hover { text-decoration: none; border-color: var(--color-primary-strong); color: var(--color-text); }
.content-character-tab.active { border-color: var(--color-primary-strong); background: color-mix(in srgb, var(--color-primary) 14%, transparent); color: var(--color-text); }
.content-character-tab img,
.content-character-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex: none;
}
.content-character-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}
/* ====================================================================
   Content Stüdyosu — tek geniş üretim kartı
   Sol: tür (segment) + kadraj listesi · Sağ: prompt editörü + sihirbaz
   Alt: Üret. Sihirbaz çalışırken editör "aurora" kenarlıkla örtülür,
   hazır prompt daktilo efektiyle yazılır. Hareket, reduce-motion'da kapanır.
   ==================================================================== */
.studio {
  position: relative;
  overflow: hidden;
  margin-block-end: 28px;
  padding: 28px 30px 26px;
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  background:
    radial-gradient(900px 320px at 0% -10%, color-mix(in srgb, var(--color-primary) 14%, transparent), transparent 60%),
    radial-gradient(600px 260px at 100% 110%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 60%),
    var(--color-surface);
  opacity: 0;
  transform: translateY(10px);
  animation: card-enter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.studio-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 60%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-primary) 30%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.studio.is-writing .studio-glow,
.studio.is-launching .studio-glow { opacity: 1; animation: studio-breathe 3.2s ease-in-out infinite; }
@keyframes studio-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(6%) scale(1.06); }
}
.studio-head { position: relative; display: flex; justify-content: space-between; gap: 20px; margin-block-end: 22px; }
.studio-title {
  margin: 4px 0 6px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.01em;
}
.studio-hint { margin: 0; max-width: 72ch; font-size: 0.92rem; line-height: 1.55; }
.studio-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 10px 34px;
  align-items: stretch;
}
.studio-grid .label { display: block; margin: 0 0 8px; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
.studio-side { display: flex; flex-direction: column; min-width: 0; }
.studio-side .label + .seg { margin-block-end: 22px; }

/* Segment (görsel / video) — kayan vurgu */
.seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 9px;
  background: var(--grad-brand);
  box-shadow: 0 4px 16px rgba(109, 91, 246, 0.4);
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.seg-option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.25s ease;
}
.seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.seg-option svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seg-option:has(input:checked) { color: #fff; }
.seg-option:hover:not(:has(input:checked)) { color: var(--color-text); }
.seg-option:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Kadraj listesi */
.frame-list { display: flex; flex-direction: column; gap: 6px; }
.frame-option {
  display: grid;
  grid-template-columns: 30px 1fr 18px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface-2) 60%, transparent);
  font-weight: 500;
  color: var(--color-text-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.frame-option input { position: absolute; opacity: 0; pointer-events: none; }
.frame-option:hover { border-color: var(--color-border-strong); transform: translateX(2px); }
.frame-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--color-primary) 70%, transparent);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}
.frame-option:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.frame-thumb { display: flex; align-items: center; justify-content: center; width: 30px; height: 26px; }
.frame-thumb i {
  display: block;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.frame-option:has(input:checked) .frame-thumb i { opacity: 1; transform: scale(1.08); border-color: var(--color-primary-strong); }
.frame-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.frame-text strong { font-weight: 600; font-size: 0.92rem; }
.frame-text small { color: var(--color-text-muted); font-size: 0.78rem; margin-block-start: 2px; }
.frame-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.6px solid var(--color-border-strong);
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.frame-check::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.frame-option:has(input:checked) .frame-check { border-color: var(--color-primary); background: var(--color-primary); }
.frame-option:has(input:checked) .frame-check::after { transform: scale(1); }
.studio-platforms { margin: 14px 0 0; line-height: 1.7; }
.studio-platform-list { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-inline-start: 4px; }
.studio-platform-list a { font-weight: 600; }

/* Prompt editörü */
.studio-main { display: flex; flex-direction: column; min-width: 0; gap: 12px; }
.prompt-shell {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  border-radius: 16px;
  padding: 2px;
  background: var(--color-border);
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.25s ease;
}
.prompt-shell:focus-within {
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 70%, transparent), color-mix(in srgb, var(--color-accent) 55%, transparent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 12%, transparent), 0 14px 40px rgba(2, 4, 12, 0.25);
}
.prompt-shell > * { position: relative; }
.prompt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 0;
  border-radius: 14px 14px 0 0;
  background: var(--color-surface-2);
}
.prompt-bar .label { margin: 0; flex: 1; white-space: nowrap; }
.prompt-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prompt-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--color-primary) 16%, transparent);
  color: var(--color-primary-strong);
  animation: chip-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.prompt-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prompt-state-ready { background: rgba(52, 211, 153, 0.14); color: var(--color-success); }
.prompt-state-saved { background: rgba(96, 165, 250, 0.14); color: var(--color-info); }
.prompt-state-template { background: rgba(251, 191, 36, 0.14); color: #d97706; }
.prompt-state-writing { background: color-mix(in srgb, var(--color-primary) 16%, transparent); color: var(--color-primary-strong); }
.prompt-state-writing::before { animation: dot-pulse 1s ease-in-out infinite; }
.prompt-state-failed { background: rgba(248, 113, 113, 0.14); color: var(--color-error); }
@keyframes chip-in { from { opacity: 0; transform: translateY(-4px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes dot-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.prompt-shell textarea {
  flex: 1;
  min-height: 320px;
  resize: vertical;
  border: none;
  border-radius: 0 0 14px 14px;
  background: var(--color-surface-2);
  font-size: 1.02rem;
  line-height: 1.6;
  padding: 12px 16px 16px;
  box-shadow: none;
  transition: opacity 0.16s ease, transform 0.16s ease, filter 0.3s ease;
}
.prompt-shell textarea:focus { box-shadow: none; border: none; }
.prompt-shell textarea.is-swapping { opacity: 0; transform: translateY(4px); }
.prompt-shell textarea.is-typing { caret-color: var(--color-primary-strong); }
.prompt-shell .prompt-error { position: absolute; left: 16px; bottom: -22px; margin: 0; }
.prompt-shell.is-shaking { animation: shell-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shell-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.prompt-shell.is-loaded { box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25); }

/* Sihirbaz çalışırken: aurora kenarlık + örtü + yörünge */
.studio.is-writing .prompt-shell {
  background: linear-gradient(120deg, #8b7bff, #22d3ee, #6d5bf6, #8b7bff);
  background-size: 300% 300%;
  animation: aurora 3s linear infinite;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 14%, transparent), 0 18px 60px rgba(109, 91, 246, 0.25);
}
@keyframes aurora { to { background-position: 300% 0; } }
.studio.is-writing .prompt-shell textarea { filter: blur(1.5px) saturate(0.7); opacity: 0.72; }
.wizard-veil {
  position: absolute;
  inset: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 68%, transparent);
  backdrop-filter: blur(2px);
  animation: veil-in 0.4s ease;
}
.wizard-veil[hidden] { display: none; }
.wizard-title { margin: 6px 0 0; font-weight: 700; font-size: 1.05rem; }
.wizard-veil p { margin: 0; max-width: 46ch; }
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
.wizard-orb { position: relative; width: 64px; height: 64px; }
.wizard-orb span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--color-primary-strong);
  border-right-color: color-mix(in srgb, var(--color-accent) 80%, transparent);
  animation: orb-spin 1.6s linear infinite;
}
.wizard-orb span:nth-child(2) { inset: 9px; border-top-color: var(--color-accent); border-right-color: transparent; animation-duration: 1.1s; animation-direction: reverse; }
.wizard-orb span:nth-child(3) {
  inset: 20px;
  border: none;
  background: var(--grad-brand);
  box-shadow: 0 0 24px rgba(109, 91, 246, 0.7);
  animation: orb-pulse 1.4s ease-in-out infinite;
}
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-pulse { 0%, 100% { transform: scale(0.85); opacity: 0.85; } 50% { transform: scale(1.05); opacity: 1; } }
.studio.is-revealing .prompt-shell {
  background: linear-gradient(135deg, var(--color-success), var(--color-accent));
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

/* Temizle onayı: editörün üstünde cam levha — "kaydet ve temizle" öne çıkar */
.clear-veil {
  position: absolute;
  inset: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 72%, transparent);
  backdrop-filter: blur(6px);
  animation: veil-in 0.22s ease;
  z-index: 2;
}
.clear-veil[hidden] { display: none; }
.clear-veil.is-closing { animation: veil-out 0.18s ease forwards; }
@keyframes veil-out { to { opacity: 0; } }
.clear-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  padding: 22px 24px 20px;
  border-radius: 16px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  box-shadow: 0 24px 60px rgba(2, 4, 12, 0.35), 0 0 0 6px color-mix(in srgb, var(--color-primary) 8%, transparent);
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.clear-veil.is-closing .clear-sheet { animation: sheet-out 0.18s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
.clear-sheet > svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #d97706;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-block-end: 2px;
}
.clear-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.clear-sheet p { margin: 0; }
.clear-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block-start: 10px; }
.clear-actions .btn { white-space: nowrap; }
.studio.is-confirming .prompt-shell textarea { filter: blur(1.2px); opacity: 0.6; }
.studio.is-confirming .prompt-shell {
  background: linear-gradient(135deg, #d97706, color-mix(in srgb, var(--color-primary) 70%, transparent));
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

/* Prompt araçları: sihirbaz (+ kredi rozeti + ipucu) solda, kaydet/temizle
   sağda tek blok hâlinde — uzun çevirilerde (TR) blok bütün olarak alt satıra
   iner ve yine sağa yaslı kalır, butonlar tek tek kaymaz. */
.prompt-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 16px;
  padding-block-start: 6px;
}
.prompt-tools-hint { grid-column: 1 / -1; margin: 0; max-width: 64ch; line-height: 1.4; transition: color 0.3s ease; }
.prompt-tools-actions { display: inline-flex; justify-self: end; align-items: center; gap: 4px; }
.prompt-tools-actions .btn { white-space: nowrap; }
.prompt-tools-actions .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.prompt-tools.is-exhausted .prompt-tools-hint { color: #d97706; }
.btn-wizard .wizard-credits {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 2px 10px rgba(109, 91, 246, 0.35);
}
.btn-wizard .wizard-credits.is-ticking { animation: credit-tick 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes credit-tick { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.prompt-tools.is-exhausted .btn-wizard { cursor: not-allowed; }
.prompt-tools.is-exhausted .btn-wizard .wizard-credits { background: var(--color-surface-2); color: var(--color-text-soft); box-shadow: none; }
.prompt-tools.is-exhausted .btn-wizard:disabled svg { animation: none; }
.btn-wizard {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  justify-self: start;
  padding: 10px 14px 10px 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-text);
}
.btn-wizard svg { width: 18px; height: 18px; fill: currentColor; color: var(--color-primary-strong); transition: transform 0.4s ease; }
.btn-wizard:hover { border-color: var(--color-primary-strong); background: color-mix(in srgb, var(--color-primary) 20%, transparent); box-shadow: 0 6px 22px rgba(109, 91, 246, 0.25); }
.btn-wizard:hover svg { transform: rotate(18deg) scale(1.12); }
.btn-wizard::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-wizard:hover::after { animation: sheen 0.9s ease; }
@keyframes sheen { to { transform: translateX(120%); } }
.btn-wizard:disabled { opacity: 0.7; cursor: progress; }
.btn-wizard:disabled svg { animation: orb-spin 1.4s linear infinite; }
.btn.is-done { border-color: var(--color-success); color: var(--color-success); }

/* Alt şerit: Üret */
.studio-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-block-start: 14px;
  padding-block-start: 18px;
  border-top: 1px solid var(--color-border);
}
.studio-foot-note { margin: 0; max-width: 60ch; flex: 1 1 300px; }
.studio-foot .btn-generate { margin-inline-start: auto; }
.btn-generate {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  min-width: 220px;
  padding: 12px 30px;
  line-height: 1.2;
}
.btn-generate small { font-weight: 500; font-size: 0.74rem; opacity: 0.8; letter-spacing: 0.02em; }
.btn-generate:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-generate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-130%);
}
.btn-generate:not(:disabled):hover::before { animation: sheen 0.8s ease; }
.btn-generate.is-launching { animation: launch 0.9s ease-in-out infinite; pointer-events: none; }
.btn-generate.is-launching .btn-generate-label { opacity: 0.85; }
@keyframes launch {
  0%, 100% { box-shadow: 0 4px 20px rgba(109, 91, 246, 0.4); transform: scale(1); }
  50% { box-shadow: 0 8px 36px rgba(34, 211, 238, 0.55); transform: scale(1.02); }
}

/* Kayıtlı prompt'lar */
.saved-prompts { margin-block-end: 28px; }
.saved-empty { margin: -6px 0 0; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.saved-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, opacity 0.26s ease, border-color 0.2s ease;
}
.saved-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border)); box-shadow: var(--shadow); }
.saved-card.is-entering { opacity: 0; transform: translateY(-10px) scale(0.97); }
.saved-card.is-leaving { opacity: 0; transform: scale(0.95); }
.saved-text {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-soft);
}
.saved-card .idea-actions { padding-block-start: 0; }

/* Giriş animasyonu (medya kartları, kayıtlı prompt'lar) + bekleyen "forge" */
@keyframes card-enter { to { opacity: 1; transform: none; } }
.idea-card.is-new {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 22%, transparent), var(--shadow-glow);
}
.idea-card.is-pending { border-style: dashed; border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border)); }
.idea-media-pending {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 30% 30%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 75% 75%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 70%),
    var(--color-surface-2);
  background-size: 200% 200%;
  animation: forge-bg 6s ease-in-out infinite;
}
@keyframes forge-bg { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.idea-media-pending::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: sheen 2.6s ease-in-out infinite;
}
.forge { position: relative; width: 74px; height: 74px; }
.forge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--color-primary-strong);
  border-left-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
  animation: orb-spin 1.8s linear infinite;
}
.forge-ring-2 { inset: 11px; border-top-color: var(--color-accent); border-left-color: transparent; animation-duration: 1.2s; animation-direction: reverse; }
.forge-core {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 30px rgba(109, 91, 246, 0.75);
  animation: orb-pulse 1.5s ease-in-out infinite;
}
.pending-text { position: relative; font-weight: 600; color: var(--color-text); text-align: center; padding-inline: 16px; }
.pending-sub { position: relative; text-align: center; }

/* Dar kart (kenar çubuğu açık dizüstü, tablet): tek sütun, kadrajlar yan yana */
.studio { container-type: inline-size; }
@container (max-width: 780px) {
  .studio-grid { grid-template-columns: 1fr; gap: 18px; }
  .frame-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .prompt-shell textarea { min-height: 260px; }
}
@container (max-width: 520px) {
  .studio { padding: 22px 18px; }
  .prompt-bar { flex-wrap: wrap; }
  .btn-generate { width: 100%; }
  .prompt-tools { grid-template-columns: 1fr; }
  .prompt-tools-actions { justify-self: end; }
  .clear-veil { padding: 12px; }
  .clear-sheet { padding: 18px 16px 16px; }
}
.strategy-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.9rem;
}
.strategy-summary dt { color: var(--color-text-muted); white-space: nowrap; }
.strategy-summary dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.strategy-summary dd.wrap-text { display: block; grid-column: 1 / -1; margin-block-start: -4px; }
.idea-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-filters .pill:hover { text-decoration: none; border-color: var(--color-primary-strong); }
.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.idea-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.idea-card-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Durum rozeti pillerle aynı akışta durur (sağa itilmez: piller sarınca
   tek başına ikinci satırın sağına kayıyordu). */
.idea-card-head .status-chip { margin-inline-start: 0; }
.idea-card-head .idea-status-generation_pending::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: dot-pulse 1s ease-in-out infinite;
}
.pill-lang { font-weight: 700; letter-spacing: 0.06em; font-size: 0.68rem; border-color: color-mix(in srgb, var(--color-info) 55%, transparent); color: var(--color-info); }
.idea-title { margin: 4px 0 0; font-size: 1.02rem; }
.idea-title a { color: var(--color-text); }
.idea-title a:hover { color: var(--color-primary-strong); text-decoration: none; }
.idea-concept { margin: 0; }
.idea-caption {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.idea-hashtags { margin: 0; word-break: break-word; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: auto; padding-block-start: 6px; }
.idea-actions form { display: contents; }
.idea-status-suggested,
.idea-status-draft { color: var(--color-text-muted); border-color: var(--color-border-strong); }
.idea-status-approved,
.idea-status-generated { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 55%, transparent); }
.idea-status-generation_pending { color: #d97706; border-color: rgba(251, 191, 36, 0.55); }
.idea-status-rejected,
.idea-status-failed { color: var(--color-error); border-color: color-mix(in srgb, var(--color-error) 55%, transparent); }
.idea-rejected { opacity: 0.7; }
.production-prompt {
  margin: 0;
  max-height: 9.6rem;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}
.idea-status-scheduled,
.idea-status-awaiting_publication { color: var(--color-primary-strong); border-color: color-mix(in srgb, var(--color-primary) 45%, transparent); }
.content-credits { margin-inline-start: auto; align-self: center; white-space: nowrap; }
.idea-media {
  margin: -18px -18px 6px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: var(--color-surface-2);
  aspect-ratio: 4 / 5;
  max-height: 420px;
}
.idea-media img,
.idea-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.idea-media .lightbox-link { display: block; height: 100%; cursor: zoom-in; }
.idea-media-detail { margin: 0 0 12px; border-radius: var(--radius-md); max-height: 560px; }
.idea-media-pending {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--color-text-muted); font-size: 0.9rem; aspect-ratio: 4 / 3;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-top-color: var(--color-primary);
  animation: quyp-spin 0.9s linear infinite;
}
@keyframes quyp-spin { to { transform: rotate(360deg); } }
/* ---- Ortak medya kartı (stüdyo "Üretilenler" + Medya kütüphanesi) ---- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.media-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  animation: card-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.media-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  box-shadow: var(--shadow), 0 18px 48px -18px rgba(109, 91, 246, 0.45);
}
.media-card.is-new {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 22%, transparent), var(--shadow-glow);
}
.media-card.is-pending { border-style: dashed; border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border)); }
.media-card.is-failed { border-color: color-mix(in srgb, var(--color-error) 45%, var(--color-border)); }
.media-card-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 460px;
  background: var(--color-surface-2);
  overflow: hidden;
}
.media-card-visual img,
.media-card-visual video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-card-visual img { transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.media-card:hover .media-card-visual img { transform: scale(1.035); }
.media-card-visual .lightbox-link { display: block; height: 100%; cursor: zoom-in; }
.media-card-visual .lightbox-link:hover img { transform: scale(1.035); box-shadow: none; }
.media-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 10, 18, 0.55) 0%, transparent 32%);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}
.media-card.has-plan .media-card-visual::after {
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.55) 0%, transparent 32%),
    linear-gradient(0deg, rgba(8, 10, 18, 0.55) 0%, transparent 30%);
}
.media-card:hover .media-card-visual::after { opacity: 1; }
.media-card-badges {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
}
.media-kind-pill,
.media-char-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(10, 12, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.media-kind-pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.media-char-pill { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.media-plan-chip {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 12, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-inline-start: 3px solid var(--color-success);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.media-plan-chip:hover { text-decoration: none; transform: translateY(-1px); background: rgba(10, 12, 20, 0.85); color: #fff; }
/* Videoda alt kenar oynatıcı kontrollerine ait: rozet sağ üste çıkar */
.media-card-visual > video ~ .media-plan-chip { bottom: auto; top: 10px; inset-inline-start: auto; inset-inline-end: 10px; max-width: 48%; }
.media-card.has-plan .media-card-visual > video ~ .media-card-badges { max-width: 50%; }
.media-plan-chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.media-plan-chip small { font-weight: 500; opacity: 0.85; font-size: 0.68rem; }
.media-plan-chip.cal-status-awaiting_approval { border-inline-start-color: #f59e0b; }
.media-plan-chip.cal-status-awaiting_account { border-inline-start-color: var(--color-primary-strong); }
.media-plan-chip.cal-status-publishing { border-inline-start-color: #0ea5e9; }
.media-plan-chip.cal-status-published { border-inline-start-color: #10b981; opacity: 1; }
.media-plan-chip.cal-status-failed { border-inline-start-color: var(--color-error); }
.media-card-pending,
.media-card-failed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.media-card-pending {
  background:
    radial-gradient(60% 50% at 30% 30%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 75% 75%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 70%),
    var(--color-surface-2);
  background-size: 200% 200%;
  animation: forge-bg 6s ease-in-out infinite;
}
.media-card-pending::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: sheen 2.6s ease-in-out infinite;
}
.media-card-failed { color: var(--color-error); font-size: 0.88rem; font-weight: 600; background: color-mix(in srgb, var(--color-error) 8%, var(--color-surface-2)); }
.media-card-failed svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.media-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.media-prompt {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--color-text-soft);
  white-space: pre-line;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}
.media-prompt:hover { color: var(--color-text); }
.media-prompt:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.media-prompt.is-expanded { display: block; -webkit-line-clamp: unset; max-height: 16rem; overflow: auto; }
/* Eylemler: üst satır İndir + Şablon (esner), alt satır Paylaş tam genişlik */
.media-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: auto;
}
.media-card-actions form { display: contents; }
.media-card-actions .btn { white-space: nowrap; flex: 1 1 auto; justify-content: center; }
.media-card-actions .btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.media-card-actions .btn-primary { flex: 1 0 100%; }
.media-card-actions .btn-share { position: relative; overflow: hidden; }
.media-card-actions .btn-share::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.media-card-actions .btn-share:hover::after { transform: translateX(120%); }
.media-card-actions .btn-share svg { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.media-card-actions .btn-share:hover svg { transform: translate(2px, -2px); }
.idea-filter-sep { width: 1px; align-self: stretch; background: var(--color-border); margin-inline: 4px; }

/* Stüdyo: Üretilenler başlığı + "Tümünü gör" */
.recent-productions { margin-block-end: 30px; }
.recent-productions .dash-section-head,
.saved-prompts .dash-section-head { align-items: flex-start; }
.recent-productions .dash-section-head p,
.saved-prompts .dash-section-head p { margin-block-start: 4px; }
.btn .btn-arrow { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn .btn-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn.is-expanded .btn-chevron { transform: rotate(180deg); }
.saved-card.is-revealing { animation: card-enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--enter-delay, 0ms); }
.pill-warn { color: var(--color-warning, #d59a2b); border-color: color-mix(in srgb, var(--color-warning, #d59a2b) 55%, transparent); }

.empty-state { text-align: center; padding: 48px 26px; }
.empty-state .empty-icon {
  font-size: 2rem;
  margin: 0 0 6px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.empty-state h3 { margin: 0 0 6px; }
.empty-state p { margin: 0 0 18px; }

@media (max-width: 820px) {
  .dash-shell { flex-direction: column; }
  .dash-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav-bottom { margin: 0; border: none; padding: 0; }
  .dash-nav-item span:not(.soon-chip) { display: none; }
  .dash-content { padding: 18px 16px 40px; }
}

/* ============================================================
   MARKETPLACE alanı (marketplace.quyp.com — Faz 6 öncesi tanıtım)
   ============================================================ */
.market-audiences {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.market-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  padding: 32px 28px;
  box-shadow: var(--shadow-card, 0 1px 3px rgb(15 20 40 / 6%));
}
.market-card h3 {
  font-family: var(--font-display);
  margin-block: 0 10px;
}
.market-list {
  list-style: none;
  padding: 0;
  margin-block: 18px;
}
.market-list li {
  position: relative;
  padding-inline-start: 26px;
  padding-block: 7px;
  border-block-end: 1px solid var(--color-border);
}
.market-list li:last-child { border-block-end: none; }
.market-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grad-brand);
  opacity: 0.85;
}
.market-soon {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  padding: 56px 28px;
}
.market-soon .soon-chip { margin-inline-start: 0; }
.market-soon h2 {
  font-family: var(--font-display);
  margin-block: 14px 10px;
}
.market-soon p { max-width: 560px; margin-inline: auto; }
.market-soon .btn { margin-block-start: 18px; }
.market-card-featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}
.market-card-featured .pill { margin-block-end: 12px; }

/* ---- Görünüm oluşturucu (Faz 2) ---- */
.appearance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 20px;
}
.appearance-head > div { min-width: 0; flex: 1; }
.appearance-head h2 { margin: 0 0 4px; }
.appearance-head .btn { flex: none; white-space: nowrap; }
.appearance-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 24px;
  align-items: start;
  margin-block-end: 28px;
}
.appearance-reference {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.version-card { padding: 14px; }
.version-card.version-active { border-color: var(--color-primary); }
.version-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: 10px;
}
@media (max-width: 900px) {
  .appearance-grid { grid-template-columns: 1fr; }
}

/* ---- Kimlik paketi (çok açılı referans seti) ---- */
.pack-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-start: 18px;
}
.pack-head .card-label { margin: 0; }
.pack-chip { margin-inline-start: 0; }
.pack-chip.pack-ready { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.pack-chip.pack-queued,
.pack-chip.pack-processing { background: rgba(251, 191, 36, 0.14); color: #d97706; }
.pack-chip.pack-failed { background: rgba(248, 113, 113, 0.14); color: #ef4444; }
.pack-chip.pack-none { background: var(--color-surface-2); color: var(--color-text-muted); }
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-block-start: 10px;
}
.pack-shot { margin: 0; text-align: center; }
.pack-shot img,
.pack-shot-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.pack-shot-placeholder { border-style: dashed; }
.lightbox-link { display: block; cursor: zoom-in; }
.lightbox-link img { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.lightbox-link:hover img { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); }

/* Görsel büyütücü */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 7, 20, 0.9);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
[hidden] { display: none !important; }
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
}
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 44px);
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-figure figcaption { color: #fff; font-size: 0.9rem; opacity: 0.85; }
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
body.lightbox-open { overflow: hidden; }
.pack-shot figcaption { margin-block-start: 4px; }
.pack-group-label {
  margin: 16px 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Casting: aday portre seçimi ---- */
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-block: 12px 16px;
}
.candidate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.candidate-card input[type="radio"] {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-primary);
}
.candidate-card img,
.candidate-card .pack-shot-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 4px);
}
.candidate-card:hover { border-color: color-mix(in srgb, var(--color-primary) 60%, transparent); }
.candidate-card:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.candidate-pending { cursor: default; border-style: dashed; }

/* ---- Bilgi / uyarı kutuları ---- */
.notice {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-block: 12px;
}
.notice-info {
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.notice-warn {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.4);
}

/* ---- Day/Night tema anahtarı ---- */
.theme-toggle { padding: 8px 10px; line-height: 0; }
.theme-toggle svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* ---- Hata sayfaları ---- */
.error-page { text-align: center; padding-block: 90px; }
.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 800;
  margin: 0;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Footer ---- */
.site-footer {
  border-block-start: 1px solid var(--color-border);
  background: var(--color-bg-raise);
  margin-block-start: 80px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-block: 44px 30px;
}
.footer-brand .brand { margin-block-end: 12px; }
.footer-brand p { margin: 6px 0; max-width: 340px; }
.footer-col h4 {
  margin: 4px 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
  font-family: var(--font-body);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-block-end: 9px; }
.footer-col a { color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-text); text-decoration: none; }
.footer-bottom {
  border-block-start: 1px solid var(--color-border);
  padding-block: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

/* App (dashboard/admin) basit footer'ı yoktur; sayfa sonu boşluğu */
.app-body main { padding-block-end: 48px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 26px; }
  .feature-row.reverse .feature-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .header-inner { justify-content: center; }
  .hero { padding-block-start: 54px; }
  .section { padding-block: 48px; }
  .stats-band { margin-block-start: -16px; }
  .auth-card { margin: 28px auto; padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .studio,
  .media-card, .saved-card.is-revealing, .share-drawer, .character-card-portrait { opacity: 1 !important; transform: none !important; animation: none !important; }
  .studio-glow, .idea-media-pending, .idea-media-pending::before, .media-card-pending, .media-card-pending::before,
  .btn-generate.is-launching, .studio.is-writing .prompt-shell, .prompt-state, .prompt-state::before, .wizard-veil,
  .clear-veil, .clear-sheet, .wizard-credits, .cal-day.is-pick-pulse, .dtp-field.is-flash, .dtp-days, .dtp-spin-value,
  .char-wizard, .char-wizard.is-working .char-wizard-shell, .char-wizard-shell.is-shaking, .is-filling, .is-filled { animation: none !important; }
  .dtp-panel, .dtp-field-icon, .dtp-field-chevron svg { transition: none !important; }
}

/* =====================================================================
   Karakter Sihirbazı (karakter formu üstü): birkaç kelime → tam profil.
   Prompt Sihirbazı ile aynı dil: aurora kenarlık, örtü + yörünge, daktilo.
   ===================================================================== */
.char-wizard {
  position: relative;
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 20px 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--color-primary) 16%, transparent), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--color-accent) 12%, transparent), transparent 60%),
    var(--color-surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: char-wizard-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes char-wizard-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.char-wizard::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.9;
}
.char-wizard-head { display: flex; align-items: flex-start; gap: 14px; }
.char-wizard-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 26px rgba(109, 91, 246, 0.35);
}
.char-wizard-icon svg { width: 24px; height: 24px; fill: currentColor; }
.char-wizard.is-working .char-wizard-icon svg { animation: orb-spin 2.4s linear infinite; }
.char-wizard-text { display: grid; gap: 4px; min-width: 0; }
.char-wizard-text .card-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.char-wizard-text h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.char-wizard-text p { margin: 0; }
.char-wizard-shell {
  position: relative;
  display: flex;
  border-radius: 16px;
  padding: 2px;
  background: var(--color-border);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.char-wizard-shell:focus-within {
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 70%, transparent), color-mix(in srgb, var(--color-accent) 55%, transparent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.char-wizard-shell textarea {
  flex: 1;
  min-height: 96px;
  resize: vertical;
  border: none;
  border-radius: 14px;
  background: var(--color-surface-2);
  font-size: 1rem;
  line-height: 1.55;
  padding: 12px 16px;
  box-shadow: none;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.char-wizard-shell textarea:focus { border: none; box-shadow: none; }
.char-wizard.is-working .char-wizard-shell {
  background: linear-gradient(120deg, #8b7bff, #22d3ee, #6d5bf6, #8b7bff);
  background-size: 300% 300%;
  animation: aurora 3s linear infinite;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 14%, transparent), 0 18px 60px rgba(109, 91, 246, 0.25);
}
.char-wizard.is-working .char-wizard-shell textarea { filter: blur(1.5px) saturate(0.7); opacity: 0.72; }
.char-wizard.is-done .char-wizard-shell {
  background: linear-gradient(135deg, var(--color-success), var(--color-accent));
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}
.char-wizard-shell.is-shaking { animation: shell-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.char-wizard-shell .wizard-veil { padding: 16px; }
.char-wizard-shell .wizard-orb { width: 48px; height: 48px; }
.char-wizard-shell .wizard-orb span:nth-child(2) { inset: 7px; }
.char-wizard-shell .wizard-orb span:nth-child(3) { inset: 15px; }
.char-wizard-shell .wizard-title { font-size: 0.98rem; margin-top: 2px; }
.char-wizard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.char-wizard-note { margin: 0; flex: 1 1 240px; }
.char-wizard-status { flex-basis: 100%; margin: 0; font-weight: 600; animation: chip-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.char-wizard-status.is-error { color: var(--color-error); }
.char-wizard-status.is-success { color: var(--color-success); }

/* Sihirbazın yazdığı alanlar: yazarken ışıltı, bitince kısa yeşil parlama */
input.is-filling, textarea.is-filling, select.is-filling {
  border-color: var(--color-primary-strong) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent) !important;
  caret-color: var(--color-primary-strong);
}
input.is-filled, textarea.is-filled, select.is-filled { animation: field-filled 1.3s ease both; }
@keyframes field-filled {
  0% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.35); border-color: var(--color-success); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@media (max-width: 640px) {
  .char-wizard { padding: 16px; }
  .char-wizard-head { flex-direction: column; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =====================================================================
   İçerik takvimi (Faz 3 — dilim 3): ay/hafta ızgarası, sürükle-bırak,
   onay kuyruğu, plan çekmecesi, toast. Vanilla CSS, kütüphanesiz.
   ===================================================================== */
.nav-count {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #111;
  white-space: nowrap;
}

.calendar-page { display: flex; flex-direction: column; gap: 14px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-period { margin: 0 0 0 8px; font-size: 1.2rem; text-transform: capitalize; }
.segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.segment-item {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-soft);
  text-decoration: none;
}
.segment-item:hover { color: var(--color-text); text-decoration: none; }
.segment-item.is-active { background: var(--color-primary); color: #fff; }
.calendar-note { margin: 0; }
.pill-xs { padding: 1px 8px; font-size: 0.68rem; }
.pill-auto { color: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 55%, transparent); }

/* Izgara */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-head {
  background: var(--color-surface-2);
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.cal-day {
  background: var(--color-surface);
  min-height: 118px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.calendar-week .cal-day { min-height: 320px; }
.cal-day.is-outside { background: color-mix(in srgb, var(--color-surface) 70%, var(--color-bg)); }
.cal-day.is-outside .cal-day-num { color: var(--color-text-muted); }
.cal-day.is-past { opacity: 0.72; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--color-accent) 70%, transparent); }
.cal-day.is-today .cal-day-num { background: var(--color-accent); color: #111; }
.cal-day.is-drop-target { background: color-mix(in srgb, var(--color-primary) 14%, var(--color-surface)); box-shadow: inset 0 0 0 2px var(--color-primary-strong); }
.calendar-page.is-drag-active .cal-day[data-droppable]:not(.is-drop-target) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 35%, transparent); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; }
.cal-day-num {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
}
.cal-day-count { font-size: 0.68rem; color: var(--color-text-muted); }
.cal-items { display: flex; flex-direction: column; gap: 4px; min-height: 40px; }
.cal-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 6px 4px 4px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  border-inline-start-width: 3px;
  background: var(--color-surface-2);
  color: var(--color-text);
  text-align: start;
  cursor: grab;
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.cal-item:hover { box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.18)); transform: translateY(-1px); }
.cal-item[draggable="false"] { cursor: pointer; }
.cal-item.is-dragging { opacity: 0.45; }
.cal-item.is-moving { opacity: 0.6; animation: cal-pulse 1s ease-in-out infinite; }
@keyframes cal-pulse { 50% { opacity: 0.35; } }
.cal-item-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  pointer-events: none;
}
.cal-item-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; pointer-events: none; }
.cal-item-time { font-size: 0.68rem; font-weight: 700; color: var(--color-text-soft); }
.cal-item-title { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item-meta { font-size: 0.66rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-month .cal-item-meta { display: none; }
.cal-item-flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-error);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-status-scheduled { border-inline-start-color: var(--color-success); }
.cal-status-awaiting_approval { border-inline-start-color: #d97706; }
.cal-status-awaiting_account { border-inline-start-color: var(--color-primary-strong); }
.cal-status-publishing { border-inline-start-color: #0ea5e9; }
.cal-status-published { border-inline-start-color: #10b981; opacity: 0.82; }
.cal-status-failed { border-inline-start-color: var(--color-error); }
.cal-item.has-conflict { border-color: color-mix(in srgb, var(--color-error) 55%, transparent); }
.cal-more { font-size: 0.72rem; font-weight: 600; color: var(--color-primary-strong); }
/* Hafta görünümünde sütunlar dar: minyatür üstte, metin altta */
.calendar-week .cal-item { grid-template-columns: minmax(0, 1fr); position: relative; padding: 4px; }
.calendar-week .cal-item-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 6px; }
.calendar-week .cal-item-thumb-empty { min-height: 54px; }
.calendar-week .cal-item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calendar-week .cal-item-flag { position: absolute; top: 6px; inset-inline-end: 6px; }
.pill-status-scheduled { color: var(--color-success); }
.pill-status-awaiting_approval { color: #d97706; }
.pill-status-awaiting_account { color: var(--color-primary-strong); }
.calendar-empty { margin-block-start: 6px; }

/* Onay kuyruğu */
.approval-queue { padding: 18px; border-color: rgba(217, 119, 6, 0.45); }
.approval-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.approval-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}
.approval-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.approval-thumb img { width: 100%; height: 100%; object-fit: cover; }
.approval-thumb-empty { color: var(--color-text-muted); }
.approval-title { margin: 0 0 2px; font-weight: 600; }
.approval-body p { margin: 0; }
.approval-actions { display: flex; gap: 6px; }
.approval-actions form { margin: 0; }

/* Çekmece */
.cal-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 60;
}
.cal-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(440px, 100vw);
  height: 100vh;
  overflow-y: auto;
  background: var(--color-surface);
  border-inline-start: 1px solid var(--color-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.3);
  z-index: 61;
  animation: cal-drawer-in 0.22s ease;
}
@keyframes cal-drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cal-drawer-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.3rem;
  cursor: pointer;
}
.cal-drawer-media { background: #000; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.cal-drawer-media img, .cal-drawer-media video { width: 100%; max-height: 52vh; object-fit: contain; display: block; }
.cal-drawer-media-empty { color: var(--color-text-muted); font-size: 2rem; }
.cal-drawer-body { padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 10px; }
.cal-drawer-body h3 { margin: 0; font-size: 1.1rem; }
.cal-drawer-body p { margin: 0; }
.cal-drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-drawer-chips .status-chip { margin-inline-start: 0; }
.cal-drawer-caption { white-space: pre-wrap; font-size: 0.9rem; color: var(--color-text-soft); }
.cal-drawer-actions { display: flex; flex-direction: column; gap: 12px; margin-block-start: 6px; }
.cal-drawer-actions form { margin: 0; }
.cal-when-row { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cal-when-row input { flex: 1; min-width: 0; }
.cal-when-row .btn { align-self: flex-end; }

/* ---------------------------------------------------------------
 * Tarih-saat seçici (datetime-picker.js)
 * ------------------------------------------------------------- */
.dtp { position: relative; display: flex; flex-direction: column; gap: 10px; }
.dtp-native { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.dtp-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border-radius: 13px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: start;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, background 0.25s ease, transform 0.25s ease;
}
.dtp-field:hover { border-color: var(--color-border-strong); background: color-mix(in srgb, var(--color-surface-2) 70%, var(--color-surface)); }
.dtp-field:focus-visible,
.dtp.is-open .dtp-field {
  outline: none;
  border-color: color-mix(in srgb, var(--color-primary) 75%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent);
}
.dtp-field.is-flash { animation: share-flash 0.9s ease; }
.dtp-field-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(109, 91, 246, 0.35);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dtp.is-open .dtp-field-icon { transform: scale(0.94) rotate(-4deg); }
.dtp-field-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dtp-field-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dtp-field-date { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.dtp-field-time { font-size: 0.8rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.dtp-field-chevron { display: grid; place-items: center; color: var(--color-text-muted); }
.dtp-field-chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dtp.is-open .dtp-field-chevron svg { transform: rotate(180deg); }

.dtp-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-6px); transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dtp-panel.is-open { grid-template-rows: 1fr; opacity: 1; transform: none; }
.dtp-panel-inner { min-height: 0; overflow: hidden; }
.dtp-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.dtp-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0.9;
}
.dtp-cal { padding: 14px 12px 8px; }
.dtp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 8px; }
.dtp-month { font-weight: 700; font-size: 0.95rem; text-transform: capitalize; letter-spacing: 0.01em; }
.dtp-nav {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.dtp-nav:hover { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border); }
.dtp-nav:active { transform: scale(0.94); }
.dtp-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dtp-weekdays, .dtp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dtp-weekdays span { text-align: center; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); padding: 4px 0 8px; }
.dtp-days { gap: 2px; }
.dtp-day {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--color-text-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.dtp-day:hover:not(:disabled):not(.is-selected) { background: var(--color-surface-2); color: var(--color-text); transform: translateY(-1px); }
.dtp-day:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.dtp-day.is-outside { color: var(--color-text-muted); opacity: 0.55; }
.dtp-day:disabled { opacity: 0.26; cursor: not-allowed; }
.dtp-day.is-today::after { content: ''; position: absolute; inset: 3px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--color-accent) 65%, transparent); pointer-events: none; }
.dtp-day.has-dot::before { content: ''; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-inline-start: -2px; border-radius: 50%; background: var(--color-accent); }
.dtp-day.is-selected { background: var(--grad-brand); color: #fff; font-weight: 700; opacity: 1; box-shadow: 0 6px 18px rgba(109, 91, 246, 0.42); }
.dtp-day.is-selected::after { display: none; }
.dtp-day.is-selected.has-dot::before { background: #fff; }
.dtp-days.is-anim-next { animation: dtp-slide-next 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dtp-days.is-anim-prev { animation: dtp-slide-prev 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes dtp-slide-next { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes dtp-slide-prev { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.dtp-time {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-block-start: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface-2) 55%, transparent);
}
.dtp-clock { display: flex; align-items: flex-start; justify-content: center; gap: 4px; }
.dtp-spin { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dtp-spin-btn { width: 40px; height: 26px; border: 0; background: transparent; color: var(--color-text-muted); display: grid; place-items: center; border-radius: 8px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease; }
.dtp-spin-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.dtp-spin-btn:active { transform: scale(0.92); }
.dtp-spin-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dtp-spin-value {
  min-width: 70px;
  padding: 6px 10px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  outline: none;
  cursor: ns-resize;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dtp-spin-value:hover { border-color: var(--color-border-strong); }
.dtp-spin-value:focus-visible { border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.dtp-spin-value.is-tick-up { animation: dtp-tick-up 0.26s ease; }
.dtp-spin-value.is-tick-down { animation: dtp-tick-down 0.26s ease; }
@keyframes dtp-tick-up { 0% { transform: translateY(6px); opacity: 0.35; } 100% { transform: none; opacity: 1; } }
@keyframes dtp-tick-down { 0% { transform: translateY(-6px); opacity: 0.35; } 100% { transform: none; opacity: 1; } }
.dtp-colon { font-size: 1.6rem; font-weight: 700; color: var(--color-text-muted); padding-block-start: 32px; line-height: 1; }
.dtp-spin-label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-block-start: 2px; }
.dtp-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dtp-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 4px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-soft);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.dtp-preset strong { font-size: 0.86rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text); }
.dtp-preset small { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.dtp-preset:hover { border-color: var(--color-border-strong); transform: translateY(-1px); }
.dtp-preset.is-active { border-color: color-mix(in srgb, var(--color-primary) 70%, transparent); background: color-mix(in srgb, var(--color-primary) 14%, var(--color-surface)); }
.dtp-preset.is-active strong { color: var(--color-primary-strong); }
.dtp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-block-start: 1px solid var(--color-border); }
.dtp-summary { margin: 0; font-size: 0.8rem; color: var(--color-text-muted); min-width: 0; line-height: 1.35; }
.dtp-summary strong { color: var(--color-text); font-weight: 600; text-transform: capitalize; }
.dtp-foot-actions { display: flex; gap: 6px; flex: none; }
.cal-drawer-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
body.cal-drawer-open { overflow: hidden; }

/* Toast */
.toast-host { position: fixed; bottom: 22px; inset-inline-end: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-success { border-color: color-mix(in srgb, var(--color-success) 60%, transparent); }
.toast-error { border-color: color-mix(in srgb, var(--color-error) 60%, transparent); }

/* ---- Paylaşım çekmecesi (?share={idea}) ----
   Geniş ekranda takvimi sola iter (günler tıklanabilir kalır), dar ekranda
   takvimin altına iner. */
.share-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(420px, 100vw);
  height: 100vh;
  overflow-y: auto;
  background: var(--color-surface);
  border-inline-start: 1px solid var(--color-border);
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.35);
  z-index: 58;
  opacity: 0;
  transform: translateX(36px);
  transition: transform 0.46s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.36s ease;
}
.share-drawer.is-open { opacity: 1; transform: none; }
.share-drawer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--grad-brand);
  z-index: 3;
}
.share-drawer.is-sending { pointer-events: none; }
.share-drawer.is-sending .share-body { opacity: 0.55; }
.share-drawer.is-done { transform: translateX(16px); opacity: 0; }
.share-drawer.is-shaking { animation: share-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes share-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
.share-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.share-head .card-label { margin: 0 0 4px; }
.share-head h3 { margin: 0; font-size: 1.15rem; font-family: var(--font-display); }
.share-close {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.2s ease;
}
.share-close:hover { text-decoration: none; transform: rotate(90deg); border-color: var(--color-primary-strong); color: var(--color-text); }
.share-media {
  position: relative;
  margin: 0 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.share-media::before {
  content: '';
  position: absolute;
  inset: -24px;
  background: var(--share-bg, none) center / cover no-repeat;
  filter: blur(26px) saturate(1.2);
  opacity: 0.55;
  z-index: -1;
}
.share-media img, .share-media video { position: relative; display: block; width: 100%; max-height: 38vh; object-fit: contain; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35)); }
.share-media .media-kind-pill { position: absolute; top: 10px; inset-inline-start: 10px; }
.share-body { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 12px; transition: opacity 0.3s ease; }
.share-body .label { margin: 6px 0 0; }
.share-body textarea { width: 100%; resize: vertical; }
.share-prompt { -webkit-line-clamp: 2; }
.share-existing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border-inline-start: 3px solid var(--color-success);
  font-size: 0.86rem;
  color: var(--color-text-soft);
}
.share-existing.cal-status-awaiting_approval { border-inline-start-color: #d97706; }
.share-existing.cal-status-awaiting_account { border-inline-start-color: var(--color-primary-strong); }
.share-existing .status-chip { flex: none; }
.share-platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.share-platforms .check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.share-platforms .check-pill { position: relative; }
.share-seg .seg-option { padding: 10px 12px; }
.share-when { display: flex; flex-direction: column; gap: 10px; }
@keyframes share-flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); border-color: var(--color-accent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
.share-pick-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.share-pick-hint svg { flex: none; width: 15px; height: 15px; margin-block-start: 2px; fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linecap: round; animation: orb-spin 9s linear infinite; }
.share-now-hint { margin: 0; }
.share-actions { margin-block-start: 6px; }
.btn-share-submit { width: 100%; gap: 10px; }
.btn-share-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn-share-submit:hover svg { transform: translate(3px, -3px); }
.share-cancel { margin: 0; text-align: center; }

/* Çekmece açıkken takvim: geniş ekranda sola iter, günler seçilebilir */
@media (min-width: 1100px) {
  .calendar-page.is-sharing { padding-inline-end: calc(min(420px, 100vw) + 16px); }
}
@media (max-width: 1099px) {
  .share-drawer { position: relative; width: auto; height: auto; margin-block-start: 22px; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); transform: translateY(16px); }
  .share-drawer.is-open { transform: none; }
  .share-drawer::before { border-radius: var(--radius) var(--radius) 0 0; }
}
.calendar-page.is-picking .cal-day[data-droppable] { cursor: pointer; }
.calendar-page.is-picking .cal-day[data-droppable]:hover {
  background: color-mix(in srgb, var(--color-accent) 9%, var(--color-surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--color-accent) 60%, transparent);
}
.calendar-page.is-picking .cal-day.is-picked {
  background: color-mix(in srgb, var(--color-primary) 14%, var(--color-surface));
  box-shadow: inset 0 0 0 2px var(--color-primary-strong);
}
.calendar-page.is-picking .cal-day.is-picked .cal-day-num { background: var(--color-primary); color: #fff; }
.cal-day.is-pick-pulse { animation: pick-pulse 0.7s ease; }
@keyframes pick-pulse { 0% { box-shadow: inset 0 0 0 2px var(--color-primary-strong), 0 0 0 0 color-mix(in srgb, var(--color-primary) 45%, transparent); } 100% { box-shadow: inset 0 0 0 2px var(--color-primary-strong), 0 0 0 14px transparent; } }

/* Otomasyon bölümü (strateji formu) */
.automation-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.automation-mode {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  cursor: pointer;
}
.automation-mode:has(input:checked) { border-color: var(--color-primary-strong); background: color-mix(in srgb, var(--color-primary) 12%, transparent); }
.automation-mode input { width: auto; margin: 0 8px 0 0; }
.automation-mode strong { font-size: 0.95rem; }
.automation-mode p { margin: 0; font-size: 0.82rem; color: var(--color-text-soft); }
.automation-consent {
  margin-block-start: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed color-mix(in srgb, var(--color-accent) 60%, transparent);
  background: color-mix(in srgb, var(--color-accent) 7%, transparent);
}
.automation-block .automation-consent { display: none; }
.automation-block:has(input[value="preauthorized"]:checked) .automation-consent { display: block; }
.automation-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.automation-consent input { width: auto; margin-top: 3px; }
.automation-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block-start: 10px; }
.automation-status form { margin: 0; }

@media (max-width: 860px) {
  .calendar-month .cal-day { min-height: 76px; padding: 5px; }
  .calendar-month .cal-item-text, .calendar-month .cal-item-flag { display: none; }
  .calendar-month .cal-item { grid-template-columns: 1fr; justify-items: center; padding: 3px; }
  .calendar-week .cal-day { min-height: 160px; }
  .approval-item { grid-template-columns: 48px minmax(0, 1fr); }
  .approval-actions { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------
   Sosyal hesaplar (Faz 4): karakter × platform ızgarası
   ------------------------------------------------------------------ */
.accounts-mock-note { margin-block: 0 16px; }
.accounts-character { margin-block-end: 18px; padding: 18px 20px 20px; }
.accounts-character.is-focus { border-color: var(--color-primary-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.accounts-character-head { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; }
.accounts-character-head h3 { margin: 0; font-size: 1.1rem; }
.accounts-character-head p { margin: 2px 0 0; }
.accounts-avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem;
}
.accounts-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.accounts-cell {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--color-surface-2);
  display: flex; flex-direction: column; gap: 8px;
  min-height: 128px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.accounts-cell:hover { border-color: var(--color-border-strong); transform: translateY(-1px); }
.accounts-cell.is-active { border-color: color-mix(in srgb, var(--color-success) 55%, transparent); }
.accounts-cell.is-expired { border-color: color-mix(in srgb, #d97706 60%, transparent); }
.accounts-cell.is-unavailable { opacity: 0.6; }
.accounts-cell-head { display: flex; align-items: center; gap: 8px; }
.accounts-cell-head strong { font-size: 0.95rem; }
.accounts-icon { width: 22px; height: 22px; flex: none; color: var(--color-text-soft); }
.accounts-cell.is-active .accounts-icon { color: var(--color-primary-strong); }
.accounts-status.accounts-status-none { color: var(--color-text-muted); border-color: var(--color-border-strong); }
.accounts-status.accounts-status-active { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 55%, transparent); }
.accounts-status.accounts-status-expired { color: #d97706; border-color: rgba(217, 119, 6, 0.55); }
.accounts-status.accounts-status-revoked { color: var(--color-text-muted); border-color: var(--color-border-strong); }
.accounts-handle { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; overflow-wrap: anywhere; }
.accounts-handle img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.accounts-error { margin: 0; color: var(--color-error); }
.accounts-hint { margin: 0; flex: 1; }
.accounts-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: auto; }
.accounts-actions form { margin: 0; }

.accounts-consent { max-width: 520px; margin: 32px auto; padding: 28px 30px; text-align: center; }
.accounts-consent-badge {
  display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(251, 191, 36, 0.16); color: #d97706; border: 1px solid rgba(217, 119, 6, 0.4);
}
.accounts-consent-scopes { text-align: start; margin: 16px auto; padding: 0 0 0 20px; max-width: 360px; color: var(--color-text-soft); }
.accounts-consent-actions { display: flex; justify-content: center; gap: 10px; margin-block-start: 18px; }

/* Takvim çekmecesi: Faz 4 ek alanlar */
.cal-drawer-error { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.86rem; color: var(--color-error); background: color-mix(in srgb, var(--color-error) 10%, transparent); border: 1px solid color-mix(in srgb, var(--color-error) 35%, transparent); }
.cal-drawer-hint { margin: 10px 0 0; font-size: 0.86rem; color: var(--color-text-soft); }
.pill-status-publishing { border-color: #0ea5e9; }
.pill-status-published { border-color: #10b981; }
.pill-status-failed { border-color: var(--color-error); }
/* Paylaşım çekmecesi: hesabı bağlı olmayan platform */
.check-pill.is-unlinked { border-style: dashed; }
.share-unlinked-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d97706; margin-inline-start: 4px; vertical-align: middle; }
.share-unlinked-note { margin: 6px 0 0; }
.share-unlinked-note a { font-weight: 600; }

@media (max-width: 640px) {
  .accounts-grid { grid-template-columns: 1fr 1fr; }
  .accounts-cell { min-height: 0; }
}
/* ============================================================
   Yasal sayfalar (site: /privacy, /terms, /data-deletion)
   ============================================================ */
.legal { padding-block: 48px 20px; }
.legal-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.legal-nav {
  position: sticky;
  top: 90px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  padding: 18px 16px;
}
.legal-nav-title {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
}
.legal-nav ul { list-style: none; margin: 0; padding: 0; }
.legal-nav li + li { margin-block-start: 4px; }
.legal-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.legal-nav a:hover { color: var(--color-text); background: var(--color-bg-raise); }
.legal-nav a.is-active {
  color: var(--color-primary-strong, var(--color-primary));
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  font-weight: 600;
}
.legal-doc {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.7;
}
.legal-head h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.legal-note {
  margin-block: 14px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-info, #3b82f6) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-info, #3b82f6) 35%, transparent);
  font-size: 0.9rem;
}
.legal-body { margin-block-start: 28px; }
.legal-body h2 {
  font-size: 1.2rem;
  margin: 34px 0 10px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--color-border);
}
.legal-body h3 { font-size: 1rem; margin: 20px 0 6px; }
.legal-body p, .legal-body ul, .legal-body ol { margin-block: 0 12px; }
.legal-body li { margin-block-end: 6px; }
.legal-body a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; gap: 20px; }
  .legal-nav { position: static; }
}