/* DİKİM.AI — Arka Plan Sil UI
   Tasarım dili tryon.html / "Arka Plan Sil.dc.html" mockup'ıyla ortak:
   Space Grotesk + IBM Plex Mono, mint yeşil (#2E8B6F) birincil,
   mercan turuncu (#F0865C) ikincil, açık/koyu tema. */

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

:root {
  --nav-h:    72px;
  --panel-w:  280px;

  --bg:       #FAFAF7;
  --surface:  #FFFFFF;
  --surface2: #F1F0E9;
  --surface3: #E9E8E1;

  --border:   #E4E7E2;
  --border2:  #D8DAD1;
  --border3:  #C7C8BD;

  --text:     #1A1D1B;
  --text-2:   #6B6F6C;
  --text-3:   #97998F;

  --accent:      #2E8B6F;
  --accent-h:    #256F59;
  --accent-bg:   rgba(46,139,111,.1);
  --accent-bdr:  rgba(46,139,111,.35);

  --secondary: #F0865C;

  --success: #3EA876;
  --error:   #D6543E;
  --warn:    #E0A227;

  --on-accent:    #FFFFFF;
  --on-secondary: #1A1D1B;

  --r:   3px;
  --r-s: 2px;
  --r-l: 4px;

  --f-body: 'Space Grotesk', -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614; --surface: #1B211E; --surface2: #232A26; --surface3: #2A312D;
    --border: #2A312D; --border2: #333B36; --border3: #454E48;
    --text: #FAFAF7; --text-2: #8A948E; --text-3: #5C665F;
    --accent: #4FCC9C; --accent-h: #6ADCB2; --accent-bg: rgba(79,204,156,.12); --accent-bdr: rgba(79,204,156,.35);
    --secondary: #F5966B;
    --success: #4FCC9C; --error: #E8695A; --warn: #F0B93F;
    --on-accent: #0E1512; --on-secondary: #121614;
  }
}
:root[data-theme="dark"] {
  --bg: #121614; --surface: #1B211E; --surface2: #232A26; --surface3: #2A312D;
  --border: #2A312D; --border2: #333B36; --border3: #454E48;
  --text: #FAFAF7; --text-2: #8A948E; --text-3: #5C665F;
  --accent: #4FCC9C; --accent-h: #6ADCB2; --accent-bg: rgba(79,204,156,.12); --accent-bdr: rgba(79,204,156,.35);
  --secondary: #F5966B;
  --success: #4FCC9C; --error: #E8695A; --warn: #F0B93F;
  --on-accent: #0E1512; --on-secondary: #121614;
}

html, body { height: 100%; }
body {
  font-family: var(--f-body);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR — tryon.html ile birebir ortak ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  flex-shrink: 0;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand-block { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.brand-name {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--text);
}
.brand-dot { color: var(--accent); }
.brand-tag {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.btn-line {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-line:hover:not(:disabled) { background: var(--surface2); }
.btn-buy { background: var(--secondary); color: var(--on-secondary); }
.btn-buy:hover:not(:disabled) { opacity: .88; }

/* Kredi durumu — tryon.html'deki slider ile aynı */
.credit-block { flex: 1; min-width: 220px; max-width: 480px; }
.credit-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.credit-slider {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 6px;
}
.credit-slider-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
}
.credit-slider-dot {
  position: absolute; top: 50%; left: 0%;
  width: 9px; height: 9px;
  background: var(--secondary);
  border: 2px solid var(--bg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.credit-caption { font-size: 11px; color: var(--text-3); }
.credit-caption span { color: var(--text); font-weight: 600; }

.credit-num {
  font-family: var(--f-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.credit-num-sep { color: var(--text-3); font-weight: 400; margin: 0 2px; }
#creditMaxUser, #creditMax { color: var(--text-3); font-weight: 400; }

/* ── Uygulama gövdesi: sol menü + içerik ──── */
.app-body {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.side-rail {
  flex-shrink: 0;
  width: 148px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 10px;
  border-right: 1px solid var(--border);
  align-self: stretch;
  position: sticky;
  top: 0;
}
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 var(--r) var(--r) 0;
  padding: 9px 10px;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.side-item:not(:disabled):hover { background: var(--surface2); color: var(--text); }
.side-item:disabled { cursor: default; opacity: .55; }
.side-item.active {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--surface2);
  cursor: default;
}
.side-item-mark {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 4px;
  background: var(--surface2);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.side-item.active .side-item-mark { background: var(--accent); color: var(--on-accent); }
.side-item--danger { color: var(--error); }
.side-item--danger:hover { background: rgba(214,84,62,.08); color: var(--error); }
.side-sep { height: 1px; background: var(--border); margin: 10px 4px; }
.side-group-label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding: 6px 10px 4px;
}
.side-soon {
  margin-left: auto;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-2);
  background: var(--surface2);
  padding: 2px 5px;
  border-radius: 8px;
}

/* Tema / Ayarlar / Profil — sol menünün en altına sabit */
.side-rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: var(--r);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.side-profile:hover { background: var(--surface2); }
.side-profile-avatar {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
}
.side-profile-text { min-width: 0; display: flex; flex-direction: column; }
.side-profile-email {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-profile-plan {
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--text-3);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .app-body { flex-direction: column; }
  .side-rail {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    position: static;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .side-group-label { display: none; }
  .side-sep { width: 1px; height: 24px; margin: 0 4px; }
  .side-rail-bottom { flex-direction: row; margin-top: 0; margin-left: auto; flex-shrink: 0; }
  .side-profile-text { display: none; }
}

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--r);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all .14s;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 14px; height: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-h); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface2); color: var(--text); }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border2);
}
.btn-outline:hover:not(:disabled) { border-color: var(--border3); color: var(--text); }

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }

.btn-thread { background: var(--accent); color: var(--on-accent); }
.btn-thread:hover:not(:disabled) { background: var(--accent-h); }
.btn-thread:disabled { opacity: .35; cursor: not-allowed; }
.btn-xs { padding: 4px 9px; font-size: 12px; }

/* ── MAIN ────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  align-self: stretch;
}

/* ── UPLOAD STATE ────────────────────────── */
.upload-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  width: 100%;
  max-width: 920px;
}

.hero { text-align: center; max-width: 640px; }
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  width: 100%;
  border: 1.5px dashed var(--border2);
}
.dropzone {
  background: transparent;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 300px;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.dz-icon {
  width: 34px; height: 34px;
  margin-bottom: 6px;
  color: var(--text-3);
}
.dz-icon svg { width: 100%; height: 100%; }
.dz-title { font-size: 13px; font-weight: 500; color: var(--text-2); max-width: 320px; line-height: 1.5; }
.dz-sub { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); margin-top: 4px; }

.upload-side {
  border-left: 1px solid var(--border2);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.upload-side-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .06em;
}
.upload-side-info {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}

@media (max-width: 640px) {
  .upload-grid { grid-template-columns: 1fr; }
  .upload-side { border-left: none; border-top: 1px solid var(--border2); }
}

/* ── PROCESS STATE ───────────────────────── */
.process-state { width: 100%; max-width: 360px; }
.process-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.spinner-ring {
  width: 40px; height: 40px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  margin-bottom: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.process-title { font-size: 14px; font-weight: 600; }
.process-sub { font-size: 13px; color: var(--text-2); }
.progress-bar {
  width: 100%; height: 2px;
  background: var(--border2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .3s ease-out;
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* ── RESULT STATE ────────────────────────── */
.result-state {
  display: flex;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  align-items: stretch;
}

.canvas-area {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
}
#resultCanvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: var(--r);
}

/* ── PANEL ───────────────────────────────── */
.panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.panel-hd {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.panel-ft {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* ── SECTIONS ────────────────────────────── */
.sec { border-bottom: 1px solid var(--border); }
.sec:last-child { border-bottom: none; }

.sec-label {
  padding: 10px 14px 4px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sec-bd { padding: 0 14px 12px; }

/* ── SEGMENTED (lang) ────────────────────── */
.seg-ctrl {
  display: inline-flex;
  gap: 2px;
  background: var(--surface2);
  padding: 3px;
  border-radius: var(--r-s);
  border: 1px solid var(--border);
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .12s;
}
.lang-btn:hover { color: var(--text-2); }
.lang-btn.active {
  background: var(--surface3);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.lang-btn.locked { cursor: pointer; opacity: .55; }
.lang-btn.locked:hover { color: var(--text-3); }
.lang-btn .pro-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 9px;
  letter-spacing: 0;
  vertical-align: middle;
}

/* ── LOGO LIBRARY ────────────────────────── */
.logo-library {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.logo-thumb-wrap {
  position: relative;
  width: 50px; height: 50px;
  border: 1px solid var(--border2);
  border-radius: var(--r-s);
  cursor: pointer;
  background: #fff;
  transition: border-color .12s;
  overflow: hidden;
}
.logo-thumb-wrap:hover { border-color: var(--accent); }
.logo-thumb-wrap.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}
.logo-thumb {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px;
  display: block;
}
.logo-thumb-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 7px;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.logo-thumb-wrap:hover .logo-thumb-del { display: flex; }

.ghost-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px;
  background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--r-s);
  color: var(--text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.ghost-add-btn svg { width: 12px; height: 12px; }
.ghost-add-btn:hover { border-color: var(--accent); color: var(--accent-h); }

.logo-ctrl { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }

.ctrl-row { display: flex; align-items: center; gap: 8px; }
.ctrl-lbl { font-size: 11px; color: var(--text-3); min-width: 36px; flex-shrink: 0; }
.ctrl-val { font-size: 11px; color: var(--text-2); min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── CHIPS ───────────────────────────────── */
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.color-pill, .pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
  line-height: 1.5;
}
.color-pill:hover, .pill:hover { border-color: var(--accent); color: var(--accent-h); }
.color-pill.active, .pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

/* ── SIZE BUTTONS ────────────────────────── */
.size-group { margin-bottom: 8px; }
.size-group:last-of-type { margin-bottom: 0; }
.size-group-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 5px;
}
.size-row { display: flex; flex-wrap: wrap; gap: 4px; }
.size-btn {
  min-width: 32px;
  padding: 4px 6px;
  border-radius: var(--r-s);
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  text-align: center;
  line-height: 1.5;
}
.size-btn:hover { border-color: var(--accent); color: var(--accent-h); }
.size-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.size-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-s);
}
.qty-btn {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--accent); color: var(--on-accent); }
.qty-val { font-size: 11px; font-weight: 600; color: var(--text); min-width: 12px; text-align: center; }

/* Kart rengi seçici */
.card-swatches { display: flex; gap: 8px; }
.card-swatch {
  width: 30px; height: 30px;
  border-radius: var(--r-s);
  border: 2px solid var(--border2);
  cursor: pointer;
  padding: 0;
  transition: border-color .12s, box-shadow .12s;
}
.card-swatch:hover { border-color: var(--border3); }
.card-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

/* ── TEXT INPUT ──────────────────────────── */
.text-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-s);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color .12s;
}
.text-input:focus { border-color: var(--accent); }
.text-input::placeholder { color: var(--text-3); }

/* ── RANGE SLIDER ────────────────────────── */
.range-slider {
  -webkit-appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--border2);
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform .1s;
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-slider::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

/* ── POSITION GRIDS ──────────────────────── */
.pos-g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: fit-content;
}
.pos-g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: fit-content;
}
.pos-btn {
  width: 30px; height: 28px;
  border-radius: var(--r-s);
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text-3);
  font-size: .85rem;
  cursor: pointer;
  transition: all .12s;
  display: flex; align-items: center; justify-content: center;
}
.pos-btn:hover { border-color: var(--accent); color: var(--accent-h); }
.pos-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ── VERIFY BANNER ───────────────────────── */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: rgba(240,185,63,.1);
  border-bottom: 1px solid rgba(240,185,63,.25);
  color: var(--warn, #F0B93F);
  font-size: 12.5px;
}
.verify-banner-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.verify-banner-btn:disabled { opacity: .6; cursor: default; text-decoration: none; }

/* ── MODAL ───────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-l);
  padding: 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: slideUp .18s ease;
}
.modal-wide { max-width: 620px; }
.modal-confirm { max-width: 340px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 4px; }
.confirm-actions .btn { flex: 1; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s, border-color .12s;
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

.modal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  color: var(--text);
}
.modal-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: -14px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.form-group input {
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-s);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .12s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-3); }

.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 38px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-3);
  cursor: pointer;
}
.password-toggle:hover { color: var(--text-2); }
.password-toggle svg { width: 18px; height: 18px; }
.form-group textarea {
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-s);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
  transition: border-color .12s;
}
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea::placeholder { color: var(--text-3); }

.support-divider { height: 1px; background: var(--border); margin: 18px 0 14px; }
.support-list-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.support-reply {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface3, var(--surface2));
  border-radius: var(--r-s);
  padding: 8px 10px;
  margin-top: 6px;
  white-space: pre-wrap;
}
.support-reply-label { font-weight: 600; color: var(--text); }
.form-error { color: var(--error); font-size: 12px; margin-bottom: 10px; }
.form-success { color: var(--success, #2fae5c); font-size: 12px; margin-bottom: 10px; }
.form-switch { text-align: center; font-size: 12px; color: var(--text-2); margin-top: 14px; }
.form-switch--tight { margin-top: 8px; margin-bottom: -4px; }
.form-switch a { color: var(--accent-h); text-decoration: none; }
.form-switch a:hover { text-decoration: underline; }

.modal-trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-trust li {
  font-size: 12px;
  color: var(--text-2);
  padding-left: 18px;
  position: relative;
}
.modal-trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-h);
  font-weight: 600;
}

/* ── HISTORY ─────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; margin-top: 4px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.history-thumb {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: var(--r-s);
  flex-shrink: 0;
  background: var(--surface3);
}
.history-info { flex: 1; min-width: 0; }
.history-section-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-2);
  padding: 14px 10px 6px;
}
.history-section-title:first-child { padding-top: 4px; }
.history-status {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.status-completed { background: rgba(34,197,94,.1); color: var(--success); }
.status-pending, .status-processing { background: rgba(245,158,11,.1); color: var(--warn); }
.status-failed { background: rgba(239,68,68,.1); color: var(--error); }
.status-closed { background: rgba(107,111,108,.12); color: var(--text-2); }
.history-date { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.history-empty { text-align: center; color: var(--text-2); padding: 32px; font-size: 13px; }

.history-filter-bar { display: flex; gap: 8px; margin: 4px 0 12px; }
.filter-chip {
  font-family: var(--f-body, inherit);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}
.filter-chip.active { border-color: var(--accent); color: var(--text); background: var(--surface2); }

.history-thumb-btn { border: none; background: none; padding: 0; cursor: zoom-in; flex-shrink: 0; }
.history-delete-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--r-s);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.history-delete-btn:hover { border-color: var(--error); color: var(--error); }
.history-delete-btn svg { width: 14px; height: 14px; }
.history-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.history-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--r);
  display: block;
  margin: auto;
}
#historyLightboxOverlay { display: flex; align-items: center; justify-content: center; }
#historyLightboxOverlay .modal-close { position: fixed; top: 20px; right: 20px; }

/* ── PRICING ─────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.pricing-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 20px 16px 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s;
  position: relative;
}
.pricing-card:hover { border-color: var(--border3); }
.pricing-featured {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.pricing-featured:hover { border-color: var(--accent-h); }
.pricing-badge-top {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  background: var(--accent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--on-accent);
  white-space: nowrap;
}
.pricing-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.pricing-amount { color: var(--text); margin-bottom: 2px; }
.pricing-num { font-size: 28px; font-weight: 700; letter-spacing: -.04em; }
.pricing-unit { font-size: 13px; color: var(--text-2); }
.pricing-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.pricing-period {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
}

.interval-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.interval-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.interval-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.interval-badge {
  font-size: 10.5px;
  color: var(--accent);
  margin-left: 4px;
}

.interval-btn.active .interval-badge {
  color: inherit;
  opacity: 0.75;
}

.modal-subtitle {
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--text);
}

.pricing-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.pricing-enterprise {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 16px;
  text-align: center;
}

.pricing-enterprise a {
  color: var(--text);
  text-decoration: underline;
}

/* ── PAGE OVERLAY (Profil + Ayarlar) ────── */
.page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pageIn .2s ease;
}
@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-l);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp .18s ease;
}

.page-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.page-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--r-s);
  transition: color .12s, background .12s;
}
.page-back svg { width: 16px; height: 16px; }
.page-back:hover { color: var(--text); background: var(--surface2); }
.page-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.page-header-filler { width: 80px; }

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px;
}
.page-content {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Profile cards */
.pcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 20px;
}
.pcard-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.pcard-account {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pcard-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: var(--text);
  flex-shrink: 0;
}
.pcard-email {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.plan-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bdr);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-h);
  letter-spacing: .02em;
}

.pcard-credit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pcard-credit-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--text);
  line-height: 1;
}
.pcard-credit-unit {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

.pcard-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pcard-plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.pcard-plan-desc {
  font-size: 12px;
  color: var(--text-2);
}

/* Settings rows */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.setting-row:first-of-type { padding-top: 0; }
.setting-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.setting-desc { font-size: 12px; color: var(--text-3); }

/* Tema rengi seçici */
.accent-swatch-row { display: flex; gap: 10px; }
.accent-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border2);
}
.accent-swatch:hover { box-shadow: 0 0 0 1px var(--border3); }
.accent-swatch.active {
  border-color: var(--surface);
  box-shadow: 0 0 0 2px var(--text);
}

/* Telegram bağlama */
.telegram-steps-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.telegram-steps-list li { margin-bottom: 10px; }
.telegram-steps-list li:last-child { margin-bottom: 0; }
.telegram-steps-list a { color: var(--accent-h); text-decoration: none; }
.telegram-steps-list a:hover { text-decoration: underline; }
.telegram-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.telegram-code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text);
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 6px 12px;
}

/* ── TOAST ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--f-body);
  box-shadow: 0 8px 20px rgba(26,29,27,.12);
  z-index: 500;
  pointer-events: none;
  white-space: nowrap;
  animation: toastIn .18s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast-success { background: rgba(34,197,94,.12);   border: 1px solid rgba(34,197,94,.3);   color: var(--success); }
.toast-error   { background: rgba(239,68,68,.1);    border: 1px solid rgba(239,68,68,.3);    color: var(--error); }
.toast-info    { background: var(--accent-bg);      border: 1px solid var(--accent-bdr);     color: var(--accent-h); }

/* ── UTILS ───────────────────────────────── */
.hidden { display: none !important; }
.muted  { color: var(--text-2); font-size: 13px; line-height: 1.5; }

.empty-card {
  max-width: 380px;
  margin: 100px auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  /* Nav dar ekranda küçülür, ikincil öğeler gizlenir */
  .topbar { padding: 8px 14px; gap: 10px; }
  .brand-tag { display: none; }
  .credit-block { display: none; }

  .main {
    padding: 16px 12px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  /* Upload state tam genişlik */
  .upload-state { max-width: 100%; }

  /* Process state tam genişlik */
  .process-state { max-width: 100%; }

  /* Result: dikey düzen, sabit yükseklik yok */
  .result-state {
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  /* Canvas: makul yükseklik, tam genişlik */
  .canvas-area {
    width: 100%;
    min-height: 55vw;
    max-height: 70vw;
    flex: none;
  }

  /* Panel: tam genişlik, içi serbest akar */
  .panel {
    width: 100%;
    overflow: visible;
  }
  .panel-body {
    overflow: visible;
    max-height: none;
  }

  /* İndir + Yeni Görsel butonları ekranın altına yapışık kalır */
  .panel-ft {
    flex-direction: row;
    position: sticky;
    bottom: 0;
    background: var(--surface);
    z-index: 10;
    border-top: 1px solid var(--border);
    padding: 10px 12px;
  }

  /* Profil / Ayarlar sayfaları */
  .page-body { padding: 20px 14px; }

  /* Modal içi */
  .modal { padding: 22px 18px; }
  .history-list { max-height: 60vh; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.4rem; }
  .dropzone { padding: 28px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  /* Toast uzun metinlerde taşmasın */
  .toast { white-space: normal; text-align: center; max-width: calc(100vw - 32px); }
  /* Nav kredi sayısı dışında şeyler küçülsün */
  .brand-tag { display: none; }
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
