/* ==========================================================================
   Akış — bileşen kitaplığı (AKIS_SPEC 3.x)
   Renk değişmezi yok (D11). Yarı saydamlık: color-mix(in srgb, var(--x) N%, transparent).

   İki tür kural:
   1) Yeni bileşenler `ax-` önekiyle.
   2) Korunan sınıf adları (D10: .button, .icon-btn, .modal*, .notice, .pager*,
      .empty*, .skeleton-*, .subnav-tab) ve 3.16b'deki küçük eski sınıflar.
   ========================================================================== */

/* ---------- 3.1 Düğme ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--h-md); padding: 0 16px; border: 0; border-radius: var(--r-md);
  background: var(--surface-2); color: var(--fg);
  font-family: var(--f); font-size: var(--fs-md); font-weight: 650; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; position: relative;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.button svg { width: var(--ic-sm); height: var(--ic-sm); flex: none; }
.button:hover { background: var(--surface-3); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary:hover { background: var(--primary-ink); }
.button:is(.quiet, .ghost) { background: var(--surface-2); color: var(--fg); }
.button:is(.quiet, .ghost):hover { background: var(--surface-3); }
.button.text { background: transparent; color: var(--primary-ink); padding-inline: 8px; }
.button.text:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.button.danger { background: var(--bad); color: var(--on-status); }
.button.danger:hover { background: color-mix(in srgb, var(--bad) 86%, var(--fg)); }
.button.danger-quiet { background: var(--bad-soft); color: var(--bad); }
.button.danger-quiet:hover { background: color-mix(in srgb, var(--bad-soft) 80%, var(--bad)); }
.button.sm { min-height: var(--h-sm); padding: 0 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.button.lg { min-height: var(--h-lg); padding: 0 22px; font-size: var(--fs-lg); }
.button.block { display: flex; width: 100%; }
.button:is([disabled], [aria-disabled="true"]) { opacity: .5; cursor: not-allowed; transform: none; }
/* Meşgul: withBusy() aria-busy + aria-disabled koyar; genişlik korunur, ikon yerine dönen halka */
.button[aria-busy="true"] { opacity: 1; cursor: progress; }
.button[aria-busy="true"] svg { display: none; }
.button[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: ax-spin .8s linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--fg-2);
  cursor: pointer; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.icon-btn svg { width: var(--ic); height: var(--ic); }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.icon-btn.plain { border-color: transparent; background: transparent; }
.icon-btn.plain:hover { background: var(--surface-2); }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon-btn:is([disabled], [aria-disabled="true"]) { opacity: .5; cursor: not-allowed; }

/* ---------- 3.2 Form ---------- */
.ax-form { display: grid; gap: var(--sp-4); min-width: 0; }
.ax-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.ax-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.ax-label { font-size: var(--fs-sm); font-weight: 600; color: var(--fg-2); }
.ax-req { color: var(--bad); margin-left: 2px; }
.ax-hint { font-size: var(--fs-xs); font-weight: 500; line-height: 1.35; color: var(--muted); }
.ax-field > .ax-error, .ax-field-error { display: block; padding: 0; background: none; border: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--bad); }
.ax-fieldset { display: grid; gap: var(--sp-3); }
.ax-fieldset > legend { margin-bottom: var(--sp-2); font-size: var(--fs-h2); font-weight: 700; color: var(--fg); }
.ax-affix {
  display: flex; align-items: center; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface);
}
.ax-affix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.ax-affix > span { padding: 0 0 0 12px; color: var(--muted); font-weight: 600; }
.ax-affix > input, .ax-affix > input:focus-visible { border: 0; box-shadow: none; background: transparent; outline: none; }
.ax-money { text-align: right; font-variant-numeric: tabular-nums; }
details.ax-more { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
details.ax-more > summary {
  display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer;
  font-weight: 600; color: var(--fg-2); list-style: none;
}
details.ax-more > summary::-webkit-details-marker { display: none; }
details.ax-more > summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--dur-1) var(--ease);
}
details.ax-more[open] > summary::before { transform: rotate(45deg); }
details.ax-more > summary .ax-hint { margin-left: auto; font-weight: 500; }
details.ax-more > .ax-form, details.ax-more > div { margin-top: var(--sp-3); }

/* Anahtar (switch) */
.ax-switch-row { display: flex; align-items: center; gap: var(--sp-3); min-height: 40px; max-width: 560px; }
.ax-switch-row > label { margin-right: auto; font-weight: 600; color: var(--fg); cursor: pointer; }
.ax-switch-state { font-size: var(--fs-sm); color: var(--fg-2); min-width: 4ch; }
input.ax-switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; cursor: pointer;
  width: 36px; height: 22px; margin: 0; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
input.ax-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--fg-2); transition: transform var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
input.ax-switch:checked { background: var(--primary); border-color: var(--primary); }
input.ax-switch:checked::before { transform: translateX(14px); background: var(--on-primary); }
input.ax-switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input.ax-switch:disabled { opacity: .5; cursor: not-allowed; }

/* Bölümlü seçici (3.2): basılı = primary-soft + primary-ink + primary halka */
.ax-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border-radius: var(--r-md); background: var(--surface-2);
}
.ax-seg button {
  min-height: 34px; padding: 0 13px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--fg-2); font-family: var(--f); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.ax-seg button:hover { color: var(--fg); }
.ax-seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--primary); }
.ax-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.ax-seg button:is([disabled], [aria-disabled="true"]) { opacity: .5; cursor: not-allowed; }

/* ---------- 3.3 Kart ---------- */
.ax-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0;
  padding: var(--card-pad); border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1);
}
.ax-card.is-flat { box-shadow: none; }
.ax-card.is-inset { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.ax-card-head, .ax-sec-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.ax-card-head > :is(h2, h3), .ax-sec-h > :is(h2, h3) {
  margin: 0; display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-h2); line-height: 1.3; font-weight: 700; color: var(--fg);
}
.ax-card-head > :is(h2, h3) svg, .ax-sec-h > :is(h2, h3) svg { width: 18px; height: 18px; color: var(--primary); }
.ax-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 2px; }
.ax-viewbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.ax-viewbar > p { margin: 0; color: var(--fg-2); max-width: 70ch; }
.ax-viewbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ---------- 3.4 Tek rakam ---------- */
.ax-hero { gap: 8px; }
.ax-hero-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.ax-hero-value {
  font-size: var(--fs-hero); line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--fg);
  /* Tek rakam hizalanmaz: orantılı rakam ("₺1 17.060" boşluğu olmaz). */
  font-variant-numeric: proportional-nums; font-feature-settings: "tnum" 0; white-space: nowrap; overflow-wrap: normal;
}
.ax-hero-value .cur { margin-right: 2px; font-size: .55em; font-weight: 700; color: var(--muted); vertical-align: .38em; letter-spacing: 0; }
.ax-hero-value .sign { margin-right: 1px; color: inherit; }
.ax-hero-value .num { font-variant-numeric: inherit; font-feature-settings: inherit; }
.ax-hero-sub { margin: 0; font-size: var(--fs-md); color: var(--fg-2); }
.ax-hero-sub b { font-weight: 700; color: var(--fg); }
.ax-hero-link { justify-self: start; margin-left: -8px; }
.ax-meter { display: flex; height: 8px; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-2); }
.ax-meter > i { display: block; height: 100%; background: var(--info); }
.ax-meter > i + i { box-shadow: inset 2px 0 0 var(--surface); }
.ax-meter > i.is-ok { background: var(--ok); }
.ax-meter > i.is-info { background: var(--info); }
.ax-meter > i.is-warn { background: var(--warn); }
.ax-meter > i.is-bad { background: var(--bad); }
.ax-meter > i.is-idle { background: var(--line-strong); }
.ax-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--fg-2); }
.ax-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ax-legend > span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ax-legend > .is-ok::before { background: var(--ok); }
.ax-legend > .is-info::before { background: var(--info); }
.ax-legend > .is-warn::before { background: var(--warn); }
.ax-legend > .is-bad::before { background: var(--bad); }
.ax-legend b { font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.ax-hero[aria-busy="true"] .ax-hero-value { color: transparent; }

/* ---------- 3.5 Bekleyen işler şeridi ---------- */
.ax-waiting { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; min-width: 0; }
.ax-wait {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--fg); text-align: left; text-decoration: none;
  font-family: var(--f); cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.ax-wait:hover { border-color: var(--line-strong); }
.ax-wait:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ax-wait[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.ax-wait .n { min-width: 1.4ch; font-size: var(--fs-num-lg); line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ax-wait > span:not(.n) { display: grid; min-width: 0; }
.ax-wait b { font-size: var(--fs-sm); font-weight: 650; color: var(--fg); }
.ax-wait small { overflow: hidden; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ax-wait.is-ok .n { color: var(--ok); }
.ax-wait.is-info .n { color: var(--info); }
.ax-wait.is-warn .n { color: var(--warn); }
.ax-wait.is-bad .n { color: var(--bad); }
.ax-wait.is-idle .n, .ax-wait.is-zero .n { color: var(--muted); }
.ax-wait.is-zero, .ax-wait[aria-disabled="true"] { cursor: default; }
.ax-wait.is-zero:hover { border-color: var(--line); }
.ax-filter-note {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 6px 6px 6px 12px; border-radius: var(--r-md); background: var(--primary-soft);
  font-size: var(--fs-sm); color: var(--fg);
}

/* ---------- 3.6 Öneri kartı ---------- */
.ax-suggs { display: grid; gap: 10px; }
.ax-sugg {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--primary);
  border-radius: var(--r-lg); background: var(--surface);
}
.ax-sugg b { font-weight: 650; color: var(--fg); }
.ax-sugg p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--fg-2); }
.ax-sugg-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ax-sugg.is-running { border-left-color: var(--info); }
.ax-sugg.is-done { border-left-color: var(--ok); }
.ax-sugg .ax-progress { grid-column: 1 / -1; }
details.ax-why { margin-top: 4px; font-size: var(--fs-sm); color: var(--fg-2); }
details.ax-why > summary { display: inline-flex; min-height: 24px; align-items: center; cursor: pointer; color: var(--primary-ink); font-weight: 600; }
.ax-sugg-more { justify-self: start; }

/* ---------- 3.7 Durum ---------- */
.ax-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: var(--r-pill); background: var(--surface-2); color: var(--fg-2);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.ax-pill::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.ax-pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.ax-pill.is-info { background: var(--info-soft); color: var(--info); }
.ax-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.ax-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
.ax-pill.is-idle { background: var(--surface-2); color: var(--fg-2); }
.ax-st { font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }
.ax-st.is-ok { color: var(--ok); }
.ax-st.is-info { color: var(--info); }
.ax-st.is-warn { color: var(--warn); }
.ax-st.is-bad { color: var(--bad); }
.ax-st.is-idle { color: var(--muted); }

/* ---------- 3.8 Akış çubuğu (mini) ---------- */
.ax-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; width: 112px; height: 14px; }
.ax-flow > i { position: relative; display: block; height: 2px; background: var(--line-strong); }
.ax-flow > i::after {
  content: ""; position: absolute; top: 50%; right: -4px; width: 8px; height: 8px; border-radius: 50%;
  transform: translateY(-50%); box-sizing: border-box;
}
.ax-flow > i.is-done { height: 3px; background: var(--info); }
.ax-flow > i.is-done::after { background: var(--info); box-shadow: 0 0 0 2px var(--surface); }
.ax-flow.is-paid > i.is-done, .ax-flow.is-paid > i.is-done::after { background: var(--ok); }
.ax-flow > i.is-now { z-index: 2; }
.ax-flow > i.is-now::after { background: var(--info); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--info); }
.ax-flow > i.is-wait::after { background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.ax-flow > i:is(.is-bad, .is-late) { z-index: 1; }
.ax-flow > i:is(.is-bad, .is-late)::after { width: 10px; height: 10px; right: -5px; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
.ax-flow > i:is(.is-skip, .is-unknown)::after { border: 2px solid var(--line-strong); background: var(--surface); }

/* Akış çubuğu (büyük, çekmece) */
/* Üç biçim (kap genişliğine göre):
   ≥ 560 px  yatay, her adımın notu kendi sütununda;
   360–559   yatay (prototip, 460 px çekmece): etiket + saat; bekleyen/sorunlu adımların
             notları çubuğun altında .ax-flow-now'da, adım içi notlar yalnız ekran okuyucuya;
   < 360 px  dikey zaman çizelgesi, notlar adımın altında. */
.ax-flow-box { container-type: inline-size; display: grid; gap: 8px; min-width: 0; }
.ax-flow-lg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ax-step { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; padding: 22px 8px 0 0; }
.ax-step::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 3px; background: var(--line-strong); }
.ax-step:first-child::before { left: 7px; }
.ax-step:last-child::before { right: auto; width: 7px; }
.ax-step::after {
  content: ""; position: absolute; top: 1px; left: 0; width: 15px; height: 15px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface);
}
.ax-step > b { font-size: var(--fs-sm); font-weight: 650; color: var(--fg); overflow-wrap: anywhere; }
.ax-step > small { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
.ax-step > .ax-step-note { color: var(--fg-2); }
.ax-step > .ax-step-note a, .ax-step > .ax-step-note button { color: var(--primary-ink); font-weight: 650; }
.ax-step.is-done::before { background: var(--info); }
.ax-step.is-done::after { border-color: var(--info); background: var(--info); }
.ax-flow-lg.is-paid .ax-step.is-done::before { background: var(--ok); }
.ax-flow-lg.is-paid .ax-step.is-done::after { border-color: var(--ok); background: var(--ok); }
.ax-step.is-now::after { border-color: var(--info); background: var(--info); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--info); }
.ax-step.is-now > b { font-weight: 800; }
.ax-step.is-wait::after { border-color: var(--warn); border-width: 3px; }
.ax-step.is-wait > .ax-step-note { color: var(--warn); }
.ax-step.is-bad::after { border-color: var(--bad); background: var(--bad); }
.ax-step:is(.is-bad, .is-late) > .ax-step-note { color: var(--bad); font-weight: 600; }
.ax-step.is-late::after { border-color: var(--bad); border-width: 3px; }
.ax-step.is-skip > :is(b, .ax-step-note), .ax-step.is-todo > b { color: var(--muted); font-weight: 500; }
.ax-step.is-unknown::after { border-style: dashed; }
.ax-step.is-unknown > .ax-step-note { color: var(--fg-2); }
.ax-flow-foot { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.ax-flow-now { display: none; margin: 0; font-size: var(--fs-sm); color: var(--fg-2); }
.ax-flow-now > span { display: block; }
.ax-flow-now > span + span { margin-top: 2px; }
.ax-flow-now > span > b { font-weight: 650; color: var(--fg); }
.ax-flow-now > .is-wait { color: var(--warn); }
.ax-flow-now > :is(.is-bad, .is-late) { color: var(--bad); font-weight: 600; }
.ax-flow-fixes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; }
/* .ax-flow-fixes > .ax-flow-fix (0,2,0): Akış kabuğundaki .button.text / .button.sm dolgusunu ezer. */
.ax-flow-fixes > .ax-flow-fix {
  min-height: var(--h-sm); padding: 0; border: 0; background: transparent; color: var(--primary-ink);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer;
}
.ax-flow-fixes > .ax-flow-fix:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.ax-flow-fix:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-xs); }
@container (min-width: 360px) and (max-width: 559px) {
  .ax-step > .ax-step-note {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .ax-flow-now { display: block; }
}
@container (max-width: 359px) {
  .ax-flow-lg { grid-template-columns: minmax(0, 1fr); }
  .ax-step { padding: 0 0 14px 28px; }
  .ax-step::before { top: 8px; bottom: -8px; left: 6px; right: auto; width: 3px; height: auto; }
  .ax-step:first-child::before { left: 6px; }
  .ax-step:last-child::before { display: none; }
}

/* ---------- 3.9 Tablolar ve liste satırları ---------- */
.ax-table-wrap { min-width: 0; overflow-x: auto; }
.ax-table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); font-variant-numeric: tabular-nums; }
.ax-table th {
  position: sticky; top: 0; z-index: var(--z-sticky); padding: 8px 10px; border-bottom: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-align: left; white-space: nowrap;
}
.ax-table td { height: var(--row-h); padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--fg); vertical-align: middle; }
.ax-table tbody tr { position: relative; }
.ax-table tbody tr:hover { background: var(--surface-2); }
.ax-table :is(th, td).num { text-align: right; white-space: nowrap; }
.ax-table td small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.ax-table td.ax-check { width: 44px; padding: 0; }
.ax-check > label { display: grid; place-items: center; width: 100%; min-height: var(--row-h); cursor: pointer; }
.ax-row-open { color: var(--fg); font-weight: 600; text-decoration: none; }
.ax-row-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.ax-row-open:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-xs); }
.ax-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.ax-rowmenu { position: relative; display: inline-flex; }

.ax-list { display: grid; min-width: 0; }
.ax-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 112px 136px; align-items: center; gap: 14px;
  width: 100%; min-height: var(--row-h); padding: 10px 8px; border: 0; border-radius: var(--r-md);
  background: none; color: var(--fg); text-align: left; text-decoration: none; font-family: var(--f); cursor: pointer;
}
.ax-row + .ax-row { box-shadow: 0 -1px 0 var(--line); }
.ax-row:hover { background: var(--surface-2); box-shadow: none; }
.ax-row:hover + .ax-row { box-shadow: none; }
.ax-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.ax-who { display: grid; min-width: 0; }
.ax-who b { overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.ax-who small { overflow: hidden; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ax-amt { display: grid; justify-items: end; gap: 2px; min-width: 0; text-align: right; }
.ax-amt b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ax-row > .d-only { font-size: var(--fs-sm); color: var(--fg-2); text-align: right; white-space: nowrap; }
html[data-detail="detailed"] .ax-row.has-detail { grid-template-columns: 38px minmax(0, 1fr) 112px 110px 96px 136px; }
.ax-list-h {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 112px 110px 96px 136px; gap: 14px; padding: 0 8px 6px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
}
.ax-list-h > span:nth-child(n+4) { text-align: right; }

.ax-batchbar {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-2); font-weight: 600;
}

/* ---------- 3.10 Sekmeler, çipler, arama, sayfalama ---------- */
.ax-tabs {
  display: flex; align-items: stretch; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.ax-tabs::-webkit-scrollbar { display: none; }
.ax-tabs > :is(a, button) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--fg-2); font-family: var(--f); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.ax-tabs > :is(a, button):hover { color: var(--fg); }
.ax-tabs > :is([aria-current="page"], [aria-selected="true"]) { border-bottom-color: var(--primary); color: var(--fg); font-weight: 650; }
.ax-tabs > :is(a, button):focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--r-xs); }
.subnav-tab[aria-current="page"] { border-bottom-color: var(--primary); color: var(--fg); }

.ax-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface);
  color: var(--fg); font-family: var(--f); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.ax-chip svg { width: 15px; height: 15px; color: var(--fg-2); }
.ax-chip:hover { background: var(--surface-2); }
.ax-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.ax-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.ax-search {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 260px; max-width: 420px;
  min-height: var(--h-md); padding: 0 6px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--muted);
}
.ax-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.ax-search svg { width: 18px; height: 18px; flex: none; }
.ax-search input, .ax-search input:focus-visible {
  flex: 1; min-width: 0; min-height: 0; height: var(--h-md); padding: 0; border: 0; box-shadow: none; outline: none;
  background: transparent; color: var(--fg); font: inherit; font-size: var(--fs-md);
}
.ax-search input::-webkit-search-cancel-button { display: none; }
.ax-search .icon-btn { width: 32px; height: 32px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.pager:empty { display: none; }
.pager-info { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-buttons { display: flex; gap: 4px; flex-wrap: wrap; }
.pager-buttons button {
  min-width: 40px; min-height: var(--h-md); padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--fg); font-family: var(--f); font-weight: 600; cursor: pointer;
}
.pager-buttons button:is(.active, [aria-current="page"]) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.pager-buttons button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 3.11 Boş, hata, yükleniyor ---------- */
.ax-empty, .empty-state {
  display: grid; justify-items: center; gap: 8px; padding: 32px 16px; text-align: center; color: var(--fg-2);
}
.ax-empty-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-2); color: var(--fg-2);
}
.ax-empty-icon svg { width: 28px; height: 28px; }
.ax-empty b { font-size: var(--fs-lg); font-weight: 700; color: var(--fg); }
.ax-empty p { margin: 0; max-width: 46ch; color: var(--fg-2); }
.ax-empty .button { margin-top: 6px; }
.empty { padding: 24px 12px; text-align: center; color: var(--muted); }
.ax-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--bad-soft); color: var(--bad); font-weight: 600;
}
.ax-error > svg { width: 20px; height: 20px; flex: none; }
.ax-error > div { display: grid; gap: 4px; min-width: 0; flex: 1; }
.ax-error small { color: var(--fg-2); font-weight: 500; overflow-wrap: anywhere; }
.ax-error .button { margin-left: auto; flex: none; }
.ax-skel {
  display: block; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: ax-shimmer 1.4s linear infinite;
}
.ax-skel.is-line { height: 12px; width: 100%; }
.ax-skel.is-hero { height: 48px; width: 220px; max-width: 100%; border-radius: var(--r-md); }
.ax-skel.is-card { height: 120px; border-radius: var(--r-xl); }
.ax-skel.is-row { height: var(--row-h); border-radius: var(--r-md); }
@keyframes ax-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skeleton-list { display: grid; gap: 10px; padding: 8px 0; }
.skeleton-row {
  height: 44px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: ax-shimmer 1.4s linear infinite;
}

/* ---------- 3.12 Bildirim (toast) ---------- */
.notice {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100% - 32px));
  padding: 12px 14px 12px 16px; border-radius: var(--r-lg); background: var(--inv-bg); color: var(--inv-fg);
  box-shadow: var(--shadow-2); font-size: var(--fs-md); font-weight: 600;
  opacity: 0; pointer-events: none; transform: translate(-50%, 12px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.notice.visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.notice > svg { width: 18px; height: 18px; flex: none; }
.notice.error { box-shadow: inset 4px 0 0 var(--inv-bad), var(--shadow-2); padding-left: 18px; }
.notice.error > svg { color: var(--inv-bad); }
.notice-text { min-width: 0; }
/* Eylem ve Kapat düğmeleri yeni öğeler: eski kabukta da çalışsın diye kapısız taban. */
.notice-action, .notice-close { margin-left: 10px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; vertical-align: middle; }
.notice-action { text-decoration: underline; text-underline-offset: 3px; }
.notice-close { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: var(--r-sm); }
.notice-close svg { width: 16px; height: 16px; }
.notice-action {
  flex: none; margin-left: 0; text-decoration: none; min-height: 32px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  color: var(--inv-link); font-family: var(--f); font-size: var(--fs-md); font-weight: 700;
}
.notice-close {
  flex: none; margin-left: 0; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--inv-fg); cursor: pointer;
}
:is(.notice-action, .notice-close):focus-visible { outline: 2px solid var(--inv-link); outline-offset: 1px; }
@media (max-width: 819px) {
  .notice { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- 3.13 Modal ve onay ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-overlay); display: none; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); }
.modal-card {
  --modal-foot-h: 72px;
  position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: calc(100dvh - 48px);
  border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-3);
  overflow: hidden; animation: ax-pop var(--dur-2) var(--ease);
}
.modal-card.is-xl, :where(#modal[data-type="invoice"]) .modal-card { width: min(960px, 100%); }
.modal-head {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: var(--fs-h2); font-weight: 700; }
.modal-head .eyebrow { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 20px; scroll-padding-bottom: var(--modal-foot-h, 72px); }
#recordForm { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal-actions {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface);
}
.modal-actions .ax-hint { margin-right: auto; }
/* Onay penceresi çekmece/modal üstünde açılır (kapısız: yeni sınıf, eski kabukta da gerekli). */
.modal.ax-confirm { z-index: var(--z-overlay-top); }
.ax-confirm .modal-card { width: min(460px, 100%); }
.ax-confirm-body { display: grid; gap: 12px; color: var(--fg-2); }
@keyframes ax-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ax-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 819px) {
  .modal { padding: 0; place-items: end stretch; }
  .modal-card {
    width: 100%; height: 100dvh; max-height: 100dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; border-width: 1px 0 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
    animation: ax-sheet-up var(--dur-3) var(--ease);
  }
  .ax-confirm .modal-card { height: auto; max-height: 88dvh; }
  .modal-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .modal-actions .button { flex: 1 1 auto; }
}
html.is-locked { overflow: hidden; }

/* ---------- 3.14 Çekmece / alt sayfa ---------- */
.ax-scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: var(--overlay); }
.ax-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-overlay);
  display: flex; flex-direction: column; width: min(480px, 100%);
  border-left: 1px solid var(--line); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-3);
  animation: ax-drawer-in var(--dur-3) var(--ease);
}
.ax-drawer.is-wide { width: min(640px, 100%); }
.ax-drawer-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.ax-drawer-head > div { display: grid; min-width: 0; flex: 1; }
.ax-drawer-head small { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.ax-drawer-head h2 { margin: 0; overflow: hidden; font-size: var(--fs-lg); font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.ax-drawer-body { display: grid; align-content: start; gap: 20px; flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.ax-drawer-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.ax-drawer-handle { display: none; }
@keyframes ax-drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 819px) {
  .ax-drawer, .ax-drawer.is-wide {
    top: auto; left: 0; width: 100%; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--line);
    border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    animation: ax-sheet-up var(--dur-3) var(--ease);
  }
  .ax-drawer-handle { display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: var(--r-pill); background: var(--line-strong); }
}
.ax-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ax-identity > div { display: grid; min-width: 0; }
.ax-identity b { font-size: var(--fs-lg); font-weight: 700; }
.ax-identity small { color: var(--muted); font-size: var(--fs-sm); }
.ax-problem {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bad-soft); color: var(--bad); font-size: var(--fs-md); font-weight: 600;
}
.ax-problem > svg { width: 20px; height: 20px; flex: none; }
.ax-problem > span { flex: 1; min-width: 0; }
.ax-problem :is(a, button) {
  flex: none; margin-left: auto; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
details.ax-breakdown { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; }
details.ax-breakdown > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
details.ax-breakdown[open] { padding-bottom: 12px; }

/* ---------- 3.15 Metrik ---------- */
.ax-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ax-metric { display: grid; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.ax-metric > span { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.ax-metric > b { font-size: var(--fs-num-lg); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-metric > b.is-bad { color: var(--bad); }
.ax-metric > b.is-ok { color: var(--ok); }
.ax-metric > b.is-warn { color: var(--warn); }
.ax-metric > small { font-size: var(--fs-xs); color: var(--fg-2); }

/* ---------- 3.16 Diğer ---------- */
.ax-avatar {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--surface-2); color: var(--fg-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
}
.ax-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--fg-2); font-size: var(--fs-xs); font-style: normal; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ax-count[data-attention] { background: var(--primary); color: var(--on-primary); }
.ax-menu {
  position: absolute; z-index: var(--z-menu); display: grid; min-width: 200px; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-2);
}
.ax-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--fg); text-align: left; text-decoration: none;
  font-family: var(--f); font-size: var(--fs-md); font-weight: 500; cursor: pointer;
}
.ax-menu-item svg { width: 18px; height: 18px; color: var(--fg-2); flex: none; }
.ax-menu-item:is(:hover, :focus-visible) { background: var(--surface-2); outline: none; }
.ax-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.ax-menu-item.is-danger, .ax-menu-item.is-danger svg { color: var(--bad); }
.ax-menu-item:is([disabled], [aria-disabled="true"]) { opacity: .5; cursor: not-allowed; }
.ax-menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }

.ax-banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--info-soft); color: var(--fg); font-size: var(--fs-md);
}
.ax-banner > svg { width: 20px; height: 20px; flex: none; color: var(--info); }
.ax-banner > span, .ax-banner > div { flex: 1; min-width: 0; }
.ax-banner .button { flex: none; }
.ax-banner.is-ok { background: var(--ok-soft); } .ax-banner.is-ok > svg { color: var(--ok); }
.ax-banner.is-warn { background: var(--warn-soft); } .ax-banner.is-warn > svg { color: var(--warn); }
.ax-banner.is-bad { background: var(--bad-soft); } .ax-banner.is-bad > svg { color: var(--bad); }

dl.ax-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; margin: 0; font-size: var(--fs-md); }
dl.ax-kv dt { color: var(--fg-2); }
dl.ax-kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
dl.ax-kv .is-total { padding-top: 10px; border-top: 1px solid var(--line); }
.term { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

.ax-progress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: var(--r-pill); background: var(--surface-2); }
progress.ax-progress { -webkit-appearance: none; appearance: none; }
progress.ax-progress::-webkit-progress-bar { background: var(--surface-2); }
progress.ax-progress::-webkit-progress-value { background: var(--info); border-radius: var(--r-pill); }
progress.ax-progress::-moz-progress-bar { background: var(--info); }
.ax-progress.is-indeterminate { position: relative; }
.ax-progress.is-indeterminate::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; border-radius: var(--r-pill);
  background: var(--info); animation: ax-indeterminate 1.2s var(--ease) infinite;
}
@keyframes ax-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Kalem düzenleyici (3.16) — fatura ve teklif editörleri ortak */
.ax-lines { display: grid; gap: 8px; min-width: 0; }
.ax-lines-head, .ax-line {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) 84px 128px 92px 116px 40px;
}
.ax-lines-head { padding: 0 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.ax-lines-head > span:nth-child(n+3):nth-child(-n+6) { text-align: right; }
.ax-line-cell { display: grid; min-width: 0; }
.ax-line-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ax-line :is(.line-qty, .line-price) input { text-align: right; font-variant-numeric: tabular-nums; }
.ax-line .line-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-line .line-remove { justify-self: end; }
.ax-lines-add { width: 100%; }
.ax-lines-totals {
  display: grid; justify-content: end; gap: 4px; padding: 12px 0 4px;
  border-top: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums;
}
/* Modal içinde toplam çubuğu alt düğmelerin üstünde yapışkan (3.16). */
.modal-body .ax-lines-totals { position: sticky; bottom: 0; z-index: 1; }
.ax-lines-totals > div { display: flex; justify-content: space-between; gap: 24px; min-width: 260px; }
.ax-lines-totals > .is-grand { padding-top: 6px; border-top: 1px solid var(--line); font-size: var(--fs-lg); font-weight: 800; }
@media (max-width: 559px) {
  .ax-lines-head { display: none; }
  .ax-line {
    position: relative; grid-template-columns: 30% minmax(0, 1fr); gap: 10px;
    padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  }
  .ax-line-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; font-size: var(--fs-xs); font-weight: 600; color: var(--fg-2); }
  .ax-line .line-product { grid-column: 1 / -1; padding-right: 48px; }
  .ax-line .line-desc { grid-column: 1 / -1; }
  .ax-line .line-total { align-self: end; }
  .ax-line .line-remove { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; }
  .ax-lines-totals > div { min-width: 0; }
  .ax-lines-totals { justify-content: stretch; }
}

/* Ayarlar › Görünüm seçim kartları (6.20) */
.ax-appearance { display: grid; gap: var(--sp-6); }
.ax-appearance > section { display: grid; gap: 10px; }
.ax-appearance h3 { margin: 0; font-size: var(--fs-h2); font-weight: 700; color: var(--fg); }
.ax-appearance p { margin: 0; color: var(--fg-2); font-size: var(--fs-sm); }
.ax-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ax-choices.is-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ax-appearance .ax-choice {
  position: relative; display: grid; align-content: start; gap: 6px; min-height: 64px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--fg);
  font-family: var(--f); text-align: left; cursor: pointer; transform: none; box-shadow: none;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.ax-appearance .ax-choice:hover { border-color: var(--fg-2); transform: none; box-shadow: none; }
.ax-appearance .ax-choice[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.ax-appearance .ax-choice:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
.ax-choice-name { font-size: var(--fs-md); font-weight: 650; color: var(--fg); }
.ax-choice-desc { font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; color: var(--fg-2); }
.ax-choice[aria-pressed="true"] .ax-choice-name { color: var(--primary-ink); }
.ax-choice-check { position: absolute; top: 10px; right: 10px; display: none; color: var(--primary-ink); }
.ax-choice-check svg { width: 18px; height: 18px; }
.ax-choice[aria-pressed="true"] .ax-choice-check { display: block; }
.ax-swatch { display: flex; align-items: center; gap: 6px; }
.ax-swatch > i { display: block; height: 18px; border-radius: var(--r-xs); }
.ax-swatch > .is-primary { width: 34px; background: var(--primary); }
.ax-swatch > .is-soft { width: 18px; background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--line); }
.ax-swatch > .is-ink { width: 18px; background: var(--primary-ink); }
.ax-appearance .ax-kbd-list { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-sm); color: var(--fg-2); }
.ax-appearance kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: var(--r-xs); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--fg); font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 600; text-align: center;
}
.ax-linkish { padding: 0; border: 0; background: none; color: var(--primary-ink); font: inherit; font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ax-linkish:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-xs); }

/* ---------- Telefon (< 820): dokunma 44 px, tablolar kart ---------- */
@media (max-width: 819px) {
  :is(.button.sm, .icon-btn, .subnav-tab, .pager-buttons button) { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .ax-chip, .ax-seg button, .ax-tab, .ax-tabs > :is(a, button), details > summary, .ax-menu-item, .ax-wait { min-height: 44px; }
  .ax-st { font-size: var(--fs-sm); }
  .ax-form-row { grid-template-columns: minmax(0, 1fr); }
  .ax-waiting { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--fg) 16px, var(--fg) calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, var(--fg) 16px, var(--fg) calc(100% - 24px), transparent 100%); }
  .ax-waiting::-webkit-scrollbar { display: none; }
  .ax-wait { flex: 0 0 auto; display: grid; justify-items: start; gap: 2px; min-height: 56px; padding: 8px 14px; }
  .ax-wait small { display: none; }
  .ax-hero.is-compact .ax-meter, .ax-hero.is-compact .ax-legend, .ax-hero.is-compact .ax-hero-link { display: none; }
  .ax-hero.is-compact .ax-hero-value { font-size: 2rem; }
  .ax-sugg { grid-template-columns: minmax(0, 1fr); }
  .ax-sugg-acts { justify-content: flex-start; }
  .ax-sugg-acts .button.sm { min-height: 44px; }
  .ax-row, html[data-detail="detailed"] .ax-row.has-detail { grid-template-columns: 38px minmax(0, 1fr) minmax(0, max-content); }
  .ax-row .ax-amt { max-width: 46vw; }
  .ax-row .ax-flow { grid-column: 2; grid-row: 2; width: 100%; max-width: 160px; }
  .ax-row .ax-amt { grid-column: 3; grid-row: 1 / span 2; }
  .ax-row > .d-only, .ax-list-h { display: none !important; }
  /* Tablo → kart */
  .ax-table-wrap { overflow: visible; }
  .ax-table, .ax-table tbody, .ax-table tr, .ax-table td { display: block; width: 100%; }
  .ax-table thead { display: none; }
  .ax-table tbody { display: grid; gap: 10px; }
  .ax-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  .ax-table td { height: auto; padding: 0; border: 0; }
  .ax-table td:nth-child(1) { grid-column: 1; }
  .ax-table td:nth-child(2) { grid-column: 2; text-align: right; }
  .ax-table td:nth-child(n+3) { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
  .ax-table td:nth-child(n+3)::before { content: attr(data-label); color: var(--muted); font-weight: 600; }
  .ax-table td:nth-child(n+3):not([data-label])::before { content: none; }
  .ax-table td.ax-row-actions-cell { justify-content: flex-end; }
  .ax-row-open::after { content: ""; position: absolute; inset: 0; }
  .ax-table td.ax-check { position: relative; z-index: 1; width: auto; }
  /* Seçim kutulu satır: kutu solda, başlık = ad + tutar. */
  .ax-table tbody tr:has(> td.ax-check) { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .ax-table tbody tr:has(> td.ax-check) > td.ax-check { grid-column: 1; grid-row: 1; }
  .ax-table tbody tr:has(> td.ax-check) > td:nth-child(2) { grid-column: 2; text-align: left; }
  .ax-table tbody tr:has(> td.ax-check) > td:nth-child(3) { grid-column: 3; display: block; text-align: right; font-size: inherit; }
  .ax-table tbody tr:has(> td.ax-check) > td:nth-child(3)::before { content: none; }
  .ax-check > label { min-height: 32px; justify-content: start; }
  .ax-batchbar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- 3.16b Kalıcı küçük sınıflar (köprüden terfi; Lane 7) ----------
   Üretilen işaretlemenin hâlâ kullandığı eski adlar. Yeni kod ax-* kullanır. */
.eyebrow { color: var(--muted); font-size: var(--fs-xs); font-weight: 650; letter-spacing: .02em; }
.muted { color: var(--muted); }
.form-help { margin: 10px 0 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.positive { color: var(--ok); }
.negative { color: var(--bad); }
.error { padding: 30px 24px; color: var(--bad); font-size: var(--fs-sm); text-align: center; }
.lookup-status { margin-top: 4px; font-size: var(--fs-xs); }

/* Eski form ızgarası: plan / tahmin / gerçekleşme ve basit modallar. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid > * { min-width: 0; }
.form-grid label { display: grid; gap: 6px; color: var(--fg-2); font-size: var(--fs-sm); font-weight: 600; }
.form-grid > .full, .form-grid label.full, .form-grid .form-help.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
.form-grid input[type="checkbox"], .form-grid input[type="radio"] { width: auto; flex: none; margin: 0; }

/* Fiş yükleme ilerlemesi (Fişler). */
.invoice-scan-source { display: grid; gap: 7px; }
.invoice-scan-source small { color: var(--muted); line-height: 1.4; }
.invoice-scan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--fg); }
.invoice-scan-head strong { font-size: var(--fs-sm); font-weight: 650; }
.invoice-scan-head span { color: var(--primary-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.invoice-scan-track { height: 7px; overflow: hidden; border-radius: var(--r-xs); background: var(--line); }
.invoice-scan-track > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width var(--dur-2) var(--ease); }
.invoice-scan-track.is-indeterminate > span { width: 40%; animation: invoiceScanIndeterminate 1.1s ease-in-out infinite; }
@keyframes invoiceScanIndeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* Tahsilat penceresi: faturaya sayılan tutar satırları. */
.payment-allocation-row { display: grid; grid-template-columns: 2fr 1fr 120px; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm); }
.payment-allocation-row input { width: 100%; }

/* PDF penceresi ve Nilvera sayfalama / bağlantı durumu. */
#pdfIframe { flex: 1; width: 100%; min-height: 550px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
#bimasrafConnectionStatus, #nilveraStatus { min-height: 38px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
#nilveraPaging { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; font-size: var(--fs-sm); overflow-wrap: anywhere; }
#nilveraPaging > div { min-width: 0; max-width: 100%; padding: 6px 0; }
@media (max-width: 819px) {
  .ax-search input, .ax-search input:focus-visible { font-size: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .payment-allocation-row { grid-template-columns: minmax(0, 1fr) 120px; }
  .payment-allocation-row > :first-child { grid-column: 1 / -1; }
  #pdfIframe { min-height: 0; height: 60vh; }
  #nilveraPaging { grid-template-columns: minmax(0, 1fr); }
}

/* Küçük denetimlerde (32–34 px) görünmez isabet alanı: dikey 40 px'e tamamlanır (3.1, 2.5). */
.ax-seg button, .ax-chip { position: relative; }
.button.sm::after, .ax-seg button::after, .ax-chip::after { content: ""; position: absolute; inset: -4px 0; }
.ax-seg button::after { inset: -3px 0; }
