/* BDB Saha · arayüz stilleri */
:root {
  --ink: #17191E;
  --ink-2: #3A3D44;
  --muted: #5B5E66;
  --faint: #7A7D84;
  --ground: #F3F1EC;
  --card: #FFFFFF;
  --line: #E2DED6;
  --line-2: #EEEBE5;
  --field: #FAF9F6;
  --field-line: #D6D2C9;
  --accent: #F5B800;
  --danger: #A1260D;
  --ok: #1E5A3A;
  --radius: 14px;
  --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: #1B4A80; }
h1, h2, h3 { margin: 0; }
#root { min-height: 100%; }

/* ---------- yerleşim */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: calc(12px + var(--safe-t)) 16px 12px; display: flex; align-items: center; gap: 10px; }
.topbar .title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar h1 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 13px; color: #C9C6BF; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: inherit; border-radius: 10px; flex-shrink: 0; }
.icon-btn:hover { background: rgba(127,127,127,.12); }
.content { flex: 1; padding: 16px 16px calc(100px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1100px; margin: 0 auto; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: var(--safe-b); }
.bottomnav a { flex: 1; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); text-decoration: none; font-size: 12px; font-weight: 600; }
.bottomnav a.on { color: var(--ink); }
.fab { position: fixed; right: 16px; bottom: calc(78px + var(--safe-b)); z-index: 25; height: 52px; padding: 0 20px 0 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--ink); border: none; border-radius: 26px; font-weight: 600; font-size: 16px; box-shadow: 0 6px 16px rgba(23,25,30,.25); text-decoration: none; }
.actionbar { position: sticky; bottom: 0; z-index: 15; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + var(--safe-b)); display: flex; gap: 8px; margin: 0 -16px calc(-100px - var(--safe-b)); }

@media (min-width: 960px) {
  .sidebar { display: flex; flex-direction: column; gap: 4px; width: 232px; flex-shrink: 0; background: var(--ink); color: #fff; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .08em; }
  .sidebar a { height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px; color: #C9C6BF; text-decoration: none; font-size: 14px; font-weight: 500; }
  .sidebar a.on { background: #2A2D34; color: #fff; font-weight: 600; }
  .sidebar .spacer { flex: 1; }
  .sidebar .me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid #2A2D34; margin-top: 8px; font-size: 13px; }
  .bottomnav { display: none; }
  .topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); padding: 14px 32px; }
  .topbar .sub { color: var(--muted); }
  .topbar .role-hide-desktop { display: none; }
  .content { padding: 24px 32px 48px; }
  .fab { position: static; box-shadow: none; height: 42px; font-size: 14px; border-radius: 10px; }
  .fab-wrap { display: flex; justify-content: flex-end; }
  .actionbar { position: static; margin: 8px 0 0; padding: 0; border: none; background: transparent; justify-content: flex-end; }
  .actionbar .btn { width: auto; min-width: 180px; }
  .grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .grid-cards, .stack.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (min-width: 1300px) { .grid-cards, .stack.grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- bileşenler */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.pad-s { padding: 12px 14px; }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 600; }
.display { font-family: var(--display); font-weight: 700; }
.big { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 14px; }
.list-btn { display: flex; gap: 14px; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: inherit; text-decoration: none; }
.list-btn:hover { border-color: #C9C4B9; }
.list-btn .time { width: 52px; flex-shrink: 0; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; }

.btn { height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { border: 1px solid var(--field-line); background: var(--ground); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.dashed { border: 2px dashed #B9B4A9; background: #fff; }
.btn.small { height: 38px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-waiting { background: #E4E1DA; color: #3A3731; }
.st-onroad { background: #D6E4F5; color: #1B4A80; }
.st-onsite { background: #FBE3A1; color: #5E4200; }
.st-parts { background: #F6D2BC; color: #7F3208; }
.st-done { background: #1E5A3A; color: #fff; }
.st-cancelled { background: #EEEBE5; color: #5B5E66; text-decoration: line-through; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 38px; padding: 0 14px; border-radius: 19px; font-size: 14px; font-weight: 600; background: #fff; color: var(--ink); border: 1px solid var(--field-line); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: flex; background: #E6E3DC; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-width: 0; white-space: nowrap; padding: 0 4px; height: 40px; border: none; border-radius: 9px; font-size: 13px; font-weight: 600; background: transparent; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23,25,30,.15); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; height: 48px; border: 1px solid var(--field-line); border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; }
.textarea { height: auto; min-height: 96px; padding: 12px; line-height: 1.4; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid #1B4A80; outline-offset: 0; border-color: #1B4A80; }
.input.sm { height: 40px; font-size: 15px; background: var(--field); }
.hint { font-size: 12px; color: var(--muted); }
.err { font-size: 13px; font-weight: 600; color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 22px; }
.stat .l { font-size: 12px; color: var(--muted); }

.line-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.line-item:last-child { border-bottom: none; }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 960px) { .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.photo { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #D9D5CC; border: none; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 12px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.add { background: #fff; border: 2px dashed #B9B4A9; font-size: 14px; font-weight: 600; flex-direction: column; gap: 4px; }

/* ---------- alt pencere (sheet) */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(23,25,30,.45); display: flex; flex-direction: column; justify-content: flex-end; }
.sheet { background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; max-height: 88vh; max-height: 88dvh; }
.sheet .sheet-body { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
.sheet h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
@media (min-width: 960px) {
  .overlay { justify-content: center; align-items: center; }
  .sheet { width: 560px; border-radius: 18px; max-height: 80vh; }
}
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.viewer img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.viewer .bar { display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); justify-content: space-between; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(92px + var(--safe-b)); z-index: 70; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 20px rgba(23,25,30,.3); max-width: 520px; margin: 0 auto; }
@media (min-width: 960px) { .toast { left: auto; right: 32px; bottom: 32px; } }

.banner { background: #D6E4F5; color: #1B4A80; border: 1px solid #9DBBE0; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.banner.warn { background: #FBE3A1; color: #5E4200; border-color: #E5C25A; }
.syncdot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; }
.sync-chip { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 16px; font-size: 12px; font-weight: 600; border: 1px solid #3A3D44; background: #22252B; color: #fff; }
@media (min-width: 960px) { .sync-chip { background: #fff; color: var(--ink); border-color: var(--field-line); } }

/* ---------- servis formu (A4) */
.doc-wrap { display: flex; justify-content: center; }
.doc { background: #fff; width: 100%; max-width: 794px; padding: 28px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(23,25,30,.08); font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 16px; }
.doc .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--ink); padding-bottom: 14px; }
.doc .doc-meta { text-align: right; flex-shrink: 0; }
.doc .head > .row { min-width: 0; flex: 1 1 260px; }
.doc .logo { width: 56px; height: 56px; border-radius: 8px; object-fit: contain; }
.doc .logo-ph { width: 56px; height: 56px; border-radius: 8px; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.doc .firm { font-family: var(--display); font-weight: 700; font-size: 20px; }
.doc .k { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th { text-align: left; background: var(--ink); color: #fff; font-weight: 600; padding: 7px 10px; font-size: 12px; }
.doc td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc .num { text-align: right; white-space: nowrap; }
.doc .boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc .box { background: var(--ground); border-radius: 8px; padding: 12px 14px; }
.doc .sig { height: 120px; border: 1px solid var(--field-line); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--field); }
.doc .sig img { max-height: 110px; max-width: 100%; }
.doc .doc-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.doc .doc-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
@media (max-width: 600px) { .doc .doc-meta { text-align: left; } .doc { padding: 16px; font-size: 12px; } .doc .boxes { grid-template-columns: 1fr; } .doc .firm { font-size: 17px; } }
.sigpad { width: 100%; height: 180px; border: 2px dashed #B9B4A9; border-radius: 10px; background: var(--field); touch-action: none; display: block; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .no-print, .sidebar, .bottomnav, .topbar, .actionbar, .fab, .toast { display: none !important; }
  .content { padding: 0; max-width: none; }
  .doc { border: none; box-shadow: none; padding: 0; max-width: none; font-size: 11pt; }
  .doc th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc .box, .doc .logo-ph, .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.row > .field { flex: 1; min-width: 0; }

/* ================= v0.2 ================= */
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.link-plain { color: inherit; text-decoration: none; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.pos-l { color: #7FE0A6; }
.neg-l { color: #FF9E87; }
.cb { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--ink); }
.bg-white { background: #fff !important; }
.mobile-only { }
.hide-mobile { }
@media (max-width: 959px) { .hide-mobile { display: none !important; } }
@media (min-width: 960px) { .mobile-only { display: none !important; } }
.avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 20px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.avatar.lg { width: 52px; height: 52px; border-radius: 26px; font-size: 20px; background: var(--accent); color: var(--ink); }
.sidebar .avatar { width: 36px; height: 36px; background: var(--accent); color: var(--ink); font-size: 14px; }
.sidebar .me { color: #fff; text-decoration: none; }
.menu-ico, .cat-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ground); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side-search { display: flex; align-items: center; gap: 8px; background: #2A2D34; border-radius: 10px; padding: 0 10px; height: 38px; margin: 0 0 10px; color: #C9C6BF; }
.side-search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font-size: 13px; }
.side-search input::placeholder { color: #8E9098; }

.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small-mobile { padding: 0 14px; }
@media (max-width: 420px) { .hide-xs { display: none; } }
.update-banner { position: fixed; top: calc(8px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; box-shadow: 0 8px 20px rgba(23,25,30,.3); }
.banner.ok { background: #E3F1E8; color: var(--ok); border-color: #9CCBAE; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; }
.empty-ico { width: 52px; height: 52px; border-radius: 26px; background: var(--ground); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.skel { height: 86px; border-radius: var(--radius); background: linear-gradient(90deg, #ECE9E3 25%, #F6F4EF 37%, #ECE9E3 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.stat { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.stat.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.chip.sm { height: 34px; font-size: 13px; padding: 0 12px; }
.chip-select { height: 34px; width: auto; padding: 0 10px; font-size: 13px; border-radius: 17px; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.status-grid .btn:last-child:nth-child(odd) { grid-column: span 2; }
.btn.is-on { border-width: 2px; }
.money-row { display: flex; gap: 10px; flex-wrap: wrap; }
.money-row > div { flex: 1; min-width: 110px; background: var(--ground); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.card.money-row > div { background: var(--ground); }
.money-row strong { font-family: var(--display); font-size: 20px; }
.big-input { font-size: 22px; font-weight: 600; height: 54px; }
.mini { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--ground); color: var(--ink-2); white-space: nowrap; }
.mini.ok { background: #E3F1E8; color: var(--ok); }
.mini.info { background: #D6E4F5; color: #1B4A80; }
.tag.accent { background: var(--accent); color: var(--ink); }
fieldset.plain { border: none; margin: 0; padding: 0; min-width: 0; }
.search-row { padding: 0 8px 0 12px; height: 50px; gap: 8px; }
.search-row input { flex: 1; min-width: 0; border: none; outline: none; height: 46px; font-size: 16px; background: transparent; }

/* finans */
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi strong { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); }
.kpi.wide { grid-column: span 2; }
.kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.dark span, .kpi.dark em { color: #C9C6BF; }
.kpi.dark strong { font-size: 32px; }
@media (min-width: 960px) { .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .kpi.wide { grid-column: auto; } }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-track { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--ink); border-radius: 4px; }

/* arşiv */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 960px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat-tile { min-height: 96px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 12px 16px; border-radius: var(--radius); text-align: left; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.cat-tile.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 6px; }
.kpi-row div { display: flex; flex-direction: column; }
.kpi-row strong { font-family: var(--display); font-size: 20px; }
.kpi-row span { font-size: 11px; color: #C9C6BF; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: flex; gap: 12px; color: inherit; text-decoration: none; }
.tl-date { width: 52px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; padding-top: 12px; }
.tl-date .display { font-size: 18px; }
.meas-inline { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }

/* teklif */
.content.wide { max-width: 1400px; }
.quote-layout { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 960px) {
  .quote-layout { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 1.15fr); align-items: start; }
  .quote-preview { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
}
.item-grid { display: grid; grid-template-columns: 62px 72px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.item-grid .input { padding: 0 8px; }
.line-total { text-align: right; font-weight: 600; font-size: 14px; }
.quote-doc { font-size: 12px; }
.quote-doc .totals { align-self: flex-end; width: min(280px, 100%); display: flex; flex-direction: column; gap: 4px; }
.quote-doc .totals > div { display: flex; justify-content: space-between; }
.quote-doc .totals .grand { font-weight: 700; font-size: 15px; border-top: 2px solid var(--ink); padding-top: 6px; }
.sign-line { width: 130px; text-align: center; border-top: 1px solid var(--ink); padding-top: 4px; font-size: 11px; }
@media print { .quote-edit, .seg { display: none !important; } .quote-preview { position: static; max-height: none; overflow: visible; } }

.scaled-page { width: 100%; overflow: hidden; }
.scaled-page .doc { max-width: none; width: 794px; min-height: 1123px; padding: 48px 52px; font-size: 12.5px; }
.scaled-page .doc .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scaled-page .doc .doc-meta { text-align: right; }
@media print { .scaled-page { height: auto !important; } .scaled-page > div { transform: none !important; } .scaled-page .doc { min-height: 0; padding: 0; } }

/* ---------- v0.3 müşteri talepleri */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kicker { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.badge.ok { background: var(--ok); color: #fff; }
.badge.blue { background: #D6E4F5; color: #1B4A80; }
.badge.sand { background: #E4E1DA; color: #3A3731; }
.badge.grey { background: #EEEBE5; color: var(--muted); }
.mini.warn { background: #FBE3A1; color: #5E4200; }
.mini.dark { background: var(--ink); color: #fff; }
.wa-bubble { background: #E7F6DE; border-radius: 12px 12px 4px 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; align-self: flex-end; max-width: 94%; }
.wa-bubble.in { border-radius: 12px 12px 12px 4px; align-self: stretch; max-width: none; }
.linkbox { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; background: var(--card); border: 1px dashed var(--field-line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; user-select: all; }
.send-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.send-grid .btn { padding: 0 8px; }
.req-grid { display: grid; gap: 12px; }
@media (min-width: 960px) { .req-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.slot-btn { min-height: 46px; text-align: left; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; background: #fff; border: 1px solid var(--field-line); }
.slot-btn.on { background: #D6E4F5; color: #1B4A80; border: 2px solid #1B4A80; }
.reason-btn { min-height: 46px; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left; background: #fff; border: 1px solid var(--field-line); }
.reason-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.req-banner { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); background: #FFF6D6; border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px 14px; font-weight: 600; }
