/* KLSOPS — Swiss kabuk (beyaz zemin, çizgisel ayraç, sakin renk).
   Sınıf/ID sözleşmesi korunur: .nav a[data-modul], .gizli, .panel, .liste, … */

:root {
  --app-ink: #141414;
  --app-teal: #1a5c55;
  --app-teal-dark: #0f3f3b;
  --app-muted: #6a6a6a;
  --app-line: #e6e6e6;
  --app-paper: #f7f7f5;
  --app-white: #ffffff;
  --app-sidebar: #ffffff;
  --app-sidebar-line: #e6e6e6;
  --app-sidebar-hover: #f2f2f0;
  --app-danger: #a12727;
  --app-ok: #276a59;
  --app-warn: #8a4b00;
  --app-sidebar-w: 248px;
  --font-ui: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --dur-hizli: 120ms;
  --dur-normal: 200ms;
  --radius: 2px;
  --focus-ring: 2px solid var(--app-ink);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--app-ink);
  background: var(--app-paper);
  line-height: 1.45;
  font-feature-settings: "kern" 1;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* B3 — klavye odağı; fare tıklamasında halka yok */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.gizli { display: none !important; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- giriş */
.giris-kutu {
  max-width: 400px;
  margin: 10vh auto;
  background: var(--app-white);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  padding: 32px;
}
.giris-kutu h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.giris-kutu p.alt-baslik {
  color: var(--app-muted);
  margin: 0 0 20px;
  font-size: 0.9rem;
}
.alan { margin-bottom: 14px; }
.alan label {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--app-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alan input, .alan select, .alan textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  background: var(--app-white);
  color: var(--app-ink);
  outline: none;
  transition: border-color var(--dur-hizli) ease, background-color var(--dur-hizli) ease;
}
.alan input:focus-visible, .alan select:focus-visible, .alan textarea:focus-visible {
  border-color: var(--app-ink);
}
.satir-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

button.birincil {
  background: var(--app-ink);
  color: #fff;
  border: 1px solid var(--app-ink);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 650;
  transition: background-color var(--dur-hizli) ease, border-color var(--dur-hizli) ease,
    opacity var(--dur-hizli) ease;
}
button.birincil:hover { background: var(--app-teal-dark); border-color: var(--app-teal-dark); }
button.ikincil {
  background: var(--app-white);
  color: var(--app-ink);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: border-color var(--dur-hizli) ease, background-color var(--dur-hizli) ease,
    color var(--dur-hizli) ease;
}
button.ikincil:hover { border-color: var(--app-ink); }
button.tehlike {
  background: var(--app-danger);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity var(--dur-hizli) ease;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.hata-mesaji { color: var(--app-danger); font-size: 0.85rem; margin-top: 10px; }
.firma-liste { display: flex; flex-direction: column; gap: 0; margin: 16px 0; border-top: 1px solid var(--app-line); }
.firma-satir {
  display: flex; justify-content: space-between; align-items: center;
  border: 0; border-bottom: 1px solid var(--app-line); border-radius: 0; padding: 12px 4px; cursor: pointer;
  background: transparent;
  transition: background-color var(--dur-hizli) ease;
}
.firma-satir:hover { background: var(--app-sidebar-hover); }
.firma-satir .rol-etiket { font-size: 0.75rem; color: var(--app-muted); }

/* -------------------------------------------------------- uygulama kabuğu */
.kabuk {
  min-height: 100vh;
  background: var(--app-paper);
  color: var(--app-ink);
}

.nav {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--app-sidebar-w);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  background: var(--app-sidebar);
  color: var(--app-ink);
  border-right: 1px solid var(--app-sidebar-line);
}
.nav .marka {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  border-bottom: 1px solid var(--app-line);
  margin-bottom: 4px;
}
.nav .marka b { font-weight: 750; }
.marka-rozet,
.mobil-marka > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--app-ink);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.tenant-satir {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  padding: 12px 8px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--app-line);
  border-radius: 0;
}
.tenant-avatar,
.profil-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--app-paper);
  color: var(--app-ink);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  font-size: 0.65rem;
  font-weight: 800;
}
.profil-avatar { width: 29px; height: 29px; border-radius: 50%; font-size: 0.7rem; }
.tenant-metin {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tenant-metin small {
  color: var(--app-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tenant-metin b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--app-ink);
  font-size: 0.85rem;
  font-weight: 650;
}

.nav-grup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 20px;
  flex: 1;
}
.nav-ust-etiket {
  margin: 0 8px 8px;
  color: var(--app-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--app-muted);
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-hizli) ease, color var(--dur-hizli) ease;
}
.nav-isaret {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  color: var(--app-muted);
  background: transparent;
}
.nav-isaret svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.nav a:hover,
.nav a.aktif {
  color: var(--app-ink);
  background: var(--app-sidebar-hover);
}
.nav a.aktif .nav-isaret {
  color: var(--app-ink);
  background: var(--app-paper);
  border-color: var(--app-ink);
}

.nav-alt {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--app-sidebar-line);
}
.guvenlik-chip {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
}
.guvenlik-chip > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--app-paper);
  color: var(--app-ok);
  border: 1px solid var(--app-line);
  border-radius: 50%;
  font-size: 0.75rem;
}
.guvenlik-chip div { display: flex; flex-direction: column; gap: 2px; }
.guvenlik-chip b { font-size: 0.75rem; }
.guvenlik-chip small { color: var(--app-muted); font-size: 0.7rem; }

.gövde {
  min-height: 100vh;
  margin-left: var(--app-sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--app-paper);
  min-width: 0;
}
.ust-bar {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--app-white);
  border-bottom: 1px solid var(--app-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.mobil-marka { display: none; align-items: center; gap: 8px; font-size: 0.95rem; letter-spacing: 0.08em; font-weight: 700; }
.kimlik-kutu {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.ust-bar .kimlik {
  font-size: 0.85rem;
  color: var(--app-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icerik {
  padding: 28px 32px 72px;
  flex: 1;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  overflow-x: auto;
}

.mobil-nav { display: none; }

/* --------------------------------------------------------------- ortak */
.panel {
  background: var(--app-white);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.panel h2 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.panel h3 {
  margin: 16px 0 8px;
  font-size: 0.85rem;
  color: var(--app-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.form-satiri { display: flex; gap: 12px; flex-wrap: wrap; }
.form-satiri .alan { flex: 1; min-width: 160px; }
table.liste {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.mal-form-sol,
#mal-arac-govde,
#mal-liste-panel,
#mal-detay-kalemler,
#mal-detay-gecmis {
  overflow-x: auto;
}
table.liste th, table.liste td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--app-line);
  color: var(--app-muted);
}
table.liste th {
  color: var(--app-muted);
  font-weight: 650;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.liste td {
  color: var(--app-ink);
  font-variant-numeric: tabular-nums;
}
table.liste tr { transition: background-color var(--dur-hizli) ease; }
table.liste tr:hover { background: var(--app-sidebar-hover); cursor: pointer; }
.arac-cubugu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--app-line);
}
.arac-cubugu h2 { margin: 0; letter-spacing: -0.03em; }

/* Modül hero — Swiss: açık zemin, tipografi hiyerarşisi */
.modul-hero {
  position: relative;
  overflow: visible;
  min-height: 0;
  margin-bottom: 18px;
  padding: 22px 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--app-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--app-line);
  border-radius: 0;
}
.modul-hero::before { content: none; }
.modul-hero > * { position: relative; z-index: 1; }
.modul-hero small {
  display: block;
  margin-bottom: 6px;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modul-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.modul-hero p {
  margin: 8px 0 0;
  max-width: 42rem;
  color: var(--app-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.modul-hero-aksiyon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.modul-hero .birincil {
  color: #fff;
  background: var(--app-ink);
  border-color: var(--app-ink);
  box-shadow: none;
}
.modul-hero .birincil:hover {
  background: var(--app-teal-dark);
  border-color: var(--app-teal-dark);
  color: #fff;
}
.modul-hero .ikincil {
  background: transparent;
  color: var(--app-ink);
  border-color: var(--app-line);
}
.modul-hero .ikincil:hover {
  border-color: var(--app-ink);
  color: var(--app-ink);
}
.modul-hero .buton-gibi-baglanti {
  background: transparent;
  color: var(--app-ink);
  border-color: var(--app-line);
  margin-right: 0;
}
.modul-hero .buton-gibi-baglanti:hover {
  border-color: var(--app-ink);
  color: var(--app-ink);
}

.bos-durum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  padding: 28px 16px;
  color: var(--app-muted);
  border: 1px dashed var(--app-line);
  background: var(--app-white);
}
.bos-durum > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--app-paper);
  border: 1px solid var(--app-line);
  color: var(--app-ink);
  font-weight: 800;
  font-size: 0.95rem;
}
.bos-durum h3 {
  margin: 0 0 6px;
  color: var(--app-ink);
  font-size: 1rem;
}
.bos-durum p {
  margin: 0;
  max-width: 380px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.liste-panel-ust {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.liste-panel-ust small {
  color: var(--app-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.liste-panel-ust h2 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}
.form-satiri.ust-bosluklu { margin-top: 14px; }
.alan.alt-hizali { align-self: flex-end; }
.buton-gibi-baglanti {
  display: inline-block;
  text-decoration: none;
  background: var(--app-white);
  color: var(--app-ink);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-right: 8px;
  font-weight: 600;
  transition: border-color var(--dur-hizli) ease;
}
.kurtarma-kutu {
  background: var(--app-paper);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--app-line);
}
.rozet, .durum-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--app-paper);
  color: var(--app-muted);
  border: 1px solid var(--app-line);
  font-style: normal;
}
.rozet.beklemede, .durum-chip.beklemede { background: #f8f1e4; color: #896837; border-color: #e0c48a; }
.rozet.kazanildi, .durum-chip.kazanildi,
.rozet.aktif, .durum-chip.aktif { background: #e8f2ee; color: var(--app-ok); border-color: #c5ddd4; }
.rozet.kaybedildi, .durum-chip.kaybedildi { background: #fdeaea; color: #8a1c27; border-color: #e08585; }
.rozet.arsiv, .durum-chip.arsiv,
.rozet.taslak, .durum-chip.taslak { background: #f0f0f0; color: #555; border-color: var(--app-line); }
.rozet.kaynak-yesil { background: #e8f2ee; color: var(--app-ok); border-color: #c5ddd4; }
.rozet.kaynak-gri { background: var(--app-paper); color: var(--app-muted); }
.rozet.kaynak-manuel { background: #f5efe6; color: #8b6940; border-color: #e0c48a; }
.uyari-kutu {
  border: 1px solid #e0c48a;
  background: #f8f1e4;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.uyari-kutu.kritik {
  border-color: #e08585;
  background: #fdeaea;
}
.cakisma-kutu {
  border: 1px solid var(--app-danger);
  background: #fdeaea;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
}
.modal-arka {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-kutu {
  background: var(--app-white);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 520px;
  width: 92%;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
.modal-kutu h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.modal-kutu .modal-aksiyonlar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* B6 — toast + iskelet */
.toast-yigin {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 14px;
  background: var(--app-ink);
  color: #fff;
  border: 1px solid var(--app-ink);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-normal) ease, transform var(--dur-normal) ease;
}
.toast.toast-basari { background: var(--app-ok); border-color: var(--app-ok); }
.toast.toast-hata { background: var(--app-danger); border-color: var(--app-danger); }
.toast.toast-uyari { background: var(--app-warn); border-color: var(--app-warn); }
.toast.toast-cikis {
  opacity: 0;
  transform: translateY(6px);
}
.iskelet {
  display: grid;
  gap: 10px;
}
.iskelet-satir {
  height: 14px;
  background: linear-gradient(90deg, #ececec 0%, #f5f5f5 50%, #ececec 100%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: iskelet-kay 1.2s ease-in-out infinite;
}
@keyframes iskelet-kay {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 1150px) {
  :root { --app-sidebar-w: 210px; }
  .icerik { padding: 24px 20px 72px; }
}

@media (max-width: 780px) {
  .nav { display: none; }
  .gövde {
    margin-left: 0;
    padding-bottom: 66px;
  }
  .ust-bar {
    height: 62px;
    padding: 0 15px;
  }
  .mobil-marka { display: flex; }
  .icerik { padding: 22px 15px 35px; }
  .mal-form-aksiyonlar { bottom: 58px; }
  .kimlik-kutu { justify-content: flex-end; }
  .ust-bar .kimlik { max-width: 42vw; font-size: 0.78rem; }
  .modul-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0 14px;
    min-height: 0;
  }
  .modul-hero h1 { font-size: 1.45rem; }
  .modul-hero-aksiyon { width: 100%; }
  .modul-hero-aksiyon .birincil,
  .modul-hero-aksiyon .ikincil { flex: 1; text-align: center; }

  .mobil-nav {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px 8px;
    background: var(--app-white);
    border: 0;
    border-top: 1px solid var(--app-line);
    border-radius: 0;
    box-shadow: none;
  }
  .mobil-nav:has(#nav-ekip-mobil:not(.gizli)) {
    grid-template-columns: repeat(4, 1fr);
  }
  .mobil-nav a {
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--app-muted);
    background: transparent;
    font-weight: 650;
    transition: background-color var(--dur-hizli) ease, color var(--dur-hizli) ease;
  }
  .mobil-nav a > span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
  }
  .mobil-nav a > span svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: square;
    stroke-linejoin: miter;
  }
  .mobil-nav a small { font-size: 0.6rem; }
  .mobil-nav a.aktif {
    color: var(--app-ink);
    background: var(--app-paper);
  }
  .toast-yigin { bottom: 72px; }
  .giris-kutu { margin: 6vh 16px; padding: 24px 20px; }
  .satir-2 { grid-template-columns: 1fr; }
  table.liste { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .ust-bar .kimlik { display: none; }
  .profil-avatar { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* --------------------------------------------------- maliyet kalem masası */
.mal-kalem-liste {
  min-width: 0;
  overflow-x: auto;
}
.mal-kalem-grp {
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  margin: 0 0 8px;
  background: var(--app-white);
}
.mal-kalem-grp > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--app-paper);
  color: var(--app-ink);
}
.mal-kalem-grp > summary::-webkit-details-marker { display: none; }
.mal-kalem-grp > summary::before {
  content: "▸ ";
  color: var(--app-muted);
  font-weight: 400;
}
.mal-kalem-grp[open] > summary::before { content: "▾ "; }
.mal-kalem-gt {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}
.mal-kalem-grp-govde { padding: 6px 8px 8px; }
.mal-kalem-satir {
  display: grid;
  grid-template-columns: minmax(110px, 1.3fr) 88px 60px 60px 48px minmax(70px, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 3px 0;
  min-width: 560px;
}
.mal-kalem-satir:not(.mal-kalem-sabit) {
  grid-template-columns: minmax(90px, 1.1fr) 72px 88px 60px 60px 48px minmax(70px, 1fr) auto;
  min-width: 640px;
}
.mal-kalem-satir input,
.mal-kalem-satir select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 5px 7px;
  font-size: 12.5px;
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  background: var(--app-white);
  color: var(--app-ink);
}
.mal-kalem-ad {
  font-size: 12.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mal-kalem-aksiyon {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}
.mal-kalem-aksiyon .ikincil {
  font-size: 0.7rem;
  padding: 3px 7px;
}
#mal-kalem-mod-hizli.aktif, #mal-kalem-mod-worksheet.aktif {
  background: var(--app-teal);
  border-color: var(--app-teal);
  color: #fff;
}
.mal-kart-ekle { margin-top: 6px; font-size: 0.75rem; padding: 3px 8px; }
.kur-kaynak { display: block; font-size: 0.7rem; color: var(--app-muted, #6b7c78); }
#mal-etki-panel .alt-baslik { margin-top: 0; color: var(--app-muted); font-size: 0.85rem; }

/* --------------------------------------------------- maliyet form düzeni (B5/B8) */
.mal-form-duzen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}
.mal-form-sol { min-width: 0; }
.mal-bolum {
  border: 1px solid var(--app-line, #cfd6d4);
  border-radius: var(--radius);
  margin: 0 0 10px;
  padding: 0 12px 12px;
  background: var(--app-white);
}
.mal-bolum > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 0 8px;
  list-style: none;
  color: var(--app-ink, #1a2b28);
}
.mal-bolum > summary::-webkit-details-marker { display: none; }
.mal-bolum > summary::before {
  content: "▸ ";
  color: var(--app-muted, #6b7c78);
  font-weight: 400;
}
.mal-bolum[open] > summary::before { content: "▾ "; }
.mal-sonuc-kart {
  position: sticky;
  top: 16px;
  border: 1px solid var(--app-line, #cfd6d4);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--app-white);
  box-shadow: none;
}
.mal-sonuc-kart h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.mal-sonuc-kart.mal-bayat {
  opacity: 0.55;
}
.mal-bayat-uyari {
  color: #8a4b00;
  background: #fff6e8;
  border: 1px solid #e8c48a;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.8rem;
  margin: 0 0 10px;
}
.mal-sonuc-ozet-satir {
  flex-direction: column;
  gap: 8px;
}
.mal-sonuc-ozet-satir > div {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--app-line, #e6ebe9);
}
.mal-sonuc-meta {
  margin-top: 12px;
  color: var(--app-muted, #6b7c78);
  font-size: 0.75rem;
  line-height: 1.4;
}
.mal-modu-satir {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mal-modu-satir select {
  flex: 0 0 auto;
  width: auto;
  min-width: 5.5rem;
}
.mal-modu-satir input { flex: 1; min-width: 0; }
.mal-fiyat-onizleme { margin: 8px 0 0; min-height: 1.2em; }
.mal-form-aksiyonlar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 16px 0 0;
  padding: 12px 0 10px;
  background: var(--app-paper);
  border-top: 1px solid var(--app-line);
}
.mal-araclar-sarici { position: relative; }
.mal-araclar-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 12.5rem;
  padding: 4px;
  background: var(--app-white);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
}
.mal-araclar-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  border-radius: var(--radius);
}
.mal-araclar-menu button:hover { background: var(--app-sidebar-hover); }
.mal-arac-sekmeler,
.mal-detay-sekmeler {
  display: flex;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--app-line);
}
.mal-arac-sekmeler button,
.mal-detay-sekmeler button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  color: var(--app-muted);
}
.mal-arac-sekmeler button.aktif,
.mal-detay-sekmeler button.aktif {
  color: var(--app-ink);
  border-bottom-color: var(--app-ink);
  font-weight: 700;
}
#mal-kontrol-sticky .uyari-kutu { margin-top: 8px; font-size: 0.8rem; }
.mal-imo-oneri {
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #5c5346;
  background: #f7f4ef;
  border: 1px solid #e0d8cc;
  border-radius: 4px;
}
.mal-imo-oneri-metin { margin: 0 0 8px; }
.mal-imo-oneri-not { color: var(--app-muted, #6b7c78); font-weight: normal; }
.mal-imo-oneri .ikincil { font-size: 0.75rem; padding: 3px 8px; }

@media (max-width: 960px) {
  .mal-form-duzen {
    grid-template-columns: 1fr;
  }
  .mal-sonuc-kart {
    position: static;
    order: -1;
  }
}
