:root {
  --bg: #0b1220;
  --panel: #111a2c;
  --panel-2: #172238;
  --line: #22304a;
  --text: #e8eef8;
  --muted: #8a99b4;
  --green: #10b981;
  --green-ink: #042f2e;
  --red: #f87171;
  --blue: #38bdf8;
  --blue-btn: #0284c7;
  --yellow: #facc15;
  --danger: #dc2626;
  --radius: 14px;
  --nav-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--blue); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; margin: 0; }
.c-red { color: var(--red); }
.c-green { color: #34d399; }
.c-blue { color: var(--blue); }
.c-neg { color: var(--red) !important; }

.logo { font-weight: 800; font-size: 20px; color: var(--text); }
.logo span { color: var(--green); }
.logo.big { font-size: 28px; text-align: center; }

/* Form öğeleri */
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
input, select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  min-height: 44px;
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: transparent; }
label, input, select { min-width: 0; }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  font: 600 14px/1 inherit; font-family: inherit;
  color: var(--text); background: var(--panel-2);
  cursor: pointer; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--green); color: var(--green-ink); }
.btn.blue { background: var(--blue-btn); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { color: var(--red); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.file-btn { position: relative; }

/* Yerleşim */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row > input, .row > select { flex: 1; min-width: 0; }
.row.wrap > select { flex-basis: 100%; }
.row.wrap > .btn { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.empty { text-align: center; color: var(--muted); padding: 28px 14px; }

/* Splash & auth */
.splash { position: fixed; inset: 0; display: grid; place-items: center; }
.auth { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 22px;
}
.auth-card p { margin: 4px 0 18px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tab { background: none; border: 0; color: var(--muted); font: 600 14px inherit; font-family: inherit; padding: 10px; border-radius: 8px; cursor: pointer; }
.tab.active { background: var(--panel-2); color: var(--text); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.error { color: var(--red); min-height: 20px; margin: 12px 0 0; font-size: 13.5px; text-align: center; }

/* Kabuk: mobilde alt menü */
.shell { min-height: 100%; }
.sidebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--panel); border-top: 1px solid var(--line);
}
.sidebar .logo, .sidebar .side-sub { display: none; }
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; color: var(--muted); font: 600 12px inherit; font-family: inherit; cursor: pointer;
}
.nav-btn span { font-size: 20px; }
.nav-btn.active { color: var(--green); }

.content {
  padding: 16px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  padding-top: calc(16px + env(safe-area-inset-top));
  max-width: 1100px; margin: 0 auto;
}
.view-head { margin-bottom: 14px; }

/* İstatistik kartları */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat small { display: block; color: var(--muted); }
.stat strong { display: block; font-size: 20px; margin-top: 4px; font-variant-numeric: tabular-nums; }

.stats-6 { grid-template-columns: 1fr 1fr; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); margin-left: 4px; vertical-align: middle; }
.badge.admin { color: var(--green); border-color: var(--green); }

/* Formlar */
.grid-3, .grid-add, .grid-inv { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-3 .btn { grid-column: 1 / -1; }
.grid-add .btn, .grid-inv .btn { grid-column: 1 / -1; }
.span-all, .span-2 { grid-column: 1 / -1; }
.grid-add h2, .grid-inv h2 { margin: 0; }

/* Listeler */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  background: var(--panel-2); border-radius: 10px; padding: 10px 12px;
}
.item .title { font-weight: 600; }
.item .meta { grid-column: 1 / 2; font-size: 12.5px; color: var(--muted); }
.item .meta.warn { color: var(--yellow); }
.item .price { font-weight: 700; color: var(--yellow); font-variant-numeric: tabular-nums; text-align: right; }
.item .price.green { color: var(--green); }
.item .actions { grid-column: 2; grid-row: 2; display: flex; gap: 6px; justify-content: flex-end; }
.search { max-width: 180px; min-height: 38px; padding: 8px 10px; }

/* Dialog */
dialog {
  width: min(92vw, 420px);
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
}
dialog::backdrop { background: rgb(0 0 0 / .6); }
dialog h2 { color: var(--text); font-size: 17px; }

/* Bildirim */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--red); color: #fff; }


/* ---- v2: stok, yarı mamul, satışlar ---- */
.grid-new, .grid-price, .grid-produce, .grid-adisyo, .grid-2 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-new .btn, .grid-price .btn, .grid-produce .btn { grid-column: 1 / -1; }
.grid-price .span-wide, .grid-new .span-2 { grid-column: 1 / -1; }
.grid-produce h2, .grid-produce p { margin: 0; }
.grid-adisyo .span-all { grid-column: 1 / -1; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.check input { width: 20px; min-width: 20px; flex: none; min-height: 20px; height: 20px; accent-color: var(--green); }
.warn-card { border-color: #a16207; background: #2a2008; color: #fde68a; font-size: 14px; }
.item.low { box-shadow: inset 3px 0 0 var(--red); }
.item .price.neg { color: var(--red); }
.badge.err { color: var(--red); border-color: var(--red); }
.nav-btn { position: relative; }
.dot { position: absolute; top: 9px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.map-actions { flex-wrap: wrap; }
.map-actions select { min-height: 32px; padding: 4px 8px; font-size: 13px; width: auto; max-width: 180px; }
.unit-label { color: var(--muted); font-size: 11px; }
.nav-btn b { font-size: 11px; }

/* ---- v3: depolar, fişler, raporlar ---- */
.stat em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.note-line { margin: -4px 0 10px; }
.note-line a { color: var(--blue); }
.head-select { width: auto; min-height: 38px; padding: 6px 10px; max-width: 220px; }
.view-head.row.wrap h1 { flex: 1 1 auto; }
.full { flex-basis: 100%; margin: 4px 0 0; }
.add-wh { margin-top: 10px; }
.small-empty { padding: 12px; }
.grid-cost { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; margin-top: 10px; }
.grid-cost label:first-child, .grid-cost .btn { grid-column: 1 / -1; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
  font: 600 13.5px inherit; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.seg button.active { background: var(--panel-2); color: var(--text); border-color: var(--green); }

.grid-doc { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-doc .doc-note { grid-column: 1 / -1; }
.doc-lines { display: flex; flex-direction: column; gap: 8px; }
.doc-line {
  display: grid; grid-template-columns: 1fr 110px auto; gap: 6px 8px; align-items: center;
  background: var(--panel-2); border-radius: 10px; padding: 8px;
}
.doc-line select, .doc-line input { min-height: 40px; padding: 8px 10px; }
.doc-line .dl-hint { grid-column: 1 / -1; grid-row: 2; }
.doc-line .dl-del { grid-column: 3; grid-row: 1; }
.doc-total { font-variant-numeric: tabular-nums; }
.item.cancelled { opacity: .55; }
.item.cancelled .title { text-decoration: line-through; text-decoration-color: var(--muted); }

.grid-period { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-period .btn { grid-column: 1 / -1; }
input[type="date"] { color-scheme: dark; }
.rep-note { margin: -6px 2px 14px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; white-space: nowrap; }
.tbl td.empty { text-align: center; padding: 22px 8px; }
.tbl tr.muted td { color: var(--muted); }
.tbl tbody tr:hover td { background: rgb(255 255 255 / .02); }
dialog.wide { width: min(96vw, 820px); }

/* ---- Katlanır bölümler ---- */
.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: 15px; color: var(--text); min-height: 32px; user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary small { font-weight: 400; font-size: 12px; }
.fold > summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold[open] > summary { margin-bottom: 12px; }
.excel-row { margin-top: 12px; }
.nav-more, .fab { display: none; }

/* Seçenek sayfası */
.sheet-title { margin: 0 0 12px; }
.sheet-body { display: flex; flex-direction: column; gap: 6px; }
.sheet-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 8px 14px;
  background: var(--panel-2); border: 0; border-radius: 12px; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.sheet-btn:active { background: #22324f; }
.sheet-btn .si { font-size: 20px; width: 26px; text-align: center; flex: none; }
.sheet-btn .st { display: flex; flex-direction: column; min-width: 0; }
.sheet-btn b { font-weight: 600; font-size: 15px; }
.sheet-btn small { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.sheet-btn.danger b { color: var(--red); }
.sheet-cancel { width: 100%; margin-top: 10px; }

/* ---- v4: yetkiler, fatura, cari, sipariş, gruplar, yazdırma ---- */
.no-money .need-money, .no-purchase .need-purchase, .no-recipe .need-recipe, .no-docs .need-docs,
.no-cancel .need-cancel, .no-settings .need-settings, .no-reports .need-reports, .no-members .need-members { display: none !important; }

.grid-semi { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-semi .btn { grid-column: 1 / -1; }
.grid-invh, .grid-sup, .grid-pay { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.grid-sup .btn, .grid-pay .btn, .grid-sup .span-all { grid-column: 1 / -1; }
.inv-lines { display: flex; flex-direction: column; gap: 8px; }
.inv-head { display: none; }
.inv-line {
  display: grid; gap: 6px 8px; align-items: center; background: var(--panel-2); border-radius: 10px; padding: 8px;
  grid-template-columns: 1fr 1fr 1fr auto;
}
.inv-line input, .inv-line select { min-height: 40px; padding: 8px 10px; }
.inv-line .il-name { grid-column: 1 / -1; grid-row: 1; }
.inv-line .il-kw { grid-column: 1 / 3; grid-row: 2; }
.inv-line .il-vat { grid-column: 3 / 5; grid-row: 2; }
.inv-line .il-count { grid-column: 1; grid-row: 3; }
.inv-line .il-price { grid-column: 2; grid-row: 3; }
.inv-line .il-disc { grid-column: 3; grid-row: 3; }
.inv-line .il-del { grid-column: 4; grid-row: 3; }
.inv-line .il-hint { grid-column: 1 / -1; grid-row: 4; }
.inv-line .il-del { min-height: 40px; }
.grid-invt { display: grid; gap: 10px; grid-template-columns: 1fr; align-items: start; }
.grid-invt .row > input { flex: 1; }
.mini-select { width: auto; min-height: 40px; padding: 6px 8px; }
.inv-totals { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.inv-totals div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.inv-totals span { color: var(--muted); }
.inv-totals .grand { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-size: 16px; }
.inv-totals .grand b { color: var(--green); }
.banner { background: #0c2a3a; border: 1px solid var(--blue-btn); color: #bae6fd; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-list { margin: 10px 0; }
.order-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; align-items: end; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.order-row .check, .order-row > span { grid-column: 1 / -1; }
.order-row input:not([type=checkbox]) { min-height: 38px; padding: 6px 10px; }
.group-head { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 2px 2px; }
.doc-actions .btn { flex: 0 0 auto; }
.stock-at-head { margin: 12px 0 8px; }

/* Yazdırma */
.print-area { display: none; }
@media print {
  @page { margin: 12mm; }
  body.printing { background: #fff !important; color: #000 !important; }
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing .print-area { display: block !important; color: #000; background: #fff; font: 10.5pt/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  .print-area .pr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; font-size: 12pt; }
  .print-area .pr-date { font-size: 9pt; color: #444; }
  .print-area .pr-meta { margin: 6px 0 10px; }
  .print-area h3 { font-size: 11.5pt; margin: 14px 0 4px; }
  .print-area table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; page-break-inside: auto; }
  .print-area tr { page-break-inside: avoid; }
  .print-area th, .print-area td { border-bottom: 1px solid #bbb; padding: 4px 6px; text-align: left; color: #000 !important; background: none !important; vertical-align: top; }
  .print-area th { border-bottom: 1.5px solid #000; font-weight: 700; }
  .print-area .n { text-align: right; white-space: nowrap; }
  .print-area .muted, .print-area .tiny { color: #555 !important; font-size: 8.5pt; }
  .print-area .pr-blank { display: inline-block; width: 70px; border-bottom: 1px solid #000; height: 12px; }
  .print-area .pr-total { text-align: right; margin: 6px 0 0; }
  .print-area .pr-sign { display: flex; justify-content: space-between; margin-top: 48px; }
  .print-area .pr-sign div { width: 40%; border-top: 1px solid #000; padding-top: 4px; text-align: center; }
  .print-area .pr-foot { margin-top: 18px; font-size: 8pt; color: #777; text-align: right; }
}

/* ---- Logo ---- */
.brand-mark { display: block; width: 32px; height: 32px; flex: none; }
.brand-mark.xl { width: 76px; height: 76px; filter: drop-shadow(0 10px 24px rgb(16 185 129 / .28)); }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: brand-in .5s ease-out both; }
.splash-in .logo { font-size: 22px; }
.auth-mark { margin: 0 auto 12px; }
@keyframes brand-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.side-logo { display: flex; align-items: center; gap: 10px; }
.side-logo .brand-mark { width: 30px; height: 30px; }
.side-logo .side-word { color: var(--text); white-space: nowrap; font-size: 18px; letter-spacing: -.01em; }
.side-logo .side-word span { color: var(--green); }
.head-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-brand .brand-mark { width: 36px; height: 36px; filter: drop-shadow(0 3px 8px rgb(16 185 129 / .3)); }
.hb-text { display: flex; flex-direction: column; min-width: 0; }
.hb-name { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.hb-name span { color: var(--green); }
.hb-text h1 { line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .head-brand .brand-mark, .hb-name { display: none; }
  .sidebar .side-logo { display: flex; }
}

/* ================= Mobil ================= */
@media (max-width: 899px) {
  /* iPhone'da yazı kutusuna dokununca ekran büyümesin */
  input, select, textarea { font-size: 16px; }

  /* Alt menü: 5 sekme + Menü */
  .nav-desk { display: none !important; }
  .nav-more { display: flex; }
  .nav-btn span { font-size: 20px; }
  .nav-btn b { font-size: 11px; }
  .dot { right: calc(50% - 18px); top: 8px; }

  /* Üstte sabit başlık */
  .content { padding-top: 0; padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
  .view-head {
    position: sticky; top: 0; z-index: 6; background: var(--bg);
    margin: 0 -14px 12px; padding: calc(12px + env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--line);
  }
  h1 { font-size: 20px; }
  .card { padding: 14px 12px; }

  .view-head.row.wrap { row-gap: 8px; }
  .view-head.row.wrap > .head-brand { flex-basis: 100%; }
  .view-head.row.wrap > .head-select { flex: 1 1 40%; max-width: none; min-height: 40px; }
  .view-head .head-select[hidden] { display: none; }

  /* Hızlı işlem düğmesi */
  .fab {
    display: grid; place-items: center; position: fixed; z-index: 9;
    right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
    width: 58px; height: 58px; border-radius: 50%; border: 0;
    background: var(--green); color: var(--green-ink); font-size: 30px; font-weight: 700; line-height: 1;
    box-shadow: 0 8px 22px rgb(0 0 0 / .5); cursor: pointer;
  }
  .fab[hidden] { display: none; }
  .fab:active { transform: scale(.95); }
  .toast { bottom: calc(var(--nav-h) + 86px + env(safe-area-inset-bottom)); }

  /* Liste satırları */
  .item { padding: 11px 12px; }
  .item .meta { grid-column: 1 / -1; }
  .item .actions { grid-column: 1 / -1; grid-row: auto; flex-wrap: wrap; }
  .item .price { min-width: 0; overflow-wrap: anywhere; }
  .item:has(> .actions > :only-child) .meta { grid-column: 1; }
  .item .actions:has(> :only-child) { grid-column: 2; grid-row: 2; }
  /* Dokun → seçenekler */
  .tap-sheet .item { cursor: pointer; position: relative; padding-right: 30px; }
  .tap-sheet .item::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 24px; line-height: 1; }
  .tap-sheet .item .actions { display: none; }
  .tap-sheet .item .meta, .tap-sheet .item:has(> .actions) .meta { grid-column: 1 / -1; }
  .tap-sheet .item:active { background: #1d2a44; }

  /* Pencereler alttan açılır */
  dialog, dialog.wide {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0;
    border-bottom: 0; max-height: 92dvh; overflow-y: auto;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  }
  dialog::before { content: ""; display: block; width: 42px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
  dialog[open] { animation: sheet-up .22s ease-out; }
  dialog .row.end { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--panel); padding: 10px 0 4px; margin-top: 4px; }
  dialog .row.end .btn { flex: 1; }

  /* Segmentler */
  #docTypeSeg { display: grid; grid-template-columns: 1fr 1fr; }
  #periodSeg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  #periodSeg::-webkit-scrollbar { display: none; }
  #periodSeg button { flex: 0 0 auto; }

  /* Fiş satırları: kalem tam genişlik, altında miktar */
  .doc-line { grid-template-columns: 1fr auto; }
  .doc-line .dl-item { grid-column: 1 / -1; grid-row: 1; }
  .doc-line .dl-qty { grid-column: 1; grid-row: 2; }
  .doc-line .dl-del { grid-column: 2; grid-row: 2; min-height: 40px; width: 44px; }
  .doc-line .dl-hint { grid-column: 1 / -1; grid-row: 3; }
  #docForm > [type="submit"] {
    position: sticky; z-index: 4; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 6px var(--panel), 0 -10px 20px var(--panel);
  }

  /* Tablolar kart olarak */
  .table-wrap { margin: 0; overflow: visible; }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr { display: block; width: 100%; }
  .tbl.cards tr { background: var(--panel-2); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
  .tbl.cards td { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; column-gap: 4px; border: 0; padding: 3px 0; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; margin-right: auto; padding-right: 12px; }
  .tbl.cards td br { display: none; }
  .tbl.cards td:first-child { display: block; text-align: left; font-weight: 600; padding-bottom: 6px; }
  .tbl.cards td:first-child::before, .tbl.cards td.empty::before { content: none; }
  .tbl.cards td.empty { display: block; text-align: center; }
  .tbl.cards td:empty { display: none; }
  .tbl.cards tbody tr:hover td { background: none; }
}
@keyframes sheet-up { from { transform: translateY(48px); opacity: .5; } to { transform: none; opacity: 1; } }

/* Masaüstü: sol menü */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 230px 1fr; }
  .sidebar {
    position: sticky; top: 0; height: 100vh; padding: 24px 14px;
    display: flex; flex-direction: column; gap: 6px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
  .sidebar .side-sub { display: block; padding: 0 8px; margin: 2px 0 20px; }
  .nav-btn { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px; border-radius: 10px; font-size: 14px; }
  .nav-btn span { font-size: 17px; }
  .nav-btn.active { background: var(--green); color: var(--green-ink); }
  .content { padding: 28px 28px 40px; }
  .row.wrap > select { flex-basis: auto; }
  .row.wrap > .btn { flex: 0 0 auto; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats-6 { grid-template-columns: repeat(6, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr auto; }
  .grid-3 .btn { grid-column: auto; }
  .grid-add { grid-template-columns: 2fr 2fr 1fr 1fr 1fr auto; }
  .grid-add .span-2 { grid-column: auto; }
  .grid-add .btn { grid-column: auto; }
  .grid-inv { grid-template-columns: 3fr 1.3fr 1.3fr auto; }
  .grid-inv .span-2 { grid-column: auto; }
  .grid-inv .btn { grid-column: auto; }
  .item { grid-template-columns: 1fr auto auto; }
  .item .meta { grid-column: 1; }
  .item .price { grid-row: 1 / 3; grid-column: 2; }
  .item .actions { grid-row: 1 / 3; grid-column: 3; }
  .toast { bottom: 24px; }
  .nav-btn b { font-size: 14px; }
  .dot { top: 50%; right: 12px; transform: translateY(-50%); }
  .grid-new { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
  .grid-new .span-2, .grid-new .btn { grid-column: auto; }
  .grid-price { grid-template-columns: 1fr 1fr 2fr auto; }
  .grid-price .span-wide, .grid-price .btn { grid-column: auto; }
  #semiForm.grid-price { grid-template-columns: 1fr 1fr 1fr auto; }
  .grid-produce { grid-template-columns: 1fr auto; }
  .grid-produce .btn { grid-column: auto; }
  .grid-inv { grid-template-columns: 3fr 1.3fr 1.2fr 1fr auto; }
  .grid-add { grid-template-columns: 1.6fr 1.6fr 1.6fr 1fr 0.9fr 0.8fr auto; }
  .grid-inv { grid-template-columns: 3fr 1.2fr 1.1fr 0.9fr 1.3fr auto; }
  .grid-price { grid-template-columns: 1fr 1fr 1.6fr 1.4fr auto; }
  .grid-produce { grid-template-columns: 1fr 1fr auto; }
  .grid-cost { grid-template-columns: 2fr 1fr 1fr auto; }
  .grid-cost label:first-child, .grid-cost .btn { grid-column: auto; }
  .grid-doc { grid-template-columns: 1fr 1fr 2fr; }
  .grid-doc .doc-note { grid-column: auto; }
  .doc-line { grid-template-columns: 2fr 130px 1.4fr auto; }
  .doc-line .dl-hint { grid-column: 3; grid-row: 1; }
  .doc-line .dl-del { grid-column: 4; }
  .grid-period { grid-template-columns: 1fr 1fr auto; }
  .grid-period .btn { grid-column: auto; }
  .item .actions { flex-wrap: wrap; max-width: 380px; }
  .grid-semi { grid-template-columns: 1fr 0.8fr 1fr 1fr 1.2fr auto; }
  .grid-semi .btn { grid-column: auto; }
  .grid-invh { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1.4fr; }
  .grid-sup { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .grid-sup .span-all { grid-column: 1 / 4; }
  .grid-sup .btn { grid-column: auto; }
  .grid-pay { grid-template-columns: 1fr 1fr 1fr 1.5fr auto; }
  .grid-pay .btn { grid-column: auto; }
  .inv-line { grid-template-columns: 2.6fr 1fr 0.7fr 1.1fr 0.7fr 0.9fr 40px; }
  .inv-head { display: grid; grid-template-columns: 2.6fr 1fr 0.7fr 1.1fr 0.7fr 0.9fr 40px; gap: 8px; padding: 0 8px; margin-bottom: -2px; font-size: 12px; color: var(--muted); }
  .inv-line > * { grid-column: auto !important; grid-row: 1 !important; }
  .inv-line .il-hint { grid-column: 1 / -1 !important; grid-row: 2 !important; }
  .grid-invt { grid-template-columns: 1fr 1fr; }
  .order-row { grid-template-columns: 2fr 120px 140px; }
  .order-row > span { grid-column: 1; grid-row: 2; }
  .order-row .check { grid-column: 1; grid-row: 1; }
  .order-row > label:nth-of-type(2) { grid-column: 2; grid-row: 1 / 3; }
  .order-row > label:nth-of-type(3) { grid-column: 3; grid-row: 1 / 3; }
}

/* =================== Uygulamayı yükle =================== */
@property --ins-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.install-chip {
  margin: 16px auto 0; display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center;
  padding: 11px 14px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
              linear-gradient(120deg, #10b98199, #38bdf855, #10b98199) border-box;
  border: 1px solid transparent; transition: transform .2s, box-shadow .2s;
}
.install-chip:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px #10b981aa; }
.install-chip img { border-radius: 6px; }
.install-chip span { font-weight: 600; }
.install-chip em { font-style: normal; font-size: 11px; font-weight: 700; color: #6ee7b7; background: #10b9811f; padding: 2px 7px; border-radius: 99px; }

.install-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: radial-gradient(120% 140% at 0% 0%, #10b98117, transparent 60%), var(--panel); }
.install-card img { border-radius: 13px; box-shadow: 0 6px 18px -6px #10b98188; flex: none; }
.install-card h2 { margin: 0 0 2px; color: var(--text); }
.install-card p { margin: 0; }

/* Pencere */
#installDialog {
  width: min(94vw, 980px); max-width: none; max-height: none; padding: 0; margin: auto;
  background: transparent; border: 0; border-radius: 0; overflow: visible; color: var(--text);
}
#installDialog::before { content: none; }
#installDialog[open] { animation: none; }
#installDialog::backdrop {
  background: radial-gradient(80% 70% at 50% 40%, #0b2a2455, #020610dd);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  animation: ins-fade .45s ease both;
}
.ins-card {
  position: relative; display: grid; grid-template-columns: 1.08fr 1fr; min-height: 540px;
  border-radius: 30px; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(90% 80% at 0% 0%, #0f2f2a 0%, transparent 60%),
    radial-gradient(70% 60% at 100% 100%, #0c2440 0%, transparent 65%),
    linear-gradient(160deg, #0e1729, #0a1120 70%);
  box-shadow: 0 50px 120px -30px #000c, 0 0 0 1px #ffffff0d inset, 0 0 80px -20px #10b98140;
  animation: ins-pop .7s cubic-bezier(.2, .9, .25, 1.12) both;
}
/* Dönen ışıklı kenar */
.ins-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 3; pointer-events: none;
  background: conic-gradient(from var(--ins-a), transparent 0 55%, #10b981 70%, #6ee7b7 76%, #38bdf8 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ins-spin 6s linear infinite;
}
/* İnce grenli doku */
.ins-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: radial-gradient(#ffffff0b 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask: radial-gradient(100% 80% at 30% 40%, #000, transparent 75%); mask: radial-gradient(100% 80% at 30% 40%, #000, transparent 75%);
}
.ins-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ins-aurora i { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; }
.ins-aurora i:nth-child(1) { background: #10b981; left: -8%; top: -14%; animation: ins-drift1 14s ease-in-out infinite; }
.ins-aurora i:nth-child(2) { background: #0ea5e9; left: 30%; bottom: -30%; opacity: .32; animation: ins-drift2 17s ease-in-out infinite; }
.ins-aurora i:nth-child(3) { background: #14b8a6; right: -12%; top: 10%; opacity: .25; animation: ins-drift1 20s ease-in-out infinite reverse; }

.ins-x {
  position: absolute; top: 16px; right: 16px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #cbd5e1;
  background: #ffffff0f; border: 1px solid #ffffff1a; backdrop-filter: blur(8px); transition: background .2s, transform .3s;
}
.ins-x:hover { background: #ffffff1f; transform: rotate(90deg); }
.ins-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Sahne: tarayıcı + telefon + simge */
.ins-stage { position: relative; perspective: 1400px; overflow: hidden; }
.ins-glow { position: absolute; left: 50%; top: 52%; width: 70%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, #10b98155, transparent 65%); filter: blur(10px); animation: ins-breathe 5s ease-in-out infinite; }
.ins-browser {
  position: absolute; left: 7%; top: 15%; width: 82%; border-radius: 12px; overflow: hidden;
  background: #0b1220; border: 1px solid #ffffff1c;
  box-shadow: 0 30px 60px -20px #000d, 0 0 0 1px #000 inset;
  transform: rotateY(16deg) rotateX(8deg) rotateZ(-2deg); transform-origin: left center;
  animation: ins-browser-in 1s .15s cubic-bezier(.2, .8, .2, 1) both, ins-float 7s 1.2s ease-in-out infinite;
}
.ins-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #131d31; border-bottom: 1px solid #ffffff10; }
.ins-bar span { width: 8px; height: 8px; border-radius: 50%; background: #f87171; }
.ins-bar span:nth-child(2) { background: #facc15; } .ins-bar span:nth-child(3) { background: #34d399; }
.ins-bar em { margin-left: 10px; flex: 1; font-style: normal; font-size: 10px; color: #8a99b4; background: #0b1220; border-radius: 6px; padding: 2px 8px; max-width: 60%; }
.ins-browser img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.ins-phone {
  position: absolute; right: 8%; bottom: 9%; width: 30%; aspect-ratio: 9 / 16; border-radius: 26px; padding: 5px;
  background: linear-gradient(145deg, #3a4660, #121a2b 40%, #2a3550); overflow: hidden;
  box-shadow: 0 40px 70px -18px #000e, 0 0 0 1px #ffffff22 inset, -20px 10px 60px -20px #10b98166;
  transform: rotateY(-14deg) rotateX(6deg) rotateZ(3deg);
  animation: ins-phone-in 1.05s .35s cubic-bezier(.2, .8, .2, 1.1) both, ins-float 6s 1.4s ease-in-out infinite reverse;
}
.ins-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 21px; background: #0b1220; }
.ins-notch { position: absolute; top: 11px; left: 50%; translate: -50% 0; width: 30%; height: 9px; border-radius: 99px; background: #000; z-index: 2; }
.ins-reflect { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, #ffffff26 42%, transparent 52%); background-size: 250% 100%; animation: ins-sweep 5.5s 1.8s ease-in-out infinite; }
.ins-icon {
  position: absolute; left: 9%; bottom: 10%; width: 104px; aspect-ratio: 1; border-radius: 25px; overflow: hidden; z-index: 2;
  box-shadow: 0 22px 44px -12px #000c, 0 0 0 1px #ffffff26 inset, 0 0 50px -6px #10b981aa;
  animation: ins-icon-in .9s .6s cubic-bezier(.3, 1.6, .5, 1) both, ins-bob 4.5s 1.6s ease-in-out infinite;
}
.ins-icon img { width: 100%; height: 100%; display: block; }
.ins-shine { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, #ffffff70 50%, transparent 65%); translate: -120% 0; animation: ins-shine 4.5s 1.6s ease-in-out infinite; }
.ins-rings { position: absolute; left: calc(9% + 52px); bottom: calc(10% + 52px); translate: -50% 50%; pointer-events: none; }
.ins-rings i { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px; border-radius: 30px; border: 1.5px solid #34d39999; opacity: 0; animation: ins-ring 3.6s 1.4s ease-out infinite; }
.ins-rings i:nth-child(2) { animation-delay: 2.6s; } .ins-rings i:nth-child(3) { animation-delay: 3.8s; }
.ins-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #a7f3d0; box-shadow: 0 0 10px 2px #34d399; animation: ins-twinkle 3s ease-in-out infinite; }
.ins-spark.s1 { left: 18%; top: 9%; } .ins-spark.s2 { left: 64%; top: 7%; animation-delay: .8s; width: 4px; height: 4px; }
.ins-spark.s3 { right: 5%; top: 42%; animation-delay: 1.6s; } .ins-spark.s4 { left: 42%; bottom: 6%; animation-delay: 2.2s; width: 4px; height: 4px; background: #bae6fd; box-shadow: 0 0 10px 2px #38bdf8; }
.ins-spark.s5 { left: 4%; top: 48%; animation-delay: 1.1s; width: 3px; height: 3px; }

/* Metin tarafı */
.ins-body { position: relative; padding: 54px 48px 34px 20px; display: flex; flex-direction: column; justify-content: center; }
.ins-main { display: flex; flex-direction: column; }
.ins-eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0 0 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #a7f3d0;
  padding: 6px 12px; border-radius: 99px; background: #10b9811a; border: 1px solid #10b98140; animation: ins-up .6s .3s both; }
.ins-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 #34d399aa; animation: ins-pulse 2s infinite; }
.ins-title { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; color: #f8fafc; animation: ins-up .7s .38s both; }
.ins-title span { background: linear-gradient(100deg, #34d399, #6ee7b7 35%, #38bdf8 70%, #34d399); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: ins-grad 6s linear infinite; }
.ins-desc { margin: 0 0 22px; color: #a3b1c9; font-size: 15px; line-height: 1.55; max-width: 40ch; animation: ins-up .7s .46s both; }

.ins-feats { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.ins-feats li { display: flex; align-items: center; gap: 13px; animation: ins-up .6s calc(.55s + var(--i) * .09s) both; }
.ins-feats b { display: block; font-size: 14.5px; color: #f1f5f9; }
.ins-feats small { color: #8a99b4; font-size: 12.5px; }
.ins-fi { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #6ee7b7;
  background: linear-gradient(#10b98114, #10b98114) padding-box, linear-gradient(140deg, #34d39988, #38bdf833) border-box; border: 1px solid transparent; }
.ins-fi svg, .ins-si svg, .ins-cta-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ins-si svg circle { fill: currentColor; stroke: none; }

.ins-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 4px; counter-reset: s; }
.ins-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: #ffffff07; border: 1px solid #ffffff0d; animation: ins-up .55s calc(.5s + var(--i) * .1s) both; }
.ins-steps li + li::before { content: ""; position: absolute; left: 25px; top: -6px; width: 2px; height: 8px; background: #10b98166; }
.ins-sn { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--green-ink); background: linear-gradient(135deg, #6ee7b7, #10b981); box-shadow: 0 4px 12px -4px #10b981; }
.ins-si { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #7dd3fc; background: #38bdf814; }
.ins-st { font-size: 14px; color: #cbd5e1; line-height: 1.4; }
.ins-st b { color: #f8fafc; }
.ins-st small { color: #8a99b4; }

.ins-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; animation: ins-up .6s .8s both; }
.ins-cta {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 15px 26px; border: 0; border-radius: 16px; font: inherit; font-size: 16px; color: #022c22;
  background: linear-gradient(135deg, #6ee7b7 0%, #10b981 45%, #059669 100%);
  box-shadow: 0 14px 34px -10px #10b981cc, 0 0 0 1px #ffffff33 inset, 0 -3px 0 #04785766 inset;
  transition: transform .2s, box-shadow .25s;
}
.ins-cta b { font-weight: 800; letter-spacing: -.01em; }
.ins-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffffaa 48%, transparent 64%); translate: -130% 0; animation: ins-shine 3.4s 1.6s ease-in-out infinite; }
.ins-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -12px #10b981ee, 0 0 0 1px #ffffff44 inset, 0 -3px 0 #04785766 inset; }
.ins-cta:active { transform: translateY(0) scale(.98); }
.ins-cta-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #022c2218; }
.ins-later { padding: 14px 18px; border-radius: 14px; border: 1px solid #ffffff1a; background: #ffffff08; color: #cbd5e1; font: inherit; font-weight: 600; cursor: pointer; transition: background .2s; }
.ins-later:hover { background: #ffffff14; }
.ins-never { align-self: flex-start; margin-top: 14px; padding: 4px 0; background: none; border: 0; color: #64748b; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; animation: ins-up .6s .9s both; }
.ins-never:hover { color: #94a3b8; }

/* Başarı */
.ins-done { text-align: center; display: flex; flex-direction: column; align-items: center; animation: ins-up .5s both; }
.ins-check { width: 92px; height: 92px; margin-bottom: 18px; border-radius: 50%; background: radial-gradient(circle, #10b98133, transparent 70%); display: grid; place-items: center; animation: ins-icon-in .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.ins-check svg { width: 76px; height: 76px; fill: none; stroke: #34d399; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ins-check circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: ins-draw .7s .1s ease-out forwards; }
.ins-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: ins-draw .45s .65s ease-out forwards; }
.ins-done .ins-desc { margin-inline: auto; }

.ins-confetti { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; z-index: 10; }
.ins-confetti i { position: absolute; width: var(--w); height: calc(var(--w) * .45); background: var(--c); border-radius: 2px; animation: ins-confetti var(--d) cubic-bezier(.15, .7, .3, 1) forwards; }

/* Tarayıcı düğmesini gösteren ok */
.ins-pointer { position: fixed; z-index: 20; width: 44px; height: 66px; color: #6ee7b7; filter: drop-shadow(0 0 12px #10b981); pointer-events: none; animation: ins-point 1.3s ease-in-out infinite; }
.ins-pointer svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ins-pointer.bottom { bottom: 4px; left: calc(50% - 22px); }
.ins-pointer.bottom-right { bottom: 4px; right: 14px; }
.ins-pointer.top-right { top: 6px; right: 14px; rotate: 180deg; }

@keyframes ins-fade { from { opacity: 0; } }
@keyframes ins-pop { from { opacity: 0; transform: translateY(26px) scale(.94); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ins-spin { to { --ins-a: 360deg; } }
@keyframes ins-drift1 { 50% { transform: translate(18%, 12%) scale(1.15); } }
@keyframes ins-drift2 { 50% { transform: translate(-16%, -10%) scale(.9); } }
@keyframes ins-breathe { 50% { opacity: .6; transform: scale(1.08); } }
@keyframes ins-browser-in { from { opacity: 0; transform: rotateY(30deg) rotateX(14deg) translateX(-40px) scale(.9); } }
@keyframes ins-phone-in { from { opacity: 0; transform: rotateY(-30deg) rotateX(10deg) translate(50px, 40px) scale(.85); } }
@keyframes ins-icon-in { from { opacity: 0; transform: scale(.3) rotate(-14deg); } }
@keyframes ins-float { 50% { translate: 0 -10px; } }
@keyframes ins-bob { 50% { translate: 0 -7px; } }
@keyframes ins-sweep { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes ins-shine { 0%, 55% { translate: -130% 0; } 85%, 100% { translate: 130% 0; } }
@keyframes ins-ring { 0% { opacity: .9; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes ins-twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes ins-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes ins-pulse { 70% { box-shadow: 0 0 0 8px #34d39900; } 100% { box-shadow: 0 0 0 0 #34d39900; } }
@keyframes ins-grad { to { background-position: 200% center; } }
@keyframes ins-draw { to { stroke-dashoffset: 0; } }
@keyframes ins-confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  55% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 1.15), calc(var(--y) + 620px)) rotate(calc(var(--r) * 2)); opacity: 0; }
}
@keyframes ins-point { 50% { translate: 0 10px; } }
.ins-pointer.top-right { animation-name: ins-point-up; }
@keyframes ins-point-up { 50% { translate: 0 -10px; } }

/* Telefon: alttan açılan şık sayfa */
@media (max-width: 760px) {
  #installDialog { width: 100%; margin: auto 0 0; max-height: 100dvh; }
  #installDialog[data-pointer="bottom"], #installDialog[data-pointer="bottom-right"] { margin-bottom: 76px; }
  #installDialog[data-pointer="bottom"] .ins-card, #installDialog[data-pointer="bottom-right"] .ins-card { border-radius: 28px; margin: 0 8px; }
  .ins-card { grid-template-columns: 1fr; min-height: 0; border-radius: 28px 28px 0 0; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
    animation: ins-sheet .6s cubic-bezier(.2, .9, .25, 1.05) both; }
  .ins-card::before { padding: 1.2px; }
  .ins-stage { height: 168px; flex: none; }
  .ins-browser, .ins-phone { display: none; }
  .ins-glow { top: 58%; width: 280px; }
  .ins-icon { left: 50%; bottom: 24px; width: 92px; border-radius: 22px; margin-left: -46px; }
  .ins-rings { left: 50%; bottom: 70px; }
  .ins-rings i { width: 96px; height: 96px; margin: -48px; border-radius: 26px; }
  .ins-stage::before { content: ""; position: absolute; top: 10px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 2px; background: #ffffff2a; }
  .ins-x { top: 14px; right: 14px; width: 34px; height: 34px; }
  .ins-body { padding: 4px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
  .ins-eyebrow { align-self: center; margin-bottom: 12px; }
  .ins-title { font-size: 29px; }
  .ins-desc { margin-inline: auto; font-size: 14.5px; margin-bottom: 18px; }
  .ins-feats { text-align: left; gap: 10px; margin-bottom: 20px; }
  .ins-steps { text-align: left; margin-bottom: 18px; }
  .ins-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .ins-cta { justify-content: center; padding: 16px 22px; }
  .ins-later { padding: 12px; }
  .ins-never { align-self: center; margin-top: 8px; }
  .ins-confetti { top: 30%; }
}
@media (max-width: 760px) {
  #installDialog[data-pointer="bottom"] .ins-card, #installDialog[data-pointer="bottom-right"] .ins-card { max-height: calc(100dvh - 90px); }
  /* Adım adım anlatımda sahne küçülür, adımlar öne çıkar */
  .ins-guide .ins-stage { height: 112px; }
  .ins-guide .ins-icon { width: 68px; margin-left: -34px; bottom: 14px; border-radius: 17px; }
  .ins-guide .ins-rings { bottom: 48px; }
  .ins-guide .ins-rings i { width: 72px; height: 72px; margin: -36px; border-radius: 20px; }
  .ins-guide .ins-eyebrow { display: none; }
  .ins-guide .ins-title { font-size: 26px; margin-bottom: 8px; }
  .ins-guide .ins-desc { font-size: 13.5px; margin-bottom: 14px; }
  .ins-guide .ins-steps li { padding: 8px 10px; gap: 10px; }
  .ins-guide .ins-steps li + li::before { left: 22px; }
  .ins-guide .ins-sn { width: 24px; height: 24px; font-size: 12px; }
  .ins-guide .ins-si { width: 30px; height: 30px; }
  .ins-guide .ins-st { font-size: 13.5px; }
  .ins-guide .ins-cta { padding: 14px 20px; }
  .ins-guide .ins-later { padding: 10px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .ins-stage { height: 132px; }
  .ins-icon { width: 76px; margin-left: -38px; bottom: 18px; border-radius: 18px; }
  .ins-rings { bottom: 56px; }
  .ins-feats small { display: none; }
}
@keyframes ins-sheet { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  #installDialog *, #installDialog::backdrop, .ins-card::before { animation: none !important; transition: none !important; }
}

/* =================== v5: telefon uygulaması hissi =================== */
:root {
  --glass: rgb(16 24 42 / .74);
  --glass-line: rgb(255 255 255 / .08);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
}
/* Ortam ışığı */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 12% -6%, rgb(16 185 129 / .16), transparent 70%),
    radial-gradient(50% 32% at 105% 2%, rgb(56 189 248 / .10), transparent 70%),
    radial-gradient(70% 45% at 50% 112%, rgb(16 185 129 / .07), transparent 70%);
}

/* Simgeler */
.ni { display: grid; place-items: center; width: 28px; height: 26px; flex: none; }
.ni svg, .fab svg, .si-svg svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { user-select: none; -webkit-user-select: none; }
.nav-btn { z-index: 1; transition: color .25s; }
.nav-btn .ni { transition: transform .4s var(--spring); }
.nav-ind { position: absolute; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); transform: translate(var(--x, 0), var(--y, 0)); opacity: 0; pointer-events: none; z-index: 0; }
.nav-ind.ready { transition: transform .5s var(--spring), width .5s var(--spring), height .5s var(--spring), opacity .25s; }

/* Kartlar, düğmeler, alanlar */
.card, .stat {
  background: linear-gradient(180deg, rgb(255 255 255 / .03), rgb(255 255 255 / 0) 140px), var(--panel);
  border-color: rgb(255 255 255 / .07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 14px 30px -22px rgb(0 0 0 / .9);
}
.card { border-radius: 18px; }
.stat { border-radius: 16px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(110 231 183 / .5), transparent); }
.btn { transition: transform .18s var(--out), box-shadow .2s, filter .2s, background-color .2s; }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(180deg, #34d399, #10b981 55%, #0c9f6f); color: #022c22;
  box-shadow: 0 10px 22px -12px rgb(16 185 129 / .95), inset 0 1px 0 rgb(255 255 255 / .35);
}
.btn.blue { background: linear-gradient(180deg, #0ea5e9, #0284c7); box-shadow: 0 10px 22px -12px rgb(14 165 233 / .9), inset 0 1px 0 rgb(255 255 255 / .22); }
.btn.ghost { background: rgb(255 255 255 / .02); }
@media (hover: hover) { .btn.primary:hover, .btn.blue:hover { filter: brightness(1.07); } }
input, select { background: rgb(6 11 22 / .7); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { outline: none; border-color: #10b981; box-shadow: 0 0 0 3px rgb(16 185 129 / .22); }
.item { transition: transform .16s var(--out), background-color .2s; }

/* Ekranlar yumuşak açılır */
.view:not([hidden]) > * { animation: view-in .48s var(--out) both; }
.view:not([hidden]) > :nth-child(2) { animation-delay: .03s; }
.view:not([hidden]) > :nth-child(3) { animation-delay: .06s; }
.view:not([hidden]) > :nth-child(4) { animation-delay: .09s; }
.view:not([hidden]) > :nth-child(n+5) { animation-delay: .12s; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }

/* Seçenek sayfası: renkli simgeler */
.sheet-btn { transition: transform .15s var(--out), background-color .2s; animation: sheet-item .42s var(--out) both; animation-delay: calc(var(--i, 0) * 32ms + 70ms); }
.sheet-btn:active { transform: scale(.98); }
@keyframes sheet-item { from { opacity: 0; transform: translateY(10px); } }
.sheet-btn .si-svg {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent);
}
.sheet-btn .si-svg svg { width: 21px; height: 21px; }
dialog::backdrop { background: rgb(2 6 16 / .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* Bildirim: cam hap */
.toast {
  background: rgb(24 36 60 / .92); color: var(--text); border: 1px solid var(--glass-line); border-radius: 16px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -14px rgb(0 0 0 / .8); padding: 12px 18px;
  transition: opacity .25s, transform .45s var(--spring);
}
.toast.err { background: rgb(185 28 28 / .92); color: #fff; }

/* Giriş kartı */
.auth-card {
  border-radius: 24px; border-color: rgb(255 255 255 / .07);
  background: linear-gradient(180deg, rgb(255 255 255 / .035), transparent 180px), var(--panel);
  box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 rgb(255 255 255 / .05);
}

/* ---------- Telefon ---------- */
@media (max-width: 899px) {
  :root { --nav-h: 66px; }
  /* Yüzen cam sekme çubuğu */
  .sidebar {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--nav-h); padding: 6px; border-radius: 26px;
    background: var(--glass); border: 1px solid var(--glass-line); border-top-color: rgb(255 255 255 / .13);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 20px 44px -14px rgb(0 0 0 / .75), inset 0 1px 0 rgb(255 255 255 / .05);
  }
  .nav-btn { gap: 2px; color: #7f8fab; border-radius: 20px; }
  .nav-btn b { font-size: 10.5px; font-weight: 650; letter-spacing: .01em; }
  .nav-btn.active { color: #ecfdf5; }
  .nav-btn.active .ni { color: #6ee7b7; transform: translateY(-1px) scale(1.1); }
  .nav-btn:active .ni { transform: scale(.86); }
  .nav-ind {
    border-radius: 20px;
    background: linear-gradient(180deg, rgb(16 185 129 / .24), rgb(16 185 129 / .08));
    box-shadow: inset 0 0 0 1px rgb(110 231 183 / .2), 0 8px 22px -8px rgb(16 185 129 / .6);
  }
  .dot { top: 5px; right: calc(50% - 20px); box-shadow: 0 0 0 2px #121b2e; }

  /* Başlık: üstte şeffaf, kayınca cam */
  .view-head { background: transparent; border-bottom-color: transparent; transition: background-color .3s, border-color .3s, box-shadow .3s; }
  .view-head.scrolled {
    background: rgb(11 18 32 / .78); border-bottom-color: var(--glass-line);
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    box-shadow: 0 12px 30px -20px #000;
  }
  .head-brand .brand-mark { width: 34px; height: 34px; }

  /* Hızlı işlem: yuvarlatılmış kare, ışıltılı */
  .fab {
    right: 18px; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
    width: 58px; height: 58px; border-radius: 20px; color: #022c22;
    background: linear-gradient(145deg, #6ee7b7, #10b981 50%, #059669);
    box-shadow: 0 16px 30px -10px rgb(16 185 129 / .8), inset 0 1px 0 rgb(255 255 255 / .45);
    transition: transform .4s var(--spring);
  }
  .fab svg { width: 28px; height: 28px; stroke-width: 2.4; transition: transform .45s var(--spring); }
  .fab.on svg { transform: rotate(135deg); }
  .fab:active { transform: scale(.9); }
  .fab::before { content: ""; position: absolute; inset: -5px; border-radius: 24px; border: 2px solid rgb(52 211 153 / .55); opacity: 0; animation: fab-ring 2.6s ease-out 1.2s 3; pointer-events: none; }
  @keyframes fab-ring { 0% { opacity: .8; transform: scale(.92); } 70%, 100% { opacity: 0; transform: scale(1.28); } }

  #docForm > [type="submit"] { bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); }

  /* Alt sayfalar: cam */
  dialog:not(#installDialog) { background: rgb(17 26 44 / .9); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%); border-color: var(--glass-line); }
  dialog:not(#installDialog)[open] { animation: sheet-up .42s var(--out); }
  dialog .row.end { background: transparent; }

  .tap-sheet .item:active { transform: scale(.985); background: #1b2741; }
}

/* Ana ekran uygulaması: sayfa sabit, içerik kendi içinde kayar (iPhone'da çubuk kayması olmaz) */
@media (max-width: 899px) {
  html.standalone:has(#app:not([hidden])), html.standalone:has(#app:not([hidden])) body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  html.standalone .shell { position: fixed; inset: 0; }
  html.standalone .content { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
  /* alt boşluk dolgu yerine öğe: yapışkan "Kaydet" düğmesi ekran altına göre konumlansın */
  html.standalone .content::after { content: ""; display: block; height: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
}
@media print {
  html.standalone, html.standalone body { height: auto !important; overflow: visible !important; }
  html.standalone .shell { position: static; }
  html.standalone .content { height: auto; overflow: visible; }
}

/* ---------- Masaüstü ---------- */
@media (min-width: 900px) {
  .sidebar { background: linear-gradient(180deg, rgb(255 255 255 / .02), transparent 260px), var(--panel); }
  .nav-btn { color: #94a3b8; }
  .nav-btn:hover { color: var(--text); background: rgb(255 255 255 / .03); }
  .nav-btn.active { background: transparent; color: #ecfdf5; }
  .nav-btn.active .ni { color: #6ee7b7; }
  .nav-btn .ni { width: 22px; height: 22px; }
  .nav-btn .ni svg { width: 20px; height: 20px; }
  .nav-ind {
    border-radius: 12px;
    background: linear-gradient(90deg, rgb(16 185 129 / .26), rgb(16 185 129 / .06));
    box-shadow: inset 3px 0 0 #10b981, 0 10px 24px -14px rgb(16 185 129 / .8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .view:not([hidden]) > *, .sheet-btn, .fab::before, dialog[open] { animation: none !important; }
  .nav-ind.ready, .nav-btn .ni, .fab svg { transition: none; }
}
/* Bölüm başlıklarında ve düğmelerde çizgi simgeler */
.fold > summary { display: flex; align-items: center; gap: 12px; }
.sum-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent); }
.sum-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sum-t { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }
.bi { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fold > summary::after { content: ""; width: 8px; height: 8px; border: solid #7f8fab; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); flex: none; margin-right: 6px; transition: transform .35s var(--spring); }
.fold[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s, border-color .2s, color .2s, transform .15s; }
.seg button:active { transform: scale(.97); }
.seg button.active { background: linear-gradient(180deg, rgb(16 185 129 / .2), rgb(16 185 129 / .08)); border-color: rgb(52 211 153 / .6); color: #ecfdf5; box-shadow: 0 6px 18px -10px rgb(16 185 129 / .8); }

/* =================== Logo animasyonu =================== */
.mark-anim { position: relative; display: inline-grid; flex: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mark-anim > svg { transform-origin: 50% 65%; animation: m-breathe 5s ease-in-out infinite; }
/* parıltı */
.m-shine { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.m-shine::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .6), transparent); transform: skewX(-18deg);
  animation: m-shine 6.5s ease-in-out 1.4s infinite;
}
/* sıcak yemek buharı */
.m-steam { position: absolute; left: 0; right: 0; bottom: 92%; height: 62%; pointer-events: none; }
.m-steam b {
  position: absolute; bottom: 0; width: 16%; height: 70%; border-radius: 50%;
  border: 2px solid transparent; border-left-color: rgb(167 243 208 / .75);
  filter: blur(.4px); opacity: 0; animation: m-steam 3.6s ease-in-out infinite;
}
.m-steam b:nth-child(1) { left: 26%; animation-delay: .3s; }
.m-steam b:nth-child(2) { left: 43%; animation-delay: 1.5s; height: 85%; }
.m-steam b:nth-child(3) { left: 60%; animation-delay: 2.6s; }
.mark-anim.xl .m-steam b { border-width: 3px; }
/* küçük logolarda buhar ara ara ve daha ince */
.head-brand .m-steam, .side-logo .m-steam { height: 46%; }
.head-brand .m-steam b, .side-logo .m-steam b { border-width: 1.6px; animation-duration: 6s; }
.head-brand .m-steam b:nth-child(3), .side-logo .m-steam b:nth-child(3) { display: none; }
/* açılış: zıplayarak gelir, halka yayılır */
.mark-anim.intro > svg { animation: m-pop .95s cubic-bezier(.3, 1.6, .5, 1) both, m-breathe 5s ease-in-out 1.2s infinite; }
.m-ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(52 211 153 / .6); opacity: 0; pointer-events: none; animation: m-ripple 2.6s ease-out .7s 3; }
/* dokununca jöle, ekran değişince selam */
.mark-anim.boing > svg { animation: m-boing .75s cubic-bezier(.3, 1.4, .5, 1); }
.mark-anim.hello > svg { animation: m-hello .85s cubic-bezier(.3, 1.4, .5, 1); }

@keyframes m-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes m-shine { 0%, 70% { left: -70%; } 90%, 100% { left: 130%; } }
@keyframes m-steam {
  0% { opacity: 0; transform: translate(0, 40%) scaleY(.6); }
  25% { opacity: .9; }
  60% { transform: translate(18%, -25%) scaleY(1); }
  100% { opacity: 0; transform: translate(-10%, -75%) scaleY(1.15); }
}
@keyframes m-pop { 0% { opacity: 0; transform: scale(.2) rotate(-28deg); } 55% { opacity: 1; } 100% { transform: none; } }
@keyframes m-ripple { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes m-boing {
  0% { transform: scale(1); } 18% { transform: scale(1.22, .8); } 36% { transform: scale(.86, 1.16) translateY(-8%); }
  56% { transform: scale(1.07, .94); } 76% { transform: scale(.97, 1.03); } 100% { transform: scale(1); }
}
@keyframes m-hello { 0% { transform: none; } 30% { transform: translateY(-14%) rotate(-10deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-3deg); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .mark-anim > svg, .m-shine::before, .m-steam b, .m-ripple { animation: none !important; }
}
.auth-mark.mark-anim { display: grid; width: fit-content; }

/* Adisyo: çekim şekli, ilerleme, hatırlatma */
.ad-mode { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ad-mode legend { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.ad-opt { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: rgb(255 255 255 / .02); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, background-color .2s; }
.ad-opt input { width: 20px; min-width: 20px; height: 20px; min-height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--green); }
.ad-opt span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-opt b { font-size: 14.5px; }
.ad-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ad-opt:has(input:checked) { border-color: rgb(52 211 153 / .6); background: linear-gradient(180deg, rgb(16 185 129 / .12), rgb(16 185 129 / .03)); }
.ad-opt.off { opacity: .55; cursor: not-allowed; }
.ad-progress { display: grid; gap: 6px; margin-top: 2px; }
.ad-bar { height: 8px; border-radius: 99px; background: rgb(255 255 255 / .06); overflow: hidden; }
.ad-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #10b981, #6ee7b7); background-size: 200% 100%;
  transition: width .5s var(--out); animation: ad-flow 1.4s linear infinite; }
.ad-progress.ok .ad-bar i { animation: none; background: #10b981; }
@keyframes ad-flow { to { background-position: -200% 0; } }
.stale-card { display: flex; align-items: center; gap: 12px; border-color: rgb(250 204 21 / .35);
  background: linear-gradient(180deg, rgb(250 204 21 / .08), rgb(250 204 21 / .02)), var(--panel); }
.stale-card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #fde68a; }
.stale-card .btn { flex: none; }
@media (max-width: 520px) { .stale-card { flex-wrap: wrap; } .stale-card .btn { width: 100%; } .stale-card p { flex: 1 1 calc(100% - 50px); } }
