/* ==========================================================================
   CoditTeklif panel stilleri
   Renkler _header.php içinde ayarlardan gelen --brand değişkenleriyle ezilir.
   ========================================================================== */

@font-face { font-family: 'Noto Sans'; font-weight: 400; src: url('../fonts/NotoSans-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Noto Sans'; font-weight: 600; src: url('../fonts/NotoSans-SemiBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Noto Sans'; font-weight: 700; src: url('../fonts/NotoSans-Bold.ttf') format('truetype'); font-display: swap; }

:root {
    --brand: #1d4ed8;
    --brand-dark: #0f172a;
    --brand-soft: #eef2ff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --surface: #ffffff;
    --canvas: #f1f5f9;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
    --sidebar-w: 236px;
    --topbar-h: 56px;
    --radius: 8px;

    --bs-body-font-family: 'Noto Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    --bs-body-font-size: .875rem;
    --bs-body-color: var(--ink-2);
    --bs-border-color: var(--line);
    --bs-primary: var(--brand);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-dark);
    --bs-border-radius: 6px;
}

[v-cloak] { display: none !important; }

body { background: var(--canvas); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; }
a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.tabular { font-variant-numeric: tabular-nums; }
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }

/* ---------- Butonlar ve form ---------- */
.btn { font-weight: 600; --bs-btn-font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f8fafc; --bs-btn-hover-border-color: var(--line-2); }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-sm.btn-icon { width: 28px; height: 28px; }
.form-label { font-weight: 600; color: var(--ink-2); font-size: .8rem; margin-bottom: .3rem; }
.form-control, .form-select { font-size: .875rem; border-color: var(--line-2); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent); }
.form-control-plain { border-color: transparent; background: transparent; }
.form-control-plain:hover { border-color: var(--line); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-group-text { height: 35px; background: #f8fafc; border-color: var(--line-2); color: var(--muted); }
.required::after { content: ' *'; color: var(--danger); }

/* ---------- Yerleşim ---------- */
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--brand-dark); color: #cbd5e1; display: flex; flex-direction: column; z-index: 1040; transition: transform .2s ease; }
.app-sidebar .brand { height: var(--topbar-h); display: flex; align-items: center; gap: .6rem; padding: 0 1.1rem; color: #fff; font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.app-sidebar .brand .brand-logo { height: 26px; width: auto; }
.app-sidebar .brand .brand-mark { display: none; height: 28px; width: auto; }
.app-sidebar nav { padding: .8rem .6rem; overflow-y: auto; flex: 1; }
.app-sidebar .nav-label { font-size: .68rem; letter-spacing: .08em; color: #64748b; padding: .9rem .6rem .35rem; font-weight: 700; }
.app-sidebar .nav-link { color: #cbd5e1; border-radius: 6px; padding: .5rem .7rem; display: flex; align-items: center; gap: .65rem; font-weight: 600; font-size: .85rem; }
.app-sidebar .nav-link i { font-size: 1.05rem; opacity: .85; }
.app-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.app-sidebar .nav-link.active { background: var(--brand); color: #fff; }
.app-sidebar .sidebar-user { border-top: 1px solid rgba(255, 255, 255, .08); padding: .8rem 1rem; display: flex; align-items: center; gap: .6rem; font-size: .8rem; }
.app-sidebar .avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }

.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar { height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1020; }
.app-topbar .page-title { font-size: 1.05rem; margin: 0; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar .breadcrumb { margin: 0; font-size: .75rem; }
.app-content { padding: 1.25rem 1.5rem 2rem; flex: 1; min-width: 0; }
.sidebar-toggle { display: inline-flex; flex-shrink: 0; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    body.sidebar-open .app-sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; }
    .app-main { margin-left: 0; }
    .app-topbar { padding: 0 1rem; }
    .app-content { padding: 1rem; }
}

/* ---------- Kartlar ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.card-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: .75rem 1rem; display: flex; align-items: center; gap: .5rem; min-height: 50px; }
.card-header .card-title { margin: 0; font-size: .9rem; font-weight: 700; color: var(--ink); }
.card-body { padding: 1rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 340px; }
.toolbar .search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 2rem; }

.stat { padding: 1rem 1.1rem; }
.stat .label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.2; margin-top: .2rem; }
.stat .hint { font-size: .75rem; color: var(--muted); }

.empty-state { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ---------- Durum rozetleri ---------- */
.status-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { background: #f1f5f9; color: #475569; }
.status-sent { background: #e0f2fe; color: #0369a1; }
.status-viewed { background: #ede9fe; color: #6d28d9; }
.status-revised { background: #fef3c7; color: #b45309; }
.status-accepted { background: #dcfce7; color: #15803d; }
.status-rejected { background: #fee2e2; color: #b91c1c; }
.status-expired { background: #f3f4f6; color: #6b7280; }
.status-queued { background: #f1f5f9; color: #475569; }
.status-delivered { background: #dcfce7; color: #15803d; }
.status-failed, .status-bounced { background: #fee2e2; color: #b91c1c; }

/* ---------- Tabulator ---------- */
.data-grid { position: relative; }
.data-grid .tabulator { border: 0; background: transparent; font-size: .84rem; }
.data-grid .tabulator .tabulator-header { background: #f8fafc; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.data-grid .tabulator .tabulator-header .tabulator-col { background: #f8fafc; border-right: 0; }
.data-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: .55rem .65rem; }
.data-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-title { font-size: .72rem; letter-spacing: .02em; }
.data-grid .tabulator .tabulator-header .tabulator-col .tabulator-header-filter { margin-top: 4px; }
.data-grid .tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,
.data-grid .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select { border: 1px solid var(--line-2) !important; border-radius: 4px !important; padding: .15rem .4rem !important; font-size: .76rem !important; font-weight: 400; background: #fff; height: 26px; line-height: 1.2; box-shadow: none; }
.data-grid .tabulator .tabulator-tableholder .tabulator-table { background: transparent; }
.data-grid .tabulator-row { border-bottom: 1px solid #f1f5f9; background: #fff; min-height: 40px; }
.data-grid .tabulator-row.tabulator-row-even { background: #fff; }
.data-grid .tabulator-row .tabulator-cell { padding: .55rem .65rem; border-right: 0; }
.data-grid .tabulator-row.tabulator-selectable:hover { background: #f8fafc; cursor: pointer; }
.data-grid .tabulator-row.tabulator-selected { background: var(--brand-soft) !important; }
.data-grid .tabulator .tabulator-footer { background: #fff; border-top: 1px solid var(--line); padding: .45rem .75rem; font-weight: 400; color: var(--muted); }
.data-grid .tabulator .tabulator-footer .tabulator-page { border-radius: 4px; border: 1px solid var(--line); background: #fff; padding: .15rem .55rem; margin: 0 1px; color: var(--ink-2); }
.data-grid .tabulator .tabulator-footer .tabulator-page.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.data-grid .tabulator .tabulator-footer .tabulator-page-size { border: 1px solid var(--line); border-radius: 4px; padding: .15rem .3rem; }
.data-grid .tabulator .tabulator-placeholder span { color: var(--muted); font-weight: 400; font-size: .9rem; }
.data-grid .grid-loading { position: absolute; inset: 0; background: rgba(255, 255, 255, .55); display: grid; place-items: center; z-index: 10; }
.data-grid .grid-toolbar { padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.grid-card { overflow: hidden; }
.grid-card .data-grid .tabulator { border-radius: 0 0 var(--radius) var(--radius); }
.column-chooser { max-height: 320px; overflow-y: auto; min-width: 220px; }
.tabulator-menu { border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(15, 23, 42, .12); font-size: .84rem; }
.tabulator-menu .tabulator-menu-item { padding: .45rem .9rem; }
.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { background: var(--brand-soft); }
.tabulator-row .tabulator-cell.tabulator-row-header { border-right: 0; }

/* ---------- Bağlam menüsü ---------- */
.context-menu { position: fixed; z-index: 2000; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); padding: .3rem; font-size: .84rem; }
.context-menu button { display: flex; width: 100%; align-items: center; gap: .55rem; border: 0; background: transparent; padding: .45rem .65rem; border-radius: 5px; color: var(--ink-2); text-align: left; }
.context-menu button:hover:not(:disabled) { background: var(--brand-soft); color: var(--ink); }
.context-menu button:disabled { opacity: .45; }
.context-menu button.danger { color: var(--danger); }
.context-menu hr { margin: .3rem 0; border-color: var(--line); opacity: 1; }
.context-menu .shortcut { margin-left: auto; color: var(--muted); font-size: .72rem; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 10px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.modal-header { border-bottom: 1px solid var(--line); padding: .9rem 1.1rem; }
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-footer { border-top: 1px solid var(--line); padding: .7rem 1.1rem; }
.modal-footer.split { justify-content: space-between; }
.modal-backdrop.stacked { z-index: 1060; }
.modal.stacked { z-index: 1065; }

/* ---------- Seçici ---------- */
.picker-input { cursor: pointer; background: #fff !important; }
.picker-input.is-empty { color: var(--muted); }
.picker-basket { font-size: .8rem; color: var(--ink-2); }

/* ---------- intl-tel-input ---------- */
.iti { width: 100%; }
.iti__country-container { z-index: 3; }
.iti--detached-country-selector { z-index: 2100 !important; }
.iti__dropdown-content { border-radius: 6px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); }
.iti__search-input { font-size: .85rem; }
.phone-input.is-invalid .form-control { border-color: var(--danger); }

/* ---------- Zengin metin ---------- */
.rich-editor { border: 1px solid var(--line-2); border-radius: 6px; background: #fff; }
.rich-editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent); }
.rich-editor .re-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: #f8fafc; border-radius: 6px 6px 0 0; }
.rich-editor .re-toolbar button { border: 0; background: transparent; width: 30px; height: 28px; border-radius: 4px; color: var(--ink-2); }
.rich-editor .re-toolbar button:hover { background: #e2e8f0; }
.rich-editor .re-toolbar .sep { width: 1px; background: var(--line); margin: 4px 3px; }
.rich-editor .re-content { min-height: 110px; padding: .6rem .75rem; outline: none; overflow-y: auto; }
.rich-editor .re-content:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rich-editor .re-content p { margin: 0 0 .5rem; }
.rich-editor .re-content ul, .rich-editor .re-content ol { padding-left: 1.3rem; margin-bottom: .5rem; }
.rich-editor .re-tags { padding: 4px 6px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 4px; }
.rich-editor .re-tags button { border: 1px solid var(--line); background: #fff; border-radius: 4px; font-size: .7rem; padding: 1px 6px; color: var(--muted); }

/* ---------- Teklif ekranı ---------- */
.offer-lock { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 6px; padding: .55rem .8rem; font-size: .82rem; display: flex; gap: .5rem; align-items: center; }

.items-wrap { overflow-x: auto; }
.items-table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; }
.items-table th { font-size: .7rem; letter-spacing: .03em; color: var(--muted); font-weight: 700; padding: .5rem .35rem; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
.items-table td { padding: .3rem .25rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; background: #fff; }
.items-table tr.row-item:hover td { background: #fafbff; }
.items-table tr.row-group td { background: var(--brand-soft); }
.items-table tr.row-group input.form-control { font-weight: 700; color: var(--ink); background: transparent; }
.items-table tr.drag-over td { border-top: 2px solid var(--brand); }
.items-table tr.is-dragging td { opacity: .4; }
.items-table .form-control, .items-table .form-select { padding: .3rem .45rem; font-size: .83rem; min-height: 32px; }
.items-table .col-handle { width: 26px; text-align: center; color: var(--line-2); cursor: grab; padding-top: .55rem; }
.items-table .col-no { width: 34px; color: var(--muted); font-size: .78rem; padding-top: .55rem; }
.items-table .col-desc { min-width: 280px; }
.items-table .col-period { width: 120px; }
.items-table .col-qty { width: 160px; }
.items-table .col-price { width: 190px; }
.items-table .col-disc { width: 72px; }
.items-table .col-vat { width: 76px; }
.items-table .col-total { width: 130px; text-align: right; font-weight: 700; color: var(--ink); padding-top: .55rem; white-space: nowrap; }
.items-table .col-actions { width: 40px; text-align: right; }
.items-table .linked-badge { font-size: .65rem; color: var(--brand); background: var(--brand-soft); border-radius: 3px; padding: 0 .3rem; margin-left: .25rem; }
.items-table .detail-input { margin-top: .25rem; font-size: .78rem !important; color: var(--muted); resize: vertical; }
.items-table .sub-total { font-size: .7rem; color: var(--muted); font-weight: 400; }

/* Fiyat analizi */
.price-stat { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; background: #fff; min-width: 0; }
.price-stat .label { font-size: .7rem; color: var(--muted); font-weight: 600; }
.price-stat .value { font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-stat .hint { font-size: .72rem; color: var(--muted); }
.price-stat.low .value { color: var(--success); }
.price-stat.high .value { color: var(--danger); }
.history-table tbody tr { cursor: pointer; }
.history-table tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.totals-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; }
.totals-box .row-line { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; font-size: .85rem; }
.totals-box .row-line.discount { color: var(--danger); }
.totals-box .row-line.grand { border-top: 1px solid var(--line-2); margin-top: .35rem; padding-top: .55rem; font-size: 1.15rem; font-weight: 700; color: var(--ink); }

.side-list { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.side-list li { padding: .55rem 1rem; border-bottom: 1px solid #f1f5f9; display: flex; gap: .5rem; align-items: center; font-size: .82rem; }
.side-list li:last-child { border-bottom: 0; }
.side-list li:hover { background: #f8fafc; }

.action-bar { position: sticky; bottom: 0; z-index: 1010; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: .6rem 1.5rem calc(.6rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem -1.5rem -2rem; }
@media (max-width: 991.98px) { .action-bar { margin: 1rem -1rem -2rem; padding-left: 1rem; padding-right: 1rem; } }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); display: inline-block; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.4rem; font-size: .82rem; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 0; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.timeline li.ev-viewed .dot, .timeline li.ev-delivered .dot { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.timeline li.ev-opened .dot, .timeline li.ev-clicked .dot { background: #7c3aed; box-shadow: 0 0 0 1px #7c3aed; }
.timeline li.ev-failed .dot, .timeline li.ev-bounced .dot { background: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.timeline li.is-bot { opacity: .55; }

.track-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; color: var(--muted); }
.track-chip.on { color: var(--success); font-weight: 600; }

/* ---------- Giriş ---------- */

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 2200; display: flex; flex-direction: column; gap: .5rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast-item { background: var(--ink); color: #fff; border-radius: 8px; padding: .7rem .9rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .25); display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; animation: toast-in .18s ease-out; }
.toast-item i { font-size: 1.05rem; margin-top: 1px; }
.toast-item > div { white-space: pre-line; }
[data-field].is-invalid .form-control, [data-field].is-invalid .form-select { border-color: var(--bs-form-invalid-border-color); }
.toast-item.success i { color: #4ade80; }
.toast-item.warning i { color: #fbbf24; }
.toast-item.danger i, .toast-item.error i { color: #f87171; }
.toast-item.info i { color: #60a5fa; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.page-loading { position: fixed; inset: 0; background: rgba(255, 255, 255, .5); z-index: 2150; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

.d-contents { display: contents; }

/* ---------- Aylık teklif grafiği (tek seri) ---------- */
.month-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; height: 220px; padding-top: 4px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to top, var(--line) 1px, transparent 1px); background-size: 100% 25%; background-position: 0 -1px; }
.month-col { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; outline: none; }
.month-value { font-size: .75rem; font-weight: 600; color: var(--ink-2); height: 18px; }
.month-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px; }
.month-bar { width: 100%; max-width: 44px; background: var(--brand); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.month-col:hover .month-bar, .month-col:focus .month-bar { opacity: .82; }
.month-label { font-size: .72rem; color: var(--muted); margin-top: 6px; margin-bottom: -22px; white-space: nowrap; }
.month-tip { position: absolute; bottom: 60%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .75rem; padding: .4rem .55rem; border-radius: 6px; white-space: nowrap; z-index: 5; pointer-events: none; box-shadow: 0 6px 16px rgba(15, 23, 42, .2); }
.month-chart + details { margin-top: 30px !important; }

/* Birleşik alan: sayı + birim / fiyat + para birimi */
.joined { display: flex; }
.joined > :first-child { flex: 1 1 auto; min-width: 0; }
.joined > :first-child .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.joined > :last-child { flex: 0 0 auto; width: 68px; margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; background-color: #f8fafc; }
.joined > select:last-child { width: 72px; padding-right: 1.4rem; background-position: right .3rem center; }
.joined .form-control:focus, .joined .form-select:focus { position: relative; z-index: 2; }

/* Liste satır işlemleri */
.data-grid .tabulator-row .tabulator-cell.grid-actions { padding-top: .3rem; padding-bottom: .3rem; overflow: visible; }
.data-grid .grid-action-buttons { display: inline-flex; gap: 4px; justify-content: flex-end; }
.data-grid .tabulator .tabulator-header .tabulator-col.grid-actions { background: #f8fafc; border-left: 1px solid var(--line); box-shadow: -6px 0 8px -6px rgba(15, 23, 42, .18); }
.data-grid .tabulator-row .tabulator-cell.grid-actions { background: #fff; border-left: 1px solid var(--line); box-shadow: -6px 0 8px -6px rgba(15, 23, 42, .18); }
.data-grid .tabulator-row.tabulator-selectable:hover .tabulator-cell.grid-actions { background: #f8fafc; }
.data-grid .tabulator-row.tabulator-selected .tabulator-cell.grid-actions { background: var(--brand-soft); }

/* Müşteri kartı */
.customer-card { overflow: hidden; }
.cc-top { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cc-icon { width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; color: var(--muted); font-size: 1.05rem; }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.25rem; border-bottom: 1px dashed var(--line-2); flex-wrap: wrap; }
.cc-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.cc-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; flex-shrink: 0; }
.cc-type { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; }
.cc-title { font-size: 1.35rem; margin: .2rem 0 .1rem; word-break: break-word; }
.cc-subtitle { color: var(--muted); }
.cc-side { display: flex; align-items: center; gap: .8rem; min-width: 260px; }
.cc-side-icon { width: 48px; height: 48px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }
.cc-chip { display: inline-block; margin-top: .25rem; background: #f1f5f9; color: var(--ink-2); font-weight: 600; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; }
a.cc-chip:hover { background: var(--brand-soft); color: var(--brand); }
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; padding: .75rem 1.25rem 1rem; border-bottom: 1px solid var(--line); }
.cc-grid dl { margin: 0; }
.cc-grid dl > div { display: grid; grid-template-columns: 40% 60%; gap: .5rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.cc-grid dt { font-weight: 400; color: var(--muted); }
.cc-grid dd { margin: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-grid dd.text-wrap { white-space: normal; }
.cc-grid dd a { text-decoration: underline; }
.cc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; padding: 1rem 1.25rem 1.25rem; }
.cc-stat { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; background: #fff; text-align: left; font: inherit; color: inherit; }
button.cc-stat:hover { border-color: var(--brand); background: var(--brand-soft); }
.cc-stat-icon { width: 38px; height: 38px; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; color: var(--muted); font-size: 1.1rem; flex-shrink: 0; }
.cc-stat .label { display: block; font-size: .78rem; color: var(--muted); }
.cc-stat .value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.cc-stat .hint { display: block; font-size: .72rem; color: var(--muted); }
@media (max-width: 1199.98px) { .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .cc-grid { grid-template-columns: minmax(0, 1fr); } .cc-side { min-width: 0; } }

/* Yatay form: solda etiket, sağda alan */
.form-horizontal > .row { margin-bottom: .55rem; align-items: flex-start; }
.form-horizontal .col-form-label { font-weight: 600; font-size: .82rem; color: var(--ink-2); padding-bottom: 0; }
@media (max-width: 575.98px) { .form-horizontal .col-form-label { padding-top: 0; margin-bottom: .25rem; } }

/* Alt çizgili sekmeler */
.card-header.card-tabs { padding-top: 0; padding-bottom: 0; min-height: 52px; align-items: stretch; }
.card-header.card-tabs > .ms-auto { display: flex; align-items: center; flex-shrink: 0; }
/* min-width: 0 olmadan sekme listesi içerik genişliğinin altına inemez; dar ekranda sağdaki düğmenin altına girerdi. Artık kayar. */
.tabs-underline { display: flex; flex-wrap: nowrap; gap: .25rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs-underline::-webkit-scrollbar { display: none; }
/* Kayan şeridin devamı olan kenar soldurulur; sekme yazısı sert bir kesikle bitmez */
.tabs-underline.tab-fade-end { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.tabs-underline.tab-fade-start { mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.tabs-underline.tab-fade-start.tab-fade-end { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tabs-underline .nav-item { display: flex; }
.tabs-underline .nav-link {
    display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
    padding: 0 .85rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
    color: var(--muted); font-weight: 600; font-size: .875rem; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.tabs-underline .nav-link i { font-size: 1rem; }
.tabs-underline .nav-link:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.tabs-underline .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs-underline .nav-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 4px; }
.tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 .4rem; border-radius: 999px; background: #eef2f7; color: var(--ink-2); font-size: .72rem; font-weight: 700; }
.tabs-underline .nav-link.active .tab-count { background: var(--brand); color: #fff; }

/* Sayfa sekmeleri (kart dışı) */
.tabs-page { border-bottom: 1px solid var(--line); }
.tabs-page .nav-link { padding: .7rem .9rem; }

/* Kart içi sade liste tablosu */
.table-list > thead > tr > th { background: #f8fafc; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid var(--line); padding: .6rem .75rem; white-space: nowrap; }
.table-list > tbody > tr > td { padding: .6rem .75rem; border-color: #f1f5f9; }
.table-list > thead > tr > :first-child, .table-list > tbody > tr > :first-child { padding-left: 1.1rem; }
.table-list > thead > tr > :last-child, .table-list > tbody > tr > :last-child { padding-right: 1.1rem; }

/* Barkod ve seri */
.barcode-input .input-group-text { color: var(--ink-2); }
.barcode-input.flash-success .form-control { border-color: var(--success); box-shadow: 0 0 0 .2rem rgba(21, 128, 61, .18); }
.barcode-input.flash-danger .form-control { border-color: var(--danger); box-shadow: 0 0 0 .2rem rgba(185, 28, 28, .18); }
.serial-list { max-height: 320px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.serial-item { display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; font-size: .82rem; }
.serial-item:hover { background: var(--brand-soft); }
.stock-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 4px; background: #f1f5f9; color: var(--ink-2); white-space: nowrap; }
.stock-chip.low { background: #fef3c7; color: #92400e; }
.stock-chip.none { background: #fee2e2; color: #b91c1c; }

@media print {
    .app-sidebar, .app-topbar, .action-bar, .no-print, .toast-stack { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0 !important; }
    .card { box-shadow: none !important; }
}

/* ---------- Kenar çubuğu: gruplar ve daraltma ---------- */
/* Genişlik ve kenar boşluğu animasyonsuz değişir; animasyon tablo ve etiketlerin her karede yeniden yerleşmesine yol açıyordu */
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav .nav-link { width: 100%; border: 0; background: transparent; text-align: left; white-space: nowrap; }
.sidebar-nav .nav-text { overflow: hidden; text-overflow: ellipsis; }
.nav-group-toggle .nav-chevron { margin-left: auto; font-size: .75rem !important; opacity: .6; }
.nav-group.open > .nav-group-toggle .nav-chevron { transform: rotate(180deg); }
.nav-group.has-active > .nav-group-toggle { color: #fff; }
.nav-sub { display: none; padding: 2px 0 6px; }
.nav-group.open > .nav-sub { display: block; }
.nav-sub .nav-link { padding: .42rem .7rem .42rem 2.35rem; font-size: .82rem; font-weight: 500; position: relative; }
.nav-sub .nav-link i { font-size: .95rem; }
.nav-sub .nav-link::before { content: ''; position: absolute; left: 1.25rem; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .1); }
.nav-sub-title { display: none; }

.sidebar-collapse-btn { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); background: transparent; color: #94a3b8; padding: .6rem 1.1rem; font-size: .78rem; font-weight: 600; }
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255, 255, 255, .04); }

@media (min-width: 992px) {
    html.sidebar-collapsed { --sidebar-w: 68px; }
    html.sidebar-collapsed .app-sidebar .nav-text,
    html.sidebar-collapsed .app-sidebar .nav-chevron { display: none !important; }
    html.sidebar-collapsed .app-sidebar .brand { justify-content: center; padding: 0; }
    html.sidebar-collapsed .app-sidebar .brand .brand-logo { display: none; }
    html.sidebar-collapsed .app-sidebar .brand .brand-mark { display: block; }
    html.sidebar-collapsed .app-sidebar nav { overflow: visible; padding: .8rem .5rem; }
    html.sidebar-collapsed .sidebar-nav > .nav-link,
    html.sidebar-collapsed .nav-group-toggle { justify-content: center; padding: .6rem 0; position: relative; }
    html.sidebar-collapsed .sidebar-nav > .nav-link i,
    html.sidebar-collapsed .nav-group-toggle i { font-size: 1.2rem; }
    html.sidebar-collapsed .nav-group.has-active > .nav-group-toggle { background: var(--brand); }
    html.sidebar-collapsed .sidebar-user { justify-content: center; padding: .8rem 0; }
    html.sidebar-collapsed .sidebar-account { flex: none; }
    html.sidebar-collapsed .sidebar-collapse-btn { justify-content: center; padding: .6rem 0; }
    html.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

    /* Daraltılmışken grup alt menüsü sağda açılır */
    html.sidebar-collapsed .nav-group { position: relative; }
    html.sidebar-collapsed .nav-group > .nav-sub { display: none; position: absolute; left: calc(100% + 6px); top: 0; min-width: 230px; background: var(--brand-dark); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: .4rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); z-index: 1050; }
    html.sidebar-collapsed .nav-group > .nav-sub::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px; }
    html.sidebar-collapsed .nav-group:hover > .nav-sub,
    html.sidebar-collapsed .nav-group:focus-within > .nav-sub { display: block; }
    html.sidebar-collapsed .nav-sub .nav-text { display: inline !important; }
    html.sidebar-collapsed .nav-sub .nav-link { padding: .45rem .7rem; }
    html.sidebar-collapsed .nav-sub .nav-link::before { display: none; }
    html.sidebar-collapsed .nav-sub-title { display: block; padding: .35rem .7rem .45rem; font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: #64748b; text-transform: uppercase; }

    /* Tekil bağlantılar için ipucu */
    html.sidebar-collapsed .sidebar-nav > .nav-link[data-tooltip]:hover::after {
        content: attr(data-tooltip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
        background: var(--ink); color: #fff; padding: .3rem .6rem; border-radius: 6px; font-size: .78rem; white-space: nowrap; z-index: 1050; pointer-events: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar-collapse-btn { display: none; }
}

/* Teklif ekranı sekmeleri */
.offer-tabs .card-header.card-tabs { row-gap: 0; }

/* Müşteri → Cari Hesap: dönem ve para birimi solda, belge işlemleri sağda (tablo araç çubuğuyla aynı şerit) */
.statement-toolbar { justify-content: space-between; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.statement-toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.statement-period input[type="date"] { width: 140px; }
/* Açıklama sarar ama çok daralıp her kelimeyi alt satıra atmaz; sığmayan tablo yatay kayar */
.statement-description { min-width: 200px; }
@media (max-width: 575.98px) {
    .statement-toolbar > div { width: 100%; }
    .statement-period input[type="date"] { flex: 1 1 0; width: auto; min-width: 7.5rem; }
    .statement-actions .btn { flex: 1 1 auto; }
}
.print-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1.5rem; }
.print-options.single { grid-template-columns: minmax(0, 1fr); }
.print-option { display: flex; align-items: center; gap: .5rem; min-height: 38px; border-bottom: 1px dashed var(--line); }
@media (max-width: 767.98px) { .print-options { grid-template-columns: minmax(0, 1fr); } }

/* Genel arama */
/* Üst çubuk üç sütun: sol başlık, ortada sabit arama, sağda sayfa butonları */
.app-topbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 460px) minmax(0, 1fr); }
.topbar-start { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; min-width: 0; }
#global-search-root { min-width: 0; }
.global-search { position: relative; }
.global-search .gs-box { position: relative; display: flex; align-items: center; }
.global-search .gs-box > .bi-search { position: absolute; left: .75rem; color: var(--bs-secondary-color); pointer-events: none; }
.global-search .gs-box .form-control { padding-left: 2.2rem; padding-right: 4rem; height: 38px; background: var(--bs-tertiary-bg); border-color: transparent; border-radius: 10px; }
.global-search .gs-box .form-control:focus { background: var(--surface); border-color: var(--brand); }
.global-search .gs-box .form-control::-webkit-search-cancel-button { display: none; }
.global-search .gs-box > .spinner-border, .global-search .gs-box > .btn-close, .global-search .gs-kbd { position: absolute; right: .7rem; }
.global-search .gs-kbd { font-size: .68rem; padding: .1rem .35rem; background: var(--surface); color: var(--bs-secondary-color); border: 1px solid var(--line); border-radius: 5px; box-shadow: none; }
.gs-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 420px; max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); padding: .35rem; z-index: 1060; }
.gs-hint { padding: .9rem 1rem; color: var(--bs-secondary-color); font-size: .85rem; }
.gs-group + .gs-group { border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .25rem; }
.gs-group-title { display: flex; align-items: center; justify-content: space-between; padding: .4rem .65rem .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: var(--bs-secondary-color); }
.gs-group-title a { font-weight: 600; text-decoration: none; }
.gs-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .65rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.gs-item.active { background: var(--brand-soft); }
.gs-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-item-title { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-sub { font-size: .76rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-amount { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.gs-item mark { padding: 0; background: rgba(250, 204, 21, .45); color: inherit; border-radius: 2px; }
/* Katalog görselleri (stok kartı ve kategori): kapak ilk sıradadır, üzerine gelince işlemler çıkar */
.catalog-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.catalog-image { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bs-tertiary-bg); }
.catalog-image.cover { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.catalog-image img { display: block; width: 100%; height: 120px; object-fit: contain; background: #fff; }
.catalog-image figcaption { display: flex; align-items: center; justify-content: space-between; padding: .35rem .5rem; font-size: .75rem; }
.catalog-image-actions { position: absolute; inset: auto 0 34px 0; display: flex; justify-content: center; gap: .25rem; padding: .25rem; opacity: 0; transition: opacity .15s; }
.catalog-image:hover .catalog-image-actions, .catalog-image:focus-within .catalog-image-actions { opacity: 1; }
.catalog-image-actions .btn { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .35rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .18); }
.catalog-thumb { width: 34px; height: 34px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* Teklif satır önerileri (kalem tablosu): gs-panel görünümü, gövdeye taşınır ve açıklama kutusunun altına sabitlenir */
.line-suggest { position: fixed; top: 0; left: 0; right: auto; min-width: 0; max-height: min(60vh, 460px); }
.line-suggest .gs-item { cursor: pointer; }
.line-suggest .gs-item .btn-link { opacity: .55; }
.line-suggest .gs-item .btn-link:hover { opacity: 1; }
.line-suggest-hint { padding: .35rem .65rem .2rem; font-size: .72rem; color: var(--bs-secondary-color); border-top: 1px solid var(--line); margin-top: .25rem; }

@media (max-width: 767.98px) {
    .app-topbar { grid-template-columns: minmax(0, 1fr) auto auto; }
    #global-search-root { width: 38px; }
    .global-search:not(.open) .form-control { padding: 0; color: transparent; cursor: pointer; }
    .global-search:not(.open) .form-control::placeholder { color: transparent; }
    .global-search:not(.open) .gs-kbd, .global-search:not(.open) .btn-close { display: none; }
    .global-search.open { position: absolute; left: .75rem; right: .75rem; top: 9px; z-index: 1061; }
    .gs-panel { min-width: 0; }
}

/* Teklif ekleri */
.attach-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.attach-drop { margin: 1rem; padding: 1.4rem 1rem; border: 2px dashed var(--line-2); border-radius: 12px; text-align: center; color: var(--ink-2); cursor: pointer; background: var(--canvas); transition: border-color .15s, background-color .15s; }
.attach-drop > .bi { font-size: 1.9rem; color: var(--brand); display: block; margin-bottom: .25rem; }
.attach-drop:hover, .attach-drop:focus-visible, .attach-drop.dragging { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.attach-table td { vertical-align: middle; }
.attach-table .attach-title { border-color: transparent; background: transparent; padding: .1rem .35rem; margin-left: -.35rem; height: auto; font-size: .78rem; color: var(--ink-2); }
.attach-table .attach-title::placeholder { color: var(--muted); }
.attach-table .attach-title:hover { border-color: var(--line); }
.attach-table .attach-title:focus { border-color: var(--brand); background: var(--surface); }
.file-ext { width: 36px; height: 36px; border-radius: 8px; display: inline-grid; place-items: center; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #fff; background: #64748b; overflow: hidden; flex-shrink: 0; }
.file-ext[data-ext="pdf"] { background: #dc2626; }
.file-ext[data-ext="doc"], .file-ext[data-ext="docx"], .file-ext[data-ext="odt"], .file-ext[data-ext="rtf"] { background: #2563eb; }
.file-ext[data-ext="xls"], .file-ext[data-ext="xlsx"], .file-ext[data-ext="ods"], .file-ext[data-ext="csv"] { background: #16a34a; }
.file-ext[data-ext="ppt"], .file-ext[data-ext="pptx"] { background: #ea580c; }
.file-ext[data-ext="dwg"], .file-ext[data-ext="dxf"], .file-ext[data-ext="dwf"], .file-ext[data-ext="step"], .file-ext[data-ext="stp"], .file-ext[data-ext="igs"], .file-ext[data-ext="iges"], .file-ext[data-ext="skp"] { background: #7c3aed; }
.file-ext[data-ext="jpg"], .file-ext[data-ext="jpeg"], .file-ext[data-ext="png"], .file-ext[data-ext="webp"], .file-ext[data-ext="gif"], .file-ext[data-ext="tif"], .file-ext[data-ext="tiff"] { background: #0891b2; }
.file-ext[data-ext="zip"], .file-ext[data-ext="rar"], .file-ext[data-ext="7z"] { background: #a16207; }
.send-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; max-height: 240px; overflow-y: auto; }
.send-file { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; cursor: pointer; margin: 0; }
.send-file:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.send-file .form-check-input { margin: 0; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .attach-drop { transition: none; } }

/* Hesabım */
.sidebar-account { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1; color: inherit; text-decoration: none; border-radius: 8px; padding: .25rem; margin: -.25rem; }
.sidebar-account:hover, .sidebar-account.active { background: rgba(255, 255, 255, .08); }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }

/* Stok sayımı */
.count-scan { flex: 1 1 280px; max-width: 480px; }
.cc-stat.active { border-color: var(--brand); background: var(--brand-soft); }
.count-table .count-qty { max-width: 190px; margin-left: auto; flex-wrap: nowrap; }
.count-table tr.row-flash > td { animation: count-flash 1.6s ease-out; }
@keyframes count-flash { from { background: #dcfce7; } to { background: transparent; } }
.count-uncounted { max-height: 420px; overflow-y: auto; }
.serial-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; }
.serial-chip { display: inline-flex; align-items: center; gap: .15rem; font-family: var(--bs-font-monospace); font-size: .72rem; line-height: 1.5; padding: .05rem .45rem; border-radius: 4px; background: #dcfce7; color: #166534; border: 1px solid transparent; }
.serial-chip.extra { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.serial-chip.missing { background: #fee2e2; color: #b91c1c; text-decoration: line-through; }
.serial-chip-remove { border: 0; background: none; padding: 0; margin-right: -.2rem; color: inherit; opacity: .6; line-height: 1; }
.serial-chip-remove:hover { opacity: 1; }
.serial-chip-input { width: 130px; height: 24px; padding: 0 .4rem; font-size: .75rem; }
@media (prefers-reduced-motion: reduce) { .count-table tr.row-flash > td { animation: none; } }

/* Müşteri görüşmeleri */
.activity-list { list-style: none; margin: 0; padding: .75rem 1rem 1rem; }
.activity-list li { position: relative; display: flex; gap: .85rem; padding-bottom: 1rem; }
.activity-list li::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 1px; background: var(--line); }
.activity-list li:last-child { padding-bottom: 0; }
.activity-list li:last-child::before { display: none; }
.activity-icon { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #f1f5f9; color: var(--muted); font-size: 1rem; }
.act-call .activity-icon { background: #dcfce7; color: #15803d; }
.act-meeting .activity-icon { background: #ede9fe; color: #6d28d9; }
.act-email .activity-icon { background: #e0f2fe; color: #0369a1; }
.act-visit .activity-icon { background: #fef3c7; color: #b45309; }
.activity-body { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; background: #fff; }
.activity-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-height: 28px; }
.activity-type { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: none; }
.activity-subject { font-weight: 600; color: var(--ink); word-break: break-word; }
.activity-text { white-space: pre-line; word-break: break-word; margin-top: .3rem; color: var(--ink-2); }
.activity-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .45rem; font-size: .75rem; color: var(--muted); }

/* Bildirimler: üst çubuk zili, bildirim listesi, tercihler */
#notification-bell-root { display: flex; flex-shrink: 0; }
.notif-bell { position: relative; }
.notif-bell-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; color: var(--ink-2); }
.notif-bell.open .notif-bell-btn, .notif-bell-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.notif-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(390px, calc(100vw - 2rem)); max-height: min(75vh, 580px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); z-index: 1060; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.notif-head .btn-link { font-size: .78rem; font-weight: 600; }
.notif-list { overflow-y: auto; padding: .35rem; overscroll-behavior: contain; }
.notif-item { display: flex; align-items: flex-start; gap: .65rem; padding: .55rem .6rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.notif-item + .notif-item { margin-top: 2px; }
.notif-item:hover, .notif-item:focus-visible { background: var(--canvas); color: var(--ink-2); outline: none; }
.notif-item.unread { background: var(--brand-soft); }
.notif-item.unread:hover, .notif-item.unread:focus-visible { background: color-mix(in srgb, var(--brand-soft) 60%, var(--line)); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: .95rem; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.notif-icon.tone-success { background: #dcfce7; color: var(--success); }
.notif-icon.tone-danger { background: #fee2e2; color: var(--danger); }
.notif-icon.tone-warning { background: #fef3c7; color: var(--warning); }
.notif-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.notif-title { font-weight: 600; font-size: .84rem; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-body { margin-top: .1rem; font-size: .78rem; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { margin-top: .2rem; font-size: .72rem; color: var(--muted); }
.notif-dot { width: 8px; height: 8px; margin-top: .4rem; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.notif-empty { padding: 1.6rem 1rem; text-align: center; color: var(--muted); font-size: .85rem; }
.notif-foot { display: flex; align-items: center; justify-content: center; gap: .15rem; padding: .6rem; border-top: 1px solid var(--line); font-size: .82rem; font-weight: 600; border-radius: 0 0 12px 12px; }
.notif-foot:hover { background: var(--canvas); }
.data-grid .tabulator-row .tabulator-cell.notif-cell { white-space: normal; }
.notif-cell-text { min-width: 0; width: 100%; }
.data-grid .tabulator-row.notif-row-unread { background: color-mix(in srgb, var(--brand-soft) 55%, #fff); }
.data-grid .tabulator-row.notif-row-unread .notif-title { font-weight: 700; }
.notif-prefs { list-style: none; margin: 0; padding: 0; }
.notif-prefs li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.notif-prefs li:last-child { border-bottom: 0; }
.notif-prefs .form-switch { padding-left: 0; margin: 0; min-height: 0; }
.notif-prefs .form-switch .form-check-input { margin: 0; width: 2.4em; height: 1.3em; cursor: pointer; float: none; }
.push-status { display: flex; align-items: flex-start; gap: .75rem; }
.push-status > .bi { font-size: 1.4rem; line-height: 1; margin-top: .1rem; }
.fcm-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.fcm-checklist li { display: flex; align-items: center; gap: .45rem; font-size: .84rem; }
.fcm-steps { margin: 0; padding-left: 1.1rem; font-size: .8rem; color: var(--muted); }
.fcm-steps li + li { margin-top: .2rem; }
@media (max-width: 767.98px) {
    .notif-panel { position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 4px); left: .75rem; right: .75rem; width: auto; }
    .notif-prefs li { align-items: flex-start; }
}

/* ---------- Bugün ekranı ---------- */
.today-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.today-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.today-filter { --tone: var(--brand); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); gap: .5rem; border-radius: 999px; padding: .3rem .8rem; }
.today-filter b { color: var(--tone); }
.today-filter:hover { border-color: var(--line-2); background: var(--surface); }
.today-filter.active { background: var(--tone); border-color: var(--tone); color: #fff; }
.today-filter.active b { color: #fff; }
.today-filter.tone-danger { --tone: var(--danger); }
.today-filter.tone-warning { --tone: var(--warning); }
.today-filter.tone-info { --tone: #0369a1; }
.today-item { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; }
.today-item.bucket-overdue { background: color-mix(in srgb, var(--danger) 3%, var(--surface)); }
.today-mark { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; background: var(--line-2); }
.today-main { flex: 1 1 auto; min-width: 0; }
.today-title { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-title:hover { color: var(--brand) !important; }
.today-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.today-side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; flex-shrink: 0; }
.today-chip { --tone: var(--muted); display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; line-height: 1.4;
    color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--surface)); white-space: nowrap; }
.tone-danger { --tone: var(--danger); }
.tone-warning { --tone: var(--warning); }
.tone-info { --tone: #0369a1; }
.tone-success { --tone: var(--success); }
.tone-secondary { --tone: var(--muted); }
.today-mark.tone-danger, .today-mark.tone-warning, .today-mark.tone-info, .today-mark.tone-success, .today-mark.tone-secondary { background: var(--tone); }
.today-date { width: 44px; flex-shrink: 0; line-height: 1.2; }
.today-date .small { font-size: .68rem; }
@media (max-width: 575.98px) {
    .today-item { flex-wrap: wrap; }
    .today-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; padding-left: calc(4px + .75rem); }
}
.today-banner { border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.today-banner:hover { border-color: var(--brand); }
