/* Temizlik Şirketi Talep ve Randevu Takibi — önce mobil, sade, ferah ve okunaklı. */
:root {
  --bg: #f0f8f9;
  --card: #ffffff;
  --ink: #14262b;
  --muted: #46606a;
  --line: #cfe2e6;
  --line-soft: #e4f0f2;
  --brand: #0e7490;
  --brand-ink: #ffffff;
  --brand-soft: #d9f1f5;
  --warn: #8a4b00;
  --warn-soft: #fdf0d2;
  --bad: #a3261d;
  --bad-soft: #fbe3e0;
  --info: #0b5e73;
  --info-soft: #dff1f5;
  --radius: 12px;
  --tab-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a1d; --card: #17252a; --ink: #e6f1f3; --muted: #a3bcc3; --line: #2a3f45; --line-soft: #22343a;
    --brand: #5fcfe6; --brand-ink: #062229; --brand-soft: #16343c;
    --warn: #f1b95a; --warn-soft: #3a2a0e; --bad: #ff8d84; --bad-soft: #3d1b18; --info: #8fd7e8; --info-soft: #16323b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
h1 { font-size: 1.4rem; margin: 0 0 .75rem; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #1d6fd6; outline-offset: 2px; }

/* ---- iskelet ---- */
.app { min-height: 100vh; padding-bottom: calc(var(--tab-h) + 8px); }
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .55rem; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; min-width: 0; }
.brand svg { flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); }
.top .who form { margin: 0; }
.demo-banner { background: var(--info-soft); color: var(--info); border-bottom: 1px solid var(--line); font-size: .85rem; padding: .45rem 1rem; text-align: center; }
.demo-banner b { color: inherit; }
.demo-banner a { display: inline-block; padding: .75rem .4rem; margin: -.4rem 0; }
main { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.side { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab-h); background: var(--card);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none;
  color: var(--muted); font-size: .75rem; position: relative; min-height: 48px;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; font-weight: 700; }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 8px); }
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 230px 1fr; grid-template-rows: none; grid-auto-rows: auto; padding-bottom: 0; }
  .top, .demo-banner, .setupbar, .a2hs { grid-column: 1 / -1; }
  .side { display: block; padding: 1rem .75rem; border-right: 1px solid var(--line); background: var(--card); min-height: calc(100vh - 60px); }
  .side a { display: flex; justify-content: space-between; align-items: center; padding: .55rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
  .side a:hover { background: var(--line-soft); }
  .side a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
  .side .sep { margin: .75rem .75rem .25rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .tabbar { display: none; }
  main { width: 100%; margin: 0; max-width: none; padding: 1.25rem 1.5rem; }
}

/* ---- kartlar, düğmeler, formlar ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.card.tight { padding: .75rem; }
.card h2:first-child { margin-top: 0; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.grid2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); } }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.tile .n { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.tile .l { font-size: .8rem; color: var(--muted); }
.tile.alert { border-color: var(--warn); background: var(--warn-soft); }
.tile.alert .n, .tile.alert .l { color: var(--warn); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem;
  border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--bad); }
.btn.sm { min-height: 36px; padding: .25rem .7rem; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .65rem; border: 1px solid #7d8aa0; border-radius: 8px; background: var(--card); color: var(--ink); font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; vertical-align: middle; margin-right: .35rem; }
.field { margin-bottom: .85rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.fields { display: grid; gap: .85rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .fields.c2 { grid-template-columns: 1fr 1fr; } .fields.c3 { grid-template-columns: repeat(3, 1fr); } .fields.c4 { grid-template-columns: repeat(4, 1fr); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.inline { display: inline; margin: 0; }
.days-pick label { display: inline-flex; align-items: center; margin: 0 .75rem .25rem 0; font-weight: 500; min-height: 44px; }
label:has(> input[type=checkbox]) { display: flex; align-items: center; min-height: 44px; }

.flash { padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.flash.error { background: var(--bad-soft); border-color: var(--bad); color: var(--ink); }
.flash.info { background: var(--info-soft); border-color: var(--info); color: var(--ink); }

/* ---- rozetler ---- */
.chip { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.chip-confirmed { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.chip-done { background: var(--line-soft); color: var(--muted); border-color: var(--line); }
.chip-pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.chip-rejected, .chip-cancelled, .chip-expired { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.chip-noshow { background: #efe3f6; color: #5a2a7a; border-color: #5a2a7a; }
.pay { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pay-ok { color: var(--brand); }
.pay-part { color: var(--warn); }
.pay-none { color: var(--bad); }
.pill { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: var(--line-soft); font-size: .78rem; color: var(--muted); }

/* ---- tablolar ---- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.list th { font-size: .8rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
table.list td.nowrap { white-space: nowrap; }
@media (max-width: 560px) { table.list .col-extra { display: none; } }   /* dar ekranda İlçe ve Son iş gizlenir */
@media (max-width: 420px) { table.list.cust .col-extra2 { display: none; } table.list.cust th, table.list.cust td { padding: .5rem .35rem; } }   /* ≤420 px: yalnız ad, telefon, ciro; tablo içinde yatay kaydırma yok */
@media (max-width: 360px) { table.list.cust td.nowrap { white-space: normal; } }
table.list tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.bk-list { list-style: none; margin: 0; padding: 0; }
.bk-list li { border-bottom: 1px solid var(--line-soft); }
.bk-list li:last-child { border-bottom: 0; }
.bk-item { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: flex-start; padding: .7rem .25rem; text-decoration: none; color: inherit; }
.bk-item:hover { background: var(--line-soft); }
.bk-time { flex: 0 0 84px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-time small { display: block; font-weight: 500; color: var(--muted); }
.bk-main { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere; }
.bk-main b { display: block; }
.bk-side { flex: 0 0 auto; margin-left: auto; text-align: right; font-size: .85rem; }

/* ---- takvim ---- */
.cal-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.cal-bar .title { font-weight: 800; font-size: 1.05rem; flex: 1 1 auto; min-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--brand); border-radius: 10px; overflow: hidden; }
.seg a { padding: .45rem .85rem; text-decoration: none; color: var(--brand); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.seg a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; }
.chips a { white-space: nowrap; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--card); min-height: 44px; display: inline-flex; align-items: center; }
.chips a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: var(--muted); margin: .25rem 0 .75rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; border: 1px solid var(--line); }
.lg-free { background: var(--card); border-style: dashed !important; }
.lg-conf { background: var(--brand-soft); border-color: var(--brand) !important; }
.lg-pend { background: repeating-linear-gradient(45deg, var(--warn-soft), var(--warn-soft) 4px, #fff 4px, #fff 8px); border-color: var(--warn) !important; }
.lg-block { background: repeating-linear-gradient(45deg, #d6dbd6, #d6dbd6 4px, #eef1ee 4px, #eef1ee 8px); }
.cal-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); max-height: 78vh; }
.cal {
  display: grid; position: relative;
  grid-template-columns: 52px repeat(var(--cols), minmax(var(--colw, 128px), 1fr));
  grid-template-rows: 44px repeat(var(--rows), 14px);
  min-width: calc(52px + var(--cols) * var(--colw, 128px));
}
.cal .hd { position: sticky; top: 0; z-index: 6; background: var(--brand-soft); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); padding: .3rem .5rem; font-size: .85rem; font-weight: 700; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.cal .hd small { font-weight: 500; color: var(--muted); }
.cal .hd.corner { left: 0; z-index: 8; border-left: 0; }
.cal .hd.today { background: var(--brand); color: var(--brand-ink); }
.cal .hd.today small { color: var(--brand-ink); opacity: .85; }
.cal .tm { position: sticky; left: 0; z-index: 5; background: var(--card); font-size: .72rem; color: var(--muted); padding: 2px 6px 0 0; text-align: right; border-right: 1px solid var(--line-soft); }
.cal .gl { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); pointer-events: none; z-index: 0; }
.cal .cell { z-index: 1; margin: 1px; border-radius: 6px; padding: 3px 6px; font-size: .78rem; line-height: 1.25; overflow: hidden; text-decoration: none; color: var(--ink); display: block; }
.cal a.free { border: 1px dashed var(--line); background: var(--card); color: var(--muted); display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem; }
.cal div.free { border: 1px solid var(--line-soft); background: var(--line-soft); color: var(--muted); display: flex; justify-content: space-between; gap: .35rem; opacity: .6; }
.cal a.free:hover, .cal a.free:focus-visible { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.cal .free.past { background: var(--line-soft); }
.cal .free .pr { opacity: .85; }
.cal a.bk { border: 1px solid var(--brand); border-left-width: 5px; background: var(--brand-soft); }
.cal a.bk.pending { border-color: var(--warn); background: repeating-linear-gradient(45deg, var(--warn-soft), var(--warn-soft) 6px, var(--card) 6px, var(--card) 12px); }
.cal a.bk.noshow { border-color: #5a2a7a; background: #efe3f6; }
.cal a.bk.past { opacity: .8; }
.cal a.bk b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.cal a.bk .st { font-size: .72rem; font-weight: 700; }
.cal a.bk .due { font-size: .72rem; color: var(--bad); font-weight: 700; }
.cal .blk { border: 1px solid #aeb7ae; background: repeating-linear-gradient(45deg, #d6dbd6, #d6dbd6 6px, #eef1ee 6px, #eef1ee 12px); color: #3a463d; font-weight: 600; }
.cal .rec { font-weight: 800; }

/* ---- herkese açık sayfa ---- */
body.pub { background: var(--bg); }
.pub-wrap { max-width: 760px; margin: 0 auto; padding: 1rem; }
.pub-head { background: var(--brand); color: var(--brand-ink); padding: 1.25rem 1rem 1.5rem; }
.pub-head .in { max-width: 760px; margin: 0 auto; }
.pub-head h1 { margin: 0 0 .25rem; font-size: 1.5rem; }
.pub-head a { color: var(--brand-ink); }
.pub-head p { margin: 0; opacity: .95; }
.court-card h2 small { font-weight: 500; color: var(--muted); font-size: .85rem; margin-left: .35rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .5rem; }
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; border-radius: 10px; border: 1px solid var(--brand); text-decoration: none; background: var(--card); color: var(--ink); padding: .3rem; text-align: center; }
.slot b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.slot span { font-size: .8rem; color: var(--muted); }
a.slot:hover, a.slot:focus-visible { background: var(--brand-soft); }
.slot.off { border-color: var(--line); background: var(--line-soft); color: var(--muted); }
.slot.off b { text-decoration: line-through; }
.slot.off span { color: var(--muted); }
.status-hero { text-align: center; padding: 1.25rem 1rem; }
.status-hero .big { font-size: 1.3rem; font-weight: 800; margin-bottom: .35rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }
.msgbox { white-space: pre-wrap; background: var(--line-soft); border: 1px solid var(--line); border-radius: 10px; padding: .75rem; font-family: inherit; font-size: .95rem; margin: 0 0 .75rem; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.timeline li { padding: .35rem 0 .35rem .9rem; border-left: 3px solid var(--line); margin-left: .25rem; }
.timeline time { color: var(--muted); font-size: .8rem; display: block; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem 2rem; }
.bar { height: 10px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
@media print {
  .top, .tabbar, .side, .demo-banner, .btn, .cal-bar, .noprint { display: none !important; }
  body { background: #fff; }
  .app { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ================= Aşamalar, talep listesi, çizelge, yazdırma ================= */
.chip-new { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.chip-survey { background: #efe3f6; color: #5a2a7a; border-color: #5a2a7a; }
.chip-quoted { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.chip-approved { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.chip-completed { background: #e1f3e6; color: #1a6a35; border-color: #1a6a35; }
.chip-cancelled, .chip-expired { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-survey { background: #2d1f3a; color: #d4b0ee; border-color: #d4b0ee; }
  :root:not([data-theme="light"]) .chip-completed { background: #14301c; color: #7fd89a; border-color: #7fd89a; }
}
.warn { color: var(--warn); }
.bad { color: var(--bad); font-weight: 600; }
.center { text-align: center; }
.grow { flex: 1 1 220px; }
.inl { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.inl select { width: auto; min-width: 150px; }
a.tile { text-decoration: none; color: inherit; display: block; }
a.tile:hover { border-color: var(--brand); }
h1 .chip { vertical-align: middle; font-size: .8rem; }
.bk-item.one { display: block; }
.bk-main > span { display: inline; }
.filters .field { margin-bottom: .4rem; }
.steps { padding-left: 1.2rem; margin: 0; }
.fs { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem 0; margin: 0 0 1rem; background: var(--card); min-width: 0; }
.fs legend { font-weight: 700; padding: 0 .4rem; }
form.stack > .row { margin-bottom: 1rem; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.alerts li:last-child { border-bottom: 0; }
.warnbox { border-color: var(--warn); }
.cancel-row { margin-top: .75rem; align-items: center; }
.cancel-row input { margin: 0; }
.payform { margin-top: 1rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.timeline li { border-left-color: var(--brand); }
textarea.msgbox { white-space: pre-wrap; background: var(--line-soft); width: 100%; }

/* müşteri durum izleyici */
.tracker { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; padding: 0; margin: 1rem 0 0; font-size: .78rem; }
.tracker li { border-top: 5px solid var(--line); padding-top: .35rem; color: var(--muted); }
.tracker li.done { border-top-color: var(--brand); color: var(--ink); }
.tracker li.now { border-top-color: var(--brand); color: var(--brand); font-weight: 800; }

/* takvim: hafta */
.legend i.lg-job { background: var(--brand-soft); border-color: var(--brand) !important; }
.legend i.lg-survey { background: #efe3f6; border-color: #5a2a7a !important; }
.legend i.lg-block { background: repeating-linear-gradient(45deg, #d3d9e2, #d3d9e2 4px, #eef1f5 4px, #eef1f5 8px); }
.legend i.lg-conf { background: var(--bad-soft); border-color: var(--bad) !important; }
.week { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; } }
.wk-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; min-width: 0; }
.wk-day.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.wk-day h3 { margin: 0 0 .4rem; font-size: .95rem; }
.wk-day h3 a { text-decoration: none; }
.wk-item { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--brand); border-left-width: 5px; background: var(--brand-soft); border-radius: 8px; padding: .3rem .45rem; margin-bottom: .4rem; text-decoration: none; color: var(--ink); font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; }
.wk-item small { color: var(--muted); }
.wk-item.done { opacity: .75; }
.wk-item.survey { border-color: #5a2a7a; background: #efe3f6; color: #2a1238; }
.wk-item.survey small { color: #4a2d62; }
.wk-item.conf { border-color: var(--bad); background: var(--bad-soft); }
.wk-item.blk { border: 1px solid #aeb7c4; border-left-width: 1px; background: repeating-linear-gradient(45deg, #d3d9e2, #d3d9e2 6px, #eef1f5 6px, #eef1f5 12px); color: #2f3a49; font-weight: 600; }

/* takvim: gün çizelgesi */
.tl-scale { display: grid; grid-template-columns: 110px 1fr; align-items: end; font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.tl-hours { position: relative; height: 1.1rem; }
.tl-hours span { position: absolute; transform: translateX(-50%); }
.tl-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; border-top: 1px solid var(--line-soft); }
.tl-name { padding: .35rem .5rem .35rem 0; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.tl-name small { display: block; color: var(--muted); font-size: .72rem; }
.tl-track { position: relative; height: 44px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 9 - 1px), var(--line-soft) calc(100% / 9 - 1px), var(--line-soft) calc(100% / 9)); }
.tl-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; padding: 0 .35rem; font-size: .75rem; line-height: 36px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.tl-bar.job { background: var(--brand); color: var(--brand-ink); }
.tl-bar.job.done { opacity: .6; }
.tl-bar.job.conf { background: var(--bad); color: #fff; outline: 2px solid var(--bad-soft); }
.tl-bar.blk { background: repeating-linear-gradient(45deg, #d3d9e2, #d3d9e2 6px, #eef1f5 6px, #eef1f5 12px); color: #2f3a49; z-index: 0; }
@media (max-width: 520px) { .tl-scale, .tl-row { grid-template-columns: 78px 1fr; } }

/* rapor eğilimi */
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; }
.trend-bars { display: flex; gap: 3px; align-items: flex-end; height: 120px; border-bottom: 1px solid var(--line); }
.trend-bars i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; }
.trend-bars .b1 { background: var(--brand); }
.trend-bars .b2 { background: #e08a1e; }
.trend-l { font-weight: 700; font-size: .8rem; text-align: center; }
.trend-v { font-size: .7rem; color: var(--muted); text-align: center; }

/* yazdırma sayfaları */
.printbar { max-width: 800px; margin: 1rem auto; display: flex; gap: .5rem; padding: 0 1rem; }
body.printpage { background: #fff; color: #111; }
.sheet { max-width: 800px; margin: 0 auto 2rem; padding: 1.25rem 1.5rem; background: #fff; color: #111; font-size: 15px; }
.sheet h1 { font-size: 1.5rem; margin: 0 0 .2rem; }
.sheet h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.sheet h3 { font-size: 1rem; margin: 1.1rem 0 .4rem; border-bottom: 2px solid #111; padding-bottom: .15rem; }
.sheet p { margin: 0 0 .5rem; }
.sheet-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid #111; padding-bottom: .75rem; margin-bottom: .75rem; }
.sheet-head .right { text-align: right; }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th, .sheet-table td { border: 1px solid #999; padding: .35rem .55rem; text-align: left; vertical-align: top; }
.sheet-table th { width: 30%; background: #f0f0f0; font-weight: 700; }
.sheet-table tr.big td { font-size: 1.15rem; }
.sheet .terms ul { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.sheet .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.5rem; text-align: center; font-size: .85rem; }
.sheet .sign .line { border-bottom: 1px solid #111; height: 2.2rem; margin-bottom: .3rem; }
.sheet .box { border: 1px solid #999; min-height: 4.5rem; }
.demo-mark { background: #fff3c4; border: 1px dashed #8a6d00; padding: .3rem .6rem; font-weight: 700; }
.conf-mark { background: #fbe3e0; border: 1px solid #a3261d; padding: .3rem .6rem; font-weight: 700; color: #7a1a13; }
@media print {
  .printbar, .noprint { display: none !important; }
  .sheet { margin: 0; padding: 0; max-width: none; }
  body.printpage { background: #fff; }
  .wk-day, .card { break-inside: avoid; }
}
dl.kv dd a { display: inline-block; padding: .6rem .2rem; margin: -.6rem 0; }

/* Sayfa içi onay penceresi */
.ts-dialog-back { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ts-dialog-back[hidden] { display: none; }
.ts-dialog { background: var(--card, #fff); color: var(--ink); max-width: 28rem; width: 100%; border-radius: 14px; padding: 1.2rem 1.2rem 1rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.ts-dialog p { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.45; }
.ts-dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }

/* Başlangıç rehberi ve yapımcı satırı */
.guide-steps { list-style: none; padding: 0; margin: .5rem 0; }
.guide-steps li { padding: .35rem 0; border-bottom: 1px solid var(--line-soft); }
.guide-steps li.done { color: var(--muted); }
.guide-steps .mark { display: inline-block; width: 1.4rem; font-weight: 700; color: var(--brand); }
.maker { margin: .6rem 0 0; font-size: .78rem; opacity: .75; }
.maker a { color: inherit; }
.demo-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); border-radius: 8px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .9rem; }

/* 1.0.6: müşteri listesi içe aktarma (Excel / CSV / yapıştırılan tablo) */
.help summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.help[open] summary { margin-bottom: .4rem; }
.import-scroll { margin: .6rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
.import-table { min-width: 680px; font-size: .92rem; }
.import-table input[type="checkbox"] { width: 24px; height: 24px; min-height: 0; }
.import-table tr.import-error td { background: var(--bad-soft); }
.import-table tr.import-exists td, .import-table tr.import-dup td { color: var(--muted); }
.import-ok { color: #1a6a35; }
.import-bad { color: var(--bad); }
.import-counts .chip { font-size: .95rem; padding: .2rem .7rem; margin-right: .3rem; }

/* ---- 1.1.0: kurulum rehberi, telefona ekle, müşteri bağlantısı ve afiş, yardım kutusu, hatada çözüm ---- */
.setupbar { background: var(--brand-soft); border-bottom: 1px solid var(--line); padding: .5rem 1rem; }
.setupbar .in { max-width: 1100px; margin: 0 auto; }
.setupbar a { display: block; text-decoration: none; margin-bottom: .35rem; padding: .35rem 0; min-height: 44px; }
.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: .35rem 0; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.a2hs { background: var(--warn-soft); border-bottom: 1px solid var(--warn); padding: .6rem 1rem; }
.a2hs[hidden] { display: none; }
.a2hs .in { max-width: 1100px; margin: 0 auto; }
.a2hs ol { margin: .5rem 0 0 1.2rem; }
.step.next { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.step .row { margin-top: .5rem; }
.demo-box { background: var(--info-soft); }
main > details.help { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1rem; margin: 1rem 0; }
.poster { border: 3px solid var(--ink); border-radius: 16px; padding: 2rem 1rem; text-align: center; margin: 1rem 0; }
.poster h3 { font-size: 2rem; margin: 0 0 .5rem; }
.posterlink { font-size: 1.3rem; font-weight: 800; word-break: break-all; }
.posterqr { display: flex; justify-content: center; margin: 1rem 0; }
.posterqr svg { width: 240px; height: 240px; max-width: 100%; }
.card.big { font-size: 1.1rem; }
.btn.full { display: flex; width: 100%; justify-content: center; margin-bottom: .6rem; }
#shareLink, #installLink { width: 100%; }
.fixlink { font-weight: 700; white-space: nowrap; }
@media print {
  .top, .side, .tabbar, .demo-banner, .setupbar, .a2hs, .help, .row, .btn, .flash, .pub-head { display: none !important; }
  main > h1, main > p, main > .card:not(.print-card), main > form { display: none !important; }
  .print-card h2, .print-card > p.small { display: none; }
  .posterqr svg { width: 9cm; height: 9cm; }
  body { background: #fff; }
}

/* ---- kontrol listesi, teklif kalemleri, sorun kaydı, sözleşme, saha, geri dönülecekler, KVKK ---- */
.chips-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .6rem; }
details.room { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 .75rem; margin: .5rem 0; background: var(--card); }
details.room summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: .5rem; }
.itemrow { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.itemrow .iname { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.itemrow .iact { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.itemrow .qty { min-width: 2rem; text-align: center; font-size: 1.1rem; }
.itemadd { padding: .6rem 0 .8rem; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.qlines { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem .75rem; margin: .5rem 0 1rem; }
.qlines legend { font-weight: 700; padding: 0 .3rem; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 8rem; gap: .4rem; margin-bottom: .4rem; }
.incrow { border-bottom: 1px solid var(--line-soft); padding: .5rem 0 .8rem; margin-bottom: .5rem; }
.fu { border-bottom: 1px solid var(--line-soft); padding: .5rem 0; }
.fu p { margin: 0 0 .3rem; }
.fieldjob.done { opacity: .75; }
.fieldjob h2 { margin: 0; }
.contract-text { white-space: normal; line-height: 1.55; border: 1px solid var(--line); border-radius: 8px; padding: .75rem; background: #fff; color: #111; max-height: 28rem; overflow: auto; }
.sheet .contract-text { border: 0; padding: 0; max-height: none; overflow: visible; font-size: .95rem; }
.printnotice { max-width: 800px; margin: 0 auto 1rem; padding: .6rem 1rem; background: #fff3c4; border: 1px dashed #8a6d00; color: #5a4600; }
@media (max-width: 480px) { .qrow { grid-template-columns: 1fr 4rem 6.5rem; } }

/* ---- katlanır talep bölümleri, kompakt madde satırı ---- */
details.sec { padding: 0 1rem; }
details.sec > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; min-height: 48px; display: flex; align-items: center; list-style-position: inside; }
details.sec[open] > summary { border-bottom: 1px solid var(--line-soft); margin-bottom: .75rem; }
details.sec > :last-child { margin-bottom: 1rem; }
.itemrow { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.itemrow .iname { flex: 1 1 0; min-width: 0; }
.itemrow .iqty { flex: 0 0 auto; display: flex; align-items: center; gap: .3rem; }
.itemrow .iflags { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: .3rem; }
.itemrow .btn.on { background: var(--brand-soft); border-color: var(--brand); font-weight: 700; }
.itemrow .btn.sm { min-height: 36px; padding: .15rem .6rem; }

/* ---- 1.0.0 temizlik eklemeleri ---- */
.chip-live { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.btn.big { min-height: 56px; font-size: 1.1rem; padding: .7rem 1.2rem; flex: 1 1 8rem; }
.btn.ok { background: #1a6a35; border-color: #1a6a35; color: #fff; }
.stepbtns { gap: .6rem; }
.stepbtns form { flex: 1 1 8rem; display: flex; }
.stepbtns form .btn { width: 100%; }
.consent { display: flex; gap: .5rem; align-items: flex-start; line-height: 1.4; }
.consent input { margin-top: .25rem; flex: none; }
.big-form label, .big-form .field label { font-size: 1.02rem; }
.big-form input, .big-form select, .big-form textarea { min-height: 48px; font-size: 1rem; }
.seri .table-wrap { margin-bottom: .5rem; }
.toff .bk-item.one { align-items: center; justify-content: space-between; gap: .75rem; }
.field.inline { display: flex; align-items: center; gap: .4rem; margin: 0; }
.itemrow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.itemrow .iname { flex: 1 1 auto; min-width: 0; }
.ok { color: #1a6a35; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ok { color: #7fd89a; } }
