/* Ayder Tesisat Servis — tek stil dosyası (derleme adımı yok).
   Yapı: değişkenler → temel → yerleşim → bileşenler → sayfa parçaları → telefon → yazdırma. */

:root {
    /* Renk: sıcak taş griler + su mavisi ana renk + kombi turuncusu vurgu */
    --bg: #f6f5f3;
    --surface: #ffffff;
    --surface-2: #faf9f7;
    --surface-3: #f2f0ec;
    --border: #e7e4df;
    --border-strong: #d6d2cb;
    --text: #1c1917;
    --text-2: #44403c;
    --muted: #78716c;
    --primary: #1f5fd1;
    --primary-hover: #194fb0;
    --primary-soft: #eaf1fd;
    --primary-ring: rgba(31, 95, 209, .18);
    --accent: #ea6a0c;
    --accent-soft: #fff1e6;
    --navy: #13233f;
    --navy-2: #1b3156;
    --danger: #c8322b;
    --danger-soft: #fdeeec;
    --warn: #a75a00;
    --warn-soft: #fff4e0;
    --ok: #157a4a;
    --ok-soft: #e6f6ed;
    /* Ölçek: köşe, boşluk, gölge */
    --radius-lg: 14px;
    --radius: 12px;
    --radius-sm: 9px;
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
    --shadow-xs: 0 1px 1px rgba(28, 25, 23, .04);
    --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 1px 3px rgba(28, 25, 23, .04);
    --shadow-md: 0 4px 14px -4px rgba(28, 25, 23, .10), 0 2px 4px -2px rgba(28, 25, 23, .05);
    --shadow-lg: 0 18px 40px -12px rgba(28, 25, 23, .22), 0 4px 10px -4px rgba(28, 25, 23, .08);
    --control-h: 44px;   /* TEK boyut ölçüsü: tüm alanlar, açılır listeler ve standart düğmeler */
    --sidebar-w: 248px;
    --topbar-h: 64px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Inter (OFL lisansı, assets/fonts/Inter-LICENSE.txt) — yerel dosya, dış CDN yok. */
@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ── Temel ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 var(--font); color: var(--text); background: var(--bg); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 .75em; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.icon { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
/* Form denetimleri tarayıcı yazı tipini değil sayfanınkini kullansın (sınıfsız düğmeler dahil). */
:where(button, input, select, textarea, optgroup) { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; }
:where(button) { cursor: pointer; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Yerleşim ──────────────────────────────────────────────── */
.app { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
    background: var(--navy); color: #d6e0ee; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.brand-logo { max-width: 40px; max-height: 34px; border-radius: 6px; background: #fff; padding: 2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { color: #fff; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: #93a7c2; font-size: 12px; }
.sidebar .sidebar-close { display: none; margin-left: auto; color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px;
    color: #c5d2e3; font-weight: 500; text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(255,255,255,.13); color: #fff; }
.nav a .icon { opacity: .85; }
.sidebar-user { display: flex; align-items: center; gap: 6px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { flex: 1; display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; color: #fff; min-width: 0; text-decoration: none; }
.user-chip:hover, .user-chip.active { background: rgba(255,255,255,.07); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2f5f99; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: #93a7c2; }
.sidebar .icon-btn { color: #c5d2e3; }
.sidebar-backdrop { display: none; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px; padding: 0 24px;
    background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--border);
}
.topbar .menu-toggle { display: none; }
.topsearch { flex: 1; max-width: 520px; position: relative; display: flex; align-items: center; }
.topsearch .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.topsearch input[type=search] { width: 100%; padding: 9px 12px 9px 36px; background: var(--surface-2); border-radius: 9px; }
.topbar-new { margin-left: auto; }
.content { padding: 24px 28px; width: 100%; max-width: 1680px; }

.banner { display: flex; align-items: center; gap: 10px; padding: 9px 24px; font-size: 13.5px; border-bottom: 1px solid; }
.banner a { margin-left: auto; font-weight: 600; }
.banner-danger { background: var(--danger-soft); color: var(--danger); border-color: #f5c9c9; }
.banner-danger a { color: var(--danger); }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-color: #f3dcb2; }
.banner-warn a { color: var(--warn); }

.bottombar { display: none; }

/* ── Sayfa başlığı ─────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.section-title .count { background: var(--border); color: var(--text-2); border-radius: 20px; padding: 0 8px; font-size: 12px; letter-spacing: 0; }
.section-title.danger { color: var(--danger); }
.section-title.danger .count { background: var(--danger-soft); color: var(--danger); }

/* ── Kart ──────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 15px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.danger { border-color: #f1c2c2; }
.card.danger .card-head { background: var(--danger-soft); color: var(--danger); border-color: #f1c2c2; border-radius: var(--radius) var(--radius) 0 0; }
.card.danger .card-head h2 { color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }

/* ── Özet kartları ─────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
    display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); color: inherit; text-decoration: none; position: relative;
}
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 12.5px; color: var(--muted); }
.stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.stat-warn::before { background: #e48a00; }
.stat-ok::before { background: var(--ok); }
.stat-danger::before { background: var(--danger); }
.stat-muted::before { background: #9aa4b2; }

/* ── Rozetler ──────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px;
    font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
    background: #eef0f3; color: #4b5563;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before, .badge-type::before { display: none; }
.badge-planned   { background: #e8f0fb; color: #1c5ea8; }
.badge-on_way    { background: #efe9fc; color: #6334c4; }
.badge-done      { background: var(--ok-soft); color: var(--ok); }
.badge-postponed { background: var(--warn-soft); color: var(--warn); }
.badge-cancelled { background: #eef0f3; color: #687180; }
.badge-late      { background: var(--danger-soft); color: var(--danger); }
.badge-w-active   { background: var(--ok-soft); color: var(--ok); }
.badge-w-expiring { background: #fff0db; color: #b45309; }
.badge-w-expired  { background: #eef0f3; color: #687180; }
.badge-w-none     { background: transparent; color: var(--muted); border-color: var(--border); }
.badge-w-none::before { display: none; }
.badge-w-pending  { background: #f1f5f9; color: #64748b; }
.badge-pay-paid    { background: var(--ok-soft); color: var(--ok); }
.badge-pay-unpaid  { background: var(--danger-soft); color: var(--danger); }
.badge-pay-partial { background: var(--warn-soft); color: var(--warn); }
.badge-wa-pending, .badge-wa-queued { background: #e8f0fb; color: #1c5ea8; }
.badge-wa-sent    { background: var(--ok-soft); color: var(--ok); }
.badge-wa-failed  { background: var(--danger-soft); color: var(--danger); }
.badge-wa-skipped { background: #eef0f3; color: #687180; }
/* İş türü: renk satır içi --c değişkeniyle gelir */
.badge-type { background: color-mix(in srgb, var(--c, #64748b) 12%, white); color: var(--c, #64748b); }
.badge small { font-weight: 500; opacity: .8; }

/* Tek tıkla durum değiştirme düğmesi */
.status-btn { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.status-btn::after { content: ""; width: 0; height: 0; margin-left: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }
.status-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.status-btn.busy { opacity: .55; pointer-events: none; }

.popover {
    position: absolute; z-index: 60; min-width: 190px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
}
.popover button {
    display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 10px; border: 0; background: none;
    border-radius: 7px; font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.popover button:hover, .popover button.current { background: var(--surface-2); }
.popover button.current { font-weight: 600; }
.popover .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.popover .pop-date { padding: 8px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.popover .pop-date label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; }

/* ── Düğmeler ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text);
    font: inherit; font-weight: 600; font-size: 14px; line-height: 1.3; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: #efc4c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #136a40; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 12px 18px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px;
    border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }

/* ── Formlar ───────────────────────────────────────────────── */
/* Metin alanları: tipi yazılmamış input dahil (tarayıcı varsayılanı "text"). :where() özgüllüğü
   sıfırlar; böylece bileşen kuralları (.topsearch input …) her zaman bunu ezebilir. */
:where(input:not([type]), input[type=text], input[type=search], input[type=tel], input[type=email], input[type=url],
       input[type=password], input[type=number], input[type=date], input[type=time], input[type=month],
       input[type=week], input[type=datetime-local], select, textarea) {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px;
    font: inherit; font-size: 14.5px; color: var(--text); background-color: var(--surface); min-height: var(--control-h);
    -webkit-appearance: none; appearance: none;
}
:where(input[type=date], input[type=time], input[type=month], input[type=datetime-local]) { line-height: 1.3; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea)::placeholder { color: #9aa3b1; opacity: 1; }
:where(input, select, textarea):disabled { background-color: var(--surface-2); color: var(--muted); cursor: not-allowed; }
/* Onay kutusu ve radio: tarayıcı görünümü yerine tasarım sistemi (yuvarlatılmış kutu, beyaz ✓, odak halkası). */
input[type=checkbox], input[type=radio] {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex: none; vertical-align: middle; cursor: pointer;
    display: inline-grid; place-content: center; border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface) no-repeat center / 14px 14px;
    transition: background-color .12s, border-color .12s, box-shadow .12s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover:not(:disabled), input[type=radio]:hover:not(:disabled) { border-color: var(--primary); }
input[type=checkbox]:checked {
    background-color: var(--primary); border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
input[type=checkbox]:indeterminate {
    background-color: var(--primary); border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
input[type=radio]:checked { border-color: var(--primary); background-color: var(--primary); box-shadow: inset 0 0 0 4px var(--surface); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
input[type=radio]:checked:focus-visible { box-shadow: inset 0 0 0 4px var(--surface), 0 0 0 4px var(--primary-ring); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
.check-danger input[type=checkbox]:checked { background-color: var(--danger); border-color: var(--danger); }
input[type=color] { width: 56px; height: var(--control-h); padding: 3px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; flex: none; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
input[type=file] {
    width: 100%; max-width: 100%; padding: 7px; border: 1px dashed var(--border-strong); border-radius: 8px;
    background: var(--surface-2); font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer;
}
input[type=file]::file-selector-button {
    margin-right: 12px; padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 7px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
input[type=file]:hover::file-selector-button { background: var(--surface-2); }
input[type=file]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
textarea { min-height: 84px; resize: none; line-height: 1.45; max-height: 70vh; }
select { padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7584' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
:where(input, select, textarea):focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28,94,168,.15); }
:where(input[readonly]) { background-color: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 12.5px; color: var(--danger); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; min-height: var(--control-h); line-height: 1.3; user-select: none; }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-radius: 8px 0 0 8px; }
.input-group .addon { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 8px 8px 0; background: var(--surface-2); color: var(--muted); font-size: 13.5px; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: var(--surface); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 8px 14px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; border-right: 1px solid var(--border); }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--primary-soft); color: var(--primary); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
details.fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
details.fold > summary { list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > .fold-body { padding: 0 16px 16px; }

/* Filtre çubuğu */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 16px; }
.filters .field { flex: 1 1 150px; max-width: 230px; }
.filters .field.wide { flex: 2 1 220px; max-width: 320px; }
.filters .filter-actions { display: flex; gap: 8px; align-items: center; }
.filter-toggle { display: none; }

/* ── Uyarılar ──────────────────────────────────────────────── */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--ok-soft); border-color: #bfe5cf; color: #125c38; }
.alert-error   { background: var(--danger-soft); border-color: #f1c2c2; color: #9d2222; }
.alert-warn    { background: var(--warn-soft); border-color: #f3dcb2; color: #7d4300; }
.alert-info    { background: var(--primary-soft); border-color: #c8daf1; color: #174f8e; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state h1, .empty-state h2 { color: var(--text); margin-bottom: 8px; }
.empty { padding: 22px 16px; color: var(--muted); text-align: center; font-size: 14px; }

/* ── Tablolar ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.table tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.table tr.is-deleted td { opacity: .55; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .cell-main { font-weight: 600; color: var(--text); }
.table .cell-sub { font-size: 12.5px; color: var(--muted); }
.table td.wrap-cell { max-width: 280px; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }

.pagination { display: flex; gap: 4px; padding: 12px 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.pagination a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination span { border: 0; }

/* Tanım listesi (detay sayfaları) */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs .count { font-size: 12px; background: var(--border); border-radius: 20px; padding: 0 7px; margin-left: 4px; color: var(--text-2); }

/* Değişiklik geçmişi */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.timeline .when { font-size: 12.5px; color: var(--muted); }
.timeline .what { font-size: 13.5px; margin-top: 2px; }
.timeline .chg { display: block; color: var(--text-2); }
.timeline .chg del { color: var(--muted); }

/* ── İş kartları (panel, personel ekranı) ─────────────────── */
.job-list { display: flex; flex-direction: column; }
.job {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.job:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.job:hover { background: #fafbfc; }
.job.is-late { box-shadow: inset 3px 0 0 var(--danger); }
.job-time { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.job-time small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.job-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.job-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.job-title a { font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); min-width: 0; }
.job-meta > * { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.job-meta a { color: var(--text-2); }
.job-meta .addr { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.job-side { display: flex; align-items: center; gap: 8px; }
.tel-link { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Uyarı kutusu (garanti devam ediyor) */
.notice { border: 1px solid #bfe5cf; background: var(--ok-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; color: #125c38; }
.notice.warn { border-color: #f3dcb2; background: var(--warn-soft); color: #7d4300; }
.notice strong { display: block; margin-bottom: 4px; }
.notice ul { margin: 0; padding-left: 18px; }

/* Giriş */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--navy); }
.login-box { width: 100%; max-width: 380px; background: var(--surface); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-lg); }
.login-box .brand-mark { background: var(--navy); color: #fff; margin-bottom: 14px; }
.login-box h1 { font-size: 20px; margin-bottom: 4px; }
.login-box .sub { color: var(--muted); margin-bottom: 18px; }
.login-box .field { margin-bottom: 14px; }

/* ── Tablet ────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Telefon ve dar ekran ──────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 280px; }
    body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 23, 42, .4); }
    .sidebar .sidebar-close { display: inline-grid; }
    .main { margin-left: 0; }
    .topbar .menu-toggle { display: inline-grid; margin-left: -8px; }
    .topbar { padding: 0 12px; gap: 6px; height: 56px; }
    .topbar-new span { display: none; }
    .topbar-new { padding: 8px 10px; }
    .content { padding: 16px 12px calc(84px + env(safe-area-inset-bottom)); }
    .banner { padding: 9px 12px; }

    .bottombar {
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(16,24,40,.05);
    }
    .bottombar a, .bottombar button {
        display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 11px; font-weight: 600;
        color: var(--muted); background: none; border: 0; padding: 6px 0; text-decoration: none; cursor: pointer;
    }
    .bottombar a.active { color: var(--primary); }
    .bottombar .bottombar-new {
        width: 52px; height: 52px; border-radius: 50%; margin: -18px auto 0; padding: 0; justify-content: center;
        background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(28,94,168,.35);
    }

    h1 { font-size: 20px; }
    .page-head { margin-bottom: 14px; align-items: flex-start; }
    .page-actions { margin-left: 0; width: 100%; }
    .page-actions .btn { flex: 1; }
    .stats { gap: 10px; margin-bottom: 14px; }
    .stat { padding: 12px 14px; }
    .stat-value { font-size: 24px; }
    .grid-2, .grid-3, .form-grid, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    .form-grid.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-body { padding: 14px; }
    .card-head { padding: 12px 14px; }
    .dl { grid-template-columns: 112px minmax(0, 1fr); }

    /* iOS 16px altındaki alanlarda yakınlaştırır */
    :where(input:not([type]), input[type=text], input[type=search], input[type=tel], input[type=email], input[type=url],
           input[type=password], input[type=number], input[type=date], input[type=time], input[type=month],
           input[type=week], input[type=datetime-local], select, textarea) { font-size: 16px; min-height: var(--control-h); }
    input[type=file] { font-size: 15px; }
    .btn { min-height: var(--control-h); }
    .btn-sm { min-height: 36px; }

    /* Filtreler katlanır */
    .filter-toggle { display: inline-flex; }
    .filters { display: none; }
    .filters.open { display: flex; }
    .filters .field, .filters .field.wide { max-width: none; flex: 1 1 100%; }
    .filters .filter-actions { width: 100%; }
    .filters .filter-actions .btn { flex: 1; }

    /* Tablolar telefonda karta döner: her td data-label ile etiketlenir */
    .table.responsive thead { display: none; }
    .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
    .table.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
    .table.responsive td { padding: 3px 0; border: 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; text-align: right; min-width: 0; }
    .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; }
    .table.responsive td[data-label=""]::before, .table.responsive td:not([data-label])::before { display: none; }
    .table.responsive td.primary { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; }
    .table.responsive td.primary::before { display: none; }
    .table.responsive td.actions { justify-content: flex-end; padding-top: 8px; }
    .table.responsive td.wrap-cell { max-width: none; }
    .table.responsive tr.is-late { box-shadow: inset 3px 0 0 var(--danger); }
    .table.responsive tr.is-late td:first-child { box-shadow: none; }
    .table.responsive tfoot tr { background: var(--surface-2); }

    .job { grid-template-columns: 52px minmax(0, 1fr); padding: 12px 14px; }
    .job-side { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
    .job-time { font-size: 15px; }
    .job-meta .addr { white-space: normal; }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-label { font-size: 12.5px; }
}

/* ── Yazdırma ──────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .bottombar, .banner, .no-print, .page-actions, .popover { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; max-width: none; }
    body { background: #fff; font-size: 12px; }
    .card { box-shadow: none; border-color: #bbb; }
    a { color: inherit; text-decoration: none; }
}

/* Kısa bildirim (ajax sonucu) */
.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 80;
    background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
@media (max-width: 900px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* ════ Sayfa parçaları ════ */
.stack > .card + .card { margin-top: 0; }

/* ── Sayfa parçası: Servis formu ve detay ─────────────────────────────── */
/* Modül A: servis formu, detay, iş kartı */
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
.svc-layout { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 20px; align-items: start; }
.svc-col { min-width: 0; }
.svc-sub { font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; }
.svc-parts, .svc-money, .svc-total, .svc-pay, .svc-paid { margin-top: 16px; }

.pick-list { margin-top: 4px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; }
.pick-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 10px 12px; min-height: 48px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover, .pick-item:focus { background: var(--primary-soft); outline: none; }
.pick-main { font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.pick-sub { font-size: 12.5px; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.pick-empty { padding: 12px; color: var(--muted); font-size: 13.5px; }
.part-search { position: relative; }
.part-search .pick-list { position: absolute; left: 0; right: 0; z-index: 20; margin-top: 2px; }

.cust-find { display: flex; gap: 10px; align-items: stretch; }
.cust-find .input-icon { flex: 1; min-width: 0; }
.cust-find .btn { flex: none; white-space: nowrap; }
.cust-picked { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #c9dafa; border-radius: var(--radius); background: linear-gradient(180deg, #f5f9ff, #eef4ff); animation: svc-in .22s ease-out; }
.cust-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 20px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b82f6, #1f5fd1); box-shadow: 0 2px 6px rgba(31,95,209,.3); }
.cust-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cust-info strong { font-size: 16px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cust-line { display: flex; align-items: flex-start; gap: 7px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.cust-line .icon { margin-top: 3px; color: var(--muted); flex: none; }
.cust-line span:empty { display: none; }
.cust-new { border: 1px solid #cfe3d8; border-radius: var(--radius); padding: 16px; background: linear-gradient(180deg, #f6fcf9, #fff); display: flex; flex-direction: column; gap: 14px; animation: svc-in .26s ease-out; }
.cust-new-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cust-new-head .head-title { flex: 1; min-width: 160px; }
@keyframes svc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

#warranty-box ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 8px; }
#warranty-box li { padding-left: 10px; border-left: 3px solid #f3dcb2; overflow-wrap: anywhere; }
#warranty-box li.same-device { border-left-color: var(--warn); background: rgba(255,255,255,.55); padding: 6px 8px 6px 10px; border-radius: 0 6px 6px 0; }
#warranty-box a { font-weight: 650; color: inherit; text-decoration: underline; }
#warranty-box .w-lines { font-size: 12.5px; }

.part-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; background: var(--surface-2); }
.part-head { display: flex; gap: 6px; align-items: flex-end; }
.part-head .part-name { flex: 1; }
.part-del { color: var(--danger); width: 44px; height: 44px; flex: none; }
.part-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.part-total { min-height: var(--control-h); display: flex; align-items: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.part-row .field > label { font-size: 12px; }
.part-empty { padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; margin-bottom: 10px; }

.svc-total { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.svc-total > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-total span { font-size: 12.5px; color: var(--muted); }
.svc-total b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.svc-total .grand b { font-size: 17px; color: var(--primary); }


/* Detay */
.svc-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.svc-deleted-strip { margin-bottom: 14px; }
.svc-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; }
.svc-sum dt { color: var(--muted); }
.svc-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.svc-sum .grand { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border); padding-top: 8px; }
.inline-form { display: inline; }

/* İş kartı */
.job-card-top { display: flex; flex-direction: column; gap: 10px; }
.job-card-top .big-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.job-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.job-card-actions .btn { min-height: 50px; font-size: 15.5px; }
.job-complaint { padding: 10px 12px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border); overflow-wrap: anywhere; white-space: pre-line; }
.job-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.job-actions .btn-lg { min-height: 56px; font-size: 16.5px; }

/* Sağ sütun: yapışkan özet + işlem bölümü */
.svc-side { display: flex; flex-direction: column; gap: 16px; }
/* Özet kartı yapışkan değil: kayarken alttaki alanların üstüne binmesin; canlı toplam zaten alt çubukta. */
.svc-summary { border-radius: var(--radius); padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #14305f, #1f5fd1); box-shadow: var(--shadow-md); }
.svc-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svc-summary .eyebrow { color: rgba(255,255,255,.75); }
.svc-summary .badge { background: #fff; }
.svc-sum-grand { font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 6px 0 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.svc-sum-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.svc-sum-rows > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-sum-rows span { font-size: 12.5px; color: rgba(255,255,255,.72); }
.svc-sum-rows b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 1180px) {
    .svc-layout { grid-template-columns: minmax(0, 1fr); }
}
}
}
@media (max-width: 900px) {
    .part-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .svc-total { grid-template-columns: 1fr; }
    .svc-total > div { flex-direction: row; justify-content: space-between; align-items: baseline; }
    .cust-find { flex-direction: column; }
    .cust-find .btn { min-height: 48px; }
    .cust-picked { flex-wrap: wrap; }
    .cust-picked .btn { min-height: 44px; }
    .cust-new-head .btn { width: 100%; min-height: 44px; }
    .svc-sum-grand { font-size: 32px; }
    .svc-sum-rows { gap: 6px; }
    .svc-sum-rows b { font-size: 14px; }
}
.part-search .input-group input { flex: 1; min-width: 0; border-radius: 8px; }

/* ── Sayfa parçası: Listeler ve raporlar ─────────────────────────────── */
/* Modül B: raporlar (ay seçici, yatay çubuklar) */
.month-picker { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.month-picker input[type=month] { min-height: 44px; }
.month-picker a.icon-btn:first-child svg { transform: rotate(180deg); }
.table .bar { display: block; height: 12px; min-width: 2px; border-radius: 3px; background: var(--primary); }
.table tr.is-current td { background: var(--surface-2); }
@media (max-width: 760px) {
}

/* ── Sayfa parçası: Panel ve personel ekranı ─────────────────────────────── */
/* Modül C: panel + personel ekranı */
/* Panel (v2): karşılama başlığı, iş satırı .pj, personel kartı */
.dash-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-hello h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.dash-hello .sub { color: var(--muted); margin-top: 3px; }
.scope-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.scope-select { position: relative; display: flex; align-items: center; margin: 0; }
.scope-select .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.scope-select select { min-height: var(--control-h); padding-left: 34px; min-width: 190px; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-col { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.dash-card { margin: 0; overflow: hidden; }
.dash-card .card-head { border-bottom: 1px solid var(--border); }
.dash-card .head-title { flex: 1; }
.dash-card .head-icon { background: var(--primary-soft); }
.head-icon.red { background: var(--danger-soft); color: var(--danger); }
.count-pill { background: var(--danger); color: #fff; border-radius: 20px; min-width: 26px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.count-pill.soft { background: var(--surface-3); color: var(--text-2); }
.dash-card.danger { border-color: #f1c8c8; }
.dash-card.danger .card-head { background: linear-gradient(90deg, var(--danger-soft), transparent 70%); border-bottom-color: #f1c8c8; }
.dash-card.danger .card-head h2 { color: var(--danger); }
.day-head { padding: 7px 18px; font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.dash-card > .job-list + .day-head { border-top: 1px solid var(--border); }
.stat-alert { color: var(--danger); font-weight: 650; margin-left: 4px; }
.stat-alert::before { content: "·"; margin-right: 6px; color: var(--muted); font-weight: 400; }
.job.is-faded { opacity: .55; }

.pj { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 18px;
    border-bottom: 1px solid var(--border); background: var(--surface); position: relative; transition: background .12s; }
.pj:last-child { border-bottom: 0; }
.pj:hover { background: var(--surface-2); }
.pj.is-late::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--danger); }
.pj.is-faded { opacity: .55; }
.pj-time { text-align: center; padding: 6px 0; background: var(--surface-3); border-radius: 10px; line-height: 1.15; }
.pj-time strong { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pj-time small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.pj.is-late .pj-time { background: var(--danger-soft); color: var(--danger); }
.pj-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pj-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.pj-title a { font-weight: 650; font-size: 15px; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.pj-title a:hover { color: var(--primary); }
.pj-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; font-size: 13px; color: var(--muted); min-width: 0; align-items: flex-start; }
.pj-meta > * { display: inline-flex; align-items: flex-start; gap: 5px; min-width: 0; }
.pj-meta .icon { margin-top: 2px; flex: none; }
.pj-meta a { color: var(--text-2); text-decoration: none; }
.pj-meta a:hover { color: var(--primary); }
.pj-addr span { overflow-wrap: anywhere; }
.pj-who { align-items: center; }
.mini-av { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--a, #f08a3c), var(--b, #ea6a0c)); }
.mini-av.none { background: var(--border-strong); color: var(--text-2); }
.mini-av.lg { width: 36px; height: 36px; font-size: 14px; }
.pj-side { display: flex; align-items: center; gap: 8px; justify-self: end; }
.pj-side .status-btn { min-height: 32px; }
.pj-compact { padding: 11px 16px; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 12px; }
.pj-compact .pj-time strong { font-size: 15px; }
.pj-compact .pj-title a { font-size: 14px; }
.pj-compact .pj-who { display: none; }
.pj-compact .pj-addr { max-width: 100%; }

.staff-list { display: flex; flex-direction: column; }
.staff-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .12s; }
.staff-row:last-child { border-bottom: 0; }
.staff-row:hover { background: var(--surface-2); }
.staff-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.staff-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.staff-row .bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: block; }
.staff-row .bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.staff-num { text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.staff-num strong { color: var(--text); font-size: 18px; }
.staff-num small { display: block; font-size: 11px; }
@media (max-width: 1180px) { .dash-cols { grid-template-columns: minmax(0, 1fr); } }
/* Masaüstünde üst çubukta zaten "Yeni servis" var; telefonda orada yalnız simge */
@media (min-width: 901px) { .scope-bar > a.btn-primary { display: none; } }
@media (max-width: 900px) {
    .dash-hero { align-items: stretch; flex-direction: column; margin-bottom: 14px; }
    .dash-hello h1 { font-size: 22px; }
    .scope-bar > * { flex: 1 1 auto; }
    .scope-bar > a.btn-primary { min-height: 44px; justify-content: center; }
    .pj-time { align-self: start; grid-row: span 2; }
    .scope-select, .scope-select select { width: 100%; }
    .scope-select select { min-height: var(--control-h); }
    .scope-bar .segmented { display: flex; }
    .scope-bar .segmented label { flex: 1; }
    .scope-bar .segmented .btn { width: 100%; min-height: 44px; justify-content: center; }
    .dash-cols, .dash-col { gap: 14px; }
    .pj { grid-template-columns: 52px minmax(0, 1fr); padding: 13px 14px; gap: 8px 12px; }
    .pj-side { grid-column: 2; justify-self: start; }
    .pj-side .status-btn { min-height: 44px; padding: 6px 16px; font-size: 14px; }
    .pj-meta a { min-height: 28px; align-items: center; }
    .pj-time strong { font-size: 16px; }
    .stat-note { font-size: 12px; }
}

/* Personel ekranı */
.staff-wrap { max-width: 760px; margin: 0 auto; }
.staff-hello h1 { margin-bottom: 2px; }
.staff-tabs { display: flex; gap: 8px; margin: 14px 0; }
.staff-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 650; text-decoration: none; }
.staff-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.staff-tabs .n { background: rgba(0,0,0,.09); border-radius: 20px; padding: 0 8px; font-size: 13px; }
.staff-tabs a.active .n { background: rgba(255,255,255,.25); }
.late-strip { border: 1px solid #f1c2c2; background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.late-strip > h2 { color: var(--danger); font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }

/* ── Sayfa parçası: Müşteriler ─────────────────────────────── */
/* Modül D: müşteriler */
.mus-name { overflow-wrap: anywhere; word-break: break-word; font-weight: 600; }
.mus-tag { margin-left: 6px; font-size: 11px; vertical-align: middle; }
.mus-table td { overflow-wrap: anywhere; }
.mus-table td.nowrap { overflow-wrap: normal; }
.mus-snip mark, .mus-name mark, .mus-table mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.page-head h1 { overflow-wrap: anywhere; min-width: 0; }

/* Telefon / cihaz satırları (düzenleme formu) */
.mus-rows { display: flex; flex-direction: column; gap: 10px; }
.mus-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px 10px; align-items: center; }
.mus-row.dev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.mus-row input[type=text], .mus-row input[type=tel] { width: 100%; min-width: 0; }
.mus-row .mus-primary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; min-height: 44px; }
.mus-row .mus-primary input { width: 20px; height: 20px; }
.mus-row .mus-remove { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--danger); }
.mus-dup { margin-bottom: 14px; }
.mus-dup a { font-weight: 600; }
.mus-phones li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.mus-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mus-list li { overflow-wrap: anywhere; }
.mus-warn-strip { margin-bottom: 14px; }
@media (max-width: 640px) {
    .mus-row { grid-template-columns: minmax(0, 1fr) auto auto; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
    .mus-row.dev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
    .mus-row.dev > :last-child { justify-self: end; }
    .mus-row > :first-child, .mus-row.dev > :first-child { grid-column: 1 / -1; }
}
.inline-form { display: inline; margin: 0; }

/* ── Sayfa parçası: Yönetim sayfaları ─────────────────────────────── */
/* Modül E: ayarlar (logo, iş türü satırları) */
.logo-preview { display: flex; align-items: center; min-height: 64px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); }
.logo-preview img { max-height: 56px; max-width: 100%; }
.logo-empty { color: var(--muted); font-size: 13.5px; }
.jt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.jt-row { display: grid; grid-template-columns: minmax(160px, 2fr) 70px minmax(110px, 1fr) 80px minmax(90px, 1fr) auto; gap: 12px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.jt-row.jt-new { background: var(--surface-2); }
.jt-row input[type=color] { width: 100%; height: var(--control-h); padding: 3px; }
.jt-check { height: var(--control-h); display: flex; align-items: center; }
.jt-act { height: var(--control-h); display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
@media (max-width: 900px) { .jt-row input[type=color], .jt-check, .jt-act { height: var(--control-h); } }
@media (max-width: 760px) {
    .jt-row { grid-template-columns: 1fr 1fr; }
    .jt-row .field:first-of-type, .jt-act { grid-column: 1 / -1; }
}

/* ── Sayfa parçası: WhatsApp ─────────────────────────────── */
/* WhatsApp sayfası */
.wa-preview { background: #e7f3e1; border: 1px solid #cfe5c6; border-radius: 10px; padding: 12px 14px; max-width: 520px;
    white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; margin-top: 8px; }
.wa-preview + .wa-preview { margin-top: 6px; }
.wa-err { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.wa-err summary { cursor: pointer; list-style: none; }
.wa-err summary::-webkit-details-marker { display: none; }
.wa-msg summary { cursor: pointer; font-size: 12.5px; color: var(--muted, #687180); }
.wa-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
@media (max-width: 640px) { .wa-toolbar .btn { flex: 1 1 100%; } }

/* ════════════════════════════════════════════════════════════════
   TASARIM SİSTEMİ v2 — üstteki temel kuralları inceltir ve yeni bileşenler ekler.
   Telefon uyarlamaları bu bölümün sonundaki @media içinde.
   ════════════════════════════════════════════════════════════════ */

/* Tipografi hiyerarşisi */
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.page-head { margin-bottom: 22px; }
.page-head .sub { font-size: 14px; margin-top: 4px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Yan menü: koyu lacivert, turuncu etkin işareti */
.sidebar { background: var(--navy); border-right: 1px solid rgba(255,255,255,.04); }
.brand { padding: 18px 18px 16px; }
.brand-mark { background: linear-gradient(135deg, #2f73e6, #1f5fd1); color: #fff; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.nav { padding: 12px; gap: 3px; }
.nav a { position: relative; padding: 9px 12px; border-radius: 9px; color: #b9c6da; font-weight: 500; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.10); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.avatar { background: linear-gradient(135deg, var(--a, #f08a3c), var(--b, #ea6a0c)); }

/* Üst çubuk */
.topbar { height: var(--topbar-h); padding: 0 28px; background: rgba(246,245,243,.85); border-bottom-color: transparent; box-shadow: 0 1px 0 var(--border); }
.topsearch input[type=search] { background: var(--surface); border-color: var(--border); border-radius: 10px; box-shadow: var(--shadow-xs); height: 40px; }
.topsearch input[type=search]:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }

/* Kart */
.card { border-color: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 14px 18px; gap: 12px; }
.card-head h2 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.card-body { padding: 18px; }
.card-foot { border-radius: 0 0 var(--radius) var(--radius); }
/* Bölüm başlığı simgesi: renkli kare içinde ikon ya da adım numarası */
.head-icon {
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
    background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13.5px;
}
.head-icon.orange { background: var(--accent-soft); color: var(--accent); }
.head-icon.green { background: var(--ok-soft); color: var(--ok); }
.head-icon.violet { background: #f1ebfd; color: #6d3fc9; }
.head-icon.slate { background: var(--surface-3); color: var(--text-2); }
.head-title { display: flex; flex-direction: column; min-width: 0; }

/* Düğmeler: belirgin birincil, sakin ikincil */
.btn { border-radius: 9px; border-color: var(--border-strong); box-shadow: var(--shadow-xs); transition: background .12s, border-color .12s, box-shadow .12s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.btn-primary { background: var(--primary); border-color: var(--primary-hover); box-shadow: 0 1px 2px rgba(31,95,209,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { box-shadow: 0 1px 2px rgba(21,122,74,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-ghost { box-shadow: none; }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); box-shadow: none; }
.btn-soft:hover { background: #dce8fc; }
.btn-dashed { border-style: dashed; border-color: #b9c9ea; background: var(--surface); color: var(--primary); box-shadow: none; }
.btn-dashed:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn-xl { padding: 14px 24px; font-size: 16px; border-radius: 11px; min-height: 50px; }

/* Form alanları */
:where(input:not([type]), input[type=text], input[type=search], input[type=tel], input[type=email], input[type=url],
       input[type=password], input[type=number], input[type=date], input[type=time], input[type=month],
       input[type=week], input[type=datetime-local], select, textarea) { border-radius: 10px; min-height: var(--control-h); border-color: var(--border-strong); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
:where(input, select, textarea):hover:not(:focus):not(:disabled) { border-color: #c4bfb7; }
:where(input, select, textarea):focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 40px; }
.input-xl :where(input) { min-height: 52px; font-size: 16px; border-radius: 12px; }
.input-xl > .icon { left: 16px; }
.input-xl > input { padding-left: 46px; }

/* Renkli seçim çipleri (radio): durum, ödeme, hızlı tarih */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-strong); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2);
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s; user-select: none;
}
.chip span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip.no-dot span::before { display: none; }
.chip span:hover { border-color: var(--c, var(--primary)); }
.chip input:checked + span { background: color-mix(in srgb, var(--c, var(--primary)) 12%, white); border-color: var(--c, var(--primary)); color: color-mix(in srgb, var(--c, var(--primary)) 85%, black); box-shadow: 0 0 0 1px var(--c, var(--primary)) inset; }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-ring); }
.chip-planned { --c: #1f5fd1; } .chip-on_way { --c: #6d3fc9; } .chip-done { --c: #157a4a; }
.chip-postponed { --c: #c26a00; } .chip-cancelled { --c: #78716c; }
.chip-paid { --c: #157a4a; } .chip-unpaid { --c: #c8322b; } .chip-partial { --c: #c26a00; }

/* İkonlu seçim kartları (iş türü) */
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px; height: 100%; padding: 12px 13px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-xs);
    transition: border-color .12s, box-shadow .12s, background .12s;
}
.choice > span:hover { border-color: var(--c, var(--primary)); }
.choice .choice-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--primary)) 12%, white); color: var(--c, var(--primary)); }
.choice strong { font-size: 14px; font-weight: 650; color: var(--text); }
.choice small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.choice input:checked + span { border-color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 6%, white); box-shadow: 0 0 0 1px var(--c, var(--primary)) inset, var(--shadow-md); }
.choice input:checked + span .choice-ic { background: var(--c, var(--primary)); color: #fff; }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-ring); }

/* Rozet/çip renkleri biraz daha canlı */
.badge { padding: 3px 10px; font-size: 12.5px; }

/* Özet kartları */
.stat { border-radius: var(--radius); padding: 16px 18px; gap: 4px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s, border-color .15s; }
a.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border); }
.stat::before { display: none; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.stat-warn .stat-ic { background: var(--accent-soft); color: var(--accent); }
.stat-ok .stat-ic { background: var(--ok-soft); color: var(--ok); }
.stat-danger .stat-ic { background: var(--danger-soft); color: var(--danger); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }

/* Boş durum: ikon dairesi + başlık + açıklama */
.empty-ill { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; color: var(--muted); }
.empty-ill .empty-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-bottom: 6px; }
.empty-ill strong { color: var(--text); font-size: 14.5px; font-weight: 650; }
.empty-ill p { margin: 0; font-size: 13.5px; max-width: 320px; }

/* Hızlı seçim çipleri (düğme): tarih/saat önerileri */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qchip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 32px; transition: background .12s, border-color .12s, color .12s; }
.qchip:hover { border-color: var(--primary); color: var(--primary); }
.qchip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.qchip:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
@media (max-width: 900px) { .qchip { min-height: 44px; padding: 8px 14px; font-size: 14px; } .qchips { gap: 8px; } }

/* Yapışkan alt eylem çubuğu (formlar) */
.action-bar {
    position: sticky; bottom: 0; z-index: 25; margin: 20px -28px -24px; padding: 14px 28px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -6px 20px -12px rgba(28,25,23,.18);
}
.action-bar .summary { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13.5px; }
.action-bar .summary strong { font-size: 20px; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.action-bar .actions { margin-left: auto; display: flex; gap: 10px; }


/* ── v2: ortak bileşenler (tüm sayfalar) ───────────────────── */
/* Sayfa başlığı eylemleri */
.page-head .page-actions .btn { min-height: var(--control-h); }
.back-link { font-weight: 500; }
.back-link:hover { color: var(--text-2); text-decoration: none; }

/* Uyarılar: ikonlu, yumuşak */
.alert { border-radius: 11px; padding: 12px 14px; align-items: flex-start; gap: 10px; font-weight: 500; box-shadow: var(--shadow-xs); }
.alert > .icon { margin-top: 1px; }
.alert-success { background: var(--ok-soft); border-color: #bfe3cd; color: #0f5e39; }
.alert-error { background: var(--danger-soft); border-color: #f2c6c1; color: #9a2620; }
.alert-warn { background: var(--warn-soft); border-color: #f1d9ad; color: #7a4300; }
.alert-info { background: var(--primary-soft); border-color: #c9dafa; color: #184aa3; }
.notice { border-radius: 11px; }
.field-error { font-weight: 500; }
.field.has-error :where(input, select, textarea) { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(200,50,43,.10); }

/* Filtre çubuğu: kart içinde, etiketli */
.filters { gap: 12px; padding: 16px 18px; }
.filters .filter-actions .btn { min-height: var(--control-h); }
.filter-toggle { gap: 6px; }

/* Tablo: sakin başlık, rahat satır, hover */
.table th { background: var(--surface-2); color: var(--muted); font-size: 11.5px; letter-spacing: .06em; padding: 11px 16px; border-bottom-color: var(--border); }
.table td { padding: 13px 16px; border-bottom-color: #efece7; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #fbfaf8; }
.table .cell-main { font-weight: 600; }
.table .cell-main a, a.cell-main { color: var(--text); }
.table .cell-main a:hover, a.cell-main:hover { color: var(--primary); text-decoration: none; }
.card > .table-wrap:first-child .table, .card-body.flush > .table-wrap .table { border-radius: var(--radius); }
.table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); }

/* Sekmeler: hap görünümü */
.tabs { gap: 6px; border-bottom: 0; padding: 4px; background: var(--surface-3); border-radius: 12px; display: inline-flex; max-width: 100%; margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border: 0; border-radius: 9px; margin: 0; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.tabs a:hover { background: rgba(255,255,255,.6); text-decoration: none; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs .count { background: var(--surface-3); color: var(--muted); }
.tabs a.active .count { background: var(--primary-soft); color: var(--primary); }

/* Sayfalama */
.pagination { gap: 6px; padding: 14px 18px; border-top: 1px solid var(--border); }
.pagination a, .pagination span { border-radius: 9px; border-color: var(--border); background: var(--surface); }
.pagination a:hover { border-color: var(--border-strong); text-decoration: none; }
.pagination a.active { box-shadow: 0 1px 2px rgba(31,95,209,.35); }

/* Tanım listesi */
.dl { gap: 11px 18px; }
.dl dt { font-size: 13.5px; }
.dl dd { font-weight: 500; color: var(--text); }

/* Değişiklik geçmişi */
.timeline li { padding-bottom: 16px; border-left-color: var(--border); }
.timeline li::before { width: 12px; height: 12px; left: -7px; top: 3px; border-color: var(--primary); background: var(--primary-soft); }
.timeline .when { font-size: 12.5px; }
.timeline .what { font-size: 14px; }

/* Bölüm başlığı (kartsız) */
.section-title { font-size: 12px; letter-spacing: .07em; margin: 26px 0 12px; }

/* Boş durum eylemi */
.empty-ill .empty-act { margin-top: 10px; }
.empty { padding: 28px 16px; }

/* Giriş ekranı */
.login-page { background: radial-gradient(1200px 600px at 10% -10%, #24467d 0%, transparent 60%), var(--navy); }
.login-box { border-radius: 18px; padding: 32px 30px; box-shadow: var(--shadow-lg); }
.login-box .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; background: linear-gradient(135deg, #2f73e6, #1f5fd1); }
.login-box h1 { font-size: 22px; }
.login-box .btn-block { margin-top: 6px; }

@media (max-width: 900px) {
    .tabs { display: flex; overflow-x: auto; }
    .table th, .table td { padding-left: 14px; padding-right: 14px; }
    .table.responsive tr { padding: 14px; }
    .table.responsive tbody tr:hover { background: transparent; }
    .login-box { padding: 26px 22px; }
}

@media (max-width: 900px) {
    h1 { font-size: 21px; }
    .topbar { padding: 0 12px; }
    .card-head { padding: 13px 14px; }
    .card-body { padding: 14px; }
    .choice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chip span { padding: 9px 14px; font-size: 14px; }
    .action-bar {
        position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); margin: 0; padding: 10px 12px 16px;
        z-index: 29; gap: 8px; background: var(--surface); backdrop-filter: none;
    }
    .action-bar .summary { display: none; }
    .action-bar .actions { margin-left: 0; width: 100%; }
    .action-bar .actions .btn-primary { flex: 1; }
    body.has-action-bar .content { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
    .stat-value { font-size: 26px; }
    .stat-ic { width: 32px; height: 32px; }
}

/* ════ v2 sayfa parçası: Servis listesi, detay, yazdırma, garanti ════ */
/* y1: servisler, servis detayı, garanti */
.y1-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.y1-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: var(--shadow-xs); font-size: 13.5px; color: var(--text-2); }
.y1-pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.y1-pill .icon { color: var(--primary); }
.y1-pill-money { background: var(--primary-soft); border-color: transparent; }
.y1-pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.y1-pill-warn .icon { color: var(--warn); }

.y1-staff { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.y1-staff.none { color: var(--muted); }
.y1-amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.y1-list tbody tr:hover { background: var(--surface-2); }

.y1-kind { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.y1-kind-labor { background: #ece8fb; color: #5b3fc4; }
.y1-kind-part { background: #fdeede; color: #b4540a; }

/* Servis detayı */
.y1-detail { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.y1-main, .y1-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.y1-side { position: sticky; top: 16px; }
.y1-text { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.y1-text-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.y1-text-lbl { display: block; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.y1-text-box p { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.y1-cust-name a { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.y1-tel { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; font-weight: 600; }
.y1-addr { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); overflow-wrap: anywhere; }
.y1-addr .icon { margin-top: 3px; flex: none; color: var(--muted); }
.y1-cust-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.y1-cust-actions .btn { min-height: 44px; flex: 1 1 130px; justify-content: center; }
.svc-deleted-strip { margin-bottom: 16px; }

@media (max-width: 1200px) {
    .y1-detail { grid-template-columns: minmax(0, 1fr) 360px; }
    .y1-text { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .y1-detail { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
    .y1-main, .y1-side { display: contents; }
    .y1-c-cust { order: 1; } .y1-c-plan { order: 2; } .y1-c-total { order: 3; }
    .y1-c-parts { order: 4; } .y1-c-warr { order: 5; } .y1-c-log { order: 6; }
    .y1-text { grid-template-columns: 1fr; }
    .y1-pill { min-height: 34px; }
}
@media (max-width: 900px) {
    .y1-detail > *, .y1-detail section, .y1-detail .svc-summary { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; margin: 0; align-self: stretch; }
    .y1-detail { width: 100%; min-width: 0; }
    .y1-c-parts tfoot, .y1-c-parts tfoot tr { display: flex; width: 100%; }
    .y1-c-parts tfoot tr { justify-content: space-between; padding: 12px 16px; background: var(--surface-2); }
    .y1-c-parts tfoot td { display: block; padding: 0; border: 0; }
    .y1-c-parts tfoot td:empty { display: none; }
}

/* ════ v2 sayfa parçası: Müşteriler ve arama ════ */
/* y2: müşteri sayfaları */
.y2-av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; font-size: 16px; color: #fff;
    background: linear-gradient(135deg, var(--a, #f08a3c), var(--b, #ea6a0c)); }
.y2-av.lg { width: 56px; height: 56px; font-size: 22px; }
.y2-av.xl { width: 72px; height: 72px; font-size: 28px; }

/* Liste: avatarlı ad hücresi */
.table.mus-table .y2-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table.mus-table .y2-who .y2-txt { min-width: 0; }
.table.mus-table .y2-who .mus-name { display: inline; }
.table.mus-table .y2-who .mus-tag { margin-left: 8px; }
.y2-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.y2-filter .filters { padding: 16px 18px; }
.y2-filter .check { min-height: var(--control-h); display: inline-flex; align-items: center; gap: 8px; }

/* Detay */
.y2-layout { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 20px; align-items: start; }
.y2-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.y2-col > .card { margin: 0; }
.y2-contact { overflow: hidden; }
.y2-contact-top { display: flex; gap: 16px; align-items: center; padding: 18px; background: linear-gradient(180deg, var(--primary-soft), transparent); }
.y2-contact-top h2 { font-size: 18px; overflow-wrap: anywhere; margin: 0; }
.y2-contact-top .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.y2-phones { list-style: none; margin: 0; padding: 0 18px; }
.y2-phones li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.y2-phones .num { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.y2-phones .lbl { color: var(--muted); font-size: 13px; }
.y2-phones .btn { margin-left: auto; min-height: 44px; }
.y2-addr { padding: 14px 18px 4px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.y2-addr svg { flex: none; margin-top: 2px; color: var(--muted); }
.y2-note { margin: 10px 18px 0; padding: 10px 12px; background: var(--warn-soft); border-radius: var(--radius-sm); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.y2-contact-act { display: flex; gap: 10px; padding: 14px 18px 18px; flex-wrap: wrap; }
.y2-contact-act .btn { flex: 1 1 140px; min-height: 44px; justify-content: center; }
.y2-list { list-style: none; margin: 0; padding: 0; }
.y2-list li { padding: 12px 18px; border-top: 1px solid var(--border); overflow-wrap: anywhere; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.y2-list li:first-child { border-top: 0; }
.y2-list .t { font-weight: 600; }
.y2-list .s { color: var(--muted); font-size: 12.5px; flex-basis: 100%; }
.y2-empty-pad { padding: 8px 0; }
.y2-warn { margin-bottom: 14px; }

/* Form */
.y2-form { display: flex; flex-direction: column; gap: 20px; }
.y2-form > .card { margin: 0; }
.y2-form .mus-row { padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.y2-form .mus-row .icon-btn { min-width: 44px; min-height: 44px; }
.y2-form .chips { margin-bottom: 4px; }
.y2-form .chip span { min-height: 44px; display: inline-flex; align-items: center; }

/* Arama */
.y2-search-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.y2-cust-list { list-style: none; margin: 0; padding: 0; }
.y2-cust-list li a.y2-row { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; min-height: 44px; }
.y2-cust-list li:first-child a.y2-row { border-top: 0; }
.y2-cust-list a.y2-row:hover { background: var(--surface-2); }
.y2-cust-list .y2-txt { min-width: 0; flex: 1; }
.y2-cust-list .nm { font-weight: 600; overflow-wrap: anywhere; }
.y2-help { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

@media (max-width: 1100px) {
    .y2-layout, .y2-search-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .y2-layout { display: flex; flex-direction: column; align-items: stretch; }
    .y2-layout > .y2-col { display: contents; }
    .y2-contact { order: -3; }
    .y2-side2 { order: -2; }
    .y2-contact-act .btn { min-height: 52px; font-size: 16px; }
    .y2-phones .btn { min-height: 48px; padding-inline: 20px; }
    .y2-form .mus-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .y2-form .mus-row > :first-child { grid-column: 1 / -1; }
    .y2-form .mus-row.dev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .y2-form .mus-row.dev > :first-child, .y2-form .mus-row.dev > :nth-child(2) { grid-column: auto; }
}
.y2-search-grid > .card { margin: 0; }

/* ════ v2 sayfa parçası: Yönetim sayfaları, giriş, 404 ════ */
/* Grup y3: yönetim sayfaları (parça, kullanıcı, ayar, profil, şifre, giriş, 404) */

/* Avatar */
.y3-av { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--a, #f08a3c), var(--b, #ea6a0c)); font-weight: 700; font-size: 14px; }
.y3-av.xl { width: 56px; height: 56px; font-size: 22px; }
.y3-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.y3-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.page-head .sub.y3-person { display: flex; margin-top: 8px; }
.page-head .sub.y3-person .y3-av { width: 28px; height: 28px; font-size: 12px; }
.y3-person .cell-sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* Rol çipi ve WhatsApp durumu */
.y3-role { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #eef0f3; color: #4b5563; white-space: nowrap; }
.y3-role.admin { background: #fdeede; color: #b4540a; }
.y3-wa { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.y3-wa.on { color: var(--ok); }
.y3-wa.off { color: var(--muted); }

/* Tablo eylemleri */
.y3-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin: 0; }
.y3-table td.actions { white-space: nowrap; }
.y3-table .btn-danger { padding-left: 10px; padding-right: 10px; }
.card > .filters { border-bottom: 1px solid var(--border); }
.card > .card-head + .table-wrap, .card > .card-head + .card-body.flush { border-top: 0; }
.y3-table tr.is-deleted td { opacity: .6; }

/* Formlar */
.y3-form .card { margin-bottom: 16px; }
.form-grid.one { grid-template-columns: minmax(0, 1fr); }
.y3-inline-act { margin-top: 14px; }
.y3-form .alert { margin-bottom: 16px; }
.card-body > .alert:first-child { margin-top: 0; }

/* Anahtar (aç/kapat) */

/* Ayarlar: logo */
.y3-logo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.y3-logo-box { width: 180px; height: 110px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; padding: 12px; overflow: hidden; flex: none; }
.y3-logo-box img { max-width: 100%; max-height: 86px; object-fit: contain; }
.y3-logo-box.empty { align-content: center; justify-items: center; gap: 6px; color: var(--muted); }
.y3-logo-box.empty small { font-size: 12.5px; }
.y3-logo-box .brand-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.y3-logo-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1 1 260px; }
.y3-file { position: relative; cursor: pointer; min-height: 44px; }
.y3-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.y3-file:focus-within { box-shadow: 0 0 0 4px var(--primary-ring); }
.y3-file-name { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }

/* Ayarlar: iş türü satırları */
.y3-jt-list { display: flex; flex-direction: column; gap: 10px; }
.y3-jt { display: grid; grid-template-columns: 40px minmax(160px, 2.2fr) 64px 110px 80px 96px 180px; gap: 12px; align-items: end; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.y3-jt.new { background: var(--surface-2); border-style: dashed; }
.y3-jt.off { background: var(--surface-2); }
.y3-jt.off .y3-jt-ic { opacity: .5; }
.y3-jt-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--c, #64748b); background: color-mix(in srgb, var(--c, #64748b) 14%, white); border: 1px solid color-mix(in srgb, var(--c, #64748b) 30%, white); }
.y3-jt input[type=color] { width: 100%; height: var(--control-h); }
.y3-jt .switch { min-height: var(--control-h); }
.y3-jt .jt-act { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: var(--control-h); white-space: nowrap; }
.y3-jt .jt-act .hint { margin: 0; }

.y3-link-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text); text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.y3-link-card:hover { border-color: var(--primary); text-decoration: none; box-shadow: var(--shadow-md); }
.y3-link-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.y3-link-text small { color: var(--muted); font-size: 12.5px; }
.y3-link-card > .icon:last-child { color: var(--muted); }

/* Profil */
.y3-profile-hero { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.y3-ph-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.y3-ph-text strong { font-size: 18px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.y3-ph-text span { color: var(--muted); font-size: 13px; }
.y3-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.y3-two > .card { margin: 0; }

/* Şifre değiştir kartı */
.y3-center { display: flex; justify-content: center; padding: 24px 0; }
.y3-pw-card { width: 100%; max-width: 440px; }
.y3-pw-card .card-body { padding: 28px; text-align: center; }
.y3-pw-card .form-grid, .y3-pw-card .field { text-align: left; }
.y3-pw-card h1 { font-size: 22px; margin-bottom: 4px; }
.y3-pw-card .sub { color: var(--muted); margin-bottom: 16px; }
.y3-pw-card .alert { text-align: left; margin-bottom: 16px; }
.y3-pw-card .btn-block { margin-top: 18px; }
.y3-pw-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 14px; background: #fdeede; color: var(--accent); }

/* Giriş ve 404 */
.y3-login { padding: 20px; }
.y3-login-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.y3-login .login-box { max-width: 420px; padding: 36px 32px 32px; text-align: left; }
.y3-login .login-box .brand-mark { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; margin-bottom: 18px; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(31,95,209,.6); }
.y3-login .login-box h1 { font-size: 24px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.y3-login .login-box .sub { font-size: 14.5px; line-height: 1.5; margin-bottom: 22px; }
.y3-login .login-box .field { margin-bottom: 16px; }
.y3-login .login-box .field > label { font-size: 13.5px; }
.y3-login .login-box .btn-block { margin-top: 10px; min-height: 52px; font-size: 16px; }
.y3-login .alert { margin-bottom: 18px; }
.y3-login-foot { color: rgba(255,255,255,.55); font-size: 13px; margin: 0; text-align: center; }
.y3-404 { text-align: center; }
.y3-404 .brand-mark { margin-left: auto; margin-right: auto; }
.y3-404-code { font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--primary); margin-bottom: 8px; }
.y3-404 h1 { margin-bottom: 6px; }

@media (max-width: 1100px) {
    .y3-jt { grid-template-columns: 40px minmax(140px, 1fr) 64px 100px 70px; }
    .y3-jt .switch, .y3-jt .jt-act { grid-column: auto; }
    .y3-jt .jt-act { grid-column: 2 / -1; justify-content: space-between; }
}
@media (max-width: 900px) {
    .y3-two { grid-template-columns: minmax(0, 1fr); }
    .y3-table td.actions { white-space: normal; }
    .y3-acts .btn { min-height: 44px; }
    .y3-acts { justify-content: flex-end; }
    .y3-center { padding: 8px 0; }
    .y3-pw-card .card-body { padding: 22px 18px; }
    .y3-logo-box { width: 100%; }
}
@media (max-width: 760px) {
    .y3-jt { grid-template-columns: 40px minmax(0, 1fr) 1fr; row-gap: 12px; }
    .y3-jt .jt-name { grid-column: 2 / -1; }
    .y3-jt .jt-color, .y3-jt .jt-months, .y3-jt .jt-sort { grid-column: auto; }
    .y3-jt .jt-color { grid-column: 1 / 3; }
    .y3-jt .jt-months { grid-column: 3; }
    .y3-jt .jt-sort { grid-column: 1 / 3; }
    .y3-jt .jt-active { grid-column: 3; }
    .y3-jt .jt-act { grid-column: 1 / -1; }
    .y3-jt input, .y3-jt .btn { min-height: 44px; }
    .y3-jt .jt-act .btn { flex: 1; }
    .y3-login { align-items: start; padding: 28px 14px; }
    .y3-login .login-box { padding: 28px 22px 24px; }
    .y3-login .login-box input { font-size: 16px; }
}

#company-form { margin-bottom: 16px; }
#company-form .action-bar { margin-bottom: 0; }

/* ════ v2 sayfa parçası: Raporlar ve WhatsApp ════ */
/* y4: raporlar + whatsapp (tasarım v2) */
:root { --st-planned:#1f5fd1; --st-on_way:#6d3fc9; --st-done:#157a4a; --st-postponed:#c26a00; --st-cancelled:#78716c; }

/* ── Raporlar ───────────────────────────────────────────── */
.rp-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rp-stats .stat-value { font-size: 26px; white-space: nowrap; }
.rp-stats .stat-note { font-size: 12.5px; color: var(--muted); }
.rp-trend { margin-top: 4px; }
.rp-grid { margin-top: 16px; }
.rp-person { display: inline-flex; align-items: center; gap: 9px; }

/* Çubuk grafik (saf CSS) */
.rp-chart { margin: 0; }
.rp-chart-axisname { font-size: 12px; color: var(--muted); margin: 0 0 8px 2px; font-weight: 600; }
.rp-chart-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); height: 260px; }
.rp-y, .rp-plot { position: relative; }
.rp-y span { position: absolute; right: 10px; transform: translateY(50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.rp-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #ece9e4; pointer-events: none; }
.rp-gl.base { border-top-color: var(--border-strong); }
.rp-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 8px; padding: 0 4px; }
.rp-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; cursor: pointer; }
.rp-bar { display: block; width: 100%; max-width: 44px; background: var(--primary); opacity: .62; border-radius: 4px 4px 0 0; transition: opacity .12s; }
.rp-col:hover .rp-bar, .rp-col:focus-visible .rp-bar, .rp-col.sel .rp-bar { opacity: 1; }
.rp-col.sel .rp-bar { background: var(--primary-hover); }
.rp-col:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.rp-val { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--h, 0%) + 4px); font-size: 12px; font-weight: 650; color: var(--text); white-space: nowrap; }
.rp-tip {
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; display: none; flex-direction: column; gap: 1px;
    background: var(--text); color: #fff; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; white-space: nowrap; box-shadow: var(--shadow-md); pointer-events: none;
}
.rp-tip strong { font-size: 12px; opacity: .8; font-weight: 600; } .rp-tip small { opacity: .75; font-size: 12px; }
.rp-col:hover .rp-tip, .rp-col:focus-visible .rp-tip { display: flex; }
.rp-col:nth-child(-n+2) .rp-tip { left: 0; transform: none; }
.rp-col:nth-last-child(-n+2) .rp-tip { left: auto; right: 0; transform: none; }
.rp-x { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; margin: 8px 4px 0 56px; }
.rp-x span { text-align: center; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; line-height: 1.25; }
.rp-x small { font-size: 11px; color: var(--muted); }
.rp-x .sel { font-weight: 700; color: var(--text); }
.rp-table-view { margin-top: 16px; }
.rp-table-view summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--primary); min-height: 32px; display: flex; align-items: center; }
.rp-table-view .table-wrap { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.table tr.is-current td { background: var(--primary-soft); }

/* Durum dağılımı */
.rp-dist { display: flex; flex-direction: column; gap: 14px; }
.rp-dist-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.rp-dist-row .badge { justify-self: start; }
.rp-dist-track { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: block; }
.rp-dist-track i { display: block; height: 100%; border-radius: 6px; background: var(--c); }
.rp-dist-n { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.rp-dist-n strong { font-size: 16px; } .rp-dist-n small { color: var(--muted); font-size: 12px; min-width: 28px; text-align: right; }

@media (max-width: 1500px) { .rp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .rp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-stats .stat:last-child { grid-column: 1 / -1; }
    .rp-stats .stat-value { font-size: 22px; }
    .rp-chart-body { grid-template-columns: 38px minmax(0, 1fr); height: 220px; }
    .rp-y span { right: 6px; font-size: 11px; }
    .rp-bars { gap: 3px; padding: 0 2px; }
    .rp-x { gap: 3px; margin: 8px 2px 0 40px; }
    .rp-x span { font-size: 11px; }
    .rp-x small { display: none; }
    .rp-col { min-height: 44px; }
    .rp-dist-row { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 6px; }
    .rp-dist-row .rp-dist-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ── WhatsApp ───────────────────────────────────────────── */
.wa2-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wa2-tile { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.wa2-tile > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; align-items: flex-start; }
.wa2-tile-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.wa2-k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wa2-v { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.wa2-health { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.wa2-health i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.wa2-health.ok { background: var(--ok-soft); color: var(--ok); } .wa2-health.ok i { background: var(--ok); }
.wa2-health.warn { background: var(--warn-soft); color: #8a4b00; } .wa2-health.warn i { background: #c26a00; }
.wa2-health.bad { background: var(--danger-soft); color: var(--danger); } .wa2-health.bad i { background: var(--danger); }

.wa2-form { display: block; }
.wa2-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.wa2-fields { align-items: start; }

.wa2-code { margin-top: 12px; border: 1px solid #1f2937; border-radius: 12px; background: #111827; overflow: hidden; }
.wa2-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; background: #1f2937; color: #cbd5e1; font-size: 13px; flex-wrap: wrap; }
.wa2-code-head strong { color: #fff; }
.wa2-code-head .btn { background: #374151; border-color: #4b5563; color: #fff; box-shadow: none; }
.wa2-code-head .btn:hover { background: #4b5563; }
.wa2-code > code { display: block; padding: 12px 14px; color: #a7f3d0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.wa2-code code.inl { background: rgba(255,255,255,.12); color: #fff; padding: 1px 6px; border-radius: 5px; }

.wa2-date input { min-height: var(--control-h); }
.wa2-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.wa2-all { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; color: var(--text-2); min-height: var(--control-h); }
.wa2-toolbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.wa2-people { list-style: none; margin: 0; padding: 0; }
.wa2-person { display: grid; grid-template-columns: 22px 36px minmax(160px, 1.4fr) auto minmax(110px, auto) auto; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid #efece7; }
.wa2-person:last-child { border-bottom: 0; }
.wa2-person:hover { background: #fbfaf8; }
.wa2-person input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.wa2-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wa2-who strong { font-weight: 650; overflow-wrap: anywhere; }
.wa2-phone { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.wa2-off { background: var(--surface-3); color: var(--text-2); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.wa2-acts { display: flex; gap: 8px; justify-content: flex-end; }
.wa2-st { font-size: 13px; }
.wa2-prev { grid-column: 3 / -1; }
.wa2-prev .wa-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 560px; }
.wa2-prev .wa-preview + .wa-preview { margin-top: 6px; }

.wa-msg { margin-top: 4px; }
.wa-msg .wa-preview { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-err summary { text-decoration: underline dotted; }

@media (max-width: 1280px) { .wa2-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .wa2-switches { grid-template-columns: 1fr; }
    .wa2-toolbar { padding: 10px 14px; }
    .wa2-toolbar-btns { width: 100%; } .wa2-toolbar-btns .btn { flex: 1 1 100%; min-height: var(--control-h); }
    .wa2-person { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px; }
    .wa2-person .count-pill { grid-column: 4; grid-row: 1; }
    .wa2-st { grid-column: 3 / -1; }
    .wa2-acts { grid-column: 1 / -1; justify-content: stretch; }
    .wa2-acts .btn { flex: 1; min-height: var(--control-h); justify-content: center; }
    .wa2-prev { grid-column: 1 / -1; }
    .wa2-code-head .btn { min-height: 44px; }
    .wa2-date input { min-height: var(--control-h); }
}
@media (max-width: 640px) { .wa2-status { grid-template-columns: 1fr; } .wa2-code-head { align-items: flex-start; } }

/* düzeltmeler */
.month-picker input[type=month] { width: 220px; flex: none; }
.rp-grid { align-items: stretch; }
.rp-grid > .card { margin: 0; }
.rp-y { font-variant-numeric: tabular-nums; }
.rp-chart-body { grid-template-columns: 64px minmax(0, 1fr); }
.rp-x { margin-left: 68px; }
@media (max-width: 900px) {
    .month-picker input[type=month] { flex: 1; width: auto; }
    .rp-chart-body { grid-template-columns: 52px minmax(0, 1fr); }
    .rp-x { margin-left: 54px; }
    .rp-val { display: none; }
}
@media (max-width: 900px) {
    .rp-x span { font-size: 10px; letter-spacing: -.02em; }
    .card-head:has(.wa-refresh, #wa-refresh) { flex-wrap: wrap; }
    .card-head:has(#wa-refresh) .actions { width: 100%; margin-left: 0; }
    .card-head:has(#wa-refresh) .actions .btn { flex: 1; min-height: 44px; justify-content: center; }
}

/* ════ v2 sayfa parçası: Personel ekranları (iş listem, iş kartı) ════ */
/* y5: personel ekranları (is-listem, is) — telefon öncelikli */
.staff-wrap { max-width: 640px; }
.staff-hello { margin-bottom: 4px; }
.staff-hello h1 { font-size: 24px; letter-spacing: -.02em; }
.staff-hello .sub { color: var(--muted); font-size: 14px; margin-top: 1px; }
.y5-prog { margin-top: 10px; }
.y5-prog-txt { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.y5-prog-txt b { color: var(--ok); font-weight: 700; }
.y5-prog-txt .icon { color: var(--ok); }
.y5-prog-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.y5-prog-bar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .3s; }

/* hap sekmeler */
.staff-tabs { gap: 4px; margin: 14px 0; padding: 4px; background: var(--surface-3); border-radius: 999px; }
.staff-tabs a { min-height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); }
.staff-tabs a.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px -2px rgba(31,95,209,.5); }

/* geciken şeridi (kompakt satırlar) */
.late-strip { padding: 10px 12px 6px; border-radius: 14px; }
.late-strip > h2 { margin-bottom: 4px; }
.late-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #f1c2c2; }
.late-row:first-of-type { border-top: 0; }
.late-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none; min-height: 44px; justify-content: center; }
.late-main b { font-size: 15px; overflow-wrap: anywhere; }
.late-main span { font-size: 12.5px; color: var(--danger); }
.late-row .btn { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; }
.late-row .late-call { background: var(--danger); border-color: var(--danger); color: #fff; }

/* iş kartı */
.jc { position: relative; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--c, var(--primary)); border-radius: 16px;
      padding: 14px 14px 14px 14px; margin-bottom: 14px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jc.st-on_way { --c: #6d3fc9; } .jc.st-done { --c: var(--ok); } .jc.st-postponed { --c: #c26a00; } .jc.is-late { --c: var(--danger); }
.jc.is-done { opacity: .62; box-shadow: none; }
.jc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jc-no { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.jc.is-done .jc-no { background: #9aa4b2; }
.jc-time { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; background: var(--primary-soft); color: var(--primary);
           font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jc-time small { font-size: 13px; font-weight: 600; color: var(--muted); }
.jc-time:has(small) { background: var(--surface-3); }
.jc-status { margin-left: auto; }
.jc-status .badge { font-size: 13px; padding: 4px 10px; }
.jc-name { font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; margin-top: 2px; }
.jc-type .badge { font-size: 13px; }
.jc-row { display: flex; gap: 8px; align-items: flex-start; color: var(--text); min-width: 0; line-height: 1.4; }
.jc-row .icon { margin-top: 2px; color: var(--muted); }
.jc-row span { min-width: 0; overflow-wrap: anywhere; }
.jc-row.muted { color: var(--muted); font-size: 14px; }
.jc-complaint { font-size: 14px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.jc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.jc-btns .btn { min-height: 52px; font-size: 16px; font-weight: 650; justify-content: center; border-radius: 12px; }
.jc-btns .btn.wide { grid-column: 1 / -1; }
.jc-btns .btn.disabled { opacity: .5; }
.jc-phones { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; }
.jc-phones { align-items: center; }
.jc-phones a { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0; margin: 0; font-size: 14px; line-height: 1.2; }

/* is.php */
.y5-head { margin-bottom: 12px; }
.y5-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.y5-head h1 { font-size: 22px; }
.y5-detail { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; min-height: 44px; white-space: nowrap; }
.y5-cust, .y5-work, .svc-form + * { max-width: 760px; }
.y5-cust { margin-bottom: 14px; }
.y5-cust .big-name { font-size: 20px; line-height: 1.25; }
.y5-line { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.y5-line .icon { margin-top: 2px; color: var(--muted); }
.y5-line span { min-width: 0; overflow-wrap: anywhere; }
.job-card-actions .btn { min-height: 52px; font-size: 16px; font-weight: 650; border-radius: 12px; justify-content: center; }
.y5-complaint { display: flex; flex-direction: column; gap: 6px; }
.y5-work { margin-top: 0; }
.y5-work-body { display: flex; flex-direction: column; }
.y5-work-body > * { order: 0; }
.y5-work-body > .svc-parts { order: 2; }
.y5-work-body > .svc-money { order: 3; }
.y5-work-body > .y5-sum { order: 4; margin-top: 16px; }
.y5-work-body > .svc-pay { order: 5; }
.y5-work-body > .svc-paid { order: 6; }
.y5-sum { padding: 16px 18px; }
.y5-sum .svc-sum-grand { font-size: 32px; margin: 4px 0 10px; }
.y5-work-body .svc-pay .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.y5-work-body .svc-pay .chip span { width: 100%; }
.y5-work-body .svc-pay .chip span { justify-content: center; min-height: 48px; padding: 8px 6px; }
.y5-work-body textarea#work_done { min-height: 110px; font-size: 16px; }
.y5-work-body input { font-size: 16px; }
.y5-work-body .part-del { min-width: 44px; min-height: 44px; }
.y5-work-body #part-add-custom { min-height: var(--control-h); }
.y5-bar .actions { margin-left: auto; }
.y5-bar .btn-success { min-width: 240px; min-height: 56px; font-size: 16.5px; font-weight: 700; justify-content: center; }
.y5-bar .btn-lg { min-height: 56px; }

@media (max-width: 900px) {
    .staff-hello h1 { font-size: 22px; }
    .y5-bar { padding: 8px 12px 12px; }
    .y5-bar .summary { display: flex; width: 100%; justify-content: space-between; align-items: baseline; font-size: 13px; }
    .y5-bar .summary strong { font-size: 18px; }
    .y5-bar .actions { display: grid; grid-template-columns: 1fr 1.8fr; gap: 8px; width: 100%; }
    .y5-bar .btn-success { min-width: 0; }
    body.has-action-bar .content { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
    .staff-screen .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 400px) {
    .jc { padding: 12px; }
    .jc-name { font-size: 18px; }
    .jc-btns { gap: 8px; }
    .jc-btns .btn { font-size: 15.5px; }
    .y5-work-body .svc-pay .chip span { font-size: 13.5px; }
}

/* Servis detayı parça tablosu: garanti hücresi sarabilir; telefonda toplam satırı tek satır, sağa yaslı. */
.y1-warr { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.y1-warr small { white-space: nowrap; font-size: 12.5px; }
@media (max-width: 900px) {
    .y1-warr-cell { align-items: flex-start; }
    .y1-warr { align-items: flex-end; }
    .table.responsive tr.y1-parts-total td:first-child, .table.responsive tr.y1-parts-total td.y1-empty { display: none; }
    .table.responsive tr.y1-parts-total td.num { font-weight: 700; }
    .table.responsive tr.y1-parts-total td.num::before { content: attr(data-label); font-weight: 600; color: var(--text-2); }
}

/* ════ Anahtar (açık/kapalı) — tek bileşen ════
   <label class="switch"><input type="checkbox" role="switch"><span class="switch-ui"></span><span class="switch-text">…</span></label>
   .switch-card: çerçeveli satır (ayar listeleri). */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: var(--control-h); cursor: pointer; user-select: none; line-height: 1.3; }
.switch > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch-ui { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d9d4cc; transition: background-color .16s; box-shadow: inset 0 1px 2px rgba(28,25,23,.12); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28,25,23,.25); transition: transform .16s; }
.switch:hover .switch-ui { background: #cdc7bd; }
.switch > input:checked + .switch-ui { background: var(--primary); }
.switch > input:checked + .switch-ui::after { transform: translateX(18px); }
.switch > input:focus-visible + .switch-ui { box-shadow: 0 0 0 4px var(--primary-ring); }
.switch > input:disabled + .switch-ui { opacity: .45; }
.switch.ok > input:checked + .switch-ui { background: var(--ok); }
.switch.danger > input:checked + .switch-ui { background: var(--danger); }
.switch-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; font-weight: 500; color: var(--text-2); }
.switch-text strong { font-weight: 600; color: var(--text); }
.switch-text small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.switch-card { display: flex; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .12s, background-color .12s; }
.switch-card:hover { border-color: var(--border-strong); }
.switch-card:has(> input:checked) { border-color: #c9dafa; background: #f7faff; }
.switch-card .switch-text { flex: 1; }

/* ════ Filtre çubuğu — tüm liste sayfaları ════
   Masaüstü: tüm alanlar ve sağdaki anahtar/temizle aynı taban çizgisinde tek satır.
   Telefon: arama + "Filtreler" düğmesi görünür; diğer alanlar katlanır panelde.
   JS varsa otomatik filtreler (yazarken 300 ms), "Uygula" gizlenir; JS yoksa Uygula ile çalışır. */
.filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 16px 18px; }
.filterbar .filterbar-main, .filterbar .filterbar-more { display: contents; }
.filterbar .field { flex: 1 1 130px; max-width: 210px; min-width: 0; }
.filterbar .field.fb-search { flex: 2 1 240px; max-width: 360px; }
.filterbar .field.fb-date { flex: 0 1 152px; }
.filterbar .filterbar-side { margin-left: auto; display: flex; align-items: center; gap: 6px 16px; min-height: var(--control-h); flex-wrap: wrap; }
.filterbar .fb-clear { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h); font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.filterbar .fb-clear:hover { color: var(--danger); text-decoration: none; }
.filterbar .fb-toggle { display: none; }
.filterbar .fb-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.filterbar .switch { min-height: var(--control-h); }
.filterbar.busy { opacity: .7; }
html.js .filterbar .fb-submit { display: none; }
.card > .filterbar + .card-body, .card > .filterbar + .table-wrap { border-top: 1px solid var(--border); }

@media (max-width: 900px) {
    .filterbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
    .filterbar .filterbar-main { display: flex; align-items: flex-end; gap: 10px; }
    .filterbar .filterbar-main .field { flex: 1; max-width: none; }
    .filterbar .fb-toggle { display: inline-flex; min-height: var(--control-h); flex: none; }
    .filterbar .filterbar-more { display: none; }
    .filterbar.open .filterbar-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .filterbar .filterbar-more .field, .filterbar .field.fb-date { max-width: none; flex: none; }
    .filterbar .filterbar-more .field.full { grid-column: 1 / -1; }
    .filterbar .filterbar-side { margin-left: 0; justify-content: space-between; min-height: 0; }
    .filterbar:not(.open) .filterbar-side.collapsible { display: none; }
    .filterbar.no-collapse .filterbar-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .filterbar.no-collapse .filterbar-side { display: flex; }
}

/* ════ Tek boyut ölçüsü (NOTLAR 5) ════
   Tüm tek satırlı alanlar, açılır listeler ve standart düğmeler var(--control-h) yüksekliğinde; aynı satırda aynı taban çizgisi.
   Küçük düğme (.btn-sm) tablo/kart başlığı eylemleri içindir; büyük (.btn-lg/.btn-xl) yalnız tek birincil eylemde. */
.btn { min-height: var(--control-h); }
.btn-sm { min-height: 34px; }
.btn-lg { min-height: 48px; }
.btn-xl { min-height: 52px; }
.topsearch input[type=search] { height: var(--control-h); min-height: var(--control-h); }
.icon-btn { width: var(--control-h); height: var(--control-h); }

/* Özel kaydırma çubuğu (tarayıcı varsayılanı görünmesin) */
* { scrollbar-width: thin; scrollbar-color: #cfc9c0 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d0c7; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #bfb8ad; }
.sidebar ::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.18); }

/* Seçim rengi ve odak: her yerde aynı halka */
::selection { background: #cfe0fb; color: var(--text); }
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible { box-shadow: 0 0 0 4px var(--primary-ring); border-radius: 8px; }

/* Sayfa başlığı: başlık + yanında okunur çipler; eylemler başlıkla aynı hizada (dikey ortalı). */
.page-head { align-items: center; }
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.svc-detail-head { display: inline-flex; align-items: center; gap: 8px; }
.svc-detail-head .badge, .svc-detail-head .status-btn { font-size: 14px; padding: 6px 14px; }
.svc-detail-head .badge::before { width: 8px; height: 8px; }

/* Toplam kartı: ödeme durumu açık ifadeyle, kalan vurgulu */
.sum-pay { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.16); color: #fff; }
.sum-pay-paid { background: #d9f3e4; color: #0f5e39; }
.sum-pay-partial { background: #ffecc9; color: #7a4300; }
.sum-pay-unpaid { background: #fde2df; color: #9a2620; }
.svc-sum-left { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.10); }
.svc-sum-left span { font-size: 13px; color: rgba(255,255,255,.8); }
.svc-sum-left b { font-size: 18px; font-variant-numeric: tabular-nums; }
.svc-sum-left.due { background: rgba(255,236,201,.18); box-shadow: inset 0 0 0 1px rgba(255,214,140,.5); }
.svc-sum-left.due b { color: #ffd88f; }

/* Anahtar-değer satırları dikeyde ortalı (etiket ile çip aynı hizada) */
.svc-sum { align-items: center; row-gap: 10px; }
.dl { align-items: center; }

/* Kart altı form eylemleri (kısa, aynı sayfada birden çok form): birincil sağda. Uzun formlar .action-bar kullanır. */
.form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.y3-two > form.card { display: flex; flex-direction: column; }
.y3-two > form.card > .card-body { flex: 1; }
@media (max-width: 900px) { .form-foot .btn { flex: 1; } }

/* ════ Onay penceresi (App.confirm) ════ */
.dlg-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(19, 35, 63, .45); opacity: 0; transition: opacity .15s; }
.dlg-backdrop.show { opacity: 1; }
.dlg { width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 24px; transform: translateY(8px) scale(.98); transition: transform .15s; }
.dlg-backdrop.show .dlg { transform: none; }
.dlg-ic { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px; background: var(--primary-soft) no-repeat center / 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5fd1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.dlg-ic.danger { background-color: var(--danger-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8322b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6'/%3E%3C/svg%3E"); }
.dlg h2 { font-size: 17px; margin-bottom: 6px; }
.dlg p { color: var(--text-2); margin: 0 0 20px; line-height: 1.5; }
.dlg-act { display: flex; justify-content: flex-end; gap: 10px; }
.btn-danger-solid { background: var(--danger); border-color: #a82822; color: #fff; box-shadow: 0 1px 2px rgba(200,50,43,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-danger-solid:hover { background: #b02a24; }
body.dlg-open { overflow: hidden; }
@media (max-width: 900px) {
    .dlg-backdrop { place-items: end center; padding: 0; }
    .dlg { max-width: none; border-radius: 18px 18px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
    .dlg-act .btn { flex: 1; min-height: 48px; }
}

/* Yapışkan eylem çubuğunda tüm düğmeler aynı boyda */
.action-bar .actions .btn { min-height: 48px; }

/* ════ Özel açılır liste (ui-select.js) ════ */
/* Özel açılır liste (select) bileşeni — ui-select.js ile birlikte. */
.ui-sel { position: relative; display: block; width: 100%; min-width: 0; }
.ui-sel > select { position: absolute !important; inset: 0; width: 100% !important; min-width: 0 !important; max-width: 100% !important; height: 100% !important; min-height: 0 !important; opacity: 0; pointer-events: none; margin: 0; padding: 0; }
.ui-sel-btn {
    display: flex; align-items: center; gap: 8px; width: 100%; height: var(--control-h, 44px); padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-xs); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.ui-sel-btn:hover:not(:disabled):not(.open) { border-color: #c4bfb7; }
.ui-sel-btn:focus { outline: none; }
.ui-sel-btn:focus-visible, .ui-sel-btn.open { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.ui-sel-btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.ui-sel-btn.is-empty .ui-sel-text { color: var(--muted); }
.field.has-error .ui-sel-btn { border-color: var(--danger); }
.ui-sel-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-sel-chev { flex: none; color: var(--muted); transition: transform .15s; }
.ui-sel-btn.open .ui-sel-chev { transform: rotate(180deg); }

.ui-sel-panel {
    position: fixed; z-index: 3000; display: flex; flex-direction: column; box-sizing: border-box;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
    overflow: hidden; animation: ui-sel-in .12s ease-out;
}
.ui-sel-panel.up { transform-origin: bottom; }
@keyframes ui-sel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ui-sel-search { flex: none; position: relative; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ui-sel-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ui-sel-search input {
    width: 100%; height: 38px; padding: 0 10px 0 34px; border: 1px solid var(--border-strong); border-radius: 9px;
    background: var(--surface-2); font: inherit; color: var(--text); box-sizing: border-box; min-height: 0;
}
.ui-sel-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--surface); }
.ui-sel-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.ui-sel-list::-webkit-scrollbar { width: 8px; }
.ui-sel-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid var(--surface); }
.ui-sel-opt {
    display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer;
    color: var(--text); user-select: none; -webkit-tap-highlight-color: transparent;
}
.ui-sel-opt .ui-sel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-sel-opt:hover { background: var(--surface-2); }
.ui-sel-opt.active { background: var(--primary-soft); }
.ui-sel-opt.is-blank { color: var(--muted); }
.ui-sel-opt.disabled { opacity: .45; cursor: not-allowed; }
.ui-sel-opt.selected { font-weight: 650; }
.ui-sel-opt .ui-sel-check { flex: none; color: var(--primary); visibility: hidden; }
.ui-sel-opt.selected .ui-sel-check { visibility: visible; }
.ui-sel-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.ui-sel-ico { flex: none; width: 18px; text-align: center; }
.ui-sel-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ui-sel-none { padding: 14px 10px; text-align: center; color: var(--muted); }

.ui-sel-backdrop { position: fixed; inset: 0; z-index: 2999; background: rgba(28, 25, 23, .45); animation: ui-sel-fade .15s ease-out; }
@keyframes ui-sel-fade { from { opacity: 0; } to { opacity: 1; } }
.ui-sel-head { display: none; }

@media (max-width: 900px) {
    .ui-sel-panel.sheet {
        left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important;
        max-height: 80vh !important; max-height: 80dvh !important; border-radius: 18px 18px 0 0; border-width: 1px 0 0;
        animation: ui-sel-up .22s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom);
    }
    @keyframes ui-sel-up { from { transform: translateY(100%); } to { transform: none; } }
    .ui-sel-panel.sheet .ui-sel-head { display: flex; align-items: center; gap: 10px; flex: none; padding: 14px 8px 8px 18px; }
    .ui-sel-panel.sheet .ui-sel-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--border-strong); }
    .ui-sel-title { flex: 1; font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ui-sel-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
    .ui-sel-close:active { background: var(--surface-2); }
    .ui-sel-panel.sheet .ui-sel-opt { min-height: 48px; font-size: 16px; }
    .ui-sel-panel.sheet .ui-sel-search input { height: 44px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ui-sel-panel, .ui-sel-backdrop { animation: none; } }

/* ════ Özel tarih/saat seçici, tarih aralığı, daha fazla filtre (ui-date.js) ════ */
/* ── Özel tarih / saat / ay seçici ve tarih aralığı (ui-date.js) ───────────────────────── */
.ud { position: relative; display: block; width: 100%; min-width: 0; }
.ud-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; min-height: 0; }
.ud-input { width: 100%; min-height: var(--control-h, 44px); padding-right: 42px; text-overflow: ellipsis; }
.ud-month .ud-input { cursor: pointer; }
.ud-noicon .ud-input { padding-right: 12px; }
.input-icon > .icon { z-index: 2; }
.input-icon .ud-input { padding-left: 40px; }
.ud-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.ud-btn:hover { background: var(--surface-2); color: var(--primary); }
.ud-bad .ud-input { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.field.has-error .ud-input { border-color: var(--danger); }
.month-picker .ud { width: 220px; flex: none; }
.wa2-date .ud { width: 190px; }
@media (max-width: 900px) { .month-picker .ud { flex: 1; width: auto; } .wa2-date .ud { width: 100%; } }

/* Açılır panel */
.udp { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px; width: max-content; max-width: calc(100vw - 16px); overflow: auto; font-size: 14px; color: var(--text); animation: udp-in .12s ease-out; }
@keyframes udp-in { from { opacity: 0; transform: translateY(-4px); } }
.udp-date, .udp-month { width: 304px; }
.udp-time { width: 208px; padding: 8px; }
.udp button { font: inherit; }
.udp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; min-height: 36px; }
.udp-title { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 10px; margin-left: -10px; border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--text); cursor: pointer; }
.udp-title:hover { background: var(--surface-2); }
.udp-title.static { cursor: default; pointer-events: none; padding: 6px 4px; }
.udp-title .icon { color: var(--muted); }
.udp-nav { display: inline-flex; gap: 2px; }
.udp-arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--text-2); cursor: pointer; padding: 0; }
.udp-arrow:hover { background: var(--surface-2); color: var(--primary); }
.udp-arrow.ph { visibility: hidden; cursor: default; }
.udp-dow, .udp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.udp-dow span { height: 28px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.udp-dow span.we { color: #b0b7c3; }
.udp-grid { gap: 2px; }
.udp-day { height: 38px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; padding: 0; position: relative; }
.udp-day:hover:not(:disabled) { background: var(--surface-3, var(--surface-2)); }
.udp-day.we { color: var(--muted); }
.udp-day.out { color: #c3c9d3; }
.udp-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--primary); font-weight: 700; }
.udp-day.sel, .udp-day.sel:hover { background: var(--primary); color: #fff; font-weight: 700; }
.udp-day.cur { box-shadow: 0 0 0 3px var(--primary-ring); }
.udp-day.sel.today { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px var(--primary); }
.udp-day:disabled { color: #d3d8e0; cursor: not-allowed; }
.udp-day.blank { pointer-events: none; }
.udp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0; }
.udp-mon { height: 46px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--text); font-weight: 500; }
.udp-mon:hover:not(:disabled) { background: var(--surface-2); }
.udp-mon.today { box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--primary); }
.udp-mon.sel { background: var(--primary); color: #fff; font-weight: 700; }
.udp-mon.cur { box-shadow: 0 0 0 3px var(--primary-ring); }
.udp-mon:disabled { color: #d3d8e0; cursor: not-allowed; }
.udp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.udp-foot button { border: 0; background: none; color: var(--primary); font-weight: 600; padding: 7px 10px; border-radius: 8px; cursor: pointer; min-height: 34px; }
.udp-foot button:hover:not(:disabled) { background: var(--primary-soft); }
.udp-foot button:disabled { color: var(--muted); cursor: not-allowed; }
.udp-foot button[data-act=clear] { color: var(--text-2); }
.udp-sheet-title { display: none; font-weight: 700; font-size: 16px; padding: 4px 4px 10px; }

/* Saat listesi */
.udp-times { display: flex; flex-direction: column; gap: 2px; max-height: 264px; overflow-y: auto; padding-right: 2px; }
.udp-opt { flex: none; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; text-align: left; }
.udp-opt:hover, .udp-opt.hi { background: var(--surface-2); }
.udp-opt.off { color: var(--text-2); }
.udp-opt.edge { margin-top: 6px; position: relative; }
.udp-opt.edge::before { content: ''; position: absolute; left: 10px; right: 10px; top: -4px; border-top: 1px dashed var(--border-strong); }
.udp-opt[data-t="07:00"]::before { top: -4px; }
.udp-opt.sel { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.udp-opt.sel::after { content: '✓'; font-size: 13px; }
.udp-free { display: flex; gap: 8px; margin-bottom: 10px; }
.udp-free-in { flex: 1; min-width: 0; min-height: 46px; font-size: 18px; text-align: center; letter-spacing: .04em; }
.udp-free-in.bad { border-color: var(--danger); }
.udp-free .btn { min-height: 46px; }

/* Tarih aralığı tetikleyici */
.udr-trigger { display: none; width: 100%; min-height: var(--control-h, 44px); align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
html.js .udr-trigger { display: flex; }
html.js .udr-fb, .udr-fb[hidden] { display: none; }
html:not(.js) .udr-label { display: none; }
.udr-fb { display: flex; gap: 12px; }
.udr-fb .field { flex: 1; }
.udr-trigger:hover { border-color: #c4bfb7; }
.udr-trigger:focus-visible, .udr-trigger[aria-expanded=true] { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.udr-trigger > .icon:first-child { color: var(--muted); flex: none; }
.udr-trigger.has-value > .icon:first-child { color: var(--primary); }
.udr-trigger.has-value { color: var(--text); font-weight: 500; }
.udr-trigger .udr-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.udr-trigger > .icon:last-child { color: var(--muted); flex: none; transform: rotate(90deg); }

/* Tarih aralığı paneli */
.udp-range { display: flex; padding: 8px; max-height: min(560px, calc(100vh - 16px)); }
.udr-presets { width: 196px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.udr-p { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.udr-p:hover { background: var(--surface-2); }
.udr-p.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.udr-p .icon { color: currentColor; flex: none; }
.udr-cal { display: none; padding: 4px 8px 4px 16px; margin-left: 4px; border-left: 1px solid var(--border); }
.udp-range.custom-on .udr-cal { display: block; }
.udr-hint { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 4px 4px 6px; }
.udr-back { display: none; }
.udr-months { display: flex; gap: 20px; }
.udr-month { width: 280px; }
.udr-month .udp-grid { gap: 2px 0; }
.udr-month .udp-day { border-radius: 0; }
.udr-month .udp-day.inr { background: var(--primary-soft); color: var(--primary); }
.udr-month .udp-day.rs, .udr-month .udp-day.re { background: var(--primary); color: #fff; font-weight: 700; }
.udr-month .udp-day.rs { border-radius: 10px 0 0 10px; }
.udr-month .udp-day.re { border-radius: 0 10px 10px 0; }
.udr-month .udp-day.rs.only, .udr-month .udp-day.rs.re { border-radius: 10px; }
.udr-month .udp-day:hover:not(.rs):not(.re):not(.inr) { border-radius: 10px; }

/* Aramalar da tek ölçüde */
.filterbar .fb-search input { min-height: var(--control-h, 44px); }

/* Filtre çubuğu: ana filtreler satırda, kalanlar "Daha fazla filtre" panelinde */
.filterbar .field.fb-range { flex: 1 1 250px; max-width: 300px; }
.filterbar .filterbar-extra { display: none; }
html:not(.js) .filterbar .filterbar-extra { display: contents; }
.filterbar .fb-more-btn { min-height: var(--control-h, 44px); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
html:not(.js) .filterbar .fb-more-btn { display: none; }
.filterbar .fb-more-btn[aria-expanded=true] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.filterbar .fb-more-btn .icon { transition: transform .15s; }
.filterbar .fb-more-btn[aria-expanded=true] .icon { transform: rotate(45deg); }
.filterbar .filterbar-side { order: 4; min-height: var(--control-h, 44px); }
.filterbar .fb-clear { min-height: var(--control-h, 44px); }
.filterbar .switch { min-height: var(--control-h, 44px); }
@media (min-width: 901px) {
    .filterbar.more-open .filterbar-extra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; order: 5; flex: 1 1 100%; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
    .filterbar .filterbar-extra .field { flex: 0 1 220px; max-width: 240px; }
}
@media (max-width: 900px) {
    .filterbar .fb-more-btn { display: none; }
    .filterbar.open .filterbar-extra, html:not(.js) .filterbar .filterbar-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .filterbar .field.fb-range { grid-column: 1 / -1; max-width: none; flex: none; }
    .filterbar .filterbar-extra .field { max-width: none; flex: none; }
    .udr-fb { flex-direction: column; }
}

/* Telefon: alt sayfa (bottom sheet) */
.udp-back { position: fixed; inset: 0; z-index: 205; background: rgba(15, 23, 42, .45); animation: udp-fade .15s; }
@keyframes udp-fade { from { opacity: 0; } }
html.udp-lock { overflow: hidden; }
.udp.udp-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; min-width: 0; max-height: 88vh; border-radius: 20px 20px 0 0; border-width: 1px 0 0; z-index: 210; padding: 22px 16px calc(14px + env(safe-area-inset-bottom)); animation: udp-up .2s ease-out; }
.udp.udp-sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border-strong); }
@keyframes udp-up { from { transform: translateY(40px); opacity: .4; } }
.udp-sheet .udp-sheet-title { display: block; }
.udp-sheet .udp-day { height: 44px; font-size: 15.5px; }
.udp-sheet .udp-arrow { width: 44px; height: 44px; }
.udp-sheet .udp-title { min-height: 44px; font-size: 16px; }
.udp-sheet .udp-mon { height: 52px; }
.udp-sheet .udp-foot button { min-height: 44px; font-size: 15px; padding: 0 14px; }
.udp-sheet .udp-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 46vh; }
.udp-sheet .udp-opt { height: 46px; justify-content: center; border: 1px solid var(--border); }
.udp-sheet .udp-opt.sel::after { content: none; }
.udp-sheet .udp-opt.sel { border-color: var(--primary); }
.udp-sheet .udp-opt.edge { margin-top: 0; }
.udp-sheet .udp-opt.edge::before { content: none; }
.udp-sheet.udp-range { display: block; padding-top: 22px; }
.udp-sheet .udr-presets { width: auto; }
.udp-sheet .udr-p { height: 48px; font-size: 15.5px; }
.udp-sheet.udp-range.custom-on .udr-presets { display: none; }
.udp-sheet .udr-cal { border-left: 0; margin: 0; padding: 0; }
.udp-sheet .udr-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--primary); font-weight: 600; min-height: 44px; padding: 0 6px 0 0; cursor: pointer; }
.udp-sheet .udr-month { width: 100%; }
.udp-sheet .udr-hint { font-size: 14px; padding-bottom: 8px; }

/* Panel personel süzgeci: ikonlu açılır liste */
.scope-select .ui-sel { min-width: 170px; }
.scope-select .ui-sel-btn { padding-left: 36px; }
.scope-select > .icon { z-index: 2; }
@media (max-width: 900px) { .scope-select .ui-sel { min-width: 0; width: 100%; } }

/* ── Filtre çubuğu: Görünüm alanı + etkin filtre çipleri (NOTLAR 9) ── */
.filterbar .field.fb-view { flex: none; max-width: none; display: flex; flex-direction: column; gap: 6px; }
.filterbar .fb-view .switch { min-height: var(--control-h, 44px); padding: 0 14px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.filterbar .fb-view .switch-text strong { font-weight: 600; font-size: 14px; }
html.js .filterbar .filterbar-side { display: none; }
.filterbar .fb-active { order: 9; flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }
.filterbar .fb-active[hidden] { display: none; }
.fb-active-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-right: 2px; }
.fb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); border: 1px solid transparent; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; max-width: 100%; }
.fb-chip .fb-chip-k { font-weight: 500; opacity: .8; }
.fb-chip .fb-chip-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.fb-chip .fb-chip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.fb-chip:hover .fb-chip-x { background: rgba(0,0,0,.08); }
.fb-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.fb-clear-all { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.fb-clear-all:hover { border-color: var(--danger); color: var(--danger); text-decoration: none; }
@media (max-width: 900px) {
    .filterbar:not(.open):not(.no-collapse) .fb-view { display: none; }
    .filterbar .field.fb-view { grid-column: 1 / -1; }
    .filterbar .fb-active { grid-column: 1 / -1; }
    .fb-chip, .fb-clear-all { min-height: 40px; }
}

/* ── Düzeltme C (inceleme 1) ── */
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 rgba(194,106,0,.28); }
.mus-snip mark, .mus-name mark, .mus-table mark { background: var(--warn-soft); padding: 0 2px; border-radius: 3px; }

.y3-403 { max-width: 520px; margin: 48px auto; }
.y3-403-in { text-align: center; padding: 36px 24px 32px; display: flex; flex-direction: column; align-items: center; }
.y3-403-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #2f73e6, #1f5fd1); color: #fff; margin-bottom: 14px; box-shadow: 0 6px 16px -6px rgba(31,95,209,.6); }
.y3-403 h1 { margin-bottom: 6px; }
.y3-403 .sub { margin: 0 0 20px; max-width: 360px; }

.wa2-person { grid-template-columns: auto minmax(160px, 1.4fr) auto minmax(110px, auto) auto; }
.wa2-pickzone { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; cursor: pointer; }
.wa2-person.no-phone .wa2-pickzone, .wa2-person.no-phone .wa2-who { cursor: default; }
.wa2-who { cursor: pointer; align-self: stretch; justify-content: center; min-height: 44px; }
.wa2-person input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.wa2-prev { grid-column: 2 / -1; }
@media (max-width: 900px) {
    .wa2-person { grid-template-columns: auto minmax(0, 1fr) auto; }
    .wa2-person .count-pill { grid-column: 3; grid-row: 1; }
    .wa2-st { grid-column: 2 / -1; }
    .wa2-acts { grid-column: 1 / -1; }
    .wa2-prev { grid-column: 1 / -1; }
    .hide-mobile { display: none !important; }
}

.popover button .dot { background: var(--c, var(--muted)); }
.popover button .dot { width: 10px; height: 10px; }
.popover button.current { background: var(--primary-soft); }
.popover button.current::after { content: "✓"; margin-left: auto; color: var(--primary); font-weight: 700; }
.popover button[data-pick="planned"] { --c: var(--st-planned); } .popover button[data-pick="on_way"] { --c: var(--st-on_way); }
.popover button[data-pick="done"] { --c: var(--st-done); } .popover button[data-pick="postponed"] { --c: var(--st-postponed); }
.popover button[data-pick="cancelled"] { --c: var(--st-cancelled); }

.rp-grid { align-items: start; }

/* ── Düzeltme B (inceleme 1) ── */
/* 2) Personel iş ekranı: >=1280 iki sütun (müşteri+şikayet solda, yapılan iş sağda) */
@media (min-width: 1280px) {
    .y5-grid { display: grid; grid-template-columns: minmax(420px, 4fr) minmax(0, 6fr); gap: 20px; align-items: start; max-width: 1500px; }
    .y5-grid > .y5-cust, .y5-grid > .y5-work, .y5-grid > .svc-form, .y5-grid > .svc-form + * { max-width: none; }
    .y5-grid > .y5-cust { margin-bottom: 0; position: sticky; top: 16px; }
}
/* 3) Personel iş listesi: >=1280 iki sütun kart ızgarası */
@media (min-width: 1280px) {
    .staff-wrap:has(.jc-grid) { max-width: 1180px; }
    .jc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
}
/* 4) Ayarlar: form altbilgisi */
.y3-foot-note { margin-right: auto; font-size: 13px; }
@media (max-width: 640px) { .y3-foot-note { display: none; } }
/* 5) Kullanıcı başlığı alt satırı tek satır */
.page-head .sub.y3-person > span:last-child { display: block; flex-direction: initial; }
.page-head .sub.y3-person > span:last-child .mono { display: inline; }
/* 6) Hata varken yardım metni gizli */
.field:has(.field-error) > .hint, .field.has-error > .hint { display: none; }
/* 7) Cihaz satırı: kaldırılacak olarak işaretli */
.mus-row.is-removed > input[type=text] { opacity: .45; text-decoration: line-through; }
.mus-row.is-removed > .btn { opacity: 1; }
/* 8-9) Servis formu müşteri seçimi (telefon) */
@media (max-width: 640px) {
    .cust-find { flex-direction: column; align-items: stretch; }
    .cust-find .input-icon, .cust-find .btn { width: 100%; flex: none; }
    .cust-picked { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; padding: 12px; }
    .cust-picked .cust-avatar { width: 40px; height: 40px; font-size: 17px; }
    .cust-picked .btn { min-height: 44px; padding: 0 12px; align-self: start; }
}

/* ── Düzeltme A (inceleme 1) ── */
/* Servis no hiçbir tabloda satır kırmaz */
.table .mono, a.cell-main.mono, .table td[data-label="Servis no"] a { white-space: nowrap; }
.table .cell-sub a { white-space: nowrap; }

/* Filtre çubuğu: "Daha fazla filtre" + Görünüm anahtarı tek kümede, aynı taban çizgisinde */
.filterbar .fb-tail { display: flex; align-items: flex-end; gap: 12px 14px; flex: none; order: 3; }
.filterbar .fb-tail .fb-more-btn { flex: none; }
/* Arama alanı esner: filtre kartı makul dolsun */
.filterbar .field.fb-search { flex: 3 1 260px; max-width: none; }
.view-toggle { display: flex; align-items: flex-end; margin: 0; }
.view-toggle .fb-view { display: flex; flex-direction: column; gap: 6px; }
.view-toggle .fb-view .switch { min-height: var(--control-h, 44px); padding: 0 14px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.view-toggle .fb-view .switch-text strong { font-weight: 600; font-size: 14px; }
.page-actions { align-items: center; }

/* Masaüstü: Müşteriler tablosunda dengeli sütunlar */
@media (min-width: 901px) {
    .mus-table { table-layout: fixed; }
    .mus-table th:nth-child(1) { width: 30%; }
    .mus-table th:nth-child(2) { width: 15%; }
    .mus-table th:nth-child(3) { width: 17%; }
    .mus-table th:nth-child(4) { width: 8%; }
    .mus-table th:nth-child(5) { width: 13%; }
    .mus-table th:nth-child(6) { width: 17%; }
}

@media (max-width: 900px) {
    .filterbar .fb-tail { display: contents; }
    .page-actions { align-items: flex-end; }
    /* Kart: başlık hücresi en üstte */
    .table.responsive tbody tr { display: flex; flex-direction: column; }
    .table.responsive td.primary { order: -1; }
    /* Müşteri hücresi: ad kendi satırında, altında "telefon · ilçe" */
    .table.responsive td.wrap-cell[data-label="Müşteri"] { display: block; text-align: left; }
    .table.responsive td.wrap-cell[data-label="Müşteri"]::before { display: none; }
    .table.responsive td.wrap-cell .cell-sub { margin-top: 1px; }
}
@media (max-width: 560px) {
    /* Garanti sekmeleri: 2×2 ızgara, hepsi görünür */
    .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; width: 100%; }
    .tabs a { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 8px; min-height: var(--control-h, 44px); font-size: 13.5px; text-align: center; }
    .tabs a.active { color: var(--primary); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary); }
}
.y1-list td[data-label="Müşteri"] { min-width: 170px; }
.y1-list td[data-label="Personel"] .y1-staff { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1500px) {
    .y1-list th, .y1-list td { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 640px) {
    .cust-picked { grid-template-columns: 40px 1fr auto; align-items: center; }
    .cust-picked .cust-avatar { grid-column: 1; grid-row: 1; }
    .cust-picked .btn { grid-column: 3; grid-row: 1; }
    .cust-picked .cust-info { grid-column: 1 / -1; grid-row: 2; }
    .cust-picked::before { content: "Seçili müşteri"; grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--muted); font-weight: 600; }
}

/* Servisler tablosu dar masaüstünde (1281–1440 dahil) sığsın: saat tarihin altında. */
@media (min-width: 901px) and (max-width: 1440px) {
    .y1-list td[data-label="Tarih"] .cell-sub { display: block; }
}


/* ════ Yerleşim incelemesi 2 düzeltmeleri ════ */
/* Müşteri detayı: alt tablolar (orantılı sütun yok; cihaz 2 satırla sınırlı) */
.mus-sub td { overflow-wrap: normal; }
.mus-sub td.mus-dev { min-width: 150px; max-width: 260px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
@media (max-width: 900px) { .mus-sub td.mus-dev { min-width: 0; max-width: none; } }

/* Yönetim tabloları: eylem sütunu sabit genişlik, düğmeler sağa yaslı */
@media (min-width: 901px) {
    .y3-table th.actions-col, .y3-table td.actions { width: 300px; }
    .y3-table td.actions .y3-acts { flex-wrap: nowrap; justify-content: flex-end; }
}
/* Yalnız "Görünüm" anahtarı olan filtre çubuğu (Kullanıcılar) */
.filterbar.fb-only-view { padding: 12px 18px; border-bottom: 1px solid var(--border); }

/* Yapışkan eylem çubuğu: Personel iş kartında form ızgara öğesi olur, çubuk iki sütunu da kaplar */
@media (min-width: 1280px) {
    .y5-grid { max-width: none; }
    .y5-grid > .svc-form { display: contents; }
    .y5-grid > .svc-form > .y5-work { max-width: none; }
    .y5-grid > .svc-form > .action-bar { grid-column: 1 / -1; margin: 0 0 -24px; padding-left: 20px; padding-right: 20px; }
}

/* Sayfalama çubuğu (includes/pagination.php) */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); }
.pager-count { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-count b { color: var(--text); font-weight: 650; }
.pager-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-num, .pager-nav { min-width: 40px; min-height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
a.pager-num:hover, a.pager-nav:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.pager-num.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(31,95,209,.35); }
.pager-nav.is-off { opacity: .45; }
.pager-nav.next .icon { transform: rotate(180deg); }
.pager-gap { padding: 0 2px; color: var(--muted); }
@media (max-width: 900px) {
    .pager { flex-direction: column; align-items: stretch; padding: 12px 14px; text-align: center; }
    .pager-links { justify-content: center; gap: 6px; }
    .pager-num, .pager-nav { min-width: 44px; min-height: 44px; }
    .pager-nav span { display: none; }
}

/* Servis listesi filtre çubuğu: 1280–1440'ta tek satır */
@media (min-width: 901px) and (max-width: 1600px) {
    #filters .field.fb-search { flex: 1 1 190px; }
    #filters .field.fb-range { flex: 1 1 190px; max-width: 260px; }
}
/* Servis listesi tablosu: 1440 ve altında hücre boşluğu daralır, kart dışına yatay taşma olmasın */
@media (min-width: 901px) and (max-width: 1440px) {
    .y1-list th, .y1-list td { padding-left: 7px; padding-right: 7px; }
}

/* Servis listesi: servis no detaya giden bağlantı, bağlantı gibi görünsün */
.table.y1-list a.cell-main { color: var(--primary); }
.table.y1-list a.cell-main:hover { text-decoration: underline; }
.status-cell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Telefonda parça satırı: marka ve kod tam genişlik (kesilmesin), sayılar ikişer sütun */
@media (max-width: 480px) {
    .part-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .part-grid > .field:nth-child(-n+2) { grid-column: 1 / -1; }
}

/* ── WhatsApp ayarları (v2) ──────────────────────────────── */
.wa2-keybox { display: flex; gap: 8px; align-items: stretch; }
.wa2-keybox input { flex: 1; min-width: 0; }
.wa2-keybox .btn-icon { flex: none; width: var(--control-h); padding: 0; justify-content: center; }
.wa2-ipnote { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid #c8daf1; background: var(--primary-soft); border-radius: 12px; color: #174f8e; }
.wa2-ipnote > .icon { flex: none; }
.wa2-ipnote > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.wa2-ipnote strong { font-weight: 650; }
.wa2-ipnote code.inl { background: rgba(255,255,255,.7); color: inherit; padding: 1px 7px; border-radius: 6px; font-weight: 650; white-space: nowrap; }
.wa2-testbar { display: flex; align-items: flex-start; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.wa2-result { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 12px; border: 1px solid; font-size: 13.5px; }
.wa2-result strong { font-weight: 650; }
.wa2-result.ok { background: var(--ok-soft); border-color: #bfe5cf; color: #125c38; }
.wa2-result.warn { background: var(--warn-soft); border-color: #f3dcb2; color: #7d4300; }
.wa2-result.bad { background: var(--danger-soft); border-color: #f1c2c2; color: #9d2222; }
.wa2-result code.inl { background: rgba(255,255,255,.7); padding: 1px 7px; border-radius: 6px; font-weight: 650; }
.wa2-block + .wa2-block { margin-top: 20px; }
.wa2-block > .field-label { display: block; margin-bottom: 8px; }
.wa2-selrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wa2-selrow > .ui-sel, .wa2-selrow > select { flex: 1 1 280px; min-width: 0; max-width: 520px; }
.wa2-chipslot:empty { display: none; }
.wa2-seg { max-width: 100%; }
.hint.warn { color: #8a4b00; }
.switch-card.is-locked { opacity: .65; cursor: not-allowed; }
.switch-card.is-locked .switch-ui { pointer-events: none; }
.switch-card.is-locked .badge { margin-left: 6px; vertical-align: 1px; }
.wa2-tpl { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.wa2-tpl-edit { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wa2-tpl-prev { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); min-width: 0; position: sticky; top: 16px; }
.wa2-prev-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.wa2-prev-group { display: flex; flex-direction: column; gap: 4px; }
.wa2-prev-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wa2-tpl-prev .wa-preview { margin-top: 0; max-width: none; }
.wa2-vars .qchip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
@media (max-width: 900px) {
    .wa2-tpl { grid-template-columns: 1fr; }
    .wa2-tpl-prev { position: static; }
    .wa2-ipnote { flex-wrap: wrap; }
    .wa2-ipnote .btn { min-height: 44px; }
    .wa2-selrow .btn { min-height: 44px; }
    .wa2-seg { display: flex; } .wa2-seg label { flex: 1; } .wa2-seg span { text-align: center; min-height: 44px; display: grid; place-items: center; }
}
.page-head .page-actions { margin-left: auto; }
#wa-test-msg .field + .field, #wa-test-msg .form-grid + .field { margin-top: 16px; }

/* ── Loglar / değişiklik geçmişi (ortak fark gösterimi) ── */
.badge-aud-ok     { background: var(--ok-soft); color: var(--ok); }
.badge-aud-info   { background: #e8f0fb; color: #1c5ea8; }
.badge-aud-warn   { background: var(--warn-soft); color: var(--warn); }
.badge-aud-danger { background: var(--danger-soft); color: var(--danger); }
.badge-aud-plain  { background: #eef0f3; color: #687180; }
.badge-aud-wa     { background: #e3f6ec; color: #11743f; }
.aud-diff { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.aud-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13.5px; line-height: 1.4; }
.aud-f { color: var(--muted); font-size: 12.5px; min-width: 96px; }
.aud-old { color: var(--danger); text-decoration: line-through; background: var(--danger-soft); border-radius: 5px; padding: 0 6px; overflow-wrap: anywhere; }
.aud-new { color: var(--ok); text-decoration: none; background: var(--ok-soft); border-radius: 5px; padding: 0 6px; font-weight: 600; overflow-wrap: anywhere; }
.aud-arr { color: var(--muted); }
.aud-timeline .what .badge { vertical-align: middle; }
.aud-table .aud-mod { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.aud-table .aud-detail { min-width: 260px; }
.aud-table .aud-ip { white-space: nowrap; }
.aud-table .aud-ip .cell-sub { display: block; }
.aud-wa { margin-top: 4px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.aud-err { margin-top: 2px; font-size: 12.5px; color: var(--danger); }
@media (max-width: 760px) {
    .aud-f { min-width: 0; width: 100%; }
    .aud-table td.aud-detail { display: block; text-align: left; }
    .aud-table td.aud-detail::before { display: block; margin-bottom: 2px; }
}

/* ── Tahsilat kutusu (servis detayı + iş kartı) ─────────────── */
.pay-card .card-body.stack { gap: 14px; }
.pay-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pay-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.pay-sum span, .pay-due-only span { font-size: 12.5px; color: var(--muted); }
.pay-sum b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pay-sum .pay-left.due { background: var(--warn-soft); border-color: #f3d39b; }
.pay-sum .pay-left.due b { color: var(--warn); }
.pay-sum .pay-left.ok { background: var(--ok-soft); border-color: #bfe5cf; }
.pay-sum .pay-left.ok b { color: var(--ok); }
.pay-due-only { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid #f3d39b; }
.pay-due-only b { font-size: 24px; color: var(--warn); font-variant-numeric: tabular-nums; }
.pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pay-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; flex-wrap: wrap; }
.pay-row + .pay-row { border-top: 1px solid var(--border); }
.pay-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.pay-ic.pay-card { background: var(--primary-soft); color: var(--primary); }
.pay-ic.pay-transfer { background: #f1ecfb; color: #6d3fc9; }
.pay-main { flex: 1; min-width: 0; }
.pay-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-amt { font-size: 15px; font-variant-numeric: tabular-nums; }
.pay-m { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pay-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.pay-row.is-void .pay-amt { text-decoration: line-through; color: var(--muted); }
.pay-row.is-void .pay-ic { background: var(--surface-3); color: var(--muted); }
.pay-void-why { color: var(--muted); }
.pay-void { flex: none; }
.pay-void > summary { list-style: none; }
.pay-void > summary::-webkit-details-marker { display: none; }
.pay-void[open] { flex-basis: 100%; }
.pay-void[open] > summary { margin-bottom: 10px; }
.pay-void-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border-radius: var(--radius-sm); background: var(--danger-soft); }
.pay-void-form .field { flex: 1 1 220px; margin: 0; }
.pay-void-form .btn { min-height: var(--control-h); }
.pay-form { border: 1px solid #cfe3d8; border-radius: var(--radius); padding: 14px; background: linear-gradient(180deg, #f6fcf9, #fff); }
.pay-form-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 12px; color: var(--ok); }
.pay-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pay-form .field-full { grid-column: 1 / -1; }
.pay-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-methods .chip span { width: 100%; justify-content: center; min-height: var(--control-h); }
.pay-form-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.pay-done { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.svc-pay-hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.y5-grid > .pay-card { scroll-margin-top: 80px; }
@media (max-width: 640px) {
    .pay-form .form-grid { grid-template-columns: 1fr; }
    .pay-form-foot .btn { width: 100%; justify-content: center; }
    .pay-sum { gap: 6px; }
    .pay-sum > div { padding: 8px 10px; }
    .pay-sum b { font-size: 14px; }
}

/* ── Tahsilat listesi + personelde nakit ───────────────────────── */
.y1-pill-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.y1-pill-ok .icon { color: var(--ok); }
.tah-chip { width: 22px; height: 22px; border-radius: 7px; }
.tah-meth { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.tah-meth.pay-card { background: var(--primary-soft); color: var(--primary); }
.tah-meth.pay-transfer { background: #f1ecfb; color: #6d3fc9; }
.tah-amt, .tah-due { font-variant-numeric: tabular-nums; }
.tah-due { color: var(--warn); }
.tah-void td { color: var(--muted); }
.tah-void .tah-v { text-decoration: line-through; color: var(--muted); }
.tah-void .tah-meth { background: var(--surface-3); color: var(--muted); }
.tah-why { text-decoration: none; display: block; color: var(--muted); }
.pn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .pn-grid { grid-template-columns: minmax(380px, 5fr) minmax(0, 6fr); } }
.pn-detail { min-width: 0; scroll-margin-top: 80px; }
.pn-people { list-style: none; margin: 0; padding: 4px 0; }
.pn-person + .pn-person { border-top: 1px solid var(--border); }
.pn-person-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; text-decoration: none; color: inherit; }
.pn-person-link:hover { background: var(--surface-2, var(--surface-3)); }
.pn-person.is-sel .pn-person-link { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.pn-person.is-off { opacity: .6; }
.pn-person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pn-person-main small, .pn-person-bal small { color: var(--muted); font-size: 12px; font-weight: 500; }
.pn-person-bal { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-person-bal.due { color: var(--warn); font-size: 16px; }
.pn-hero { display: flex; align-items: center; gap: 16px; padding: 20px; }
.pn-hero-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); flex: none; }
.pn-hero.due .pn-hero-ic { background: var(--warn-soft); color: var(--warn); }
.pn-hero-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.pn-hero-amt { display: block; font-size: 32px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pn-hero.due .pn-hero-amt { color: var(--warn); }
.pn-hero-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.pn-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .pn-form .form-grid { grid-template-columns: 1fr; } }
.pn-moves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pn-move { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.pn-move + .pn-move { border-top: 1px solid var(--border); }
.pn-sign { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.pn-move.in .pn-sign { background: var(--ok-soft); color: var(--ok); }
.pn-move.out .pn-sign { background: var(--warn-soft); color: var(--warn); }
.pn-move-main { flex: 1; min-width: 0; }
.pn-move-top { display: flex; align-items: center; gap: 8px; }
.pn-amt { font-size: 16px; font-variant-numeric: tabular-nums; }
.pn-move.in .pn-amt { color: var(--ok); }
.pn-move.out .pn-amt { color: var(--warn); }
.pn-move-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pn-move-sub a { font-weight: 600; }
.pn-move.is-void .pn-amt, .pn-move.is-void .pn-move-sub:not(:last-child) { text-decoration: line-through; color: var(--muted); }
.pn-move.is-void .pn-sign { background: var(--surface-3); color: var(--muted); }
.pn-move .pay-void { flex-basis: 100%; }
.tah-note { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 760px) { .tah-note { align-items: flex-end; text-align: right; } }

/* ═══ Roller ve izin matrisi (yetki-tablo.js) ═══ */
.pm-role-row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.pm-role-row .ui-sel, .pm-role-row select { flex: 1 1 220px; min-width: 0; }
.pm-role-row .btn { min-height: var(--control-h); }
.pm-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warn-soft); color: var(--warn); border: 1px solid #f1d9ad; white-space: nowrap; }
.pm-top { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.pm-legend { display: flex; gap: var(--sp-4); font-size: 13px; color: var(--muted); }
.pm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pm-sw { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-block; }
.pm-sw.is-ov { border-color: var(--accent); background: var(--accent-soft); }
.pm-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.pm-count b { color: var(--text-2); }
.pm-count.has, .pm-count.has b { color: var(--accent); font-weight: 700; }
.pm-top .btn { min-height: 36px; }
.pm-note { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 12px; margin-bottom: var(--sp-3); border-radius: var(--radius-sm); background: var(--primary-soft); color: #174f8e; font-size: 13.5px; }
.pm-note[hidden] { display: none; }
.pm-note svg { flex: none; }
.pm-grid { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pm-head, .pm-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 170px; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4); }
.pm-head { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--muted); min-height: 40px; }
.pm-head > span:last-child { text-align: center; }
.pm-row { min-height: 52px; border-bottom: 1px solid var(--border); }
.pm-row:last-child { border-bottom: 0; }
.pm-row:hover { background: var(--surface-2); }
.pm-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2); align-items: center; }
.pm-head .pm-cells { text-align: center; }
.pm-head .pm-cells span { white-space: nowrap; font-size: 12px; }
.pm-mod { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.pm-mic { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pm-cell { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; border-radius: var(--radius-sm); border: 1.5px solid transparent; }
.pm-cell.is-na { color: var(--border-strong); cursor: default; user-select: none; }
.pm-cell input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pm-box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: background .12s, border-color .12s; }
.pm-cell:hover .pm-box { border-color: var(--primary); }
.pm-cell input:checked + .pm-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.pm-cell input:focus-visible + .pm-box { box-shadow: 0 0 0 4px var(--primary-ring); }
.pm-cell input:disabled { cursor: not-allowed; }
.pm-cell input:disabled + .pm-box { opacity: .55; }
.pm-cell input:disabled ~ .pm-lbl { opacity: .7; }
.pm-lbl { display: none; }
.pm-cell.is-ov { background: var(--accent-soft); border-color: var(--accent); }
.pm-cell.is-ov::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pm-cell.is-ov input:checked + .pm-box { background: var(--accent); border-color: var(--accent); }
.pm-sc { display: flex; justify-content: center; }
.pm-sc-lbl { display: none; }
.pm-scope { display: inline-flex; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.pm-scope label { position: relative; display: block; }
.pm-scope input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pm-scope span { display: flex; align-items: center; justify-content: center; min-height: 40px; min-width: 66px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--text-2); border-right: 1px solid var(--border); }
.pm-scope label:last-child span { border-right: 0; }
.pm-scope input:checked + span { background: var(--primary-soft); color: var(--primary); }
.pm-scope input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.pm-scope input:disabled + span { opacity: .6; }
.pm-scope.is-ov { border-color: var(--accent); }
.pm-scope.is-ov input:checked + span { background: var(--accent-soft); color: var(--accent); }
.pm-scope-fixed { min-height: 40px; display: flex; align-items: center; justify-content: center; font-size: 13.5px; color: var(--muted); font-weight: 600; }

.rl-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.rl-list { display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: calc(var(--topbar-h) + 12px); }
.rl-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); min-height: 64px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); color: inherit; text-decoration: none; }
.rl-item:hover { border-color: var(--border-strong); }
.rl-item.is-current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: var(--primary-soft); }
.rl-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rl-item.is-current .rl-ic { background: #fff; color: var(--primary); }
.rl-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rl-txt strong { font-size: 14.5px; }
.rl-txt small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rl-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rl-edit .card { margin-bottom: var(--sp-4); }

@media (max-width: 1100px) {
    .pm-head, .pm-row { grid-template-columns: 150px minmax(0, 1fr) 150px; padding: 0 var(--sp-3); }
    .pm-scope span { min-width: 56px; padding: 0 8px; }
    .pm-head .pm-cells span { font-size: 11px; }
}
@media (max-width: 900px) {
    .rl-layout { grid-template-columns: minmax(0, 1fr); }
    .rl-list { position: static; }
}
@media (max-width: 640px) {
    .pm-grid { border: 0; display: flex; flex-direction: column; gap: var(--sp-3); overflow: visible; }
    .pm-head { display: none; }
    .pm-row { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
    .pm-row:hover { background: var(--surface); }
    .pm-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
    .pm-cell.is-na { display: none; }
    .pm-cell { justify-content: flex-start; gap: 10px; padding: 0 10px; border-color: var(--border); background: var(--surface-2); }
    .pm-lbl { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
    .pm-cell.is-ov::after { top: 6px; right: 6px; }
    .pm-sc { justify-content: space-between; align-items: center; gap: var(--sp-3); }
    .pm-sc-lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
    .pm-scope { flex: 1; max-width: 220px; margin-left: auto; }
    .pm-scope label { flex: 1; }
    .pm-scope span { min-height: 44px; }
    .pm-scope-fixed { min-height: 44px; margin-left: auto; }
    .pm-top { gap: var(--sp-3); }
    .pm-count { margin-left: 0; width: 100%; }
    .pm-top .btn { min-height: 44px; width: 100%; justify-content: center; }
    .pm-role-row .btn { width: 100%; justify-content: center; }
}
.pm-cell { width: 100%; max-width: 72px; justify-self: center; }
@media (max-width: 640px) { .pm-cell { max-width: none; justify-self: stretch; } }

/* ── İzin/rol/kullanıcı ekranları: tasarım incelemesi düzeltmeleri ── */
.pm-scope-fixed { color: var(--border-strong); font-weight: 400; cursor: default; }
.pm-scope { position: relative; }
.pm-scope.is-ov::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); pointer-events: none; }
.pm-head { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.pm-head .pm-cells span { font-size: 11.5px; letter-spacing: .04em; }
.rl-txt small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.y3-pills-row { align-items: center; }
.y3-pills-switch { margin: 0 0 0 auto; }
.y3-pills-switch .switch { min-height: 36px; }
.y3-inline-end { display: flex; justify-content: flex-end; }
.y3-rolecell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.y3-rolecell .pm-badge { margin-left: 0; }
@media (min-width: 901px) {
    .y3-acts.y3-acts-fixed { display: grid; grid-template-columns: 96px 104px 40px; justify-content: end; gap: 6px; }
    .y3-acts-fixed .btn { justify-content: center; }
    .action-bar.ab-del-left .actions { display: contents; }
    .action-bar.ab-del-left .btn-del { order: 1; margin-right: auto; margin-left: 8px; }
    .action-bar.ab-del-left .summary { order: 0; }
    .action-bar.ab-del-left .btn-primary { order: 2; margin-left: auto; }
}
@media (max-width: 900px) {
    .y3-rolecell { align-items: flex-end; }
}
@media (max-width: 640px) {
    .pm-sc.is-none { display: none; }
}

/* ═══ Tasarım incelemesi düzeltmeleri (tahsilat / nakit / başlık eylemleri) ═══ */
.btn-danger-outline { background: transparent; color: var(--danger); border-color: #efc3bf; }
.btn-danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
/* İptal et / Vazgeç: düğme yerinde (sağ üst), form altında tam genişlik */
.pay-row, .pn-move { position: relative; }
.pay-void > summary { position: absolute; top: 10px; right: 12px; min-height: 36px; }
.pn-move .pay-void > summary { right: 0; }
.pay-void .v-close, .pay-void[open] .v-open { display: none; }
.pay-void[open] .v-close { display: inline; }
.pay-void[open] > summary { margin-bottom: 0; }
.pn-move .pay-void { flex-basis: auto; }
.pn-move .pay-void[open], .pay-void[open] { flex-basis: 100%; }
.pay-row.has-void > .pay-main, .pn-move.has-void > .pn-move-main { padding-right: 92px; }
/* Personel listesi: satır = ayrıntı, "Teslim al" ayrı düğme */
.pn-person { display: flex; align-items: center; }
.pn-person .pn-person-link { flex: 1; min-width: 0; }
.pn-person .pn-take { flex: none; min-height: 44px; margin-right: 12px; padding: 0 14px; }
.pn-person-bal.due { font-size: 16px; }
.pn-sub-line { display: block; }
/* Yöntem çipleri: eşit üç sütun */
.pay-methods .chip { min-width: 0; }
.pay-methods .chip span { padding: 8px; gap: 6px; white-space: nowrap; }
.pay-methods .m-short { display: none; font-style: normal; }
.pay-methods .m-full { font-style: normal; }
@media (max-width: 480px), (min-width: 901px) and (max-width: 1200px) {
    .pay-methods .m-full { display: none; }
    .pay-methods .m-short { display: inline; }
}
@media (max-width: 900px) {
    /* Servis detayı: Müşteri → Planlama → Parçalar → Toplam → Tahsilat → garanti → geçmiş */
    .y1-detail .y1-c-parts { order: 3; }
    .y1-detail .y1-c-total { order: 4; }
    .y1-detail section.pay-card { order: 5; }
    .y1-detail .y1-c-warr { order: 6; }
    .y1-detail .y1-c-log { order: 7; }
}
@media (max-width: 640px) {
    .tah-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tah-pills .y1-pill { min-width: 0; padding: 6px 10px; gap: 6px; font-size: 13px; line-height: 1.25; }
    .tah-pills .y1-pill > span:last-child { min-width: 0; overflow-wrap: anywhere; }
    .page-head:has(.tah-actions) { flex-wrap: nowrap; align-items: flex-start; }
    .page-head:has(.tah-actions) > div:first-child { flex: 1; min-width: 0; }
    .page-actions.tah-actions { width: auto; margin-left: auto; flex: none; }
    .page-actions.tah-actions .btn { flex: none; min-height: 40px; padding: 0 12px; background: transparent; box-shadow: none; color: var(--text-2); }
    .pn-person-link { padding-right: 8px; }
}
@media (max-width: 640px) {
    .pn-person { flex-wrap: wrap; }
    .pn-person .pn-person-link { flex: 1 1 100%; }
    .pn-person .pn-take { margin: -4px 16px 12px auto; }
}

/* Personel listesi: vurgu satırın tamamında, "Teslim al" sabit sütunda */
.pn-person.is-sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.pn-person.is-sel .pn-person-link { background: transparent; box-shadow: none; }
.pn-person .pn-take-col { flex: none; width: 128px; margin-right: 12px; display: flex; justify-content: flex-end; }
.pn-person .pn-take { margin: 0; width: 100%; justify-content: center; background: var(--surface); }
.pn-person-bal { min-width: 96px; align-items: flex-end; }
.tah-pills .y1-pill b { white-space: nowrap; }
.tah-pills .pay-methods { display: inline; }
@media (max-width: 640px) {
    .pn-person .pn-take-col { width: auto; flex: 1 1 100%; margin: -4px 16px 12px 16px; }
    .pn-person .pn-take-col:empty { display: none; }
    .pn-person .pn-take { width: auto; margin: 0; }
    .pn-person .pn-take { margin: 0; }
    .tah-pills .y1-pill-ok { grid-column: 1 / -1; }
}
