:root {
  --ink: #2c3e50;
  --ink-soft: #64748b;
  --navy: #1e466e;
  --navy-deep: #0f172a;
  --green: #22c55e;
  --green-hover: #16a34a;
  --blue: #2563eb;
  --orange: #ea580c;
  --teal: #0f766e;
  --brown: #b45309;
  --paper: #f5f7fa;
  --card: #ffffff;
  --muted: #f8fafc;
  --chip: #eef2f6;
  --info: #eef2ff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --focus: #3b82f6;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --gold: #1e466e;
  --sage: #15803d;
  --brick: #dc2626;
  --radius-pill: 40px;
  --radius-btn: 28px;
  --radius-card: 20px;
  --radius-input: 12px;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  padding: 16px 12px 24px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

.ekran-koyu,
.ekran-hesap {
  background: var(--paper);
}

.atla {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  padding: 8px 12px;
  z-index: 20;
}

.atla:focus {
  left: 8px;
}

[hidden] {
  display: none !important;
}

.logo a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.kabuk {
  max-width: min(960px, calc(100vw - 24px));
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow);
  overflow: visible;
  padding: 20px 24px 32px;
}

body:has(#detay-calisan:not([hidden])) .kabuk {
  max-width: min(1680px, calc(100vw - 16px));
  padding: 20px 20px 32px;
}

.damga {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

h1,
h2 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  color: var(--navy);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  background: var(--card);
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* —— Karşılama —— */

.karsilama {
  display: flex;
  flex-direction: column;
  padding: 8px 0 12px;
  color: var(--ink);
}

.karsilama-baslik {
  text-align: center;
  margin-bottom: 8px;
}

.marka {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.marka-simge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.marka a,
.karsilama-baslik > a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.marka-logo {
  width: min(280px, 72vw);
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.marka-logo-kucuk {
  width: min(180px, 48vw);
  margin: 0 auto 10px;
}

.marka-simge-kucuk {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin: 0 auto 10px;
}

.marka-ad {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0;
}

.karsilama-baslik h1 {
  font-size: 1.8rem;
  line-height: 1.2;
}

.lead {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.roller {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 30px 0 8px;
}

.rol {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  text-align: center;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
  transition: 0.2s;
}

.rol:hover,
.rol:focus-visible {
  transform: none;
  filter: brightness(0.94);
}

.rol-kimin {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  opacity: 0.9;
}

.damga-buyuk {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.rol-metin {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  max-width: 22rem;
}

.rol-aciklama {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0.92;
  max-width: 28rem;
}

.rol-calisan,
.rol[data-taraf="calisan"],
.rol[data-konu="maas"] {
  background: var(--blue);
  color: #fff;
}

.rol-calisan .rol-kimin,
.rol[data-taraf="calisan"] .rol-kimin,
.rol[data-konu="maas"] .rol-kimin {
  color: #fff;
}

.rol-isveren,
.rol[data-taraf="isveren"] {
  background: var(--teal);
  color: #fff;
}

.rol-isveren .rol-kimin,
.rol[data-taraf="isveren"] .rol-kimin,
.rol[data-konu="kidem"] .rol-kimin {
  color: #fff;
}

.rol[data-konu="kidem"] {
  background: var(--brown);
  color: #fff;
}

.karsilama-dip {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* —— Hesap —— */

.sayfa,
.hesap {
  max-width: none;
  margin: 0;
  padding: 0 0 8px;
}

.hesap-ust {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding-top: 4px;
}

.geri {
  background: var(--chip);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  min-height: 40px;
  color: var(--navy);
  font-weight: 600;
  transition: 0.2s;
}

.geri:hover,
.geri:focus-visible {
  background: var(--line-strong);
}

.geri-koyu {
  align-self: flex-start;
  margin-bottom: 16px;
  color: var(--navy);
}

.hesap-kimlik {
  flex: 1;
}

.hesap-kimlik h2 {
  font-size: 1.8rem;
}

.kaynak {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 220px;
}

.hesap-govde {
  display: grid;
  gap: 20px;
}

.form,
.basit-form,
.kidem-taslak {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
}

legend,
.alan > span,
.alan label > span {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.mod-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mod-switch label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--chip);
  color: var(--navy);
  font-weight: 500;
}

.mod-switch label:has(input:checked) {
  background: var(--navy);
  color: #fff;
}

.mod-switch input {
  width: auto;
  min-height: 0;
}

.alan-cift {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.alan {
  display: block;
  margin-bottom: 20px;
}

.link-btn {
  background: var(--chip);
  border: 0;
  padding: 8px 16px;
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: 0.2s;
}

.link-btn:hover {
  background: var(--line-strong);
}

.basit-form #btn-detayli,
.basit-form .link-btn-mavi,
.link-btn-mavi,
#btn-detayli {
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.basit-form #btn-detayli:hover,
.basit-form .link-btn-mavi:hover,
.link-btn-mavi:hover,
#btn-detayli:hover {
  background: #1d4ed8 !important;
  color: #fff !important;
}

.ipucu {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.onay {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
}

.onay input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.daha {
  margin: 8px 0 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.daha summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
  color: var(--navy);
}

.daha-govde {
  padding-top: 8px;
}

.kalem {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.kalemler h3 {
  font-size: 0.95rem;
  margin: 12px 0 8px;
  color: var(--navy);
}

.hesapla-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--green);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: 0.2s;
}

.hesapla-btn:hover,
.hesapla-btn:focus-visible {
  background: var(--green-hover);
}

.hesapla-btn:disabled {
  opacity: 0.6;
}

.form-hata {
  color: var(--danger);
  font-weight: 600;
  margin: 10px 0 0;
}

/* —— Sonuç —— */

.ozet-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.kart {
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}

.kart .etiket {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 500;
}

.kart .rakam {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-deep);
}

.kart-net .rakam {
  color: var(--sage);
}

.kart-maliyet .rakam {
  color: var(--navy);
}

.kart-vergi .rakam {
  color: var(--brown);
}

.selale {
  list-style: none;
  margin: 0 0 20px;
  padding: 20px;
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.selale li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 0.95rem;
}

.selale li:last-child {
  border-bottom: 0;
}

.selale .eksi {
  color: var(--brick);
}

.selale .arti {
  color: var(--sage);
}

.selale .toplam {
  font-weight: 700;
  background: transparent;
}

.uyari {
  background: var(--danger-bg);
  border: 0;
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-input);
  padding: 12px;
  font-size: 0.85rem;
  margin: 16px 0;
}

.gecisler {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.gecis {
  background: var(--chip);
  color: var(--navy);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.dilim-bar {
  margin: 0 0 18px;
}

.dilim-bar .metin {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--ink-soft);
}

.dilim-bar .cubuk {
  height: 10px;
  background: var(--chip);
  border-radius: 999px;
  overflow: hidden;
}

.dilim-bar .dolu {
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.tablo-sarici {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--muted);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.88rem;
}

th,
td {
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px dashed var(--line-strong);
}

th:first-child,
td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--muted);
  font-weight: 600;
}

th {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy-deep);
  background: #eef2f6;
}

th:first-child {
  background: #eef2f6;
}

tr.dilim-degisti td {
  background: #fff7ed;
}

tr.dilim-degisti td:first-child {
  background: #fff7ed;
  box-shadow: inset 4px 0 0 var(--orange);
}

.ay-dilim {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}

.bos {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-soft);
}

/* —— Basit çalışan formu —— */

.basit-govde .sonuc,
.kidem-govde .sonuc {
  margin-top: 28px;
}

.basit-giris {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 22px;
  color: var(--ink-soft);
}

.alan.buyuk > span,
.alan.buyuk .bolum-satir,
.soru-metin {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.alan.buyuk .bolum-satir {
  margin-bottom: 6px;
}

#detay-ucret-th-hucre {
  white-space: normal;
  min-width: 7.5rem;
}

#detay-ucret-th-hucre .tur-secim {
  margin-top: 6px;
  justify-content: center;
}

.alan.buyuk input,
.alan.buyuk select {
  min-height: 46px;
  font-size: 1rem;
}

.bolum {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-deep);
  margin: 24px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.soru {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line-strong);
}

.soru-metin {
  margin: 0 0 10px;
}

.bolum-satir {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.tur-secim {
  display: flex;
  gap: 8px;
  font-family: var(--font);
}

.tur-secim label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--chip);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.tur-secim input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--navy);
}

.tur-secim label:has(input:checked) {
  background: var(--navy);
  color: #fff;
}

.tur-secim-tablo {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.tur-secim-tablo label {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.eh {
  display: block;
}

.eh-cift {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eh-cift .eh-btn {
  width: 100%;
}

.kidem-secim {
  margin: 0 0 18px;
}

.kidem-secim .soru-metin {
  margin: 0 0 8px;
  font-weight: 600;
}

.eh-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--chip);
  color: var(--navy);
  font-weight: 600;
  font-size: 1rem;
  transition: 0.2s;
}

.eh-btn:hover {
  background: var(--line-strong);
}

.eh-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

.soru-alan {
  display: block;
  margin-top: 12px;
}

.soru-alan[hidden] {
  display: none !important;
}

.soru-alan input,
.soru-alan select {
  min-height: 46px;
  font-size: 1rem;
  margin-top: 6px;
  width: 100%;
}

.basit-form .hesapla-btn {
  margin-top: 10px;
}

.basit-form .link-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 14px;
  padding: 12px 16px;
}

.tahmini-not {
  background: var(--info);
  border: 0;
  border-radius: var(--radius-card);
  padding: 18px;
  margin: 24px 0 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
  color: var(--navy);
}

.tablo-ust {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
}

.tablo-ust .bolum {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.tablo-ust .link-btn {
  width: auto;
  padding: 8px 16px;
}

.maas-tablo-sarici {
  margin-bottom: 18px;
  max-width: 100%;
}

.maas-tablo {
  min-width: 920px;
  font-variant-numeric: tabular-nums;
}

.detay-tablo {
  min-width: 1480px;
}

.detay-tablo thead th {
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.detay-tablo thead th:first-child {
  text-align: left;
}

.detay-tablo input {
  width: 5.2rem;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.85rem;
  text-align: right;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  background: #fff;
  font-weight: 600;
}

.detay-tablo .ay-net {
  width: 6.6rem;
}

.maas-tablo th em {
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--blue);
  margin-left: 6px;
}

.maas-tablo .ay-net,
.maas-tablo .ay-mesai,
.maas-tablo .ay-ikramiye {
  width: 8.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  padding: 8px 10px;
  text-align: right;
  font: inherit;
  font-weight: 600;
  background: #fff;
}

.detay-tablo input.ay-net,
.detay-tablo input.ay-mesai,
.detay-tablo input.ay-ikramiye,
.detay-tablo input {
  width: 5.2rem;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.detay-tablo input.ay-net {
  width: 6.6rem;
}

.maas-tablo .ay-net.auto {
  color: var(--ink-soft);
  font-weight: 500;
  background: var(--muted);
}

.maas-tablo tr.bu-ay td,
.maas-tablo tr.bu-ay th {
  background: #eff6ff;
}

.maas-tablo tfoot th,
.maas-tablo tfoot td {
  background: var(--chip);
  font-weight: 700;
}

.sade-tablo table {
  min-width: 0;
  font-size: 1rem;
}

.sade-tablo th,
.sade-tablo td {
  white-space: normal;
  padding: 12px 0;
}

.sade-tablo .tablo-sarici {
  background: var(--muted);
  padding: 20px;
}

.isveren-ay-tablo {
  min-width: 0;
  width: 100%;
}

.isveren-ay-tablo th,
.isveren-ay-tablo td {
  white-space: nowrap;
}

.isveren-ay-tablo input.ay-ucret {
  width: 100%;
  max-width: 16rem;
  text-align: right;
  font-weight: 600;
}

.dilim-kutu,
.tesvik-kutu {
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 24px 0 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.dilim-kutu strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--navy-deep);
  text-align: center;
}

.tesvik-kutu {
  background: var(--info);
  border-color: transparent;
}

.tesvik-kutu strong {
  display: block;
  text-align: center;
  margin-bottom: 8px;
  color: #1e3a8a;
}

.tesvik-uc {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tesvik-uc span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border-radius: var(--radius-input);
  padding: 10px 12px;
}

.kidem-taslak {
  opacity: 0.85;
}

@media (min-width: 640px) {
  .alan-cift {
    grid-template-columns: 1fr 1fr;
  }

  .ozet-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tesvik-uc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .kabuk {
    padding: 16px;
    border-radius: 24px;
  }

  .hesap-ust {
    flex-direction: column;
  }

  .kaynak {
    max-width: none;
  }

  .alan-cift {
    grid-template-columns: 1fr;
  }

  .mod-switch {
    grid-template-columns: 1fr;
  }
}

@media print {
  .karsilama,
  .geri,
  .form,
  .atla,
  .basit-form {
    display: none !important;
  }

  .sayfa,
  .hesap,
  #basit,
  #detay-calisan,
  #hesap,
  #kidem {
    display: block !important;
  }

  body {
    background: #fff;
    padding: 0;
  }

  .kabuk {
    box-shadow: none;
    max-width: none;
  }
}
