/* TOPTANKAR arayüz dili: ortak stiller. Kaynağı docs/ui-prototip/app.css; kurallar docs/ui-tasarim-rehberi.md. */
:root {
  --ground: #F4F3EF;
  --surface: #FFFFFF;
  --ink: #15181B;
  --muted: #5B6168;
  --hairline: #EDEBE5;
  --line: #D9D5CC;
  --teal: #0E2A27;
  --teal-2: #1B403B;
  --teal-line: #25504A;
  --teal-text: #C7D5D1;
  --accent: #D2431F;
  --late: #A62A23;
  --late-fill: #C2332B;
  --plus: #0B6444;
}
body { margin: 0; background: var(--ground); }
a { color: inherit; text-decoration: none; }
.disp { font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif; letter-spacing: -.02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.late { color: var(--late); }
.plus { color: var(--plus); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.small { font-size: 14px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Kabuk */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; background: var(--ground); color: var(--ink); font-family: 'Figtree', system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
.side { flex: 1 1 240px; min-width: 0; max-width: 100%; box-sizing: border-box; background: var(--teal); color: var(--teal-text); padding: 26px 16px 18px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 22px; font-weight: 700; color: #FFFFFF; }
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; transition: background .18s ease, color .18s ease; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--teal-2); color: #FFFFFF; }
.menu a[aria-current="page"] { font-weight: 600; }
.menu svg { flex: none; width: 20px; height: 20px; opacity: .8; }
.menu a:hover svg, .menu a[aria-current="page"] svg { opacity: 1; }
.firm { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; overflow: hidden; min-height: 58px; box-sizing: border-box; padding: 10px 12px 10px 14px; border: 0; border-radius: 14px; background: var(--teal-2); color: #FFFFFF; font: inherit; text-align: left; cursor: pointer; transition: background .18s ease; }
.firm:hover:not([disabled]) { background: #25504A; }
.firm-text { flex: 1 1 auto; min-width: 0; }
.firm b { display: block; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-text > span { display: block; font-size: 13px; color: #A9BDB8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-caret { flex: none; color: #A9BDB8; }
.main { flex: 999 1 560px; min-width: 0; box-sizing: border-box; padding: 28px 32px 56px; }
.wrap { max-width: 1160px; display: flex; flex-direction: column; gap: 24px; }

/* Sayfa başlığı */
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.title { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 28px; font-weight: 700; line-height: 1.15; }
.back { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; color: var(--muted); }
.back:hover { color: var(--ink); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: transform .16s cubic-bezier(.2,.8,.2,1), background .16s ease; }
.btn:hover { transform: translateY(-1px); background: #ECEAE4; }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: #FFFFFF; padding: 0 20px; }
.btn-primary:hover { background: #BC3A19; }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #2A2F34; }
.btn-line { border: 1px solid var(--line); background: var(--surface); }
.btn-danger { color: var(--late); border: 1px solid #E5C4C1; background: var(--surface); }
.btn-wide { width: 100%; min-height: 52px; font-size: 16px; }
.link { border-bottom: 1px solid #C9C5BB; transition: border-color .16s ease; }
.link:hover { border-color: var(--ink); }

/* Yüzeyler */
.card { background: var(--surface); border-radius: 20px; padding: 28px 32px; box-sizing: border-box; min-width: 0; }
.card-tight { padding-bottom: 12px; }
.card-dark { background: var(--teal); color: #FFFFFF; }
.card-dark .muted { color: var(--teal-text); }
.card-dark .row, .card-dark .kv > * { border-color: var(--teal-line); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 20px; font-weight: 700; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.big { margin: 4px 0 0; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 40px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mid { font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.label { margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }

/* Satırlar */
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--hairline); box-sizing: border-box; }
a.row, .row-link { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; transition: background .16s ease; }
a.row:hover, .row-link:hover { background: #F7F6F2; }
.row .sub { display: block; font-size: 14px; color: var(--muted); }
.kv { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.kv > dt, .kv > dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--hairline); }
.kv > dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 16px; }
.kv > dt { color: var(--muted); }
.kv .total { color: var(--ink); font-weight: 600; }

/* Tablolar */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { padding: 8px; font-size: 14px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
.table td { padding: 14px 8px; border-top: 1px solid var(--hairline); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: #F7F6F2; }
.table .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .sub { display: block; font-size: 14px; color: var(--muted); }
.cancelled td { color: #8A8F95; text-decoration: line-through; }
.cancelled td.keep { text-decoration: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--muted); }

/* Durum: düz metin, yalnızca gecikme renkli */
.st { font-size: 14px; color: var(--muted); white-space: nowrap; }
.st-late { color: var(--late); font-weight: 600; }
.st-done { color: var(--plus); }
.bar { display: block; height: 4px; border-radius: 999px; background: #E4E1D9; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.bar > .late-fill { background: var(--late-fill); }

/* Araç çubuğu ve formlar */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.toolbar .grow { flex: 1 1 240px; min-width: 0; }
.inp { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; min-height: 48px; box-sizing: border-box; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.inp:hover { border-color: #B9B4A8; }
.inp:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(14,42,39,.12); }
textarea.inp { padding: 12px 14px; min-height: 96px; resize: vertical; }
.inp-big { min-height: 64px; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lab { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.hint { margin: 8px 2px 0; font-size: 14px; color: var(--muted); }
.err { margin: 8px 2px 0; font-size: 14px; color: var(--late); font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ground); }
.card .seg { background: var(--ground); }
.seg button, .seg a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: background .18s ease, color .18s ease; }
.seg [aria-pressed="true"], .seg [aria-selected="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(21,24,27,.12); }
.ground .seg { background: #E9E7E0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { flex: none; width: 20px; height: 20px; accent-color: var(--teal); }
.note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ground); font-size: 14px; }
.card-dark .note { background: var(--teal-2); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0 14px; padding-bottom: 18px; }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ground); font-weight: 600; font-variant-numeric: tabular-nums; }
.steps > li.first::before, .steps > li.done::before { background: var(--teal); color: #FFFFFF; }

/* Pencere: tarayıcının kendi <dialog> öğesi (odak tuzağı, Esc ve arka plan ondan gelir) */
dialog.dialog { width: calc(100% - 40px); max-width: 460px; box-sizing: border-box; border: 0; background: var(--surface); color: var(--ink); border-radius: 20px; padding: 28px; }
dialog.dialog::backdrop { background: rgba(21,24,27,.45); }
dialog.dialog-wide { max-width: 560px; }
.dialog h2 { margin: 0 0 8px; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 22px; font-weight: 700; }
.dialog .actions { justify-content: flex-end; margin-top: 22px; }
.device-list { list-style: none; margin: 8px 0 0; padding: 0; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.device-row .hint { display: block; margin: 2px 0 0; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
  .swap { animation: swap .3s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Yardımcılar */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand svg { flex: none; }
.brand-ink { color: var(--ink); padding: 0; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.alert { margin: 0; padding: 12px 14px; border-radius: 12px; background: #FDECEA; color: var(--late); font-weight: 600; }
.firm-list { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 0; }
.firm-list button { justify-content: space-between; width: 100%; }
.firm-list button[aria-pressed="true"] { background: var(--ground); }
tr.is-loading td { color: var(--muted); }

/* Hata sayfası */
.error-page { min-height: 100vh; display: grid; place-items: center; box-sizing: border-box; padding: 32px 24px; background: var(--ground); color: var(--ink); font-family: 'Figtree', system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
.error-box { width: 100%; max-width: 620px; }
.error-code { margin: 40px 0 0; }
.error-title { margin: 6px 0 0; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; font-size: clamp(34px, 6vw, 56px); font-weight: 700; line-height: 1.02; }
.error-text { margin: 18px 0 0; font-size: 18px; color: #3E444A; }
.error-actions { margin-top: 28px; }
.error-foot { margin: 28px 0 0; }

/* Dar ekran: yan menü üste iner, içerik kenar boşlukları daralır */
@media (max-width: 720px) {
  .side { padding: 14px 16px; gap: 12px; }
  .menu { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .main { padding: 20px 16px 48px; }
  .card { padding: 22px 18px; }
}
.dialog .lab { margin-top: 16px; }
.dialog h2 + .alert, .dialog h2 + .muted { margin-top: 0; }
.language-switch { margin: 0; }
.language-switch .seg { background: #E9E7E0; }
.dialog .language-switch { margin-top: 6px; }
dialog.dialog-form { max-width: 620px; }
.field-wide { grid-column: 1 / -1; }
.dialog .fields .lab { margin-top: 0; }
.dialog .fields { margin-top: 16px; }
.dialog .note { margin-top: 16px; }
.dialog .seg { margin-top: 12px; }
.table-fit { min-width: 0; }
.table-fit td { overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack[hidden] { display: none; }
@media (max-width: 720px) {
  .phone-hidden { display: none; }
}
.card-title-spaced { margin-bottom: 12px; }
.hint-last { margin-bottom: 12px; }
.shelf-warning { margin: 6px 0 0; }
.inp[aria-invalid="true"] { border-color: var(--late-fill); }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.dialog .muted + .alert { margin-top: 12px; }
.tree-cell { display: flex; align-items: flex-start; gap: 6px; }
.tree-toggle, .tree-spacer { flex: none; width: 32px; height: 32px; margin: -5px 0; }
.tree-toggle { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background .16s ease, transform .18s ease; }
.tree-toggle:hover { background: #ECEAE4; color: var(--ink); }
.tree-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.tree-toggle[aria-expanded="true"] { transform: rotate(90deg); }
.tree-level-1 .tree-cell { padding-left: 24px; }
.tree-level-2 .tree-cell { padding-left: 48px; }
.tree-level-3 .tree-cell { padding-left: 72px; }
tr[class*="tree-level-"]:not(.tree-level-0) { background: #FAF9F6; }
.choices { margin: 16px 0 0; padding: 0; border: 0; }
.kv-spaced { margin-top: 14px; }
.plan-count { max-width: 140px; }
.plan-rows { display: grid; gap: 8px; margin-top: 12px; }
.plan-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.plan-row.is-single { grid-template-columns: 84px minmax(0, 1fr); }
.plan-row > span { font-size: 14px; color: var(--muted); }
.part-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); }
.part-row:first-child { border-top: 0; }
.open-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--hairline); }
.open-row .sub { display: block; font-size: 14px; color: var(--muted); }
.open-row > span { min-width: 0; overflow-wrap: anywhere; }
.open-row .btn { min-height: 32px; padding: 0 10px; font-size: 13px; margin-top: 4px; }
.is-cancelled td { color: var(--muted); }
.is-cancelled .struck { text-decoration: line-through; }
.dialog .fields + .lab, .dialog .seg + .lab { margin-top: 16px; }
#money-parts { margin-top: 12px; }
@media (max-width: 720px) {
  .plan-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); }
  .part-row { grid-template-columns: minmax(0, 1fr) 110px; }
}
.account-list { margin: 16px -12px 0; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .16s ease; }
.account-row:hover { background: #F7F6F2; }
.account-row[aria-pressed="true"] { background: var(--ground); border-radius: 12px; border-top-color: transparent; }
.account-row[aria-pressed="true"] + .account-row { border-top-color: transparent; }
.account-row .sub { display: block; font-size: 14px; color: var(--muted); }
.account-add { margin: 12px 0; }
.phone-only { display: none; }
@media (max-width: 720px) {
  .phone-only { display: revert; }
  /* Telefonda asıl rakam (rafta, bize borcu, eldeki para) listelerden önce gelir. */
  .cols > .col-side { order: -1; }
  /* Formda toplam ve Kaydet, doldurulan alanlardan sonra gelir. */
  form .cols > .col-side, .cols-keep-order > .col-side { order: 0; }
}
.picker { position: relative; }
.picker-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 28px rgba(21,24,27,.14); }
.picker-option { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.picker-option:hover, .picker-option:focus-visible { background: var(--ground); outline: 0; }
.picker-option .sub { display: block; font-size: 13px; color: var(--muted); }
.picker-empty { margin: 0; padding: 9px 10px; font-size: 14px; color: var(--muted); }
.line-rows { display: grid; gap: 0; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 120px 44px; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--hairline); }
.line-row:first-child { border-top: 0; }
.line-row .line-total { padding-top: 13px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.line-row .line-hint { margin: 4px 2px 0; font-size: 13px; color: var(--muted); }
.line-remove { min-height: 48px; padding: 0; width: 44px; color: var(--muted); }
.line-row .line-pricing { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.line-pricing .inp { width: auto; min-height: 40px; font-size: 14px; }
.line-pricing .line-discount, .discount-input { max-width: 150px; }
.discount-box { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.discount-box .lab { margin-top: 0; }
.discount-box #document-discount-field { margin-top: 12px; }
.payment-fields { margin-top: 16px; }
[data-kind] .card .lab { margin-top: 16px; }
[data-kind] .card .fields .lab { margin-top: 0; }
.btn-accent { margin-top: 18px; background: #F1623A; color: #15181B; }
.btn-accent:hover { background: #F47A57; }
@media (max-width: 720px) {
  .line-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .line-row .picker { grid-column: 1 / -1; }
  .line-row .line-total { grid-column: 1 / 3; padding-top: 0; text-align: left; }
  .line-row .line-remove { grid-row: 2; grid-column: 3; }
}
a.account-row { text-decoration: none; box-sizing: border-box; }
.card-tight > .account-row { width: calc(100% + 24px); margin: 0 -12px; }
.stock-low-title { margin: 14px 0 4px; }
#dues-card .seg { margin-bottom: 8px; }
.account-list-flush { margin-top: 0; }
.chart-box { margin-top: 14px; }
.chart { display: block; width: 100%; height: 72px; overflow: visible; }
.chart-tall { height: 120px; }
.chart-bar { fill: #C9D3D0; transition: fill .16s ease; }
.chart-bar:hover { fill: var(--teal); }
.chart-bar-today { fill: var(--teal); }
.chart-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(14, 42, 39, .06); }
.chart-axis { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
.breakdown { margin-top: 14px; }
.breakdown-row { padding: 10px 0; border-top: 1px solid var(--hairline); }
.breakdown-row > span:first-child { display: flex; justify-content: space-between; gap: 12px; }
.breakdown-row .bar { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--ground); overflow: hidden; }
.breakdown-row .bar > span { display: block; height: 100%; border-radius: 3px; background: var(--teal); }
.category-rows { display: grid; gap: 8px; margin: 16px 0 8px; }
.category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
form.category-row { grid-template-columns: minmax(0, 1fr) auto; padding-top: 12px; border-top: 1px solid var(--hairline); }
.category-row .btn { min-height: 48px; }
.dialog #expense-now-fields .lab, .dialog #expense-later-fields .lab { margin-top: 16px; }
.breakdown-row > span:first-child > :last-child { flex: none; white-space: nowrap; }
.settings-actions { margin-top: 16px; }
.setup-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline); }
.setup-row .sub { display: block; font-size: 14px; color: var(--muted); }
.setup-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.setup-row.is-done .setup-mark { border-color: var(--teal); background: var(--teal); }
.setup-row.is-done .strong { color: var(--muted); text-decoration: line-through; }
.statement-month { min-height: 36px; width: auto; }
#statement-direction { margin-bottom: 8px; }
.print-only { display: none; }
@media print {
  .side, .no-print, .head .actions, .pager, .back, dialog { display: none !important; }
  .print-only { display: block; }
  .app, .main { display: block; background: #FFFFFF; padding: 0; }
  .card { padding: 0; border-radius: 0; }
  body.is-printing-statement .cols > *, body.is-printing-statement .col-main > * { display: none; }
  body.is-printing-statement .cols > .col-main, body.is-printing-statement #statement-card { display: block; }
  .phone-hidden { display: revert !important; }
  /* Yazdırılan fiş müşteriye verilir; malın maliyeti ve kâr kâğıda çıkmaz. */
  [data-profit-row], [data-cost-column], .cost-cell { display: none !important; }
  .letterhead { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #000000; }
}
.letterhead p { margin: 0; font-size: 14px; }
.letterhead .letterhead-name { font-family: var(--display); font-size: 22px; font-weight: 700; }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline); }
.team-row:first-child { border-top: 0; }
.team-row .who { min-width: 0; overflow-wrap: anywhere; }
.team-row .sub { display: block; font-size: 14px; color: var(--muted); }
.team-row select.inp { min-height: 36px; width: auto; }
.team-row .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.team-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.invite-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.invite-form .inp + .inp, .invite-form .err + .inp, .invite-form select.inp { margin-top: 8px; }
.invite-result { margin: 12px 0; padding: 14px; border-radius: 12px; background: var(--ground); }
.invite-result .actions { margin-top: 12px; }
@media (max-width: 720px) {
  #history-rows .open-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #history-rows .open-row .right { text-align: left; }
}
#company-form .err + .lab { margin-top: 14px; }
.dialog .import-template { justify-content: flex-start; margin: 12px 0 4px; }
.import-errors { max-height: 240px; margin: 8px 0 0; padding: 12px 14px 12px 30px; overflow-y: auto; border-radius: 12px; background: var(--ground); font-size: 14px; }
.import-errors li + li { margin-top: 6px; }
input[type="file"].inp { padding: 10px 12px; height: auto; }
.alerts { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.alerts:hover { background: var(--teal-2); color: #FFFFFF; }
.alerts svg { flex: none; opacity: .8; }
.alerts-badge { margin-left: auto; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 13px; font-weight: 700; text-align: center; }
.alerts-list { display: grid; margin-top: 8px; }
.alerts-row { display: block; padding: 14px 0; border-top: 1px solid var(--hairline); font-weight: 600; }
.alerts-row:first-child { border-top: 0; }
.alerts-row.is-late { color: var(--late); }
.alerts-row:hover { text-decoration: underline; }
@media print { .alerts { display: none !important; } }
.return-lines { display: grid; margin: 8px 0 4px; }
.return-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); }
.return-line:first-child { border-top: 0; }
.return-line .sub { display: block; font-size: 14px; color: var(--muted); }
#refund-account-field { margin-top: 12px; }

/* Telefon: yan menü yerine altta, iPhone'daki gibi cam görünümlü yüzen çubuk */
.tabbar, dialog.sheet { display: none; }
@media (max-width: 720px) {
  /* Üst çubuk da alt çubuk gibi yerinde durur; yalnızca içerik kayar (kullanıcı isteği). Sabit
     kaldığı için tek satırdır: marka, firma kutusu (yalnızca firma adı) ve bildirim zili. */
  .side {
    position: sticky; top: 0; z-index: 20; flex: 0 0 100%;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    box-shadow: 0 6px 18px rgba(16, 40, 36, .18);
  }
  .side .brand { grid-column: 1; grid-row: 1; padding: 0; font-size: 19px; gap: 8px; }
  .side .firm { grid-column: 2; grid-row: 1; min-height: 44px; padding: 6px 8px 6px 12px; border-radius: 12px; }
  .side .firm #firm-user { display: none; }
  .side .alerts { grid-column: 3; grid-row: 1; width: auto; min-width: 44px; padding: 0 8px; gap: 6px; justify-content: center; }
  .side .alerts > span:not(.alerts-badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .side .alerts-badge { margin-left: 0; }
  .side .menu { display: none; }
  .main { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

  .tabbar {
    position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 6px;
    border-radius: 32px; border: 1px solid rgba(255, 255, 255, .72);
    background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .36));
    -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
    box-shadow: 0 14px 36px rgba(16, 40, 36, .22), 0 2px 8px rgba(16, 40, 36, .10), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(16, 40, 36, .05);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-width: 0; min-height: 54px; padding: 6px 2px; border: 0; border-radius: 26px; background: transparent;
    color: rgba(21, 24, 27, .66); font: inherit; font-size: 11px; font-weight: 600; line-height: 1.45; cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
  }
  .tabbar svg { flex: none; width: 23px; height: 23px; }
  /* Satır yüksekliği dar tutulursa Ö ve Ü harflerinin noktaları kırpılır. */
  .tabbar span { max-width: 100%; padding-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar #more-button svg { stroke-width: 3; }
  .tabbar a:active, .tabbar button:active { transform: scale(.94); }
  .tabbar [aria-current="page"] {
    color: var(--teal); background: rgba(255, 255, 255, .82);
    box-shadow: 0 2px 10px rgba(16, 40, 36, .14), inset 0 1px 0 #FFFFFF;
  }

  dialog.sheet[open] { display: block; }
  dialog.sheet {
    position: fixed; inset: auto 12px calc(84px + env(safe-area-inset-bottom, 0px)) 12px; margin: 0;
    width: auto; max-width: none; max-height: 70vh; box-sizing: border-box; overflow-y: auto; padding: 18px 14px 12px;
    border: 1px solid rgba(255, 255, 255, .72); border-radius: 30px; color: var(--ink);
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .72));
    -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 18px 44px rgba(16, 40, 36, .28), inset 0 1px 0 rgba(255, 255, 255, .95);
  }
  dialog.sheet::backdrop { background: rgba(16, 40, 36, .28); }
  .sheet-title { margin: 0 8px 8px; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; font-size: 18px; font-weight: 700; }
  .sheet-list { display: grid; gap: 2px; }
  .sheet-list a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-radius: 18px; font-weight: 600; }
  .sheet-list a[aria-current="page"] { color: var(--teal); background: rgba(255, 255, 255, .82); box-shadow: 0 1px 6px rgba(16, 40, 36, .10); }
  .sheet-list svg { flex: none; width: 22px; height: 22px; opacity: .8; }
  .sheet-close { display: block; width: 100%; min-height: 48px; margin-top: 8px; border: 0; border-radius: 18px; background: rgba(21, 24, 27, .06); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
}
/* Bulanıklığı çizemeyen tarayıcıda çubuk okunaklı kalsın diye neredeyse opak zemin */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar, dialog.sheet { background: rgba(255, 255, 255, .96); }
}
@media (prefers-reduced-motion: reduce) { .tabbar a, .tabbar button { transition: none; } }
@media print { .tabbar, dialog.sheet { display: none !important; } }
.setup-guide { border: 1px solid var(--line); }
.setup-guide:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.setup-guide .setup-row:first-child { border-top: 0; }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
@media (max-width: 720px) {
  .setup-guide .setup-row { grid-template-columns: 28px minmax(0, 1fr); }
  .setup-guide .setup-row > :last-child { grid-column: 2; justify-self: start; }
}
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.next-step-text { min-width: 0; }
.next-step-count { color: var(--muted); }
.next-step .btn { min-height: 40px; padding: 0 16px; }
@media print { .next-step { display: none !important; } }
.history-button { display: none; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: 4px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; transition: background .18s ease, color .18s ease; }
.can-see-history .history-button { display: inline-flex; }
.history-button:hover, .history-button:focus-visible { background: var(--ground); color: var(--ink); }
.history-button svg { width: 18px; height: 18px; }
.history-rows { max-height: min(56vh, 460px); overflow-y: auto; margin-top: 8px; }
.history-row { grid-template-columns: minmax(0, 1fr); }
@media print { .history-button { display: none !important; } }
.two-factor-secret, .two-factor-codes { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 16px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.two-factor-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 14px 0 0; padding: 14px; list-style: none; border-radius: 12px; background: var(--ground); }
.dialog #two-factor-link { margin-top: 10px; }
/* Türkçe not: "plan-row" taksit planının satırıdır (84 px'lik ızgara); paket satırı ayrı ad
   taşır, yoksa telefonda paket metni 84 px'lik sütuna sıkışıyordu. */
.package-row { align-items: center; }
.package-row .sub { display: block; }
.storefront-page { max-width: 760px; }
.storefront-products { margin-top: 16px; }
.storefront-pick { border-top: 1px solid var(--hairline); min-height: 48px; }
.storefront-pick:first-child { border-top: 0; }
.storefront-pick span { min-width: 0; overflow-wrap: anywhere; }
.suspended-note { margin-bottom: 16px; }
.support-note { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; background: var(--teal); color: #FFFFFF; font-weight: 600; }
.support-note[hidden] { display: none; }
.support-note .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
@media print { .support-note { display: none !important; } }
.suspended-note a { color: inherit; text-decoration: underline; }
@media print { .suspended-note { display: none !important; } }
@media (max-width: 720px) {
  /* Dar sütunda düğmenin yazısı harf harf bölünmesin: yazı tek satırda kalır, sığmayan düğme
     bir alt satıra iner. */
  .row-actions.phone-only { display: flex; flex-wrap: wrap; justify-content: flex-start; margin-top: 10px; }
  .row-actions.phone-only .btn { flex: none; white-space: nowrap; padding: 0 10px; font-size: 13px; }
}
#company-form .hint + .lab { margin-top: 14px; }
/* Telefon: alt sekmeler ve çok seçenekli vade süzgeci iki satıra taşmaz, yana kaydırılır. */
@media (max-width: 720px) {
  .subnav, #due-filter { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .subnav::-webkit-scrollbar, #due-filter::-webkit-scrollbar { display: none; }
  .subnav a, #due-filter button { flex: none; white-space: nowrap; }
}
.balance-pair { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; white-space: nowrap; }
.balance-pair + .balance-pair { margin-top: 4px; }
.recurring-row { grid-template-columns: minmax(0, 1fr) auto; }
.recurring-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
.recurring-actions .btn { flex: none; white-space: nowrap; }
#recurring-rows .open-row:first-child { border-top: 0; }
.recurring-row .sub.late { color: var(--late); }
.roles-group { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.roles-group legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.roles-group .check { min-height: 38px; align-items: flex-start; padding-top: 8px; line-height: 1.35; }
.roles-group .check input { flex: none; }
.permission-mark { display: block; }
#member-permission-groups { max-height: min(52vh, 460px); overflow-y: auto; }
.roles-actions { margin-top: 16px; flex-wrap: wrap; }
#family-rows tr.is-current td { background: var(--ground); }
.row-toggle { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.row-toggle[aria-expanded="true"] { text-decoration-color: var(--ink); }
tr.detail-row > td { background: var(--ground); padding: 14px 16px; }
tr.is-cancelled > td { color: var(--muted); }
.production-detail .open-row:first-child { border-top: 0; }
.production-actions { margin-top: 10px; justify-content: flex-start; }
.production-inputs-title { margin-top: 16px; }
.production-input { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px 44px; gap: 8px; align-items: start; padding: 8px 0; }
.production-input .line-hint { margin: 4px 2px 0; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .production-input { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .production-input .picker { grid-column: 1 / -1; }
}
.production-input-actions { justify-content: flex-start; flex-wrap: wrap; }
.recipe-item { grid-template-columns: minmax(0, 1fr) 130px 44px; }
@media (max-width: 720px) {
  .recipe-item { grid-template-columns: minmax(0, 1fr) 44px; }
}
.line-pricing .line-unit { width: auto; max-width: 220px; }

/* Ürün görselleri: kare kutular; kapak ilk sırada ve etiketlidir. */
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.shots:empty { display: none; }
.shot { position: relative; border-radius: 14px; overflow: hidden; background: var(--ground); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.shot-tag { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 13px; font-weight: 600; }
.shot-actions { display: flex; border-top: 1px solid var(--hairline); background: var(--surface); }
.shot-button { flex: 1 1 auto; white-space: nowrap; min-height: 44px; padding: 6px 4px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.shot-button + .shot-button { border-left: 1px solid var(--hairline); }
.shot-button-danger { color: var(--late); }
.shot-button:hover { background: var(--ground); }
.shot { border: 1px solid var(--hairline); }
.shot-picker { cursor: pointer; }
.shot-picker[aria-busy="true"] { opacity: .5; pointer-events: none; }
.shot-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.pic-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pic-field .inp { flex: 1 1 200px; min-width: 0; }
.pic-preview { flex: none; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 1px solid var(--hairline); }
.pic-dot { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 10px; }
.clip { display: block; width: 100%; max-width: 420px; max-height: 520px; border-radius: 14px; background: var(--ink); }
.shot-video { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: var(--ink); }
.shot-video::before { content: ''; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.shot-note { margin: 0; padding: 8px 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; background: var(--surface); }
.story-live-title { margin: 24px 0 12px; }
.story-group + .story-group { margin-top: 20px; }
.story-group-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.swatches legend { padding: 0; }
.swatch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch::before { content: ''; width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); }
.swatch:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.swatch[data-accent="ember"] { --swatch: #D2431F; }
.swatch[data-accent="teal"] { --swatch: #0E6B5C; }
.swatch[data-accent="navy"] { --swatch: #1F3A6B; }
.swatch[data-accent="plum"] { --swatch: #7A2251; }
.swatch[data-accent="forest"] { --swatch: #2F6B3A; }
.swatch[data-accent="ink"] { --swatch: #15181B; }
.shots-wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot-wide img { aspect-ratio: 8 / 3; }
.product-cell { display: flex; align-items: flex-start; gap: 10px; }
.product-text { min-width: 0; }
.product-thumb { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--ground); }
.product-thumb-blank { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.product-thumb-blank::before { content: attr(data-initial); }

/* Kayıt kullanımı (özet ve Ayarlar): sayı büyük, çubuk ince; sınıra yaklaşınca ve ulaşınca renk değişir. */
.usage-count { margin: 4px 0 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.usage-count .big-number { font-family: 'Bricolage Grotesque', sans-serif; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.usage-bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #E4E1D9; overflow: hidden; }
.usage-bar[hidden] { display: none; }
.usage-bar::-webkit-progress-bar { background: #E4E1D9; border-radius: 999px; }
.usage-bar::-webkit-progress-value { background: var(--teal); border-radius: 999px; }
.usage-bar::-moz-progress-bar { background: var(--teal); border-radius: 999px; }
.usage-bar.is-near::-webkit-progress-value { background: var(--accent); }
.usage-bar.is-near::-moz-progress-bar { background: var(--accent); }
.usage-bar.is-full::-webkit-progress-value { background: var(--late-fill); }
.usage-bar.is-full::-moz-progress-bar { background: var(--late-fill); }

/* Manken görseli */
.actions-start { justify-content: flex-start; flex-wrap: wrap; }
.try-on-preview { display: block; max-width: 160px; max-height: 200px; margin: 4px 0 16px; border-radius: 12px; object-fit: contain; background: var(--ground); }
.try-on-preview[hidden], .try-on-result[hidden] { display: none; }
.try-on-result { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 12px; background: var(--ground); margin-bottom: 16px; }
.try-on-prompt { font-size: 13px; line-height: 1.5; min-height: 220px; }
#try-on-form .fields + .lab { margin-top: 16px; }

/* Ürün kartı (Faz 127): tek ekranda ad, renk, fotoğraf, video, fiyat ve raf. Gölge, rozet ve kesik çizgi yok. */
.title-input { font-family: 'Bricolage Grotesque', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.02em; padding: 8px 12px; min-height: 48px; }
.title-input.is-invalid { border-color: var(--late); }
.name-edit { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.name-edit .title-input { flex: 1; min-width: 0; }
.save-status { margin: 6px 0 0; min-height: 1.4em; font-size: 14px; color: var(--muted, #5A6066); }
.save-status.late { color: var(--late); font-weight: 600; }
.seg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-chip { min-height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; color: var(--ink); }
.seg-chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.seg-chip[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.option-tools { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.option-add { margin-top: 16px; }
.row-tight { display: flex; gap: 8px; align-items: center; }
.row-tight .inp { flex: 1; min-width: 0; }
.link-danger { color: var(--late); border-color: currentColor; }
.danger-zone { margin: 8px 0 0; }
.size-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.size-list li { min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--hairline); }
.shot-number { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; }
.shot-actions { flex-wrap: wrap; }
.price-edit .unit { font-weight: 600; }
details.card > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: '▸'; margin-right: 8px; transition: transform .16s ease; }
details.card[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details.card > summary::before { transition: none; } }

/* ── 13 Kasım 2026 görünümü (prototip: claude.ai/artifact/3tRcoydZnVL24EMR6nXx6o, "Web" sayfası) ──
   Türkçe not: Mobil uygulamayla aynı dil: mercan ana renk, beyaz yan menü (seçili bölüm mercan hap), sayfa
   başlığı mercan bant, kartlar çizgisiz ve hafif gölgeli. Mercan METİN gerektiğinde koyu tonu (--accent-text,
   beyaz zeminde 5,6:1) kullanılır; düz mercan metin kontrastı yetmez. Telefonda üst çubuk mercan. */
:root { --accent-text: #B83A1A; --accent-tint: #FDEBE4; --on-accent-muted: #FFE1D6; --shadow-soft: 0 4px 16px rgba(21, 24, 27, .06); }

.side { background: var(--surface); color: #3A4046; box-shadow: 4px 0 24px rgba(21, 24, 27, .05); }
.brand { color: var(--teal); }
.menu a:hover { background: var(--ground); color: var(--ink); }
.menu a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); font-weight: 800; }
.firm { background: var(--ground); color: var(--ink); }
.firm:hover:not([disabled]) { background: #ECEAE4; }
.firm-text > span, .firm-caret { color: var(--muted); }
.alerts:hover { background: var(--ground); color: var(--ink); }

.head { background: var(--accent); color: #FFFFFF; border-radius: 24px; padding: 20px 24px; }
.head .title { color: #FFFFFF; font-weight: 800; }
.head .muted, .head .back { color: var(--on-accent-muted); }
.head .back:hover { color: #FFFFFF; }
.head .btn-primary { background: #FFFFFF; color: var(--accent-text); font-weight: 800; }
.head .btn-primary:hover { background: #FFF4EF; }
.head .btn-line, .head .btn:not(.btn-primary):not(.btn-danger) { background: rgba(255, 255, 255, .16); color: #FFFFFF; border-color: transparent; }
.head .btn-line:hover, .head .btn:not(.btn-primary):not(.btn-danger):hover { background: rgba(255, 255, 255, .26); }
.head .btn-danger { background: #FFFFFF; }
.head :focus-visible { outline-color: #FFFFFF; }

.card { box-shadow: var(--shadow-soft); }
.card-dark { box-shadow: none; }
.subnav { border-bottom: 0; gap: 8px; }
.subnav a { min-height: 38px; padding: 0 16px; border: 1px solid #E2DED5; border-radius: 19px; margin-bottom: 0; background: var(--surface); color: var(--ink); }
.subnav a:hover { background: #FFF4EF; }
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 700; }

@media (max-width: 720px) {
  .side { background: var(--accent); color: #FFFFFF; border-radius: 0 0 24px 24px; box-shadow: 0 6px 18px rgba(90, 20, 5, .18); }
  .side .brand { color: #FFFFFF; }
  .side .brand svg { box-sizing: content-box; padding: 4px; border-radius: 10px; background: #FFFFFF; }
  .side .firm { background: rgba(255, 255, 255, .18); color: #FFFFFF; }
  .side .firm-caret { color: var(--on-accent-muted); }
  .side .alerts { color: #FFFFFF; }
  .side .alerts-badge { background: #FFFFFF; color: var(--accent-text); }
  .head { border-radius: 20px; padding: 16px 18px; }
  .tabbar [aria-current="page"] { color: var(--accent-text); }
}
@media print {
  .head { background: none; color: var(--ink); padding: 0; }
  .head .title { color: var(--ink); }
  .card { box-shadow: none; }
}

.rule-rows { list-style: none; margin: 0 0 12px; padding: 0; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.settings-group { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }

/* Topi, yardım asistanı (Faz 9): her panel sayfasının köşesinde; sohbet yanında açılır. */
.topi-button { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 68px; height: 68px; padding: 6px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 6px 18px rgba(21, 24, 27, .22); cursor: pointer; }
.topi { display: block; width: 100%; height: 100%; overflow: visible; }
.topi-box, .topi-hand { fill: #F1623A; }
.topi-arm, .topi-seam { stroke: #A8330F; stroke-width: 7; stroke-linecap: round; }
.topi-seam { stroke-width: 5; }
.topi-eye { fill: #FFFFFF; }
.topi-pupil { fill: var(--ink); }
.topi-smile { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.topi-shadow { fill: rgba(21, 24, 27, .12); }
.topi-body { transform-origin: 50px 92px; animation: topi-breathe 4.3s ease-in-out infinite; }
.topi-eyes { transform-origin: 50px 48px; animation: topi-blink 4.3s infinite; }
.topi-wave { transform-origin: 82px 56px; }
.topi-greets .topi-wave { animation: topi-wave 1.4s ease-in-out 1; }
/* Köşedeki düğmede yalnız sağ kol, birkaç saniyede bir üç kez sallanır; sol kol yerinde kalır. */
.topi-button .topi-wave { animation: topi-corner-wave 4.3s ease-in-out infinite; }
@keyframes topi-corner-wave { 0%, 8%, 52%, 100% { transform: rotate(0); } 16%, 28%, 40% { transform: rotate(-150deg); } 22%, 34%, 46% { transform: rotate(-115deg); } }
@keyframes topi-breathe { 0%, 42%, 100% { transform: none; } 21% { transform: translateY(-2px) scale(1.02, .98); } }
@keyframes topi-blink { 0%, 76%, 79%, 100% { transform: none; } 77.5% { transform: scaleY(.1); } }
@keyframes topi-wave { 0%, 100% { transform: rotate(0); } 25%, 75% { transform: rotate(-150deg); } 50% { transform: rotate(-120deg); } }
@media (prefers-reduced-motion: reduce) { .topi-body, .topi-eyes, .topi-greets .topi-wave, .topi-button .topi-wave { animation: none; } }
.topi-panel { position: fixed; right: 20px; bottom: 100px; z-index: 41; display: flex; flex-direction: column; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 140px)); border-radius: 20px; overflow: hidden; background: var(--ground); box-shadow: 0 12px 36px rgba(21, 24, 27, .3); }
.topi-panel[hidden] { display: none; }
.topi-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: var(--teal); color: #FFFFFF; }
.topi-head .topi { width: 52px; height: 52px; flex: none; }
.topi-head h2 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; }
.topi-head p { margin: 0; color: var(--teal-text); font-size: 14px; }
.topi-close { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #FFFFFF; font-size: 24px; cursor: pointer; }
.topi-close:focus-visible, .topi-head :focus-visible { outline-color: #FFFFFF; }
.topi-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.topi-bubble { align-self: flex-start; max-width: 88%; margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--surface); }
.topi-mine { align-self: flex-end; background: #FDEBE4; }
.topi-steps, .topi-optional { margin: 6px 0; padding-left: 20px; }
.topi-label { margin: 6px 0 4px; color: var(--muted); font-weight: 600; font-size: 14px; }
.topi-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.topi-choices .topi-label { flex-basis: 100%; margin: 0; }
.topi-choice { min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.topi-ask { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hairline); background: var(--surface); }
.topi-ask .inp { flex: 1; min-width: 0; }
@media (max-width: 639px) {
  .topi-button { bottom: 84px; right: 14px; width: 60px; height: 60px; }
  .topi-panel { right: 8px; left: 8px; bottom: 80px; width: auto; height: calc(100vh - 110px); }
}

/* İstek sürerken ekran tıklamaya kapalı; uzarsa markanın kutuları zıplar (busy.js). */
.busy-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; cursor: progress; background: transparent; transition: background .2s ease; }
.busy-overlay.is-blocking { display: flex; }
.busy-overlay.is-visible { background: rgba(244, 243, 239, .55); }
.busy-loader { display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; transition: opacity .2s ease; }
.busy-overlay.is-visible .busy-loader { opacity: 1; }
.busy-boxes { position: relative; width: 56px; height: 56px; }
.busy-track, .refresh-track { display: block; overflow: hidden; background: rgba(241, 98, 58, .2); }
.busy-track { width: 120px; height: 6px; border-radius: 3px; }
.busy-track span { display: block; width: 40%; height: 100%; border-radius: 3px; background: #F1623A; animation: busy-slide 1.2s ease-in-out infinite; }
@keyframes busy-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.busy-box { position: absolute; width: 22px; height: 22px; border-radius: 6px; background: #F1623A; animation: busy-drop 1.2s ease-in-out infinite; }
.busy-box-top { left: 17px; top: 4px; animation-delay: .3s; }
.busy-box-left { left: 4px; top: 30px; }
.busy-box-right { left: 30px; top: 30px; animation-delay: .15s; }
@keyframes busy-drop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-10px); } 60% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .busy-box, .busy-track span { animation: none; } }

/* Ekran yüklenirken iskelet, güncellenirken üstte akan çubuk (loading_states.js). */
.sk { position: relative; display: block; overflow: hidden; height: 12px; border-radius: 6px; background: var(--hairline); }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: sk-shine 1.4s ease-in-out infinite; }
@keyframes sk-shine { 100% { transform: translateX(100%); } }
.skeleton-row td { padding-top: 16px; padding-bottom: 16px; }
.skeleton-row td:first-child .sk { width: 70%; }
.skeleton-row td + td .sk { width: 50%; margin-left: auto; }
.sk-line { padding: 14px 0; }
.sk-line .sk { width: 80%; }
.is-refreshing tbody, div.is-refreshing { opacity: .55; transition: opacity .2s ease; }
.has-refresh-bar { position: relative; }
.has-refresh-bar::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent 0 30%, #F1623A 30% 60%, transparent 60%) 0 0 / 300% 100%, rgba(241, 98, 58, .2); animation: refresh-run 1s linear infinite; }
@keyframes refresh-run { from { background-position: 100% 0, 0 0; } to { background-position: -50% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk::after, .has-refresh-bar::before { animation: none; } }


/* Hesap penceresi: başlıkta baş harf, bölümler kart kart, en altta çıkış ve hesabı silme */
dialog.account-dialog { max-width: 480px; padding: 20px; }
.account-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-head h2 { margin: 0; }
.account-head .grow, .account-row .grow { flex: 1; min-width: 0; }
.account-head .muted { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.account-avatar { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-text); font-weight: 800; font-size: 19px; }
.account-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ground); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.account-close:hover { color: var(--ink); }
.account-card { padding: 14px; margin-top: 10px; border-radius: 16px; background: var(--ground); }
.account-card > .lab:first-child, .account-row .lab { margin-top: 0; }
.account-card .seg { background: var(--surface); }
.account-card .seg [aria-pressed="true"] { background: var(--ground); }
.account-card .actions { justify-content: flex-start; margin-top: 12px; }
.account-warning { background: var(--accent-tint); }
.account-row { display: flex; align-items: center; gap: 12px; }
.account-row .hint { margin-top: 2px; }
.account-foot { display: grid; gap: 8px; margin-top: 16px; }
.account-foot .btn { justify-content: center; width: 100%; }
.account-delete { min-height: 42px; border: 0; border-radius: 12px; background: var(--late-tint); color: var(--late); font: inherit; font-weight: 700; cursor: pointer; }
.account-delete:hover { background: var(--late-tint-strong); }
.account-delete[hidden] { display: none; }
