/* AkyuzGo — monokrom tasarım dili (docs/08-TASARIM-ILKELERI.md, K-41).
   Renk yalnızca durum ve uyarı taşır: kırmızı, yeşil, amber; hepsi küçük alanlarda. */

:root {
    --bg: #F6F7F8;
    --surface: #FFFFFF;
    --line: #E4E7EA;
    --line-soft: #EFF1F3;
    --hover: #F1F2F4;
    --text: #14161A;
    --text-2: #565C63;
    --text-3: #8B9199;
    --ink: #111214;
    --side: #0B0B0C;
    --side-line: #1E2023;
    --side-text: #C3C8CE;
    --side-muted: #6C727A;

    --red: #C0392B;
    --red-soft: #F7E3E1;
    --green: #1E7A4C;
    --amber: #B8860B;

    --r-card: 12px;
    --r-ctrl: 8px;
    --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Barlow Semi Condensed", Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-danger { color: var(--red); }
.inline-form { display: inline; margin: 0; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 36px; height: 36px; color: var(--text-3); }

/* ---------- Uygulama kabuğu ---------- */

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.side {
    background: var(--side);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-logo { display: block; padding: 22px 22px 24px; border-bottom: 1px solid var(--side-line); }
.side-logo img { height: 26px; display: block; }

/* Menü düğmesi yalnızca dar ekranda görünür; kutu görünmez ama klavyeyle odaklanabilir. */
.side-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.side-burger { display: none; }

.side nav { padding-bottom: 12px; overflow-y: auto; }

.side-group {
    font: 600 11px/1 var(--font);
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--side-muted);
    padding: 22px 22px 10px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 22px;
    color: var(--side-text);
    text-decoration: none;
    font-size: 13.5px;
    border-left: 2px solid transparent;
}

.side-link:hover { color: #fff; background: #141517; }
.side-link.is-active { color: #fff; background: #17181A; border-left-color: #fff; }
.side-link.is-disabled { color: #4A4F56; cursor: default; }
.side-link.is-disabled:hover { background: none; color: #4A4F56; }

/* Açılır menü başlığı (Cari Hesap): alt sayfalar ince bir çizginin sağında, girintili. */
.side-tree > summary { list-style: none; cursor: pointer; }
.side-tree > summary::-webkit-details-marker { display: none; }
.side-tree > summary.is-open { color: #fff; }
.side-chevron { margin-left: auto; transition: transform .15s; }
.side-tree:not([open]) .side-chevron { transform: rotate(-90deg); }
.side-sub { margin: 2px 0 6px 31px; padding-left: 10px; border-left: 1px solid #26282C; display: grid; gap: 1px; }
.side-sublink {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--side-text);
    text-decoration: none;
    font-size: 13px;
}
.side-sublink:hover { color: #fff; background: #141517; }
.side-sublink.is-active { color: #fff; background: #17181A; font-weight: 600; }
.side-sublink.is-disabled { color: #4A4F56; cursor: default; }
.side-sublink.is-disabled:hover { background: none; color: #4A4F56; }

.side-foot {
    margin-top: auto;
    padding: 16px 22px 20px;
    border-top: 1px solid var(--side-line);
    color: var(--side-muted);
    font-size: 11.5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.side-company { color: var(--side-text); font-weight: 500; }

.main-col { min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-title { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.topbar-title h1 { font: 600 20px/1 var(--font-display); letter-spacing: .2px; margin: 0; }
.topbar-title .muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content { padding: 24px 28px 40px; }

/* ---------- Kontör göstergesi ---------- */

.credit {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctrl);
    padding: 7px 12px;
}

.credit-label { font-size: 11px; color: var(--text-3); letter-spacing: .07em; text-transform: uppercase; }
.credit-value { font: 800 17px/1 var(--font-display); letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.credit.is-low { border-color: #E7C3BF; background: var(--red-soft); color: var(--red); }
.credit.is-low .credit-label { color: var(--red); }
.credit-link { text-decoration: none; }
.credit-link:hover { background: var(--hover); }
.credit-link.is-low:hover { border-color: var(--red); background: var(--red-soft); }
.credit-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Kullanıcı ---------- */

.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.user-name { font-size: 13px; font-weight: 500; white-space: nowrap; }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    display: grid;
    place-items: center;
    font: 600 12px/1 var(--font);
    flex: 0 0 auto;
}

.avatar-outline { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); width: 32px; height: 32px; font-size: 11.5px; }

.icon-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--r-ctrl);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--text-2);
    cursor: pointer;
}

.icon-btn:hover { color: var(--text); background: var(--hover); }

/* ---------- Kart, istatistik, tablo ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.card-head h2 { font: 600 14px/1 var(--font); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 15px 16px; }
.stat-label { display: block; font: 500 11.5px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.stat-value { font: 800 28px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat.is-warn .stat-value, .stat.is-warn .stat-label { color: var(--red); }

.tabs { display: flex; gap: 4px; margin-right: auto; margin-left: 10px; }
.tab { font-size: 12.5px; color: var(--text-2); padding: 5px 10px; border-radius: 7px; }
.tab.is-active { background: var(--hover); color: var(--text); font-weight: 600; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    font: 500 11.5px/1 var(--font);
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-3);
    text-align: left;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFB; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #DDE1E5;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}

.dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ink); display: inline-block; flex: 0 0 auto; margin-right: 6px; vertical-align: middle; }
.badge .dot { margin-right: 0; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-busy { background: var(--ink); }
.dot-off { background: var(--surface); border: 1.5px solid #B4BAC1; }

.code-chip {
    display: inline-block;
    font: 500 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    background: var(--hover);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 7px;
}

.empty { text-align: center; padding: 56px 24px; }
.empty-sm { padding: 28px 18px; }
.empty-title { font-weight: 600; margin: 12px 0 4px; }
.empty .muted { margin: 0; }

/* ---------- Admin: güncel durum ---------- */

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }

.segments { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.segment { padding: 12px 0; text-align: center; border-right: 1px solid var(--line-soft); }
.segment:last-child { border-right: 0; }
.segment b { display: block; font: 800 18px/1 var(--font-display); }
.segment span { font-size: 11.5px; color: var(--text-3); }

.courier-list { list-style: none; margin: 0; padding: 0; }
.courier-row { display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.courier-row:last-child { border-bottom: 0; }
.courier-row.is-off { opacity: .6; }
.courier-meta { display: flex; flex-direction: column; min-width: 0; }
.courier-name { font-size: 13px; font-weight: 500; }
.pkg-count { margin-left: auto; font: 600 12.5px/1 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Form ve düğmeler ---------- */

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field-error { color: var(--red); font-size: 12px; }
.field-error:empty { display: none; }

.input {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctrl);
    padding: 0 12px;
    font: 14px var(--font);
    color: var(--text);
    background: var(--surface);
}

.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.input.input-validation-error { border-color: var(--red); }

.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: var(--r-ctrl);
    border: 1px solid #DDE1E5;
    background: var(--surface);
    color: var(--text);
    font: 500 13.5px var(--font);
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: var(--hover); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2A2C30; }
.btn-block { width: 100%; height: 44px; }
.btn:focus-visible, .icon-btn:focus-visible, .side-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.alert { border-radius: var(--r-ctrl); padding: 11px 13px; font-size: 13px; }
.alert ul { margin: 0; padding: 0; list-style: none; }
.alert-danger { background: var(--red-soft); color: var(--red); border: 1px solid #E7C3BF; }
.validation-summary-valid { display: none; }

/* ---------- Giriş ekranı ---------- */

.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

.auth-brand {
    background: var(--side);
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-logo { height: 34px; width: auto; align-self: flex-start; }
.auth-pitch h2 { font: 600 38px/1.12 var(--font-display); margin: 0 0 18px; letter-spacing: .2px; }
.auth-pitch p { color: var(--side-text); max-width: 440px; margin: 0; font-size: 15px; line-height: 1.6; }
.auth-foot { color: var(--side-muted); font-size: 12px; }

.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font: 600 28px/1.1 var(--font-display); margin: 0 0 8px; }
.auth-card > .muted { margin: 0 0 8px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }
.auth-note strong { color: var(--text-2); }

/* ---------- Duyarlı ---------- */

@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .side { position: relative; height: auto; }
    .side nav, .side-foot { display: none; }
    .side-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--side-line); }
    .side-logo { padding: 16px; border-bottom: 0; }
    .side-burger { display: grid; place-items: center; width: 40px; height: 40px; margin-right: 8px; border-radius: var(--r-ctrl); color: var(--side-text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .side-burger:hover { color: #fff; background: #141517; }
    .side-burger-close { display: none; }
    .side-toggle:checked ~ .side-head .side-burger-open { display: none; }
    .side-toggle:checked ~ .side-head .side-burger-close { display: block; }
    .side-toggle:checked ~ nav { display: block; }
    .side-toggle:checked ~ .side-foot { display: flex; }
    .side-toggle:focus-visible ~ .side-head .side-burger { outline: 2px solid #fff; outline-offset: -2px; }
    .auth { grid-template-columns: 1fr; }
    .auth-brand { padding: 28px 24px; gap: 28px; }
    .auth-pitch h2 { font-size: 28px; }
    .user-name { display: none; }
    .content { padding: 18px 16px 32px; }
    .topbar { padding: 0 16px; }
    .topbar-title .muted { display: none; }
}

/* ---------- Tablo yardımcıları ---------- */

.table tr.is-muted td { color: var(--text-3); }
.table tr.is-muted .strong { color: var(--text-2); }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .btn + .btn, .row-actions form + .btn { margin-left: 6px; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; }
.num-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ---------- Form sayfaları ---------- */

.form-page { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.form-card { padding: 20px 22px; overflow: visible; }
.form-card-head { margin-bottom: 18px; }
.form-card-head h2 { font: 600 15px/1.2 var(--font); margin: 0 0 4px; }
.form-card-head .muted { margin: 0; font-size: 13px; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid-bordered { border-top: 1px solid var(--line-soft); margin-top: 18px; padding-top: 18px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }

.field-hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.input-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; }
select.input { appearance: none; padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565C63' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

.check-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 4px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }

/* Anahtar (açık/kapalı). Onay kutusu klavye ile de kullanılabilir. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.switch-row p { margin: 4px 0 0; max-width: 560px; }
.switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D5D9DD; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Kaydetme bildirimi: betik gerektirmeden 4 saniye sonra kaybolur. */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: var(--ink);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--r-ctrl);
    font-size: 13px;
    max-width: 420px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    z-index: 20;
    animation: toast-life 4.5s ease forwards;
    pointer-events: none;
}

@keyframes toast-life {
    0% { opacity: 0; transform: translateY(6px); }
    6%, 85% { opacity: 1; transform: none; }
    100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
}

/* ---------- Pano, atama, paket detayı ---------- */

a.tab { text-decoration: none; }
a.tab:hover { background: var(--hover); }
.link { text-decoration: none; }
.link:hover { text-decoration: underline; }

.chip {
    display: inline-block;
    align-self: flex-start;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
    white-space: nowrap;
}

.badge-danger { border-color: #E7C3BF; color: var(--red); }
.chip-warn { border-color: #E5D3A6; color: var(--amber); font-weight: 600; }
.stat.is-attention { border-color: #E5D3A6; }
.stat.is-attention .stat-label { color: var(--amber); }

.board td { vertical-align: top; }
.board .row-actions { vertical-align: middle; }

.assign-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.candidate-list { list-style: none; margin: 0; padding: 0; }
.candidate { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.candidate:last-child { border-bottom: 0; }
.candidate.is-blocked { opacity: .55; }
.candidate.is-current { background: #FAFBFB; }
.candidate-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.candidate-meta .chip { margin: 0 0 0 6px; vertical-align: middle; }
.candidate-km { font: 800 17px/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.candidate-spacer { width: 52px; }

.summary { display: grid; grid-template-columns: 96px 1fr; gap: 10px 14px; margin: 0; padding: 16px 18px; font-size: 13px; }
.summary dt { color: var(--text-3); }
.summary dd { margin: 0; }
.summary-grid { grid-template-columns: 96px 1fr 96px 1fr; }
.summary-actions { padding: 0 18px 18px; }

.timeline { list-style: none; margin: 0; padding: 14px 18px 18px; }
.timeline li { display: grid; grid-template-columns: 46px 14px 1fr; align-items: start; gap: 8px; padding: 6px 0; position: relative; }
.timeline-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 1px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--ink); margin-top: 5px; }
.timeline li:not(:last-child) .timeline-dot::after { content: ""; position: absolute; left: 58px; top: 19px; bottom: -7px; width: 1px; background: var(--line); }
.timeline-text { font-size: 13px; }

.action-stack { display: flex; flex-direction: column; gap: 8px; }
.action-stack form { margin: 0; }
.cancel-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); margin-top: 18px; padding-top: 18px; }

.btn-danger { color: var(--red); border-color: #E7C3BF; }
.btn-danger:hover { background: var(--red-soft); }

.inline-details { display: inline-block; position: relative; margin-left: 6px; }
.inline-details > summary { list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }
.popover-form {
    position: absolute;
    right: 0;
    top: 38px;
    z-index: 10;
    display: flex;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-ctrl);
    padding: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    width: 320px;
}
.popover-form .input { height: 32px; flex: 1; font-size: 13px; }

.section-gap { margin-top: 20px; }

@media (max-width: 1100px) {
    .assign-layout { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 96px 1fr; }
}

/* Pano: tutar, ödeme ve kurye adı tek satırda kalır. */
.board .num span, .board td:nth-child(5) { white-space: nowrap; }

/* ---------- Canlı güncelleme göstergesi ---------- */

.live-status { display: inline-flex; align-items: center; gap: 0; font-size: 12px; color: var(--text-2); padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.live-status .dot { margin-right: 6px; }
.live-status.is-live .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(30, 122, 76, .14); }
.live-status.is-connecting .dot { background: var(--amber); }
.live-status.is-offline .dot { background: var(--red); }
.live-status.is-offline { color: var(--red); }
.live-swap { display: contents; }

/* ---------- Canlı harita (K-68) ----------
   Monokrom kurala istisna: harita karoları renkli, kurye durumları Loji ile aynı dört renk (yalnızca bu ekranda). */

:root {
    --map-idle: #16A34A;
    --map-accepted: #EA7A0C;
    --map-onway: #2563EB;
    --map-break: #DC2626;
    --map-store: #1F2937;
    --map-waiting: #64748B;
}

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }
.map-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.map-stage { position: relative; }
.live-map { height: calc(100vh - 210px); min-height: 460px; background: #E8EAED; }
.live-map .leaflet-control-attribution { font-size: 10.5px; color: var(--text-3); background: rgba(255, 255, 255, .85); }
.live-map .leaflet-control-zoom a { color: var(--text); border-color: var(--line); }
.live-map .leaflet-tooltip { font: 500 12px/1.3 var(--font); color: var(--text); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(17, 18, 20, .10); padding: 5px 8px; }
.live-map .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 18, 20, .14); }
.live-map .leaflet-popup-content { margin: 12px 14px; font: 13px/1.4 var(--font); }

/* Harita üstü: sağ üstte durum açıklaması ve katman / etiket anahtarları. */
.map-overlay { position: absolute; top: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: calc(100% - 70px); pointer-events: none; }
.map-overlay > * { pointer-events: auto; }
.map-legend {
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; padding: 8px 14px; border-radius: 10px;
    background: rgba(255, 255, 255, .96); box-shadow: 0 4px 16px rgba(17, 18, 20, .14); font-size: 12.5px; color: var(--text);
}
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 999px; background: var(--map-waiting); vertical-align: middle; margin-right: 6px; }
.map-legend .map-dot { margin-right: 0; }
.map-dot.is-idle { background: var(--map-idle); }
.map-dot.is-accepted { background: var(--map-accepted); }
.map-dot.is-onway { background: var(--map-onway); }
.map-dot.is-break { background: var(--map-break); }

.map-panel { width: 200px; border-radius: 10px; background: rgba(255, 255, 255, .97); box-shadow: 0 4px 16px rgba(17, 18, 20, .14); font-size: 13px; }
.map-panel > summary {
    display: flex; justify-content: space-between; align-items: center; padding: 9px 14px;
    list-style: none; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text-2);
}
.map-panel > summary::-webkit-details-marker { display: none; }
.map-panel > summary::after {
    content: ""; width: 7px; height: 7px; margin-top: -3px;
    border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg);
}
.map-panel[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.map-panel-group { display: grid; gap: 9px; padding: 10px 14px 12px; border-top: 1px solid var(--line-soft); }
.map-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-sm { width: 38px; height: 22px; }
.switch-sm span::after { width: 16px; height: 16px; }
.switch-sm input:checked + span { background: var(--map-onway); }
.switch-sm input:checked + span::after { transform: translateX(16px); }

.map-legend-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-2); }
.map-legend-foot > span { display: inline-flex; align-items: center; gap: 7px; }
.map-shape { display: inline-block; flex: 0 0 auto; }
.map-shape.is-store { width: 12px; height: 12px; border-radius: 3px; background: var(--map-store); }
.map-shape.is-drop { width: 11px; height: 11px; border-radius: 999px; background: var(--map-accepted); }
.map-shape.is-drop.is-waiting { background: #fff; border: 2.5px solid var(--map-waiting); }
.map-shape.is-route { width: 18px; border-top: 2.5px dashed var(--map-onway); }

/* İşaretler: renkli damla, içinde simge; etiket üstte hap şeklinde (anahtarla açılır). */
.map-pin-wrap { background: none; border: 0; }
.map-pin { position: relative; display: block; width: 100%; height: 100%; --pin: var(--map-waiting); }
.map-pin-head {
    position: absolute; left: 50%; top: 0; width: 34px; height: 34px; margin-left: -17px;
    display: grid; place-items: center; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--pin); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(17, 18, 20, .35);
}
.map-pin-head svg { width: 18px; height: 18px; transform: rotate(45deg); fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.map-pin-head b {
    position: absolute; top: -8px; right: -8px; transform: rotate(45deg); min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px; background: #fff; color: var(--ink); border: 1px solid var(--line); font: 700 10.5px/16px var(--font); text-align: center;
}
.map-pin.is-idle { --pin: var(--map-idle); }
.map-pin.is-accepted { --pin: var(--map-accepted); }
.map-pin.is-onway { --pin: var(--map-onway); }
.map-pin.is-break { --pin: var(--map-break); }
.map-pin.is-stale { opacity: .55; }
.map-pin-store { --pin: var(--map-store); }
.map-pin-store .map-pin-head { width: 30px; height: 30px; margin-left: -15px; }
.map-pin-store .map-pin-head svg { width: 16px; height: 16px; }
.map-pin-sm .map-pin-head { width: 24px; height: 24px; margin-left: -12px; }
.map-pin-sm .map-pin-head svg { width: 13px; height: 13px; stroke-width: 2.2; }
.map-pin.is-order-assigned { --pin: var(--map-accepted); }
.map-pin.is-order-onway { --pin: var(--map-onway); }
.map-pin.is-order-waiting .map-pin-head { background: #fff; border-color: var(--map-waiting); }
.map-pin.is-order-waiting .map-pin-head svg { stroke: var(--map-waiting); }

.map-label {
    position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); display: none; white-space: nowrap;
    padding: 3px 8px; border-radius: 999px; font: 600 11px/1.3 var(--font); color: #fff; background: var(--pin);
    box-shadow: 0 2px 6px rgba(17, 18, 20, .22); pointer-events: none;
}
.map-pin-store .map-label, .map-pin-sm .map-label { background: #fff; color: var(--text); border: 1px solid var(--line); }
.labels-courier .map-label-courier, .labels-restaurant .map-label-restaurant, .labels-customer .map-label-customer { display: block; }

.map-route { stroke: var(--map-accepted); stroke-opacity: .8; }
.map-route.is-onway { stroke: var(--map-onway); }
.map-popup { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.map-popup .link { margin-top: 6px; font-weight: 600; }
.map-avatar { color: #fff; border: 0; background: var(--map-waiting); }
.map-avatar.is-idle { background: var(--map-idle); }
.map-avatar.is-accepted { background: var(--map-accepted); }
.map-avatar.is-onway { background: var(--map-onway); }
.map-avatar.is-break { background: var(--map-break); }

.map-side { max-height: calc(100vh - 140px); overflow: auto; }
.courier-row.is-clickable { cursor: pointer; }
.courier-row.is-clickable:hover, .courier-row.is-clickable:focus-visible { background: var(--hover); outline: none; }

@media (max-width: 1100px) {
    .map-layout { grid-template-columns: 1fr; }
    .live-map { height: 64vh; }
    .map-side { max-height: none; }
}
@media (max-width: 720px) {
    .map-legend { font-size: 11.5px; gap: 4px 10px; padding: 7px 10px; }
    .map-panel { width: 180px; }
}

/* ---------- Kullanıcılar ve hesap ---------- */

.page-note { margin: 14px 4px 0; max-width: 760px; }
.form-page.form-narrow { max-width: 520px; }
.form-grid.form-grid-1 { grid-template-columns: 1fr; }

/* ---------- Uyarı şeridi (amber = bekliyor, K-41) ---------- */

.alert-warn { display: flex; align-items: center; gap: 10px; background: #FBF6E9; color: #6B5210; border: 1px solid #EBDDB3; margin-bottom: 16px; }
.alert-warn .icon { color: var(--amber); }
.alert-success { display: flex; align-items: center; gap: 10px; background: #E8F3EC; color: #1B5E3B; border: 1px solid #BFDCCB; margin-bottom: 16px; }
.alert-success .icon { color: var(--green); }
.alert-danger.alert-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert-danger.alert-row .icon { margin-top: 1px; }
.alert-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.alert-list li + li { margin-top: 2px; }

/* ---------- Platform bağlantısı ---------- */

.platform-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); white-space: nowrap; }
.platform-chip .dot { margin-right: 0; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.form-card > .status-grid + form { margin-top: 18px; }
.status-grid .stat-label { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.status-grid .stat-text { font-weight: 600; }
.error-box { margin-top: 14px; padding: 11px 13px; border-radius: var(--r-ctrl); background: var(--red-soft); color: var(--red); font-size: 13px; }
.timeline-platform { margin: 0; padding: 0; list-style: none; }
.timeline-platform li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.timeline-platform li:last-child { border-bottom: 0; }
.timeline-platform .when { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.form-inline-actions { margin-top: 14px; }
.form-inline-actions:has(.field) { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-inline-actions .field { max-width: 160px; }
.switch-row + .switch-row { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 14px; }
/* Onay kutusu ya da alan ızgarasından sonra gelen anahtar satırı ayrı bir blok gibi durur. */
.check + .switch-row, .form-grid + .switch-row, .form-grid-bordered + .switch-row { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 14px; }
.form-card > .check { margin-top: 14px; }
.card-body { padding: 4px 18px 10px; }

/* ---------- Finans ---------- */

.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-value.stat-money { font-size: 22px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
.bank-info { white-space: pre-line; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-ctrl); font-variant-numeric: tabular-nums; }
.form-grid.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-end { justify-content: flex-end; }
.nowrap { white-space: nowrap; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.field.field-inline { gap: 5px; min-width: 150px; }
.field.field-inline .input { height: 38px; }

.table-money td.num, .table-money th.num { white-space: nowrap; }
.table-money tfoot td { font-weight: 600; border-top: 1px solid var(--line); background: var(--bg); }
.table-inputs .input { height: 34px; }
.input.input-sm { height: 32px; width: 104px; font-size: 13px; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-soft td { color: var(--text-2); background: var(--bg); }

.popover-form.popover-wide { flex-direction: column; align-items: stretch; width: 290px; }
.popover-form.popover-wide .input { flex: none; height: 34px; }

.plain-details > summary { cursor: pointer; list-style: none; }
.plain-details > summary::-webkit-details-marker { display: none; }
.plain-details > summary::before { content: "+"; display: inline-block; width: 16px; color: var(--text-3); }
.plain-details[open] > summary::before { content: "−"; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin-top: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }

.totals-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); }
.totals-grid > div { background: var(--surface); padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.totals-grid .stat-label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.totals-grid b { font-size: 16px; font-variant-numeric: tabular-nums; }
.totals-grid .totals-final b { font-size: 19px; }

.print-only { display: none; }

@media (max-width: 1100px) {
    .two-col { grid-template-columns: 1fr; }
    .totals-grid, .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Yazdırma (özellik 9.7): menü, düğmeler ve formlar gizlenir; tablo kâğıda sığar. */
/* ---------------------------------------------------------------- Yasal sayfalar (K-46) */
.legal-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.legal-top { background: var(--side); display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; }
.legal-logo img { height: 26px; display: block; }
.btn-invert { background: transparent; color: #fff; border-color: var(--side-line); }
.btn-invert:hover { background: var(--side-line); color: #fff; }
.legal-wrap { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 20px 24px; }
.legal-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 32px 36px; line-height: 1.65; font-size: 14.5px; }
.legal-doc h1 { font: 600 30px/1.15 var(--font-display); margin: 0 0 6px; }
.legal-meta { color: var(--text-3); font-size: 12.5px; margin: 0 0 14px; }
.legal-summary { color: var(--text-2); margin: 0 0 20px; }
.legal-doc .alert-warn { display: block; }
.legal-section { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 18px; }
.legal-section h2 { font-size: 15.5px; font-weight: 600; margin: 0 0 8px; }
.legal-section p { margin: 0 0 10px; }
.legal-section ul { margin: 0 0 10px; padding-left: 20px; }
.legal-section li + li { margin-top: 5px; }
.legal-table { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 6px 16px; margin: 4px 0 12px; font-size: 14px; }
.legal-table dt { color: var(--text-3); }
.legal-table dd { margin: 0; }
.legal-index { list-style: none; padding: 0; margin: 0; }
.legal-index li { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; padding: 18px 12px; font-size: 12px; color: var(--text-3); }
.legal-links a { color: var(--text-2); }
.legal-links a:hover { color: var(--text); text-decoration: underline; }
.content-foot .legal-links { justify-content: flex-start; padding: 0 28px 20px; }
.content-foot .pay-logos { justify-content: flex-start; padding: 0 28px 10px; }
.auth-panel .legal-foot { position: absolute; bottom: 8px; left: 0; right: 0; }
.auth-panel { position: relative; padding-bottom: 150px; }  /* sabit alt bilgi (logolar + yasal bağlantılar) form ile çakışmasın */
.terms-check { align-items: flex-start; margin: 12px 0 10px; line-height: 1.5; }
.terms-check input { margin-top: 3px; flex: none; }
.consent-state { display: flex; gap: 8px; align-items: center; }
@media (max-width: 720px) {
    .legal-doc { padding: 22px 18px; }
    .legal-table { grid-template-columns: 1fr; gap: 2px; }
    .legal-table dd { margin-bottom: 8px; }
    .auth-panel .legal-foot { position: static; }
    .auth-panel { padding-bottom: 24px; }
}

@media print {
    .side, .topbar-actions, .no-print, .toast, .filter-bar, form .form-actions { display: none !important; }
    .app { display: block; }
    body, .content { background: #fff; }
    .content { padding: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
    .print-only { display: block; margin-bottom: 12px; font-size: 13px; }
    .table { font-size: 11px; }
    .table th, .table td { padding: 5px 8px; }
    a { text-decoration: none; color: inherit; }
}

/* ---------- Kontör yükleme (K-60) ----------
   Monokrom kurala tek istisna: kart markaları (Visa, Mastercard, Troy) ve banka işareti kendi renkleriyle görünür.
   Yöntem seçimi betiksizdir: gizli radyo düğmeleri kardeş seçicilerle kutuyu ve paneli değiştirir. */

.topup { position: relative; padding: 22px; }
.topup-head h2 { font: 600 15px/1.2 var(--font); margin: 0 0 4px; }
.topup-head { margin-bottom: 18px; }
.topup-head .muted { margin: 0; font-size: 13px; }

.topup-radio, .package-radio { position: absolute; opacity: 0; pointer-events: none; }

.topup-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.topup-method {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0;
    padding: 14px 16px 15px; border: 1px solid var(--line); border-radius: var(--r-card);
    background: #FAFBFB; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.topup-method:hover { border-color: #C9CED4; background: var(--surface); }
.topup-method-top { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 8px; }
.topup-method-icon {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: background .15s, color .15s;
}
.topup-method-icon .icon { width: 20px; height: 20px; }
.topup-tick { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid #C4C9CF; background: var(--surface); transition: border .15s; }
.topup-method-title { font-size: 14.5px; font-weight: 600; }
.topup-method-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.topup-method-meta .icon { color: var(--text-3); }
.soon-chip {
    display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--hover);
    border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--text-2);
}

#topup-card:checked ~ .topup-methods .topup-method-card,
#topup-bank:checked ~ .topup-methods .topup-method-bank {
    background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 6px 18px rgba(17, 18, 20, .06);
}
#topup-card:checked ~ .topup-methods .topup-method-card .topup-method-icon,
#topup-bank:checked ~ .topup-methods .topup-method-bank .topup-method-icon { background: var(--ink); border-color: var(--ink); color: #fff; }
#topup-card:checked ~ .topup-methods .topup-method-card .topup-tick,
#topup-bank:checked ~ .topup-methods .topup-method-bank .topup-tick { border: 5.5px solid var(--ink); }
#topup-card:focus-visible ~ .topup-methods .topup-method-card,
#topup-bank:focus-visible ~ .topup-methods .topup-method-bank { outline: 2px solid var(--ink); outline-offset: 2px; }

.pay-marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pay-mark { display: block; width: 44px; height: 29px; }
.pay-marks-lg { justify-content: center; gap: 8px; margin: 0 0 14px; }
.pay-marks-lg .pay-mark { width: 56px; height: 37px; }

.bank-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 29px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.bank-mark {
    display: inline-grid; place-items: center; min-width: 29px; height: 29px; padding: 0 6px; border-radius: 7px;
    background: var(--ink); color: #fff; font: 800 11px/1 var(--font); letter-spacing: .02em; white-space: nowrap;
}
.bank-mark-lg { min-width: 42px; height: 42px; border-radius: 10px; font-size: 13px; }
.bank-mark .icon { width: 18px; height: 18px; }
/* Banka işaretleri: IBAN'daki banka koduna göre bankanın rengi. Resmi logo değil, renkli kısaltmadır. */
.bank-mark[data-bank="00010"] { background: #E30A17; }
.bank-mark[data-bank="00012"] { background: #0A5AA6; }
.bank-mark[data-bank="00015"] { background: #FDB913; color: #14161A; }
.bank-mark[data-bank="00032"] { background: #00A551; }
.bank-mark[data-bank="00046"] { background: #DC0005; }
.bank-mark[data-bank="00059"] { background: #00803E; }
.bank-mark[data-bank="00062"] { background: #1B8A43; }
.bank-mark[data-bank="00064"] { background: #0B4EA2; }
.bank-mark[data-bank="00067"] { background: #004B93; }
.bank-mark[data-bank="00099"] { background: #FF6200; }
.bank-mark[data-bank="00103"] { background: #1D4F91; }
.bank-mark[data-bank="00111"] { background: #5C2D91; }
.bank-mark[data-bank="00123"] { background: #DB0011; }
.bank-mark[data-bank="00134"] { background: #005CA9; }
.bank-mark[data-bank="00146"] { background: #6D2077; }
.bank-mark[data-bank="00203"] { background: #009A44; }
.bank-mark[data-bank="00205"] { background: #00A19A; }
.bank-mark[data-bank="00206"] { background: #0072BC; }
.bank-mark[data-bank="00209"] { background: #00833E; }
.bank-mark[data-bank="00210"] { background: #F2A900; color: #14161A; }

.topup-panel { display: none; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
#topup-card:checked ~ .topup-panel-card, #topup-bank:checked ~ .topup-panel-bank { display: block; }
.topup-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }

.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.topup-label-gap { margin-top: 22px; }
.package {
    position: relative; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.package:hover { border-color: #C9CED4; }
#pkg-0:checked ~ .package-grid .pkg-0,
#pkg-1:checked ~ .package-grid .pkg-1,
#pkg-2:checked ~ .package-grid .pkg-2,
#pkg-3:checked ~ .package-grid .pkg-3,
#pkg-4:checked ~ .package-grid .pkg-4 { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
#pkg-0:focus-visible ~ .package-grid .pkg-0,
#pkg-1:focus-visible ~ .package-grid .pkg-1,
#pkg-2:focus-visible ~ .package-grid .pkg-2,
#pkg-3:focus-visible ~ .package-grid .pkg-3,
#pkg-4:focus-visible ~ .package-grid .pkg-4 { outline: 2px solid var(--ink); outline-offset: 2px; }
.package-credits { font: 800 24px/1 var(--font-display); letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.package-credits small { font: 500 12.5px var(--font); color: var(--text-3); margin-left: 5px; letter-spacing: 0; }
.package-price { font-size: 14px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.package-facts {
    display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-2);
}
.package-facts > span { display: flex; align-items: center; gap: 6px; }
.package-facts .icon { width: 13px; height: 13px; color: var(--text-3); }
.package-daily { color: var(--text); font-weight: 600; }
.package-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.package-note .icon { margin-top: 2px; }
.package-tick {
    position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 20px; height: 20px;
    border-radius: 999px; background: var(--ink); color: #fff; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s;
}
.package-tick .icon { width: 12px; height: 12px; stroke-width: 2.4; }
#pkg-0:checked ~ .package-grid .pkg-0 .package-tick,
#pkg-1:checked ~ .package-grid .pkg-1 .package-tick,
#pkg-2:checked ~ .package-grid .pkg-2 .package-tick,
#pkg-3:checked ~ .package-grid .pkg-3 .package-tick,
#pkg-4:checked ~ .package-grid .pkg-4 .package-tick { opacity: 1; transform: none; }
#pkg-0:checked ~ .topup-panel .pkg-only:not(.pkg-only-0),
#pkg-1:checked ~ .topup-panel .pkg-only:not(.pkg-only-1),
#pkg-2:checked ~ .topup-panel .pkg-only:not(.pkg-only-2),
#pkg-3:checked ~ .topup-panel .pkg-only:not(.pkg-only-3),
#pkg-4:checked ~ .topup-panel .pkg-only:not(.pkg-only-4) { display: none; }

.btn-pay { height: 46px; font-weight: 600; font-size: 14px; }
.btn-pay .pkg-only { font-variant-numeric: tabular-nums; }
.topup-secure { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.topup-secure .icon { color: var(--green); margin-top: 1px; }

.topup-soon { text-align: center; padding: 10px 12px 4px; }
.topup-soon b { display: block; font-size: 15px; }
.topup-soon p { max-width: 430px; margin: 6px auto 16px; font-size: 13px; color: var(--text-2); }

.bank-account { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.bank-account-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: #FAFBFB; }
.bank-account-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bank-account-name b { font-size: 14.5px; }
.bank-account-name span { font-size: 12px; color: var(--text-3); }
.copy-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px 11px 16px; border-bottom: 1px solid var(--line-soft); }
.copy-row:last-child { border-bottom: 0; }
.copy-label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.copy-value { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.copy-value small { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.copy-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.btn-copy { gap: 6px; }
.btn-copy .icon { color: var(--text-3); }

.topup-contact { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; color: var(--text-2); }
.topup-contact .icon { margin-top: 2px; color: var(--text-3); }
.topup-contact a { font-weight: 600; }

.topup-steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.topup-steps li { counter-increment: step; position: relative; min-height: 22px; padding-left: 34px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.topup-steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); font: 600 11.5px/1 var(--font); color: var(--ink);
}
.topup-steps b { color: var(--text); font-weight: 600; }
.topup-steps .code-chip { padding: 3px 6px; }
.topup-panel-bank .bank-info { margin: 14px 0 0; font-size: 12.5px; color: var(--text-2); }

@media (max-width: 520px) {
    .topup { padding: 18px 16px; }
    .topup-methods { grid-template-columns: 1fr; }
    .package-grid { gap: 8px; }
    .package { padding: 12px 10px; }
    .package-credits { font-size: 21px; }
    .package-credits small { display: block; margin: 3px 0 0; }
    .package-price { font-size: 13px; }
    .package-facts { font-size: 11.5px; gap: 3px; }
    .package-facts .icon { display: none; }
    .package-tick { top: 8px; right: 8px; width: 18px; height: 18px; }
    .copy-row { grid-template-columns: minmax(0, 1fr) auto; }
    .copy-label { grid-column: 1 / -1; margin-bottom: -6px; }
}
.pay-card { max-width: 760px; }
.pay-frame { display: block; width: 100%; height: 640px; border: 0; }

/* ---------- Raporlar ---------- */

.tabs.tabs-page { margin-bottom: 16px; }
.stats.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-sub { font: 600 14px/1 var(--font); color: var(--text-3); margin-left: 4px; }
.stat-foot { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.chart-wrap { padding-top: 12px; padding-bottom: 12px; }
.chart { display: block; width: 100%; height: auto; }
.chart:not(.chart-bars) { height: 180px; }
.chart-bar { fill: var(--ink); }
.chart-bar:hover { fill: #3A3D42; }
.chart-track { fill: var(--line-soft); }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-label { font: 500 10.5px var(--font); fill: var(--text-3); }
.chart-text { font: 500 12.5px var(--font); fill: var(--text); }
.chart-num { fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-empty { font: 13px var(--font); fill: var(--text-3); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line-soft); }

@media (max-width: 1100px) {
    .stats.stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Platform paneline girilecek bilgiler (Yemeksepeti) ---------- */
.handoff { display: grid; gap: 8px; }
.handoff-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctrl); }
.handoff-row .stat-label { margin-bottom: 0; }
.handoff-row code { font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.handoff-steps { margin: 14px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.btn.is-copied { border-color: var(--green); color: var(--green); }
@media (max-width: 720px) {
    .handoff-row { grid-template-columns: minmax(0, 1fr) auto; }
    .handoff-row .stat-label { grid-column: 1 / -1; }
}

/* ---------- Kurye uygulaması indirme sayfası ---------- */
.app-release { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.app-release .stat-label { margin-bottom: 6px; }
.app-version { display: block; font: 800 26px/1 var(--font-display); letter-spacing: .01em; margin-bottom: 4px; }
.app-download-button { height: 46px; padding: 0 22px; font-size: 15px; }
.app-hash { font: 11.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }

/* ---------- Kurye grid'i (K-64) ----------
   Yerinde düzenleme: seçimler ve küçük pencereler; kaydet düğmesi yok. Renk yalnızca durum noktasında (K-41). */

.grid-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.grid-search {
    display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 240px; height: 38px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--r-ctrl); color: var(--text-3); background: var(--surface);
}
.grid-search:focus-within { border-color: var(--ink); }
.grid-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); }
.grid-tools { display: flex; align-items: center; gap: 10px; }
.grid-pagesize { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.grid-pagesize .grid-select { height: 38px; }

.courier-grid details { position: relative; }
.courier-grid details > summary { list-style: none; }
.courier-grid details > summary::-webkit-details-marker { display: none; }

.menu, .pop-body {
    position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; background: var(--surface);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(17, 18, 20, .14);
}
.menu { min-width: 200px; padding: 6px; }
.menu-right { left: auto; right: 0; }
.menu a, .menu button {
    display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none;
    font: inherit; font-size: 13px; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu .check { padding: 6px 8px; white-space: nowrap; }

.grid-table th, .grid-table td { padding-left: 12px; padding-right: 12px; }
.grid-table th:first-child, .grid-table td:first-child { padding-left: 16px; }
.grid-table td { padding-top: 10px; padding-bottom: 10px; }
.grid-table th[data-sort]:not([data-sort=""]) { cursor: pointer; user-select: none; }
.grid-table th[data-sort]:not([data-sort=""]):hover { color: var(--text); }
.grid-table th[aria-sort=ascending]::after { content: " ↑"; color: var(--text); }
.grid-table th[aria-sort=descending]::after { content: " ↓"; color: var(--text); }
.grid-table tr.is-saving { opacity: .55; pointer-events: none; transition: opacity .15s; }
.grid-table td[data-col=name], .grid-table td[data-col=phone], .grid-table td[data-col=region], .grid-table td[data-col=vehicle] { white-space: nowrap; }
.grid-table th.th-wrap { white-space: normal; min-width: 100px; max-width: 120px; line-height: 1.35; }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { text-decoration: underline; }

.grid-select {
    display: inline-flex; align-items: center; height: 34px; max-width: 200px; padding: 0 30px 0 11px;
    border: 1px solid var(--line); border-radius: var(--r-ctrl); background: var(--surface) no-repeat right 9px center / 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565C63' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    font: 500 13px var(--font); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    appearance: none; cursor: pointer;
}
.grid-select:hover { border-color: #C9CED4; }
.grid-select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.grid-time { width: 104px; padding-right: 8px; background-image: none; cursor: text; }

.state-pill { position: relative; display: inline-flex; align-items: center; }
.state-pill .dot { position: absolute; left: 11px; margin: 0; pointer-events: none; }
.state-pill .grid-select { min-width: 136px; padding-left: 27px; }
.state-pill.is-working .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(30, 122, 76, .14); }
.state-pill.is-break .dot { background: var(--amber); }
.state-pill.is-off .dot { background: var(--surface); border: 1.5px solid #B4BAC1; }
.state-pill.is-working .grid-select { border-color: #BCD8C8; }
.state-pill.is-break .grid-select { border-color: #E5D3A6; }

.cell-note { display: block; margin-top: 4px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.cell-note.text-danger { color: var(--red); }

.pop-body { display: grid; gap: 10px; width: 290px; padding: 14px; }
.pop-title { font-size: 13px; font-weight: 600; }
.pop-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-3); white-space: normal; }
.pop-field { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.pop-list { max-height: 340px; overflow: auto; }
.pop-list .check { padding: 3px 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-ctrl); overflow: hidden; }
.seg label { position: relative; padding: 8px 4px; border-left: 1px solid var(--line); font-size: 12.5px; text-align: center; cursor: pointer; }
.seg label:first-child { border-left: 0; }
.seg label.is-on { background: var(--ink); color: #fff; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:focus-within { outline: 2px solid var(--ink); outline-offset: -2px; }

.grid-noresult { margin: 0; padding: 28px 16px; text-align: center; }
.grid-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.grid-pager { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.toast-error { background: var(--red); }

@media (max-width: 720px) {
    .grid-search { flex: 1 1 100%; }
    .grid-tools { width: 100%; justify-content: space-between; }
}

/* Üst çubuk dar ekranda: sığmayan eylemler alt satıra iner, başlığın üstüne binmez. */
.topbar-actions .btn { white-space: nowrap; }
@media (max-width: 720px) {
    .topbar { height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
    .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
}

/* Yasal bağlantılar her sayfanın en altında: içerik kısaysa ekranın altına, uzunsa içeriğin sonuna oturur. */
.content-foot { margin-top: auto; }
.legal-wrap { display: flex; flex-direction: column; }
.legal-wrap > .legal-foot { margin-top: auto; }
@media (max-width: 900px) {
    .app { grid-template-rows: auto 1fr; }
    .auth { grid-template-rows: auto 1fr; }
}
@media (max-width: 720px) {
    .auth-panel { grid-template-rows: 1fr auto; padding-bottom: 0; }
}

/* ---------- Güncel Durum paket tablosu (K-69) ----------
   Durum rozeti ve satır şeridi aynı renk; Kurye onayladı / Yolda renkleri Canlı Harita ile aynı. */

.board-color { --st: transparent; }
.board-color td { padding-top: 14px; padding-bottom: 14px; }
.board-row td:first-child { box-shadow: inset 3px 0 0 var(--st); }
.board-row.is-new { --st: #94A3B8; }
.board-row.is-waiting { --st: #D97706; }
.board-row.is-assigned { --st: #7C3AED; }
.board-row.is-accepted { --st: var(--map-accepted); }
.board-row.is-onway { --st: var(--map-onway); }
.board-row.is-late { --st: var(--map-break); }
.board-row.is-late { background: #FFF8F8; }

.board-restaurant { font-weight: 600; color: var(--text); text-decoration: none; }
.board-restaurant:hover { text-decoration: underline; }
.board-time { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.board-time b { margin-left: 4px; padding: 1px 6px; border-radius: 999px; font-weight: 600; font-size: 11.5px; }
.board-time.is-ok b { color: #15803D; background: #DCFCE7; }
.board-time.is-warn b { color: #B45309; background: #FEF3C7; }
.board-time.is-late b { color: #B91C1C; background: #FEE2E2; }

.platform-chip { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.platform-chip.is-yemeksepeti { color: #C8003F; background: #FDE7EF; }
.platform-chip.is-trendyol { color: #D35400; background: #FEF0E5; }
.platform-chip.is-migros { color: #C76A00; background: #FFF3E0; }
.platform-chip.is-phone { color: #475569; background: #F1F5F9; }
.platform-chip.is-posentegra { color: #475569; background: #F1F5F9; }

.board-customer { min-width: 240px; max-width: 360px; }
.board-phone { font-weight: 400; color: var(--text-3); }
.board-quarter { font-size: 13px; font-weight: 600; color: var(--map-onway); }
.board-address {
    font-size: 12px; line-height: 1.45; color: var(--text-3);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.status-pill {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 4px 11px;
    border-radius: 8px; background: var(--st); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(17, 18, 20, .12);
}
.status-pill i { width: 7px; height: 7px; border-radius: 999px; background: #fff; flex: 0 0 auto; }
.status-pill.is-new { --st: #94A3B8; }
.status-pill.is-waiting { --st: #D97706; }
.status-pill.is-assigned { --st: #7C3AED; }
.status-pill.is-accepted { --st: var(--map-accepted); }
.status-pill.is-onway { --st: var(--map-onway); }
.status-pill.is-late { --st: var(--map-break); }
.board-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-amount span { margin-left: 4px; font-weight: 400; font-size: 12.5px; color: var(--text-2); }

.board-courier { font-weight: 600; white-space: nowrap; }
.pkg-chip {
    display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
    background: #FEF3E2; color: #9A4A00; font-size: 11.5px; font-weight: 600; vertical-align: 1px;
}
.pkg-chip .icon { width: 12px; height: 12px; }

.board-times { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.board-times dt { font-weight: 600; color: var(--text); }
.board-times dd { margin: 0; color: var(--text-2); white-space: nowrap; }
.board-eta { color: #E11D48; font-weight: 600; }

/* Pano: tablo kendi kaydırma alanında kalsın, dar ekranda sayfayı genişletmesin. */
.dash-main { min-width: 0; }
.board-link { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--map-onway); text-decoration: none; }
.board-link:hover { text-decoration: underline; }
.board-assign { align-self: flex-start; margin-top: 2px; }
.board-detail { align-self: flex-start; margin-top: 2px; }
.courier-row .map-dot { margin-right: 6px; }

/* ---------- Otomatik fiş (K-71) ---------- */
.receipt-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    padding: 10px 14px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.receipt-bar .muted { flex: 1 1 260px; min-width: 0; }
.row-actions .btn + form { margin-left: 6px; }

/* ---------- Uygulamadan kurye kaydı (K-74) ---------- */
.pending-couriers { margin-bottom: 20px; }
.pending-couriers .card-head h2 { display: flex; align-items: center; gap: 8px; }
.side-badge {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--amber); color: #fff; font: 600 11.5px/1 var(--font);
}
/* Ret onayı satırın solunda açılır: kartın alt kenarında (son satırda) kesilmez. */
.pending-couriers .popover-form { top: 50%; right: calc(100% + 8px); transform: translateY(-50%); align-items: center; width: 360px; white-space: normal; text-align: left; }
.pending-couriers .popover-form .btn { flex: none; white-space: nowrap; }

/* ---- Vitrin: kontör paketleri, ürün sayfası, sepet (oturumsuz) ---- */
.store-nav { display: flex; align-items: center; gap: 18px; min-width: 0; }
.store-top { gap: 12px; }
.store-top .legal-logo { flex: none; }
.store-link { color: var(--side-text); text-decoration: none; font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.store-link:hover, .store-link.is-active { color: #fff; }
.store-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--ink); font: 600 11px/1 var(--font); }
.store-wrap { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 20px 24px; }
.store-hero h1, .store-title, .store-product h1 { font: 800 34px/1.1 var(--font-display); margin: 0 0 10px; letter-spacing: .2px; }
.store-hero p { max-width: 720px; color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0 0 26px; }
.store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.store-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 20px 20px; }
.store-card.is-featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.store-badge { position: absolute; top: -10px; left: 18px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 10px; }
.store-card .package-credits, .store-buy .package-credits { font-size: 32px; }
.store-price { font: 600 20px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.store-price small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 6px; }
.store-facts { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 7px; font-size: 13px; color: var(--text-2); }
.store-facts li { display: flex; align-items: center; gap: 8px; }
.store-facts .icon { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.store-card-actions { margin-top: auto; padding-top: 10px; display: grid; gap: 8px; }
.store-card-actions .btn-block { height: 40px; }
.store-steps, .store-info, .store-others { margin-top: 34px; }
.store-steps h2, .store-info h2, .store-others h2, .store-product h2, .store-summary h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.store-steps ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.store-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: grid; align-content: start; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.store-steps li::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 12px/1 var(--font); margin-bottom: 4px; }
.store-steps li b { color: var(--text); }
.store-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.store-info > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; }
.store-info p { margin: 0; color: var(--text-2); line-height: 1.6; }
.store-crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.store-product { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.store-product-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 28px; }
.store-lead { color: var(--text-2); font-size: 15px; margin: 0 0 18px; }
.store-buy, .store-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 10px; position: sticky; top: 20px; }
.store-buy-note { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.store-buy-note .icon { flex: none; margin-top: 1px; }
.store-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 34px; text-align: center; }
.store-empty p { margin: 0 0 14px; color: var(--text-2); }
.store-cart { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.store-cart-lines { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 6px 20px 18px; }
.store-cart-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.store-cart-table th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.store-cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.store-cart-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.store-cart-sub { display: block; font-size: 12px; margin-top: 3px; }
.store-cart-edit { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; }
.store-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.store-inline select.input { width: auto; height: 32px; }
.store-cart-note { font-size: 12px; margin: 12px 0 0; }
.store-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 6px; font-size: 13.5px; }
.store-summary dt { color: var(--text-2); }
.store-summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.store-summary .store-total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 600; color: var(--text); font-size: 15px; }
.store-footer { border-top: 1px solid var(--line); background: var(--surface); }
.store-footer-in { max-width: 1040px; margin: 0 auto; padding: 18px 20px 4px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
.store-seller { display: grid; gap: 3px; }
.store-seller b { color: var(--text); }
.store-seller a { color: inherit; }
.store-pay { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
@media (max-width: 900px) {
    .store-grid, .store-steps ol, .store-info, .store-product, .store-cart { grid-template-columns: minmax(0, 1fr); }
    .store-buy, .store-summary { position: static; }
    .store-top { padding: 12px 16px; }
    .store-nav { gap: 12px; }
    .store-link-wide { display: none; }
    .store-top .legal-logo img { height: 22px; }
    .store-wrap { padding: 22px 16px 18px; }
    .store-hero h1, .store-title, .store-product h1 { font-size: 28px; }
    .store-product-main { padding: 20px; }
    .store-cart-table th:nth-child(3), .store-cart-table td:nth-child(3) { display: none; }
}

/* iyzico logoları (K-77): resmi paketten, renkleri değiştirilmez; monokrom kurala istisna (K-60 gibi). */
.pay-logos { display: flex; justify-content: center; padding: 14px 12px 0; }
.pay-logos img { height: 22px; width: auto; display: block; max-width: 100%; }
.pay-iyzico { display: block; height: 22px; width: auto; margin: 10px auto 0; }

/* ---------- Cari Hesap ekranları: tarih seçimi, sütun menüsü ---------- */
.page-tools { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.range-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.range-select {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px;
}
.range-input { border: 0; background: transparent; font: 600 13.5px var(--font); color: var(--text); padding: 0 2px; cursor: pointer; min-width: 120px; }
.range-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.range-filter .input { width: auto; }
.grid-columns { position: relative; }
.grid-columns > summary { list-style: none; }
.grid-columns > summary::-webkit-details-marker { display: none; }
.empty-row { padding: 22px 18px; margin: 0; }
@media (max-width: 640px) {
    .page-tools { justify-content: stretch; }
    .range-filter, .range-select { width: 100%; }
    .range-input { flex: 1; }
}

/* ---------- Borç Alacak Bakiye Listesi ve cari hesap ekstresi ---------- */
.text-success { color: var(--green); }
.section-title { font: 600 17px/1.2 var(--font); margin: 6px 2px 12px; }
.section-title ~ .section-title { margin-top: 26px; }
.card-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-tools-left { margin-right: auto; display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.table-balance td, .table-balance th { padding-top: 13px; padding-bottom: 13px; }
.row-link { position: relative; cursor: pointer; }
.row-link:hover td { background: var(--hover); }
.row-anchor { color: inherit; text-decoration: none; }
.row-anchor::after { content: ""; position: absolute; inset: 0; }
.row-chevron { width: 40px; text-align: right; color: var(--text-3); }
.chevron-right { transform: rotate(-90deg); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-btn {
    min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12.5px; text-decoration: none;
}
.page-btn:hover { background: var(--hover); }
.page-btn.is-current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.page-btn.is-disabled { color: var(--text-3); cursor: default; }
.page-btn.is-disabled:hover { background: var(--surface); }
.page-gap { color: var(--text-3); padding: 0 2px; }
.table-ledger { font-size: 12.5px; }
.table.table-ledger th { white-space: normal; line-height: 1.25; text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 600; vertical-align: bottom; min-width: 64px; }
.table.table-ledger th, .table.table-ledger td { padding-left: 8px; padding-right: 8px; }
.table-ledger td { vertical-align: middle; }
.table-ledger td.num { white-space: nowrap; }
.ledger-order { min-width: 150px; font-size: 12.5px; line-height: 1.35; }
.ledger-order b, .ledger-order span, .ledger-order a { display: block; }
.ledger-order b { font-weight: 600; }
.ledger-order span + b { margin-top: 4px; }
.row-entry td { background: var(--bg); }
.party-select { max-width: 100%; }
.party-select .range-input { min-width: 220px; max-width: 360px; }
.range-input-sm { min-width: 52px; }
.entry-pop > summary { list-style: none; }
.entry-pop > summary::-webkit-details-marker { display: none; }
.entry-pop .entry-form { right: 0; left: auto; top: calc(100% + 8px); width: 320px; z-index: 40; gap: 10px; padding: 14px; }
.entry-pop .entry-form .field { display: grid; gap: 4px; }
.entry-pop .entry-form .input { height: 36px; }

/* ---------- Tarih aralığı seçici (Loji düzeni) ---------- */
.drp { position: relative; display: inline-block; }
.drp-trigger {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 260px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: 13.5px var(--font); color: var(--text); cursor: pointer;
}
.drp-trigger:hover, .drp-trigger[aria-expanded=true] { border-color: var(--text-3); }
.drp-trigger:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.drp-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drp-caret { margin-left: auto; color: var(--text-3); }
.drp-panel {
    position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; display: flex; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17, 18, 20, .16); overflow: hidden;
}
.drp-panel[hidden] { display: none; }
.drp-presets { display: grid; align-content: start; gap: 2px; padding: 8px; width: 150px; border-right: 1px solid var(--line); }
.drp-preset { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: 13.5px var(--font); color: var(--text); cursor: pointer; }
.drp-preset:hover { background: var(--hover); }
.drp-preset.is-active { background: var(--hover); font-weight: 600; }
.drp-main { width: 300px; }
.drp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px; }
.drp-month { font-size: 14px; }
.drp-nav { width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.drp-nav:hover { background: var(--hover); }
.drp-left { transform: rotate(90deg); }
.drp-right { transform: rotate(-90deg); }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 4px 12px 10px; }
.drp-dow { text-align: center; font-size: 11.5px; color: var(--text-3); padding: 6px 0; }
.drp-day { height: 34px; border: 0; border-radius: 8px; background: none; font: 13px var(--font); color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.drp-day:hover:not(:disabled) { background: var(--hover); }
.drp-day.is-out { color: var(--text-3); }
.drp-day.is-in { background: var(--bg); border-radius: 0; }
.drp-day.is-edge { background: var(--ink); color: #fff; font-weight: 600; }
.drp-day.is-today:not(.is-edge) { box-shadow: inset 0 0 0 1px var(--line); }
.drp-day:disabled { color: var(--line); cursor: default; }
.drp-times { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.drp-time-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.drp-date { height: 34px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; white-space: nowrap; }
.drp-time { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: 13px var(--font); background: var(--surface); color: var(--text); }
.drp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.drp-foot .muted { margin-right: auto; }
.btn-plain { background: none; border-color: transparent; }
.btn-plain:hover { background: var(--hover); }
.filter-bar .drp { align-self: end; }
@media (max-width: 640px) {
    .drp, .drp-trigger { width: 100%; min-width: 0; }
    .drp-panel { position: fixed; left: 8px; right: 8px; top: 72px; flex-direction: column; max-height: calc(100vh - 90px); overflow-y: auto; }
    .drp-presets { width: auto; display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
    .drp-main { width: auto; }
}

/* ---------- Kurye Tahsilatları: arama + tarih, detay penceresi ---------- */
.search-range { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.search-box {
    flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text-3);
}
.search-box input { flex: 1; border: 0; outline: 0; background: none; font: 14px var(--font); color: var(--text); min-width: 0; }
.search-box:focus-within { border-color: var(--text-3); }
.modal { border: 0; padding: 0; border-radius: 14px; width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: visible; background: var(--surface); box-shadow: 0 24px 64px rgba(0, 0, 0, .28); }
.modal::backdrop { background: rgba(17, 18, 20, .55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 600 17px/1.2 var(--font); }
.modal-body { padding: 16px 20px; }
.modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.modal-foot { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); }
.table-boxed { border: 1px solid var(--line); border-radius: 10px; }
.modal-page .modal-head .icon-btn { display: none; }
@media (max-width: 640px) {
    .search-range { flex-direction: column; align-items: stretch; }
}

/* ---------- Mutabakat ---------- */
.search-inline { flex: 0 1 380px; }
.search-inline .search-box { width: 100%; }
.with-info { display: inline-flex; align-items: center; gap: 6px; }
.info-tip { color: var(--text-3); display: inline-flex; cursor: help; }
.recon-meta { margin: 0 0 14px; display: grid; gap: 4px; font-size: 13.5px; }
.recon-meta div { display: flex; gap: 6px; }
.recon-meta dt { font-weight: 600; }
.recon-meta dd { margin: 0; }
.recon-note { margin: 14px 2px 0; font-size: 12.5px; color: var(--text-2); }
.recon-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; }
.recon-sign div { display: grid; gap: 52px; font-size: 13px; font-weight: 600; }
.recon-sign-line { border-top: 1px solid var(--text-3); padding-top: 6px; font-weight: 400; color: var(--text-2); font-size: 12px; }
.recon-form .table-boxed .card-tools { border-bottom: 1px solid var(--line); }
@media print {
    .modal-page { border: 0; box-shadow: none; }
    .modal-page .modal-head { border-bottom: 2px solid #000; }
    .recon-form .table-ledger { font-size: 12px; }
    /* Form yazdırılırken üst çubuğun başlığı tekrar etmez. */
    body:has(.modal-page) .topbar { display: none; }
}
