/* Giriş, kayıt, ödeme-başarılı ve panel sayfaları: landing.css'in koyu temasının devamı.
   Yalnızca <body class="app"> olan sayfalarda etkilidir. */

.app .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app .muted { color: var(--muted); }
.app .small { font-size: 0.875rem; }
.app p { margin: 0 0 1em; }

/* ---------- butonlar (landing'de olmayanlar) ---------- */
.app .btn-secondary { background: var(--glass-2); border-color: var(--line-2); color: var(--text); }
.app .btn-secondary:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.28); }
.app .btn-danger { background: rgba(255, 91, 110, 0.08); border-color: rgba(255, 91, 110, 0.45); color: #ff8b9a; }
.app .btn-danger:hover { background: #ff5b6e; border-color: #ff5b6e; color: #07080c; }
.app .btn-block { width: 100%; height: 46px; }
.app .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- form alanları ---------- */
.app label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 550; color: #d4d8e6; }
.app input[type="email"], .app input[type="password"], .app input[type="text"], .app input[type="number"], .app select, .app textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.app input::placeholder, .app textarea::placeholder { color: var(--dim); }
.app input:focus, .app select:focus, .app textarea:focus {
  outline: none; border-color: var(--violet); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 4px rgba(139, 123, 255, 0.18);
}
.app select { width: auto; padding: 9px 12px; color-scheme: dark; }
.try-actions input[type="number"], .try-actions input[type="text"] { width: auto; padding: 9px 12px; color-scheme: dark; }
.try-actions input:disabled { opacity: 0.5; cursor: not-allowed; }
.app select option { background: #12141c; color: var(--text); }
.app textarea { min-height: 300px; resize: vertical; font: 13px/1.6 var(--mono); tab-size: 2; }
.app input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--violet); }
.app .field { margin-bottom: 18px; }
.app .hint { margin: 6px 0 0; font-size: 13px; color: var(--dim); }
.app .error { margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 14px; color: #ff9aa7; background: rgba(255, 91, 110, 0.1); border: 1px solid rgba(255, 91, 110, 0.3); }

/* ---------- giriş / kayıt / başarı ---------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; }
.auth-top { width: 100%; max-width: 420px; display: flex; justify-content: flex-end; margin-bottom: 14px; }
.auth-card { width: 100%; max-width: 420px; padding: 40px 36px; }
.auth-card .logo { margin-bottom: 26px; }
.auth-card h1 { font-size: 30px; letter-spacing: -0.03em; margin-bottom: 26px; }
.auth-card h1 + .sub { margin-top: -18px; }
.auth-card .sub { margin-bottom: 26px; color: var(--muted); font-size: 15px; }
.auth-card .sub:empty { display: none; }
.auth-card .alt { margin: 22px 0 0; text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-card .fine { margin: 18px 0 0; font-size: 13px; color: var(--dim); line-height: 1.6; }
.auth-card a:not(.btn):not(.logo) { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(53, 224, 181, 0.4); }
.auth-card a:not(.btn):not(.logo):hover { text-decoration-color: var(--mint); }
.auth-card .btn-primary { margin-top: 4px; }
.auth-card.center { text-align: center; }
.auth-card.center .btn { margin-top: 14px; }
.spinner { width: 40px; height: 40px; margin: 0 auto 22px; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--violet); border-radius: 50%; animation: spin 0.9s linear infinite; }
.check-big { position: relative; width: 48px; height: 48px; margin: 0 auto 20px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--mint)); box-shadow: 0 0 40px -6px rgba(53, 224, 181, 0.6); }
.check-big::after { content: ""; position: absolute; left: 18px; top: 10px; width: 9px; height: 18px; border: solid #07080c; border-width: 0 3px 3px 0; transform: rotate(40deg); }

/* ---------- panel ---------- */
.bar.simple { grid-template-columns: 1fr auto; }
.who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }
.dash { padding: 36px 24px 90px; max-width: 1080px; }
.panel { padding: 30px; margin-bottom: 20px; }
.panel > h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 6px; }
.panel > p.muted { margin-bottom: 20px; }
.panel h3 { margin: 30px 0 12px; font-size: 15px; font-weight: 600; color: #d4d8e6; }
.flash { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 13px 20px; border-radius: 14px; font-weight: 550; font-size: 15px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7); }
.flash.ok { color: #7ff0cf; background: linear-gradient(rgba(53, 224, 181, 0.12), rgba(53, 224, 181, 0.12)), #0d1016; border: 1px solid rgba(53, 224, 181, 0.35); }
.flash.error { color: #ff9aa7; background: linear-gradient(rgba(255, 91, 110, 0.12), rgba(255, 91, 110, 0.12)), #0d1016; border: 1px solid rgba(255, 91, 110, 0.35); }

.usage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 24px; margin: 16px 0 14px; }
.plan-badge { display: inline-block; margin-right: 10px; padding: 4px 14px; border-radius: 99px; font-size: 13px; font-weight: 650; color: #07080c; background: var(--grad); }
.usage-num { font-size: 16px; color: var(--muted); }
.usage-num strong { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; color: var(--text); }
/* landing'deki "meter" bento kutusunu panelde düz ilerleme çubuğuna çevir */
.app .meter { padding: 0; height: 10px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.app .meter span { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--grad); box-shadow: 0 0 16px rgba(139, 123, 255, 0.5); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.app .meter.warn span { background: #f5c97a; box-shadow: 0 0 16px rgba(245, 201, 122, 0.4); }
.app .meter.full span { background: #ff5b6e; box-shadow: 0 0 16px rgba(255, 91, 110, 0.5); }
.chart { aspect-ratio: 600 / 150; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .bar-rect { fill: var(--violet); }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart text { fill: var(--dim); font: 11px var(--font); }
.chart-empty { height: 100%; display: grid; place-items: center; padding: 0 16px; text-align: center; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 14px; }

.keyrow { display: flex; flex-wrap: wrap; gap: 8px; }
.keyrow { align-items: center; }
.keyrow input { flex: 1 1 260px; height: 50px; padding-top: 0; padding-bottom: 0; font-family: var(--mono); font-size: 14px; }
.keyrow .btn { height: 50px; padding: 0 22px; }
.regen { margin-top: 20px; font-size: 14.5px; }
.regen summary { cursor: pointer; color: var(--muted); }
.regen summary:hover { color: var(--text); }
.regen p { margin: 12px 0; color: var(--muted); }

.try-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
.samples { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 6px; margin: 0 0 16px; font-size: 14px; }
.samples .muted { grid-column: 1 / -1; margin: 0 0 2px; }
.samples .chip { width: 100%; padding: 0 4px; white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .samples { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chip { height: 30px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 550; color: var(--muted); background: var(--glass); border: 1px solid var(--line); transition: all 0.15s; }
.chip:hover { color: var(--text); border-color: var(--violet); background: rgba(139, 123, 255, 0.12); }
.manage-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- panelde plan kartları (pages.js planCard) ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch; }
.app .plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); border-radius: 18px; transition: border-color 0.2s; }
.app .plan:hover { border-color: var(--line-2); }
.app .plan.is-current { border-color: rgba(139, 123, 255, 0.7); box-shadow: 0 0 0 1px rgba(139, 123, 255, 0.3), 0 20px 50px -20px rgba(139, 123, 255, 0.45); }
.app .plan.is-featured { background: linear-gradient(180deg, rgba(139, 123, 255, 0.2), rgba(139, 123, 255, 0.04)); border-color: rgba(139, 123, 255, 0.5); }
.plan-tag { position: absolute; top: -11px; left: 20px; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 650; color: #07080c; background: var(--grad); }
.plan-name { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.plan-blurb { margin: 0 0 18px; min-height: 3.2em; font-size: 14px; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 6px; }
.plan-price .amount { font-size: 44px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.plan-price .per { font-size: 14px; color: var(--muted); }
.plan-quota { margin: 0 0 2px; font-weight: 600; }
.plan-sub { margin: 0 0 18px; font-size: 13px; color: var(--dim); }
.plan-list { display: grid; gap: 10px; margin: 0 0 22px; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: #cfd3e2; }
.plan-list li { position: relative; padding-left: 26px; }
.plan-list li::before { content: ""; position: absolute; left: 5px; top: 0.3em; width: 6px; height: 11px; border: solid var(--mint); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.app .plan .btn { width: 100%; margin-top: auto; }

@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) {
  .auth-card { padding: 30px 22px; }
  .dash { padding: 24px 16px 60px; }
  .panel { padding: 20px 18px; }
  .who { display: none; }
}

/* ---------- panel: PDF oluştur ---------- */
.try-left { min-width: 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 30px; margin-bottom: 8px; }
.code-label { margin: 0; font-size: 14px; font-weight: 600; color: #d4d8e6; }
.code-tools { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--mint); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn.dim { color: var(--muted); font-weight: 500; }
.linkbtn.dim:hover { color: var(--text); }
.app .try-left textarea { display: block; width: 100%; height: 300px; min-height: 0; resize: none; white-space: pre; overflow: auto; }
.app .try-left textarea, .pdf-pages { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }

.drop {
  display: flex; align-items: center; gap: 14px; height: 68px; margin: 12px 0 14px; padding: 0 18px; cursor: pointer;
  border: 1.5px dashed rgba(139, 123, 255, 0.45); border-radius: 14px; background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background 0.2s;
}
.drop > * { pointer-events: none; }
.drop:hover, .drop:focus-visible { border-color: var(--violet); background: rgba(139, 123, 255, 0.08); }
.drop.over { border-color: var(--mint); border-style: solid; background: rgba(53, 224, 181, 0.08); }
.drop.has-file { border-style: solid; border-color: rgba(53, 224, 181, 0.35); background: rgba(53, 224, 181, 0.06); }
.drop-ico { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--violet); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop.over .drop-ico, .drop.has-file .drop-ico { stroke: var(--mint); }
.drop-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.drop .drop-title { margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop .drop-sub { margin: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ayarlar: 2 sütunlu sabit ızgara. Düğme kendi sütununda sabit genişlikte olduğu için
   "Oluşturuluyor..." yazısına dönse de yeri ve boyutu değişmez (aşağı kayma olmaz). */
.try-actions { display: grid; grid-template-columns: minmax(0, 1fr) 172px; align-items: center; gap: 12px 16px; margin: 4px 0 12px; }
.try-actions label { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; }
.try-actions label > span { white-space: nowrap; }
.try-actions label:nth-child(1) > span, .try-actions label:nth-child(3) > span { min-width: 160px; }
.try-actions #opt-format, .try-actions #opt-margin { width: 104px; }
.try-actions input[type="checkbox"] { flex: none; }
.try-actions label.wide input { flex: 1 1 auto; width: 100%; min-width: 0; }
.try-actions #gen-btn { width: 172px; height: 44px; margin: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
@media (max-width: 420px) {
  .try-actions { grid-template-columns: minmax(0, 1fr); }
  .try-actions #gen-btn { width: 100%; }
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; min-width: 0; }

.preview { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.preview .hint { margin: 0; }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.pv-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); }
.pv-tab { height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.pv-tab[aria-selected="true"] { background: #fff; color: #07080c; }
.pv-tab:disabled { opacity: 0.4; cursor: not-allowed; }
.pv-box { position: relative; height: 620px; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); }
.pv-box .preview-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--dim); }
/* Taslak: kâğıt genişliğinde çizilip kutuya sığacak şekilde küçültülür (PDF'e daha yakın görünür) */
.dpage-wrap { position: relative; flex: none; margin: 0 auto; }
.dpage { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #fff; border-radius: 2px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.dclip { position: absolute; overflow: hidden; }
.dclip iframe { position: absolute; border: 0; background: #fff; pointer-events: none; }
.pdf-pages { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; padding: 12px; overflow: auto; }
.pv-box > #pdf-fallback { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.pdf-page { margin: 0; }
.pdf-page canvas { display: block; max-width: 100%; border-radius: 6px; background: #fff; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pdf-page figcaption { margin-top: 6px; font-size: 12px; text-align: center; color: var(--dim); }
@media (max-width: 900px) { .pv-box { height: 520px; } }

/* Boş kutu uyarısı (PDF sekmesinin altında) */
.app .hint.warn { color: #f5c26b; }
.app .hint.warn[hidden] { display: none; }
