:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e9edf2;
  --primary: #111827;
  --primary-soft: #eef2ff;
  --green: #0f9f57;
  --blue: #2457a6;
  --orange: #d27a08;
  --danger: #c93434;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
body.modal-open { overflow: hidden; overscroll-behavior: contain; }

.app-shell {
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.topbar {
  height: 76px;
  padding: env(safe-area-inset-top) 18px 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}
.topbar h1 {
  margin: 0;
  font-size: clamp(21px, 4.4vw, 27px);
  text-align: center;
  letter-spacing: -.02em;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.icon-button:hover { background: #f1f3f5; }
.icon-button:active { transform: scale(.95); }
.icon-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.soft { background: #f2f4f7; font-size: 28px; flex: 0 0 auto; }

main { padding: 18px; }
.summary-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid #edf0f4;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.summary-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 18px;
  position: relative;
}
.summary-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  width: 1px;
  height: 60%;
  background: var(--line);
}
.summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
}
.summary-icon.package { color: var(--orange); background: #fff4df; }
.summary-icon.money { color: var(--green); background: #e8f9ef; }
.summary-icon.days { color: var(--blue); background: #eaf1ff; }
.summary-label { display: block; color: #3f4652; font-size: 14px; margin-bottom: 7px; white-space: nowrap; }
.summary-item strong { display: block; font-size: clamp(23px, 3.7vw, 33px); line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; }
.summary-item small { font-size: .55em; font-weight: 600; color: var(--muted); }

.period-toolbar {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 18px 4px 12px;
}
.eyebrow { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.period-toolbar strong { display: block; margin-top: 4px; font-size: 18px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 700; cursor: pointer; padding: 8px; }

.table-card {
  background: var(--surface);
  border: 1px solid #edf0f4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15,23,42,.05);
}
.table-head, .record-row, .table-total {
  display: grid;
  grid-template-columns: minmax(155px, 1.25fr) minmax(105px, .7fr) minmax(150px, 1fr) 24px;
  align-items: center;
  gap: 12px;
}
.table-head {
  padding: 16px 20px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.table-head span:nth-child(2), .record-packages { text-align: center; }
.table-head span:nth-child(3), .record-earnings { text-align: right; }
.record-row {
  width: 100%;
  padding: 17px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease;
}
.record-row:hover { background: #fafbfc; }
.record-row:active { background: #f2f4f7; }
.date-cell strong { display: block; font-size: 17px; font-weight: 700; }
.date-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.record-packages, .record-earnings { font-size: 18px; font-weight: 650; }
.chevron { color: #a7adb5; font-size: 30px; font-weight: 300; line-height: 1; }
.table-total {
  min-height: 70px;
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
.table-total strong:nth-child(2) { text-align: center; }
.table-total strong:nth-child(3) { text-align: right; }
.empty-state { text-align: center; padding: 52px 24px; border-top: 1px solid var(--line); }
.empty-state h2 { margin: 14px 0 8px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); line-height: 1.6; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: auto; border-radius: 18px; background: #f0f3f7; font-size: 30px; }

.fab {
  position: fixed;
  right: max(22px, calc((100vw - 900px) / 2 + 22px));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(15,23,42,.28);
  cursor: pointer;
  z-index: 25;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(15,23,42,.34); }
.fab:active { transform: scale(.94); }

.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15,23,42,.48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 30px;
  backdrop-filter: blur(4px);
}
.modal {
  width: min(100%, 620px);
  max-height: calc(100vh - 30px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 10px 22px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 50px rgba(15,23,42,.2);
  animation: slideUp .22s ease-out;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
.modal-handle { width: 44px; height: 5px; border-radius: 999px; background: #d6dbe2; margin: 0 auto 12px; }
.modal-header {
  position: sticky;
  top: -10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 10px 0 8px;
  background: var(--surface);
}
.modal-header h2 { margin: 3px 0 0; font-size: 24px; letter-spacing: -.02em; }
.field { display: block; margin-bottom: 17px; }
.field > span { display: block; margin-bottom: 8px; font-weight: 750; font-size: 14px; }
.field em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .input-with-prefix {
  width: 100%;
  border: 1px solid #dce1e8;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input, .field textarea { padding: 14px 15px; }
.field textarea { resize: vertical; min-height: 94px; }
.field input:focus, .field textarea:focus, .input-with-prefix:focus-within { border-color: #6e7e94; box-shadow: 0 0 0 4px rgba(17,24,39,.08); }
.input-with-prefix { display: flex; align-items: center; padding-left: 15px; }
.input-with-prefix > span { color: var(--muted); font-weight: 800; }
.input-with-prefix input { border: 0; box-shadow: none !important; padding-left: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { display: block; min-height: 16px; margin-top: 5px; color: var(--danger); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }
.button { min-height: 48px; border-radius: 14px; border: 0; padding: 0 18px; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--primary); color: #fff; }
.button.secondary { background: #eef1f5; color: var(--text); }
.button.danger { background: #fff0f0; color: var(--danger); margin-right: auto; }

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(102px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 36px);
  padding: 12px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
  animation: toastIn .18s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.visually-hidden { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 720px) {
  main { padding: 12px; }
  .summary-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-item {
    min-width: 0;
    min-height: 126px;
    padding: 14px 6px 13px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: center;
  }
  .summary-item:not(:last-child)::after {
    top: 18%;
    right: 0;
    bottom: auto;
    left: auto;
    width: 1px;
    height: 64%;
  }
  .summary-item > div { min-width: 0; width: 100%; display: block; }
  .summary-label {
    min-height: 28px;
    margin: 0 0 5px;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
  }
  .summary-item strong {
    max-width: 100%;
    font-size: clamp(15px, 4.1vw, 21px);
    letter-spacing: -.035em;
    white-space: nowrap;
  }
  .table-head, .record-row, .table-total { grid-template-columns: 1.1fr .58fr .9fr 16px; gap: 7px; }
  .table-head { padding: 13px 12px; font-size: 11px; }
  .record-row { padding: 15px 12px; }
  .date-cell strong { font-size: 15px; }
  .record-packages, .record-earnings { font-size: 16px; }
  .table-total { padding: 14px 12px; font-size: 16px; }
}

@media (max-width: 430px) {
  .topbar { height: 68px; padding-left: 8px; padding-right: 8px; }
  .topbar h1 { font-size: 21px; }
  .summary-item { min-height: 116px; padding: 12px 4px 11px; gap: 7px; }
  .summary-icon { width: 29px; height: 29px; border-radius: 9px; font-size: 14px; }
  .summary-label { min-height: 25px; font-size: 10px; }
  .summary-item strong { font-size: clamp(13px, 3.9vw, 17px); }
  .period-toolbar { min-height: 61px; }
  .table-head span:nth-child(3) { font-size: 0; }
  .table-head span:nth-child(3)::after { content: "Kazanç (₺)"; font-size: 11px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .button.danger { grid-column: 1 / -1; width: 100%; order: 3; }
}

@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 28px; max-height: calc(100vh - 48px); padding-bottom: 24px; }
}

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

/* Kurye araçları ve ikinci hızlı işlem butonu */
.fab {
  display: grid;
  place-items: center;
  text-decoration: none;
}
.fab-add { bottom: calc(24px + env(safe-area-inset-bottom)); }
.fab-tools {
  bottom: calc(104px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  right: max(27px, calc((100vw - 900px) / 2 + 27px));
  background: #ffffff;
  color: var(--primary);
  border: 1px solid #e1e6ec;
  font-size: 27px;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
.fab-tools:hover {
  background: #f8fafc;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
}
.icon-link { text-decoration: none; }
.topbar-spacer { width: 44px; height: 44px; }

.tools-shell { padding-bottom: calc(38px + env(safe-area-inset-bottom)); }
.tools-main { display: grid; gap: 18px; }
.tools-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(145deg, #111827, #263349);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
}
.tools-hero-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.13);
  font-size: 30px;
  line-height: 1;
}
.tools-hero .eyebrow { color: rgba(255,255,255,.66); }
.tools-hero h2 {
  margin: 5px 0 7px;
  font-size: clamp(23px, 4vw, 31px);
  letter-spacing: -.025em;
}
.tools-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}

.location-card,
.tools-section {
  background: var(--surface);
  border: 1px solid #e9edf2;
  border-radius: 22px;
  box-shadow: 0 8px 26px rgba(15,23,42,.055);
}
.location-card { padding: 20px; }
.tools-section { padding: 20px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 15px;
}
.compact-heading { margin-bottom: 13px; }
.section-heading h2 {
  margin: 4px 0 0;
  font-size: 23px;
  letter-spacing: -.02em;
}
.location-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #087943;
  font-size: 12px;
  font-weight: 800;
}
.location-field {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #dce1e8;
  border-radius: 15px;
  background: #ffffff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.location-field:focus-within {
  border-color: #6e7e94;
  box-shadow: 0 0 0 4px rgba(17,24,39,.08);
}
.location-field svg,
.location-button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.location-field svg { color: #687386; }
.location-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.location-field input::placeholder { color: #9aa3af; }
.clear-input {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: #eef1f5;
  color: #4b5563;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.location-button {
  width: 100%;
  min-height: 62px;
  margin-top: 11px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e7ed;
  border-radius: 15px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, opacity .16s ease;
}
.location-button:hover { background: #f1f4f7; }
.location-button:active { transform: scale(.99); }
.location-button svg { color: var(--blue); }
.location-button span { display: block; min-width: 0; }
.location-button strong { display: block; font-size: 14px; }
.location-button small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.location-button.is-loading svg { animation: spin 1s linear infinite; }
.location-button:disabled { opacity: .68; cursor: wait; }
.location-status {
  margin: 11px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.location-status[data-type="success"] { color: #087943; }
.location-status[data-type="warning"] { color: #a65c00; }
.location-status[data-type="loading"] { color: var(--blue); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.tool-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e6eaf0;
  border-radius: 17px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.tool-card:hover {
  transform: translateY(-1px);
  border-color: #cfd6df;
  box-shadow: 0 10px 22px rgba(15,23,42,.07);
}
.tool-card:active { transform: scale(.99); background: #f8fafc; }
.tool-card:disabled { opacity: .65; cursor: wait; }
.tool-card.is-loading .tool-icon { animation: pulse 1s ease-in-out infinite; }
.tool-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0f3f7;
  color: #1f2937;
  font-size: 21px;
  font-weight: 850;
}
.tool-copy { min-width: 0; }
.tool-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.tool-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.tool-arrow {
  color: #a7adb5;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
.featured-tool {
  grid-column: 1 / -1;
  min-height: 90px;
  border-color: #ccebd9;
  background: #f7fdf9;
}
.featured-tool .tool-icon { background: #e5f8ed; color: #078147; }
.accuracy-note {
  margin-top: 14px;
  padding: 14px 15px;
  border-radius: 15px;
  background: #fff8e8;
  border: 1px solid #f3e4bd;
}
.accuracy-note strong { display: block; color: #7a4d00; font-size: 13px; }
.accuracy-note p { margin: 5px 0 0; color: #7d6842; font-size: 12px; line-height: 1.55; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

@media (max-width: 620px) {
  .tools-main { padding: 12px; gap: 13px; }
  .location-card, .tools-section { padding: 13px; border-radius: 19px; }
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .tool-card,
  .featured-tool {
    grid-column: auto;
    min-width: 0;
    min-height: 110px;
    padding: 11px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 15px;
    text-align: center;
  }
  .tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 18px;
  }
  .tool-copy { width: 100%; }
  .tool-copy strong {
    font-size: 12px;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
  .tool-copy small,
  .tool-arrow { display: none; }
}

@media (max-width: 430px) {
  .fab-tools {
    right: 22px;
    width: 54px;
    height: 54px;
  }
  .tools-grid { gap: 7px; }
  .tool-card,
  .featured-tool { min-height: 104px; padding: 9px 4px; }
  .tool-icon { width: 39px; height: 39px; font-size: 17px; }
  .tool-copy strong { font-size: 11px; }
  .section-heading h2 { font-size: 21px; }
}

/* Sürüm 1.4 – gider ve net kazanç takibi */
body.modal-open { overflow: hidden; }

.summary-action {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease;
}
.summary-action:hover { background: #fbfcfd; }
.summary-action:active { background: #f3f6f8; }
.summary-action:focus-visible { outline: 3px solid rgba(37, 99, 235, .2); outline-offset: -3px; }
.summary-detail-mark {
  position: absolute;
  top: 11px;
  right: 11px;
  color: #a4acb8;
  font-size: 23px;
  line-height: 1;
}

.record-money,
.footer-money {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.record-money small,
.footer-money small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.record-money small.is-negative,
.is-negative { color: var(--danger) !important; }
.footer-money > strong { text-align: right !important; }

.expense-editor {
  margin: 3px 0 19px;
  padding: 17px;
  border: 1px solid #e4e8ee;
  border-radius: 18px;
  background: #fafbfc;
}
.expense-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.expense-editor-header h3 {
  margin: 3px 0 0;
  font-size: 19px;
  letter-spacing: -.02em;
}
.mini-button {
  min-height: 38px;
  border: 1px solid #d9dfe7;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.mini-button:hover { background: #f3f5f8; }
.expense-rows { display: grid; gap: 10px; }
.expense-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, .85fr) 38px;
  gap: 9px;
  align-items: start;
}
.expense-row select,
.compact-prefix {
  width: 100%;
  height: 48px;
  border: 1px solid #dce1e8;
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.expense-row select {
  padding: 0 38px 0 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  appearance: auto;
}
.compact-prefix { padding-left: 12px; }
.compact-prefix input { min-width: 0; height: 46px; padding-top: 0; padding-bottom: 0; }
.expense-row select:focus,
.compact-prefix:focus-within {
  border-color: #6e7e94;
  box-shadow: 0 0 0 4px rgba(17,24,39,.08);
}
.remove-expense-button {
  width: 38px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #fff0f0;
  color: var(--danger);
  font-size: 23px;
  cursor: pointer;
}
.remove-expense-button:hover { background: #ffe3e3; }
.expense-row-error {
  grid-column: 1 / -1;
  min-height: 0;
  margin-top: -5px;
  color: var(--danger);
  font-size: 12px;
}
.expense-empty {
  margin: 2px 0 0;
  padding: 12px;
  border: 1px dashed #dce2e9;
  border-radius: 13px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.expense-general-error { min-height: 0; }
.entry-finance-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #e1e6ec;
  border-radius: 14px;
  background: #fff;
}
.entry-finance-preview > div {
  min-width: 0;
  padding: 11px 9px;
  text-align: center;
}
.entry-finance-preview > div:not(:last-child) { border-right: 1px solid #e8ebef; }
.entry-finance-preview span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.entry-finance-preview strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.net-preview { background: #f4fbf7; }

.finance-modal { width: min(100%, 760px); }
.finance-header { align-items: flex-start; }
.finance-period {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.finance-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}
.finance-kpi {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e8ecf1;
  border-radius: 17px;
  background: #f8fafc;
}
.finance-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.finance-kpi strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: clamp(17px, 3.4vw, 24px);
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gross-kpi { background: #f5f8ff; border-color: #dfe8fb; }
.expense-kpi { background: #fff7f5; border-color: #f4dfda; }
.net-kpi { background: #f3fbf6; border-color: #d9edde; }

.finance-chart-card {
  margin-top: 13px;
  padding: 17px;
  border: 1px solid #e7ebf0;
  border-radius: 18px;
  background: #fff;
}
.chart-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.chart-heading h3 {
  margin: 4px 0 0;
  font-size: 17px;
  letter-spacing: -.015em;
}
.ratio-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #087943;
  font-size: 12px;
}
.comparison-chart { display: grid; gap: 13px; }
.comparison-meta,
.category-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.comparison-meta span,
.category-chart-meta span { color: #475164; font-size: 13px; font-weight: 750; }
.comparison-meta strong,
.category-chart-meta strong { font-size: 13px; }
.comparison-track,
.category-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}
.comparison-fill,
.category-track span {
  display: block;
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
}
.comparison-fill.gross { background: #4f7be8; }
.comparison-fill.expense { background: #ef7864; }
.comparison-fill.net { background: #30a46c; }
.comparison-fill.negative { background: #d9363e; }

.chart-legend { display: flex; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend-gross { background: #9db5f2; }
.legend-net { background: #30a46c; }
.daily-finance-chart {
  min-height: 220px;
  display: flex;
  align-items: stretch;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 3px 7px;
  scrollbar-width: thin;
}
.daily-column {
  min-width: 54px;
  flex: 1 0 54px;
  display: grid;
  grid-template-rows: 164px auto auto;
  gap: 5px;
  text-align: center;
}
.daily-bar-area {
  height: 164px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px 0;
  border-bottom: 1px solid #dfe4ea;
  background: repeating-linear-gradient(to top, transparent 0, transparent 40px, #f0f2f5 41px);
}
.daily-bar {
  width: 12px;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
}
.daily-bar.gross { background: #9db5f2; }
.daily-bar.net { background: #30a46c; }
.daily-bar.negative { background: #d9363e; }
.daily-column > strong { font-size: 12px; }
.daily-column > small {
  max-width: 70px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-chart { display: grid; gap: 15px; }
.category-chart-meta span { display: flex; align-items: center; gap: 7px; }
.category-chart-meta i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f3f6;
  color: #495365;
  font-style: normal;
  font-size: 12px;
}
.category-track span { background: #ef9b54; }
.chart-empty {
  margin: 0;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 720px) {
  .summary-detail-mark { top: 8px; right: 6px; font-size: 18px; }
  .record-money small,
  .footer-money small { font-size: 9px; }
  .finance-modal { padding-left: 15px; padding-right: 15px; }
  .finance-overview { gap: 7px; }
  .finance-kpi { padding: 13px 9px; text-align: center; }
  .finance-kpi span { min-height: 28px; font-size: 10px; }
  .finance-kpi strong { font-size: clamp(14px, 4vw, 18px); }
}

@media (max-width: 430px) {
  .table-head span:nth-child(3)::after { content: "Brüt (₺)"; }
  .summary-detail-mark { display: none; }
  .expense-editor { margin-left: -4px; margin-right: -4px; padding: 13px; }
  .expense-editor-header { align-items: flex-end; }
  .mini-button { min-height: 36px; padding: 0 9px; font-size: 12px; }
  .expense-row { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) 36px; gap: 6px; }
  .expense-row select { padding-left: 9px; padding-right: 24px; font-size: 12px; }
  .compact-prefix { padding-left: 8px; }
  .compact-prefix input { padding-left: 5px; font-size: 13px; }
  .remove-expense-button { width: 36px; }
  .entry-finance-preview > div { padding: 10px 4px; }
  .entry-finance-preview strong { font-size: 12px; }
  .finance-chart-card { padding: 14px; }
  .chart-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .chart-legend { align-self: flex-start; }
  .ratio-badge { align-self: flex-end; }
  .daily-finance-chart { min-height: 205px; }
  .daily-column { grid-template-rows: 150px auto auto; min-width: 49px; flex-basis: 49px; }
  .daily-bar-area { height: 150px; padding-left: 3px; padding-right: 3px; }
  .daily-bar { width: 10px; }
}


/* Sürüm 1.5 – mobil hizalama, kompakt kayıt formu ve renkli araç ikonları */
.field-error:empty,
.expense-row-error:empty,
.expense-general-error:empty {
  display: none;
}

/* Araç ikonları: canlı, kolay ayırt edilen renk paleti */
.tool-icon {
  background: linear-gradient(145deg, var(--tool-icon-from, #64748b), var(--tool-icon-to, #334155));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--tool-icon-to, #334155) 28%, transparent);
  border: 1px solid rgba(255,255,255,.35);
  text-shadow: 0 1px 2px rgba(0,0,0,.16);
}
.icon-fuel { --tool-icon-from: #ffb52e; --tool-icon-to: #f97316; }
.icon-repair { --tool-icon-from: #64748b; --tool-icon-to: #1e293b; }
.icon-tire { --tool-icon-from: #475569; --tool-icon-to: #0f172a; }
.icon-market { --tool-icon-from: #34d399; --tool-icon-to: #059669; }
.icon-atm { --tool-icon-from: #60a5fa; --tool-icon-to: #2563eb; }
.icon-wc { --tool-icon-from: #a78bfa; --tool-icon-to: #7c3aed; }
.icon-hospital { --tool-icon-from: #fb7185; --tool-icon-to: #e11d48; }
.icon-police { --tool-icon-from: #38bdf8; --tool-icon-to: #0369a1; }
.icon-pharmacy { --tool-icon-from: #4ade80; --tool-icon-to: #16a34a; }
.icon-24market { --tool-icon-from: #f472b6; --tool-icon-to: #db2777; }
.icon-24tire { --tool-icon-from: #818cf8; --tool-icon-to: #4f46e5; }
.icon-24service { --tool-icon-from: #fb923c; --tool-icon-to: #ea580c; }
.featured-tool .tool-icon {
  background: linear-gradient(145deg, #4ade80, #16a34a);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22,163,74,.28);
}
.tool-card {
  overflow: hidden;
}
.tool-card:hover .tool-icon {
  transform: translateY(-1px) scale(1.04);
}
.tool-icon {
  transition: transform .16s ease, box-shadow .16s ease;
}

@media (max-width: 720px) {
  /* Üç özet kartını gerçek anlamda aynı eksende ortala */
  .summary-card { align-items: stretch; }
  .summary-item,
  .summary-action {
    min-width: 0;
    padding: 12px 3px 11px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }
  .summary-item > div,
  .summary-action > div {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .summary-icon { margin-inline: auto; }
  .summary-label {
    width: 100%;
    min-height: 24px;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .summary-item strong,
  .summary-action strong {
    width: 100%;
    margin: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .summary-detail-mark { display: none; }

  /* Ekle / düzenle penceresinde gereksiz dikey boşlukları azalt */
  .modal {
    padding: 8px 15px calc(16px + env(safe-area-inset-bottom));
  }
  .modal-handle { margin-bottom: 7px; }
  .modal-header {
    margin-bottom: 10px;
    padding: 6px 0;
  }
  .modal-header h2 { font-size: 21px; }
  .field { margin-bottom: 11px; }
  .field > span { margin-bottom: 5px; }
  .field input,
  .field textarea { padding: 11px 12px; }
  .field textarea { min-height: 74px; }
  .input-with-prefix { padding-left: 12px; }
  .input-with-prefix input { padding-left: 7px; }
  .field-error {
    min-height: 0;
    margin-top: 3px;
  }
  .field-grid { gap: 10px; }
  .expense-editor {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 12px;
  }
  .expense-editor-header { margin-bottom: 8px; }
  .expense-editor-header h3 { font-size: 17px; }
  .expense-rows { gap: 7px; }
  .expense-empty { padding: 9px; }
  .entry-finance-preview { margin-top: 9px; }
  .entry-finance-preview > div { padding-top: 9px; padding-bottom: 9px; }
  .modal-actions { padding-top: 0; }
}

@media (max-width: 430px) {
  .summary-item,
  .summary-action {
    min-height: 108px;
    padding: 10px 2px;
    gap: 5px;
  }
  .summary-icon {
    width: 30px;
    height: 30px;
  }
  .summary-label {
    min-height: 23px;
    font-size: 10px;
    line-height: 1.12;
  }
  .summary-item strong,
  .summary-action strong {
    font-size: clamp(13px, 3.75vw, 16px);
    letter-spacing: -.04em;
  }
  .summary-item small { font-size: .54em; }

  .modal { padding-left: 12px; padding-right: 12px; }
  .modal-header { gap: 10px; }
  .modal-header h2 { font-size: 19px; }
  .field-grid { gap: 0; }
  .expense-editor { margin-left: 0; margin-right: 0; padding: 10px; }
  .expense-editor-header { gap: 8px; }
  .expense-editor-header .eyebrow { display: none; }
  .expense-editor-header h3 { margin-top: 0; }
  .entry-finance-preview strong { font-size: 11.5px; }

  .tool-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}


/* Sürüm 1.6 – ay / tüm sonuçlar filtresi */
.period-toolbar {
  position: relative;
  align-items: center;
}
.filter-control {
  position: relative;
  flex: 0 0 auto;
}
.filter-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #dfe4ea;
  border-radius: 13px;
  background: #fff;
  color: #263143;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .06);
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.filter-button:hover {
  border-color: #cbd3dc;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .09);
}
.filter-button:active { transform: scale(.97); }
.filter-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.filter-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 9px);
  right: 0;
  width: min(278px, calc(100vw - 36px));
  padding: 7px;
  border: 1px solid #e2e7ed;
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .17);
  backdrop-filter: blur(18px);
}
.filter-menu-item {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 36px 1fr 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
}
.filter-menu-item:hover,
.filter-menu-item:focus-visible { background: #f3f6f9; outline: none; }
.filter-menu-item + .filter-menu-item { margin-top: 3px; }
.filter-menu-item strong { font-size: 14px; }
.filter-option-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 900;
}
.month-option { color: #2457a6; background: #eaf1ff; }
.all-option { color: #0f8a4b; background: #e8f9ef; font-size: 22px; line-height: 1; }
.filter-check {
  color: #0f9f57;
  font-size: 17px;
  font-weight: 900;
  opacity: 0;
}
.filter-menu-item.is-active { background: #f6f8fb; }
.filter-menu-item.is-active .filter-check { opacity: 1; }

@media (max-width: 430px) {
  .period-toolbar { padding-left: 2px; padding-right: 2px; }
  .period-toolbar strong { font-size: 16px; }
  .filter-button { min-height: 40px; padding: 8px 12px; font-size: 13px; }
  .filter-menu { right: -2px; }
}

/* Sürüm 1.7 – hızlı bu ay görünümü ve akıllı sayfalama */
.period-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.quick-month-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #d9e4f5;
  border-radius: 13px;
  background: #f5f8ff;
  color: #2457a6;
  box-shadow: 0 5px 16px rgba(36, 87, 166, .07);
  font-weight: 800;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.quick-month-button:hover {
  border-color: #bfcfeb;
  background: #eef4ff;
  box-shadow: 0 8px 20px rgba(36, 87, 166, .11);
}
.quick-month-button:active { transform: scale(.97); }
.quick-month-button.is-active {
  border-color: #a9bee5;
  background: #e8f0ff;
  box-shadow: inset 0 0 0 1px rgba(36, 87, 166, .08);
}
.quick-month-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-month-short { display: none; }

.pagination[hidden] { display: none !important; }
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.pagination-arrow,
.pagination-page {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid #dde3ea;
  border-radius: 11px;
  background: #fff;
  color: #273244;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.pagination-arrow { font-size: 24px; line-height: 1; }
.pagination-page:hover,
.pagination-arrow:hover:not(:disabled) { background: #f3f6fa; border-color: #cbd4de; }
.pagination-page:active,
.pagination-arrow:active:not(:disabled) { transform: scale(.95); }
.pagination-page.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}
.pagination-arrow:disabled {
  color: #aab2bd;
  background: #f7f8fa;
  cursor: not-allowed;
}
.pagination-ellipsis {
  min-width: 24px;
  text-align: center;
  color: #8a94a3;
  font-weight: 800;
}
.pagination-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .quick-month-full { display: none; }
  .quick-month-short { display: inline; }
  .quick-month-button { min-height: 40px; padding: 8px 10px; font-size: 13px; }
  .quick-month-button svg { width: 17px; height: 17px; }
}

@media (max-width: 430px) {
  .period-toolbar { gap: 7px; }
  .period-toolbar > div:first-child { min-width: 0; }
  .period-toolbar strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .period-actions { gap: 6px; }
  .quick-month-button,
  .filter-button { padding-left: 9px; padding-right: 9px; }
  .quick-month-button { gap: 6px; }
  .filter-button { gap: 6px; }
  .pagination { padding-left: 8px; padding-right: 8px; }
  .pagination-arrow,
  .pagination-page { min-width: 35px; height: 35px; border-radius: 10px; }
  .pagination-pages { gap: 4px; }
}

/* =========================================================
   Sürüm 2.0 · Kullanıcı odaklı Kurye Asistanı arayüzü
   ========================================================= */
.dashboard-shell {
  width: min(100%, 960px);
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}
.dashboard-main { padding: 20px 18px 32px; }
.app-topbar {
  min-height: 78px;
  height: auto;
  grid-template-columns: 1fr 48px;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
}
.app-topbar h1 { text-align: left; font-size: 22px; }
.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(17,24,39,.2);
}
.topbar-kicker { display: block; color: var(--muted); font-size: 11px; font-weight: 750; margin-bottom: 2px; }
.app-view { animation: viewFade .18s ease; }
@keyframes viewFade { from { opacity: 0; transform: translateY(4px); } }

.today-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(145deg, #111827 0%, #1f2937 62%, #263247 100%);
  color: #fff;
  box-shadow: 0 18px 44px rgba(15,23,42,.2);
}
.today-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -115px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.today-hero-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.today-hero .eyebrow { color: rgba(255,255,255,.62); }
.today-date { margin: 5px 0 0; color: rgba(255,255,255,.82); font-size: 14px; font-weight: 650; }
.status-badge {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-badge.has-record { background: rgba(38,196,112,.16); color: #a7f3c8; border-color: rgba(79,214,137,.25); }
.today-net { position: relative; z-index: 1; display: block; margin: 18px 0 22px; font-size: clamp(40px, 8vw, 62px); line-height: 1; letter-spacing: -.055em; }
.today-net.is-negative, .snapshot-card strong.is-negative, .history-net-card strong.is-negative, .recent-money strong.is-negative, .record-net.is-negative { color: #dc4545; }
.today-hero .today-net.is-negative { color: #ff9b9b; }
.today-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.09);
}
.today-metrics div { min-width: 0; padding: 3px 8px; text-align: center; }
.today-metrics div:not(:last-child) { border-right: 1px solid rgba(255,255,255,.1); }
.today-metrics span { display: block; color: rgba(255,255,255,.58); font-size: 11px; margin-bottom: 5px; }
.today-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; color: #fff; font-size: clamp(14px, 3vw, 18px); white-space: nowrap; }
.hero-button {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: #111827;
  min-height: 52px;
}
.hero-button:hover { background: #f5f7fa; }
.hero-button > span:first-child { font-size: 22px; font-weight: 400; }

.month-snapshot, .recent-section { margin-top: 24px; }
.section-heading.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 12px; }
.dashboard-heading h2, .view-heading h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.025em; }
.text-link-button { border: 0; background: transparent; padding: 8px 0; color: #2457a6; font-weight: 800; cursor: pointer; }
.snapshot-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr; gap: 12px; }
.snapshot-card {
  min-width: 0;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid #e9edf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.snapshot-card > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.snapshot-card strong { display: block; margin: 8px 0 3px; font-size: clamp(22px, 4vw, 31px); letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snapshot-card small { color: var(--muted); font-size: 11px; }
.snapshot-primary { border-color: #cdebdc; background: linear-gradient(145deg, #f3fcf7, #fff); }
.snapshot-primary strong { color: #087a41; }

.recent-records {
  overflow: hidden;
  border: 1px solid #e9edf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.recent-record {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(76px, .8fr) minmax(120px, 1.2fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.recent-record:last-child { border-bottom: 0; }
.recent-record:hover { background: #fafbfc; }
.recent-date strong, .recent-money strong { display: block; font-size: 15px; }
.recent-date small, .recent-money small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-package { text-align: center; font-size: 13px; font-weight: 750; color: #3d4654; }
.recent-money { text-align: right; min-width: 0; }
.compact-empty { padding: 30px 22px; text-align: center; border: 1px dashed #d8dee7; border-radius: 20px; background: #fff; color: var(--muted); }
.compact-empty > span { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: #f1f4f7; font-size: 24px; }
.compact-empty p { margin: 0; line-height: 1.55; }

.view-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 4px 0 18px; }
.compact-primary { min-height: 44px; padding: 0 14px; background: #111827; color: #fff; }
.history-summary {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.history-summary > div, .history-net-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e9edf2;
  border-radius: 18px;
  background: #fff;
  text-align: left;
}
.history-net-card { border-color: #cdebdc; background: #f3fcf7; cursor: pointer; color: var(--text); }
.history-summary span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.history-summary strong { display: block; margin-top: 7px; font-size: clamp(16px, 3vw, 23px); letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-net-card strong { color: #087a41; }
.history-net-card small { display: block; margin-top: 5px; color: #4b7d63; font-size: 10px; }
.period-selector {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}
.period-arrow, .period-main-button, .period-all-button {
  border: 1px solid #dfe4eb;
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.period-arrow { font-size: 26px; }
.period-arrow:disabled { opacity: .35; cursor: default; }
.period-main-button { min-width: 0; padding: 9px 14px; text-align: left; }
.period-main-button strong { display: block; margin-top: 3px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.period-all-button { padding: 0 16px; font-weight: 800; }
.period-all-button.is-active { background: #111827; border-color: #111827; color: #fff; }
.modern-table-card { box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.modern-record-row {
  grid-template-columns: minmax(100px, 1fr) minmax(100px, .9fr) minmax(135px, 1.2fr) 18px;
  padding: 15px 17px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.modern-record-row:last-child { border-bottom: 0; }
.modern-record-row .record-packages { display: block; text-align: left; font-size: 14px; }
.record-summary-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modern-record-row .record-money { min-width: 0; text-align: right; }
.modern-record-row .record-net { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modern-record-row .record-earnings { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }

.settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px;
  margin-bottom: 12px;
  border: 1px solid #e9edf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(15,23,42,.04);
}
.settings-copy { min-width: 0; display: flex; align-items: center; gap: 13px; }
.settings-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: #f0f3f7; font-size: 21px; font-weight: 800; }
.settings-copy strong { display: block; font-size: 15px; }
.settings-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.data-warning { margin-top: 18px; padding: 18px; border: 1px solid #f0dfb7; border-radius: 19px; background: #fffaf0; }
.data-warning strong { display: block; color: #8a5d00; }
.data-warning p { margin: 7px 0 0; color: #775f2d; font-size: 13px; line-height: 1.55; }

.bottom-nav {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 960px);
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5e9ef;
  background: rgba(255,255,255,.96);
  box-shadow: 0 -10px 28px rgba(15,23,42,.08);
  backdrop-filter: blur(18px);
}
.bottom-nav-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #7a8391;
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.bottom-nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav-item.is-active { color: #111827; background: #f2f4f7; }
.floating-add {
  position: fixed;
  z-index: 36;
  right: max(18px, calc((100vw - 960px) / 2 + 18px));
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 4px solid #f4f6f8;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 31px;
  font-weight: 300;
  box-shadow: 0 14px 30px rgba(15,23,42,.28);
  cursor: pointer;
}
.floating-add:active { transform: scale(.94); }

.stepper-field {
  display: grid;
  grid-template-columns: auto auto minmax(72px, 1fr) auto auto;
  gap: 7px;
}
.stepper-field button {
  min-width: 48px;
  border: 1px solid #dce1e8;
  border-radius: 13px;
  background: #f6f8fa;
  color: #333b47;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.stepper-field input { min-width: 0; text-align: center; font-size: 18px; font-weight: 800; }
.quick-expenses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.quick-expenses button { min-height: 42px; border: 1px solid #dfe4eb; border-radius: 13px; background: #fff; color: #303846; font-size: 13px; font-weight: 750; cursor: pointer; }
.quick-expenses button:hover { background: #f7f9fb; }
.record-modal { width: min(100%, 680px); }

.action-toast { display: flex; align-items: center; gap: 14px; }
.action-toast button { border: 0; background: transparent; color: #a7d2ff; font-weight: 900; cursor: pointer; padding: 3px; }

.daily-finance-chart { align-items: end; min-height: 190px; overflow-x: auto; }
.daily-column { min-width: 28px; }
.daily-bars { width: 26px; height: 150px; display: flex; align-items: end; justify-content: center; gap: 3px; }
.daily-bars .daily-bar { width: 10px; min-height: 4px; border-radius: 6px 6px 2px 2px; }
.daily-column > small { text-align: center; }
.category-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.category-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #f4f6f8; }
.category-copy { min-width: 0; }
.category-copy > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.category-copy > div:first-child span { color: var(--muted); }
.category-row > small { text-align: right; color: var(--muted); font-weight: 750; }

/* Kurye Araçları sayfasında ortak alt menü */
.tools-shell.with-bottom-nav { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.tools-shell.with-bottom-nav .tools-main { padding-bottom: 22px; }

@media (max-width: 720px) {
  .dashboard-main { padding: 14px 12px 28px; }
  .snapshot-grid { grid-template-columns: 1.2fr .8fr .8fr; gap: 8px; }
  .snapshot-card { min-height: 106px; padding: 13px 10px; text-align: center; }
  .snapshot-card strong { font-size: clamp(18px, 4.4vw, 24px); }
  .history-summary { grid-template-columns: repeat(3, 1fr); }
  .history-net-card { grid-column: 1 / -1; }
  .modern-record-row { grid-template-columns: minmax(88px, 1fr) minmax(82px, .85fr) minmax(112px, 1.15fr) 14px; gap: 7px; padding: 14px 12px; }
  .modern-record-row .date-cell strong { font-size: 14px; }
}

@media (max-width: 520px) {
  .app-topbar { min-height: 72px; padding-left: 12px; padding-right: 12px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .topbar-kicker { display: none; }
  .app-topbar h1 { font-size: 20px; }
  .today-hero { padding: 20px 16px; border-radius: 23px; }
  .today-net { margin: 17px 0 20px; font-size: clamp(38px, 12vw, 52px); }
  .today-metrics { padding: 11px 5px; gap: 0; }
  .today-metrics div { padding: 3px 5px; }
  .today-metrics strong { font-size: clamp(12px, 3.6vw, 16px); }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
  .snapshot-primary { grid-column: 1 / -1; min-height: 96px; text-align: left; }
  .recent-record { grid-template-columns: minmax(65px, .9fr) minmax(68px, .75fr) minmax(100px, 1.1fr) 13px; gap: 6px; padding: 12px 10px; }
  .recent-package { font-size: 12px; }
  .recent-date strong, .recent-money strong { font-size: 13px; }
  .view-heading { align-items: flex-end; }
  .view-heading h2 { font-size: 21px; }
  .compact-primary { font-size: 12px; padding: 0 11px; }
  .history-summary > div, .history-net-card { padding: 13px 10px; }
  .history-summary strong { font-size: 16px; }
  .period-selector { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .period-all-button { grid-column: 1 / -1; min-height: 40px; }
  .modern-record-row { grid-template-columns: minmax(76px, 1fr) minmax(72px, .82fr) minmax(98px, 1.15fr) 12px; padding: 13px 9px; }
  .modern-record-row .record-net { font-size: 14px; }
  .modern-record-row .record-packages { font-size: 12px; }
  .record-summary-cell small, .modern-record-row .record-earnings, .modern-record-row .date-cell small { font-size: 10px; }
  .settings-card { grid-template-columns: 1fr; align-items: stretch; }
  .settings-card .button { width: 100%; }
  .stepper-field { grid-template-columns: repeat(4, 1fr); }
  .stepper-field input { grid-column: 1 / -1; grid-row: 1; }
  .stepper-field button:nth-of-type(1) { grid-column: 1; }
  .stepper-field button:nth-of-type(2) { grid-column: 2; }
  .stepper-field button:nth-of-type(3) { grid-column: 3; }
  .stepper-field button:nth-of-type(4) { grid-column: 4; }
  .stepper-field button { min-height: 40px; min-width: 0; }
  .quick-expenses button { font-size: 12px; }
  .bottom-nav-item span { font-size: 10px; }
  .floating-add { right: 14px; }
}

/* =========================================================
   Sürüm 2.1 · Hedef, çalışma süresi ve kilometre takibi
   ========================================================= */
.goal-section { margin-top: 24px; }
.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.goal-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #e4e9f0;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.goal-card.is-complete { border-color: #bce7cf; background: linear-gradient(145deg, #f1fbf5, #fff); }
.goal-card.is-disabled { background: #fafbfc; }
.goal-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.goal-card-head > div { min-width: 0; }
.goal-card-head span:not(.goal-icon) { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.goal-card-head strong { display: block; margin-top: 4px; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #edf3ff;
  color: #2457a6;
  font-size: 20px;
  font-weight: 900;
}
.goal-icon.money { background: #eef9f3; color: #087a41; }
.goal-track { height: 9px; overflow: hidden; margin: 17px 0 11px; border-radius: 999px; background: #edf0f4; }
.goal-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2457a6, #4b82dc); transition: width .35s ease; }
.monthly-goal-card .goal-track > span, #monthlyGoalCard .goal-track > span { background: linear-gradient(90deg, #087a41, #31a96c); }
.goal-card.is-complete .goal-track > span { background: linear-gradient(90deg, #087a41, #31a96c); }
.goal-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.goal-card-foot span { color: var(--muted); font-size: 11px; }
.goal-card-foot strong { color: #394252; font-size: 11px; text-align: right; }
.goal-card.is-complete .goal-card-foot strong { color: #087a41; }

.performance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.performance-grid article {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e9edf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(15,23,42,.035);
}
.performance-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.performance-grid strong { display: block; margin-top: 7px; font-size: clamp(17px, 3vw, 23px); letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.performance-grid strong.is-negative { color: #dc4545; }
.performance-grid small { display: block; margin-top: 5px; color: #6d7684; font-size: 10.5px; line-height: 1.4; }

.settings-goals {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid #dce5f2;
  border-radius: 22px;
  background: linear-gradient(145deg, #f6f9ff, #fff);
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.settings-section-heading > div { display: flex; align-items: center; gap: 13px; }
.settings-section-heading strong { display: block; font-size: 16px; }
.settings-section-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.target-icon { background: #e9f1ff; color: #2457a6; }
.goal-settings-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; margin-top: 16px; }
.goal-settings-form .field { margin: 0; }
.goal-save-button { min-height: 50px; white-space: nowrap; }
.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.input-with-suffix:focus-within { border-color: #939ba8; box-shadow: 0 0 0 3px rgba(17,24,39,.06); }
.input-with-suffix input { min-width: 0; border: 0 !important; box-shadow: none !important; border-radius: 0; }
.input-with-suffix > span { padding: 0 14px 0 8px; color: var(--muted); font-size: 12px; font-weight: 750; }

.work-details {
  margin: 4px 0 18px;
  overflow: hidden;
  border: 1px solid #e1e6ed;
  border-radius: 18px;
  background: #fafbfc;
}
.work-details > summary {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}
.work-details > summary::-webkit-details-marker { display: none; }
.work-details > summary strong { display: block; font-size: 14px; }
.work-details > summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.details-chevron { color: #697384; font-size: 20px; transition: transform .18s ease; }
.work-details[open] .details-chevron { transform: rotate(180deg); }
.work-details-body { padding: 4px 15px 16px; border-top: 1px solid #e8ebef; background: #fff; }
.work-details-body .field-grid { margin-top: 12px; }
.compact-field { max-width: calc(50% - 7px); margin-top: 2px; }
.work-preview { display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; margin-top: 10px; border: 1px solid #e5e9ef; border-radius: 15px; background: #f8fafc; }
.work-preview > div { padding: 12px; text-align: center; }
.work-preview > div + div { border-left: 1px solid #e5e9ef; }
.work-preview span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.work-preview strong { display: block; margin-top: 5px; font-size: 14px; }

.finance-performance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }
.finance-performance-grid article { min-width: 0; padding: 13px; border: 1px solid #e6eaf0; border-radius: 16px; background: #f8fafc; }
.finance-performance-grid span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.finance-performance-grid strong { display: block; margin-top: 6px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .goal-settings-form { grid-template-columns: repeat(2, 1fr); }
  .goal-save-button { grid-column: 1 / -1; width: 100%; }
  .finance-performance-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .goal-grid { grid-template-columns: 1fr; }
  .performance-grid { grid-template-columns: repeat(2, 1fr); }
  .performance-grid article:last-child { grid-column: 1 / -1; }
  .goal-card { padding: 15px; }
  .goal-card-head strong { font-size: 16px; }
  .goal-card-foot { align-items: flex-start; }
  .goal-settings-form { grid-template-columns: 1fr; }
  .goal-save-button { grid-column: auto; }
  .compact-field { max-width: none; }
}

@media (max-width: 430px) {
  .performance-grid { gap: 8px; }
  .performance-grid article { padding: 12px 10px; }
  .performance-grid strong { font-size: 16px; }
  .settings-goals { padding: 15px; }
  .work-details > summary { padding: 12px; }
  .work-details-body { padding-left: 12px; padding-right: 12px; }
}
