/* Netmax İş Takip — Bootstrap 5.3 üzerine tema.
   Renkler portal.netmax.tr tasarım sistemiyle aynı (docs/DESIGN-SYSTEM.md). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-bs-theme="light"] {
  --nx-bg: #f5f5f7;
  --nx-surface: #ffffff;
  --nx-muted-bg: #f8f8fa;
  --nx-border: #e6e5ea;
  --nx-border-strong: #cfcdd6;
  --nx-fg: #1f1d29;
  --nx-fg-muted: #5f5c6b;
  --nx-fg-subtle: #9a97a6;
  --nx-primary: #d1151e;
  --nx-primary-hover: #b3121a;
  --nx-primary-soft: #fdecec;
  --nx-primary-fg: #ffffff;
  --nx-brand: #ed1b24;
  --nx-success: #10b981;
  --nx-success-soft: #ecfdf5;
  --nx-success-fg: #047857;
  --nx-warning: #f59e0b;
  --nx-warning-soft: #fffbeb;
  --nx-warning-fg: #b45309;
  --nx-danger: #e11d48;
  --nx-danger-fg: #be123c;
  --nx-info: #3b82f6;
  --nx-sidebar-bg: #2b283a;
  --nx-sidebar-bg-2: #211e2c;
  --nx-sidebar-fg: #d9d7e0;
  --nx-sidebar-muted: #a19eb0;
  --nx-sidebar-active: rgb(237 27 36 / .18);
  --nx-sidebar-accent: #ff3b44;
  --nx-shadow: 0 1px 2px rgb(31 29 41 / .06), 0 1px 3px rgb(31 29 41 / .08);
  --nx-radius: .75rem;
  --nx-sidebar-w: 248px;
  --nx-bottom-nav-h: 64px;

  --bs-body-bg: var(--nx-bg);
  --bs-body-color: var(--nx-fg);
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-secondary-color: var(--nx-fg-muted);
  --bs-tertiary-color: var(--nx-fg-subtle);
  --bs-border-color: var(--nx-border);
  --bs-primary: var(--nx-primary);
  --bs-primary-rgb: 209, 21, 30;
  --bs-link-color: var(--nx-primary);
  --bs-link-color-rgb: 209, 21, 30;
  --bs-link-hover-color: var(--nx-primary-hover);
  --bs-link-hover-color-rgb: 179, 18, 26;
  --bs-danger: var(--nx-danger);
  --bs-danger-rgb: 225, 29, 72;
  --bs-success: var(--nx-success);
  --bs-success-rgb: 16, 185, 129;
  --bs-focus-ring-color: rgb(209 21 30 / .25);
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: var(--nx-radius);
  --bs-card-bg: var(--nx-surface);
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --nx-bg: #141219;
  --nx-surface: #1c1a24;
  --nx-muted-bg: #18161f;
  --nx-border: rgb(200 196 214 / .14);
  --nx-border-strong: rgb(200 196 214 / .28);
  --nx-fg: #ecebf0;
  --nx-fg-muted: #a6a3b3;
  --nx-fg-subtle: #75727f;
  --nx-primary: #ff5c63;
  --nx-primary-hover: #ff7a80;
  --nx-primary-soft: rgb(255 92 99 / .16);
  --nx-primary-fg: #1f0507;
  --nx-success-soft: rgb(52 211 153 / .16);
  --nx-success-fg: #6ee7b7;
  --nx-warning-soft: rgb(251 191 36 / .16);
  --nx-warning-fg: #fcd34d;
  --nx-danger: #fb7185;
  --nx-danger-fg: #fda4af;
  --nx-shadow: 0 1px 2px rgb(0 0 0 / .4);

  --bs-body-bg: var(--nx-bg);
  --bs-body-color: var(--nx-fg);
  --bs-secondary-color: var(--nx-fg-muted);
  --bs-border-color: var(--nx-border);
  --bs-primary-rgb: 255, 92, 99;
  --bs-link-color: var(--nx-primary);
  --bs-link-color-rgb: 255, 92, 99;
  --bs-link-hover-color: var(--nx-primary-hover);
  --bs-tertiary-bg: var(--nx-muted-bg);
  --bs-secondary-bg: #24212d;
  --bs-focus-ring-color: rgb(255 92 99 / .3);
  color-scheme: dark;
}

body {
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  min-height: 100dvh;
}

/* ---- Düğmeler ---------------------------------------------------- */
.btn { --bs-btn-font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--nx-primary);
  --bs-btn-border-color: var(--nx-primary);
  --bs-btn-color: var(--nx-primary-fg);
  --bs-btn-hover-bg: var(--nx-primary-hover);
  --bs-btn-hover-border-color: var(--nx-primary-hover);
  --bs-btn-hover-color: var(--nx-primary-fg);
  --bs-btn-active-bg: var(--nx-primary-hover);
  --bs-btn-active-border-color: var(--nx-primary-hover);
  --bs-btn-active-color: var(--nx-primary-fg);
  --bs-btn-disabled-bg: var(--nx-primary);
  --bs-btn-disabled-border-color: var(--nx-primary);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--nx-primary);
  --bs-btn-border-color: var(--nx-primary);
  --bs-btn-hover-bg: var(--nx-primary);
  --bs-btn-hover-border-color: var(--nx-primary);
  --bs-btn-hover-color: var(--nx-primary-fg);
  --bs-btn-active-bg: var(--nx-primary-hover);
  --bs-btn-active-color: var(--nx-primary-fg);
}
.btn-success {
  --bs-btn-bg: #059669;
  --bs-btn-border-color: #059669;
  --bs-btn-hover-bg: #047857;
  --bs-btn-hover-border-color: #047857;
  --bs-btn-active-bg: #047857;
}
.btn-soft {
  --bs-btn-bg: var(--nx-muted-bg);
  --bs-btn-border-color: var(--nx-border);
  --bs-btn-color: var(--nx-fg);
  --bs-btn-hover-bg: var(--nx-border);
  --bs-btn-hover-border-color: var(--nx-border-strong);
  --bs-btn-hover-color: var(--nx-fg);
  --bs-btn-active-bg: var(--nx-border);
}
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.form-control:focus, .form-select:focus { border-color: var(--nx-primary); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--nx-primary); border-color: var(--nx-primary); }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .3rem; }
.form-control, .form-select { background-color: var(--nx-surface); }

/* ---- İskelet ----------------------------------------------------- */
.app-shell { display: flex; min-height: 100dvh; }

.app-sidebar {
  width: var(--nx-sidebar-w);
  flex: 0 0 var(--nx-sidebar-w);
  background: linear-gradient(180deg, var(--nx-sidebar-bg), var(--nx-sidebar-bg-2));
  color: var(--nx-sidebar-fg);
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.app-sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--nx-sidebar-bg); --bs-offcanvas-color: var(--nx-sidebar-fg); }
@media (max-width: 991.98px) {
  .app-sidebar.offcanvas-lg { position: fixed; height: 100dvh; }
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1.1rem 1.25rem; color: #fff; text-decoration: none;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
  background: var(--nx-brand); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em;
}
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-size: 1rem; font-weight: 700; }
.brand-text small { color: var(--nx-sidebar-muted); font-size: .75rem; }

.side-nav { padding: .25rem .75rem 1rem; flex: 1; }
.side-nav .nav-section {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--nx-sidebar-muted); padding: 1rem .75rem .35rem; font-weight: 600;
}
.side-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .75rem; border-radius: .5rem;
  color: var(--nx-sidebar-fg); text-decoration: none; font-weight: 500; font-size: .9rem;
  border-left: 3px solid transparent;
}
.side-nav a .bi { font-size: 1.05rem; opacity: .85; }
.side-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.side-nav a.active { background: var(--nx-sidebar-active); color: #fff; border-left-color: var(--nx-sidebar-accent); }
.side-nav a.active .bi { color: var(--nx-sidebar-accent); opacity: 1; }
.side-nav .badge { margin-left: auto; }

.sidebar-footer { padding: .75rem 1rem 1rem; border-top: 1px solid rgb(255 255 255 / .08); font-size: .8125rem; }
.sidebar-footer .user-chip { display: flex; align-items: center; gap: .6rem; color: #fff; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 255 255 / .12); color: #fff; font-weight: 600; font-size: .85rem; flex: 0 0 34px;
}

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

.app-topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.25rem;
  background: color-mix(in srgb, var(--nx-bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--nx-border);
  min-height: 60px;
}
.app-topbar h1 { font-size: 1.125rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.app-topbar .subtitle { color: var(--nx-fg-muted); font-size: .8125rem; }
.app-topbar .title-link { flex-shrink: 0; display: inline-flex; padding: .15rem; border-radius: .375rem; color: var(--nx-fg-muted); font-size: 1.05rem; line-height: 1; text-decoration: none; }
.app-topbar .title-link:hover, .app-topbar .title-link:focus-visible { color: var(--bs-link-color); background: color-mix(in srgb, var(--nx-fg-muted) 12%, transparent); }
.app-content { padding: 1.25rem; flex: 1; }
@media (min-width: 1200px) { .app-content { padding: 1.5rem 2rem; } }

/* Telefon alt gezinme */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  height: calc(var(--nx-bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--nx-surface); border-top: 1px solid var(--nx-border);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .6875rem; font-weight: 500; color: var(--nx-fg-muted); text-decoration: none;
  background: none; border: 0; height: 100%;
}
.bottom-nav .bi { font-size: 1.3rem; line-height: 1; }
.bottom-nav a.active { color: var(--nx-primary); }
.bottom-nav .fab {
  width: 52px; height: 52px; border-radius: 16px; margin-top: -22px;
  background: var(--nx-primary); color: var(--nx-primary-fg); box-shadow: 0 6px 16px rgb(209 21 30 / .35);
  display: grid; place-items: center;
}
.bottom-nav .fab .bi { font-size: 1.6rem; }
@media (max-width: 991.98px) {
  .app-content { padding: 1rem .875rem calc(var(--nx-bottom-nav-h) + 1.5rem + env(safe-area-inset-bottom)); }
  .app-topbar { padding: .6rem .875rem; }
}

/* ---- Kartlar ----------------------------------------------------- */
.card { border-color: var(--nx-border); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); background: var(--nx-surface); }
.card-header { background: transparent; border-bottom-color: var(--nx-border); font-weight: 600; padding: .85rem 1rem; }
.section-title { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-fg-muted); margin: 1.25rem 0 .6rem; }

/* İş kartı: solda tip rengi şeridi */
.job-card {
  position: relative; border: 1px solid var(--nx-border); border-radius: var(--nx-radius);
  background: var(--nx-surface); box-shadow: var(--nx-shadow);
  padding: .9rem 1rem .9rem 1.15rem; overflow: hidden;
}
.job-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--type-color, var(--nx-border-strong));
}
.job-card + .job-card { margin-top: .75rem; }
.job-card .job-head { display: flex; align-items: flex-start; gap: .5rem; }
.job-card .job-title { font-weight: 650; font-size: 1rem; line-height: 1.3; margin: 0; word-break: break-word; }
.job-card .job-title a { color: inherit; text-decoration: none; }
.job-card .job-meta { color: var(--nx-fg-muted); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .3rem; }
.job-card .job-meta .bi { margin-right: .25rem; }
.job-card .job-notes { margin-top: .6rem; font-size: .875rem; display: grid; gap: .35rem; }
.job-card .job-notes dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-fg-subtle); font-weight: 600; }
.job-card .job-notes dd { margin: 0; white-space: pre-line; word-break: break-word; }
.job-card .job-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.job-card .job-actions .btn { min-height: 38px; }
.job-card.is-closed { opacity: .82; }
.job-index { margin-left: auto; font-size: .75rem; color: var(--nx-fg-subtle); font-variant-numeric: tabular-nums; }

.type-pill {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: color-mix(in srgb, var(--type-color, #6c757d) 14%, transparent);
  color: color-mix(in srgb, var(--type-color, #6c757d) 78%, var(--nx-fg));
  border: 1px solid color-mix(in srgb, var(--type-color, #6c757d) 30%, transparent);
}
[data-bs-theme="dark"] .type-pill {
  background: color-mix(in srgb, var(--type-color, #6c757d) 22%, transparent);
  color: color-mix(in srgb, var(--type-color, #6c757d) 40%, #fff);
  border-color: color-mix(in srgb, var(--type-color, #6c757d) 45%, transparent);
}
.type-pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--type-color, #6c757d); }

.status-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.status-open { background: var(--nx-warning-soft); color: var(--nx-warning-fg); }
.status-closed { background: var(--nx-success-soft); color: var(--nx-success-fg); }

/* Sayaç çipleri (tipe göre) */
.chip-row { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .4rem .75rem; border-radius: 999px; border: 1px solid var(--nx-border);
  background: var(--nx-surface); color: var(--nx-fg); text-decoration: none; font-size: .8125rem; font-weight: 500;
}
.chip .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--type-color, #6c757d); }
.chip .count { font-variant-numeric: tabular-nums; font-weight: 700; }
.chip.active { border-color: var(--nx-primary); background: var(--nx-primary-soft); }
.chip:hover { border-color: var(--nx-border-strong); color: var(--nx-fg); }

/* Gün seçici */
.day-switch { display: flex; align-items: center; gap: .5rem; }
.day-switch .btn { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; }
.day-switch input[type="date"] { max-width: 170px; }

/* İstatistik kutuları */
.stat {
  border: 1px solid var(--nx-border); border-radius: var(--nx-radius); background: var(--nx-surface);
  padding: .85rem 1rem; box-shadow: var(--nx-shadow); height: 100%;
}
.stat .label { color: var(--nx-fg-muted); font-size: .8125rem; font-weight: 500; }
.stat .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }

/* Tablolar */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--nx-muted-bg); margin: 0; }
.table > :not(caption) > * > * { padding: .65rem .75rem; border-bottom-color: var(--nx-border); vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nx-fg-muted); font-weight: 600; background: var(--nx-muted-bg); white-space: nowrap; }
.table thead th a { color: inherit; text-decoration: none; }
.table td.wrap { white-space: pre-line; min-width: 180px; max-width: 360px; }
.table-card { overflow: hidden; }

/* Boş durum */
.empty {
  text-align: center; padding: 2.5rem 1rem; color: var(--nx-fg-muted);
  border: 1px dashed var(--nx-border-strong); border-radius: var(--nx-radius); background: var(--nx-surface);
}
.empty .bi { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--nx-fg-subtle); }

/* Zaman çizelgesi */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: .45rem; top: .35rem; bottom: -.35rem; width: 2px; background: var(--nx-border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: .1rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--nx-surface); border: 3px solid var(--nx-border-strong); }
.timeline .tl-created .tl-dot { border-color: var(--nx-info); }
.timeline .tl-closed .tl-dot { border-color: var(--nx-success); }
.timeline .tl-reopened .tl-dot, .timeline .tl-deleted .tl-dot { border-color: var(--nx-danger); }
.timeline .tl-located .tl-dot { border-color: var(--nx-warning); }
.timeline .tl-head { font-size: .875rem; }
.timeline .tl-time { color: var(--nx-fg-subtle); font-size: .75rem; }
.timeline .tl-details { white-space: pre-line; color: var(--nx-fg-muted); font-size: .8125rem; margin-top: .15rem; }

/* Giriş */
.auth-wrap { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 1.1fr 1fr; } }
.auth-aside {
  display: none; background: linear-gradient(160deg, var(--nx-sidebar-bg), var(--nx-sidebar-bg-2) 70%);
  color: var(--nx-sidebar-fg); padding: 3rem; position: relative; overflow: hidden;
}
@media (min-width: 992px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside h2 { color: #fff; font-weight: 700; font-size: 2rem; letter-spacing: -.02em; max-width: 420px; }
.auth-aside .accent { color: var(--nx-sidebar-accent); }
.auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.auth-aside li { display: flex; gap: .6rem; align-items: center; color: var(--nx-sidebar-fg); }
.auth-aside li .bi { color: var(--nx-sidebar-accent); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .form-control { padding: .7rem .85rem; }

/* Harita */
.map-wrap { position: relative; border-radius: var(--nx-radius); overflow: hidden; border: 1px solid var(--nx-border); box-shadow: var(--nx-shadow); }
#map { height: min(70dvh, 640px); background: var(--nx-muted-bg); }
@media (max-width: 991.98px) { #map { height: calc(100dvh - 260px); min-height: 320px; } }
.mini-map { height: 220px; border-radius: .5rem; border: 1px solid var(--nx-border); }
.map-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .35); }
.map-pin span { display: block; transform: rotate(45deg); color: #fff; font-size: .7rem; font-weight: 700; text-align: center; line-height: 22px; }
.leaflet-container { font-family: inherit; }
[data-bs-theme="dark"] .leaflet-tile { filter: brightness(.75) contrast(1.1) saturate(.8); }

/* Bildirim kutusu */
.flash-stack { position: fixed; top: 70px; right: 1rem; left: auto; z-index: 1080; display: grid; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
@media (max-width: 991.98px) { .flash-stack { left: 1rem; right: 1rem; top: auto; bottom: calc(var(--nx-bottom-nav-h) + 1rem + env(safe-area-inset-bottom)); max-width: none; } }
.flash-stack .alert { box-shadow: 0 8px 24px rgb(0 0 0 / .15); margin: 0; display: flex; gap: .6rem; align-items: flex-start; }

.alert-success { --bs-alert-bg: var(--nx-success-soft); --bs-alert-color: var(--nx-success-fg); --bs-alert-border-color: transparent; }
.alert-warning { --bs-alert-bg: var(--nx-warning-soft); --bs-alert-color: var(--nx-warning-fg); --bs-alert-border-color: transparent; }
.alert-danger { --bs-alert-bg: color-mix(in srgb, var(--nx-danger) 12%, var(--nx-surface)); --bs-alert-color: var(--nx-danger-fg); --bs-alert-border-color: transparent; }
.alert-info { --bs-alert-bg: color-mix(in srgb, var(--nx-info) 12%, var(--nx-surface)); --bs-alert-color: var(--nx-fg); --bs-alert-border-color: transparent; }

.text-muted-2 { color: var(--nx-fg-subtle) !important; }
.min-w-0 { min-width: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.sticky-actions { position: sticky; bottom: 0; background: var(--nx-surface); padding: .75rem 0; border-top: 1px solid var(--nx-border); z-index: 5; }
@media (max-width: 991.98px) { .sticky-actions { bottom: calc(var(--nx-bottom-nav-h) + env(safe-area-inset-bottom)); margin: 0 -1rem; padding: .75rem 1rem; } }
.color-swatch { width: 1.4rem; height: 1.4rem; border-radius: .35rem; border: 1px solid var(--nx-border); display: inline-block; vertical-align: middle; }
.drag-handle { cursor: grab; color: var(--nx-fg-subtle); }
.sortable-ghost { opacity: .4; }
.offline-banner { display: none; background: var(--nx-warning-soft); color: var(--nx-warning-fg); text-align: center; font-size: .8125rem; padding: .35rem; font-weight: 500; }
body.is-offline .offline-banner { display: block; }

/* Yazdırma */
@media print {
  .app-sidebar, .app-topbar, .bottom-nav, .flash-stack, .no-print, .offline-banner { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .app-content { padding: 0 !important; }
  .card, .job-card { box-shadow: none; break-inside: avoid; }
}

/* Adres parçaları ve önizleme */
.addr-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.addr-chip { font-size: .75rem; padding: .05rem .5rem; border-radius: 999px; background: var(--nx-muted-bg); border: 1px solid var(--nx-border); color: var(--nx-fg-muted); }
.address-preview { font-size: .875rem; color: var(--nx-fg-muted); padding: .45rem .65rem; background: var(--nx-muted-bg); border: 1px dashed var(--nx-border-strong); border-radius: .5rem; }
.address-preview:empty { display: none; }
.building-badge { font-size: .75rem; color: var(--nx-fg-muted); text-decoration: none; }
.building-badge:hover { color: var(--nx-primary); }
/* Yaklaşık konum işaretçisi: soluk ve kesik çerçeveli */
.map-pin.is-approx { opacity: .55; border-style: dashed; }

/* Müdahale süresi */
.sla-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.sla-overdue { background: var(--nx-danger); color: #fff; }
.sla-today { background: color-mix(in srgb, var(--nx-danger) 14%, var(--nx-surface)); color: var(--nx-danger-fg); border: 1px solid color-mix(in srgb, var(--nx-danger) 35%, transparent); }
.sla-soon { background: var(--nx-warning-soft); color: var(--nx-warning-fg); }
.sla-ok { background: var(--nx-muted-bg); color: var(--nx-fg-muted); border: 1px solid var(--nx-border); }
.job-card.is-urgent { border-color: color-mix(in srgb, var(--nx-danger) 55%, var(--nx-border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--nx-danger) 25%, transparent), var(--nx-shadow); }
tr.is-urgent > td:first-child { box-shadow: inset 3px 0 0 var(--nx-danger); }
.timeline .tl-urgent .tl-dot { border-color: var(--nx-danger); background: var(--nx-danger); }
.meta-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--nx-border-strong); }
.meta-link:hover { color: var(--nx-primary); }
.chip.chip-urgent { border-color: var(--nx-danger); color: var(--nx-danger-fg); }
.chip.chip-urgent .count { color: var(--nx-danger); }
.map-pin.is-urgent { box-shadow: 0 0 0 3px var(--nx-danger), 0 2px 6px rgb(0 0 0 / .35); opacity: 1; }
.legend-pin { display: inline-block; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--nx-primary); border: 2px solid #fff; vertical-align: -1px; margin-right: .25rem; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.legend-pin.is-approx { opacity: .55; border-style: dashed; }
.legend-pin.is-urgent { box-shadow: 0 0 0 2px var(--nx-danger); }

/* Akıllı adres girişi */
.smart-address { position: relative; }
.smart-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 1050; max-height: 260px; overflow: auto; margin-top: .25rem; border-radius: .5rem; background: var(--nx-surface); border: 1px solid var(--nx-border-strong); box-shadow: 0 10px 28px rgb(0 0 0 / .25) !important; }
.smart-suggest .list-group-item { background: var(--nx-surface); color: var(--nx-fg); border-color: var(--nx-border); }
.smart-suggest .list-group-item { cursor: pointer; padding: .45rem .75rem; font-size: .875rem; display: flex; gap: .5rem; align-items: center; }
.smart-suggest .list-group-item.active { background: color-mix(in srgb, var(--nx-primary) 14%, var(--nx-surface)); color: var(--nx-fg); border-color: var(--nx-border); }
.smart-suggest .kind { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--nx-fg-subtle); min-width: 4.5rem; }
.smart-suggest mark { padding: 0; background: none; color: var(--nx-primary); font-weight: 600; }
.address-analysis:empty { display: none; }
.address-analysis { border: 1px solid var(--nx-border); border-radius: .5rem; padding: .5rem .65rem; background: var(--nx-muted-bg); font-size: .8125rem; }
.address-analysis .parsed { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.address-analysis .part { display: inline-flex; gap: .25rem; align-items: baseline; padding: .1rem .5rem; border-radius: 999px; background: var(--nx-surface); border: 1px solid var(--nx-border); }
.address-analysis .part small { color: var(--nx-fg-subtle); font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; }
.address-analysis .part.is-new { border-color: var(--nx-primary); }
.address-analysis .quality { font-weight: 600; margin-right: .25rem; }
.address-analysis .q-full { color: var(--nx-success-fg); }
.address-analysis .q-street, .address-analysis .q-neighborhood { color: var(--nx-warning-fg); }
.address-analysis .q-none { color: var(--nx-danger-fg); }
.address-analysis .suggest-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .4rem; }
.field-manual { box-shadow: inset 3px 0 0 var(--nx-info); }

/* ISS Manager: iş formundaki abone kartı ve iş detayındaki bağlantı kontrolü */
.iss-box { background: var(--nx-muted-bg); }
.iss-box.iss-found { border-color: color-mix(in srgb, var(--nx-success) 40%, var(--nx-border)) !important; }
.iss-box.iss-error { border-color: color-mix(in srgb, var(--nx-danger) 40%, var(--nx-border)) !important; }
.iss-box .bi, .conn-card .bi { margin-right: .15rem; }
.conn-card { background: var(--nx-muted-bg); max-width: 34rem; }
.conn-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: var(--nx-fg-subtle); }
.conn-success { border-color: color-mix(in srgb, var(--nx-success) 45%, var(--nx-border)) !important; }
.conn-success .conn-dot { background: var(--nx-success); box-shadow: 0 0 0 .2rem var(--nx-success-soft); }
.conn-danger { border-color: color-mix(in srgb, var(--nx-danger) 45%, var(--nx-border)) !important; }
.conn-danger .conn-dot { background: var(--nx-danger); }
.conn-warning { border-color: color-mix(in srgb, var(--nx-warning) 45%, var(--nx-border)) !important; }
.conn-warning .conn-dot { background: var(--nx-warning); }

/* Müşteri adı ve adres büyük harfle kaydedilir; yazarken de öyle görünsün (ipucu metni hariç) */
#job-form #customer_name, #job-form #address { text-transform: uppercase; }
#job-form #customer_name::placeholder, #job-form #address::placeholder { text-transform: none; }

/* İş formu: kaydet düğmeleri üstte ve altta */
.form-actions { background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); padding: .6rem .75rem; }
@media (max-width: 575.98px) {
  .form-actions-buttons { flex-basis: 100%; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* Kilitli tarih/saat: değiştirilemediği belli olsun */
.datetime-lock input[readonly] { background: var(--nx-muted-bg); color: var(--nx-fg-muted); cursor: not-allowed; }

/* Saha performansı: kürsü, değişim okları, dağılım çubukları */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: .75rem; }
.podium-step { flex: 1 1 0; max-width: 15rem; text-align: center; background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); padding: .9rem .6rem 0; overflow: hidden; }
.podium-step.is-me { box-shadow: 0 0 0 2px var(--nx-primary); }
.podium-cup { font-size: 2rem; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.podium-cup span { font-size: .85rem; font-weight: 700; }
.podium-name { font-weight: 600; margin-top: .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-size: .9rem; }
.podium-score strong { font-size: 1.4rem; }
.podium-base { margin: .6rem -.6rem 0; }
.podium-gold .podium-cup { color: #d4a017; } .podium-gold .podium-base { height: 3.2rem; background: linear-gradient(#f6d365, #e6b422); }
.podium-silver .podium-cup { color: #9aa3ad; } .podium-silver .podium-base { height: 2.2rem; background: linear-gradient(#e2e6ea, #b8c0c8); }
.podium-bronze .podium-cup { color: #b0703b; } .podium-bronze .podium-base { height: 1.5rem; background: linear-gradient(#e7b98f, #c98a55); }
.medal-gold { color: #d4a017; } .medal-silver { color: #9aa3ad; } .medal-bronze { color: #b0703b; }
.trend { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.trend-up { color: var(--nx-success-fg); } .trend-down { color: var(--nx-danger-fg); } .trend-flat { color: var(--nx-fg-subtle); }
.spark polyline { fill: none; stroke: var(--nx-primary); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.dist-bar { height: .5rem; background: var(--nx-muted-bg); border-radius: 999px; overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--nx-primary); border-radius: 999px; }
.dist-bar span.is-unassigned { background: var(--nx-danger); }
.stat-card.stat-danger { border-color: color-mix(in srgb, var(--nx-danger) 40%, var(--nx-border)); }
@media (max-width: 575.98px) { .podium { gap: .4rem; } .podium-cup { font-size: 1.5rem; } .podium-score strong { font-size: 1.15rem; } }


/* İş atama penceresi */
.assign-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--nx-primary-soft); color: var(--nx-primary); font-weight: 700; }
#assign-modal .active-assignee { background: var(--nx-primary-soft); }

/* Dağıtım önizlemesi: mevcut + eklenecek yük */
.dist-stack { display: flex; }
.dist-stack span { border-radius: 0; }
.dist-stack span:first-child { background: var(--nx-fg-subtle); border-radius: 999px 0 0 999px; }
.dist-stack span.is-added { background: var(--nx-success); border-radius: 0 999px 999px 0; }
.justify-self-start { justify-self: start; }

/* Arıza radarı */
.radar { --radar-0: #d1151e; --radar-1: #2563eb; --radar-2: #16a34a; --radar-3: #d97706; --radar-4: #7c3aed; --radar-5: #0891b2; --radar-6: #db2777; --radar-7: #4b5563; }
.radar-calm { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: var(--nx-radius); background: var(--nx-success-soft); color: var(--nx-success-fg); font-weight: 500; }
.radar-alert { min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: var(--nx-radius); border: 1px solid; }
.radar-alert.radar-high { background: color-mix(in srgb, var(--nx-danger) 10%, var(--nx-surface)); border-color: color-mix(in srgb, var(--nx-danger) 45%, transparent); }
.radar-alert.radar-medium { background: var(--nx-warning-soft); border-color: color-mix(in srgb, var(--nx-warning) 45%, transparent); }
.radar-count { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.radar-pulse { width: .8rem; height: .8rem; border-radius: 50%; flex: none; background: var(--nx-warning); position: relative; }
.radar-high .radar-pulse { background: var(--nx-danger); }
.radar-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: radar-ping 1.6s ease-out infinite; }
@keyframes radar-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .radar-pulse::after { animation: none; } }
.radar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.radar-tile { border: 1px solid var(--nx-border); border-left: 4px solid var(--c); border-radius: var(--nx-radius); padding: .7rem .8rem; background: var(--nx-surface); }
.radar-tile > summary { list-style: none; cursor: pointer; }
.radar-tile > summary::-webkit-details-marker { display: none; }
.radar-tile.radar-high { box-shadow: 0 0 0 2px color-mix(in srgb, var(--nx-danger) 35%, transparent); }
.radar-tile.radar-medium { box-shadow: 0 0 0 2px color-mix(in srgb, var(--nx-warning) 35%, transparent); }
.radar-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); margin-top: .35rem; flex: none; }
.radar-big { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.radar-bar { height: .4rem; background: var(--nx-muted-bg); border-radius: 999px; overflow: hidden; }
.radar-bar span { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.radar-ap { font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: var(--nx-muted-bg); border: 1px solid var(--nx-border); white-space: nowrap; }
.radar-ap.is-hot { background: color-mix(in srgb, var(--nx-danger) 12%, var(--nx-surface)); border-color: color-mix(in srgb, var(--nx-danger) 40%, transparent); }
.radar-jobs li { padding: .15rem 0; border-top: 1px dashed var(--nx-border); }
.radar-map { height: 22rem; border-radius: var(--nx-radius); overflow: hidden; border: 1px solid var(--nx-border); position: relative; }
.radar-map-empty { position: absolute; inset: auto 0 0 0; z-index: 500; text-align: center; font-size: .8rem; padding: .4rem; background: color-mix(in srgb, var(--nx-surface) 85%, transparent); }

/* Bugün: öncelik panosu */
.today-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 767.98px) { .today-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.today-stat { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
.today-stat:hover { border-color: var(--nx-primary); color: inherit; }
.today-stat.is-danger { border-color: color-mix(in srgb, var(--nx-danger) 45%, var(--nx-border)); background: color-mix(in srgb, var(--nx-danger) 7%, var(--nx-surface)); }
.today-stat.is-danger .value { color: var(--nx-danger-fg); }
.today-row { display: flex; align-items: flex-start; gap: .6rem; border-left: 3px solid transparent; }
.today-row.is-urgent { border-left-color: var(--nx-danger); }
.today-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--type-color); margin-top: .45rem; flex: none; }
.flex-none { flex: none; }
.today-rank { display: flex; align-items: baseline; gap: .25rem; font-weight: 700; line-height: 1; }
.today-rank span { font-size: 2.4rem; letter-spacing: -.03em; }
.today-rank small { color: var(--nx-fg-muted); font-weight: 500; }
.today-rank .bi { font-size: 1.6rem; align-self: center; }
.rank-1 { color: #d4a017; } .rank-2 { color: #9ca3af; } .rank-3 { color: #b87333; }
.today-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.6rem, 1fr)); gap: .5rem; text-align: center; }
.today-kpis > div { background: var(--nx-muted-bg); border-radius: var(--nx-radius); padding: .5rem .25rem; }
.today-kpis strong { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.today-kpis span { font-size: .72rem; color: var(--nx-fg-muted); }
.device-peek { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: var(--nx-fg-muted); background: var(--nx-muted-bg); cursor: pointer; vertical-align: middle; }
.device-peek:hover, .device-peek:focus { color: var(--nx-primary); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--nx-primary) 40%, transparent); }
.popover { --bs-popover-border-color: color-mix(in srgb, var(--nx-primary) 35%, var(--nx-border)); --bs-popover-header-bg: var(--nx-muted-bg); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .25); font-weight: 500; }
.team-rank { width: 1.4rem; text-align: center; flex: none; color: var(--nx-fg-muted); font-weight: 600; }
.ms-team { margin-left: 1.9rem; }
.radar-jobs li.is-closed a { color: var(--nx-fg-muted); text-decoration: line-through; }
.radar-actions { border-top: 1px dashed var(--nx-border); }
.radar-actions .form-select, .radar-actions .form-control { min-width: 0; }

/* Kronik istasyonlar ve arıza saatleri */
.chronic-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.6rem; vertical-align: middle; }
.chronic-spark span { width: 6px; background: var(--nx-primary); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.chronic-spark span.is-zero { background: var(--nx-border-strong); opacity: .5; }
.heat { display: grid; grid-template-columns: 2.2rem repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .68rem; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--nx-danger) calc(var(--v, 0) * 100%), var(--nx-muted-bg)); }
.heat-day { color: var(--nx-fg-muted); align-self: center; }
.heat-hour { color: var(--nx-fg-muted); text-align: center; }

/* Bildirim / uygulama daveti */
.engage-card { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--nx-radius);
  border: 1px solid color-mix(in srgb, var(--nx-primary) 35%, var(--nx-border)); background: color-mix(in srgb, var(--nx-primary) 6%, var(--nx-surface)); }
.engage-steps { padding-left: 1.2rem; font-size: .875rem; display: grid; gap: .2rem; }
.engage-steps .bi { color: var(--nx-primary); }
.radar-grow { flex: 1 1 10rem; }

/* Canlı radar */
.live-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 767.98px) { .live-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.live-tile.is-alert { border-color: color-mix(in srgb, var(--nx-danger) 50%, var(--nx-border)); background: color-mix(in srgb, var(--nx-danger) 8%, var(--nx-surface)); }
.live-tile.live-down .value { color: var(--nx-danger-fg); }
.live-tile.live-weak .value { color: var(--nx-warning-fg); }
.live-tile.live-up .value { color: var(--nx-success-fg); }
.live-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #9ca3af; vertical-align: middle; flex: none; }
.live-dot.live-up { background: #16a34a; } .live-dot.live-weak { background: #f59e0b; } .live-dot.live-down { background: #dc2626; } .live-dot.live-none { background: var(--nx-muted-bg); border: 1px solid var(--nx-border); }
.live-routers { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; align-items: start; }
.live-router { border: 1px solid var(--nx-border); border-left: 4px solid #9ca3af; border-radius: var(--nx-radius); padding: .65rem .75rem; background: var(--nx-surface); min-width: 0; }
.live-router.live-up { border-left-color: #16a34a; } .live-router.live-weak { border-left-color: #f59e0b; } .live-router.live-down { border-left-color: #dc2626; box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 30%, transparent); }
.live-chip { font-size: .72rem; padding: .12rem .45rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.live-chip.live-up { background: color-mix(in srgb, #16a34a 15%, var(--nx-surface)); color: var(--nx-success-fg); border-color: color-mix(in srgb, #16a34a 35%, transparent); }
.live-chip.live-weak { background: color-mix(in srgb, #f59e0b 18%, var(--nx-surface)); color: var(--nx-warning-fg); border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
.live-chip.live-down { background: #dc2626; color: #fff; }
.live-chip.live-unknown { background: var(--nx-muted-bg); color: var(--nx-fg-muted); border-color: var(--nx-border); }
.live-days { display: flex; align-items: flex-end; gap: 3px; height: 9rem; }
.live-day { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.live-day .bar { width: 100%; max-width: 1.4rem; background: #dc2626; border-radius: 3px 3px 0 0; opacity: .85; }
.live-day .bar.is-empty { background: var(--nx-border-strong); opacity: .4; }
.live-day small { font-size: .6rem; line-height: 1.1; text-align: center; color: var(--nx-fg-muted); margin-top: 2px; }
.heat-cell.is-empty { background: transparent; border: 1px dashed var(--nx-border); }
.live-timeline { display: grid; grid-template-columns: 3.4rem repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .68rem; }
.live-cell { height: 1.1rem; border-radius: 3px; background: var(--nx-muted-bg); }
.live-cell.live-up { background: #16a34a; opacity: .75; } .live-cell.live-weak { background: #f59e0b; } .live-cell.live-down { background: #dc2626; } .live-cell.live-unknown { background: #9ca3af; opacity: .5; }
.radar-pulse.is-warn { background: var(--nx-warning); }
.radar-pulse.is-down { background: var(--nx-danger); }
/* Canlı radar: açılır router kutuları */
.live-router > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.live-router > summary::-webkit-details-marker { display: none; }
.live-router-badges { display: inline-flex; align-items: center; gap: .35rem; flex: none; }
.live-router-caret { color: var(--nx-fg-muted); transition: transform .15s; flex: none; }
.live-router[open] .live-router-caret { transform: rotate(180deg); }
.live-router[open] { grid-column: 1 / -1; }
.live-router:not([open]):hover { border-color: var(--nx-border-strong); }

/* İş tipi tanımları (formda çip seçimi) */
.def-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.def-chip { border: 1px solid var(--nx-border); background: var(--nx-surface); color: var(--nx-fg); border-radius: 999px; padding: .3rem .8rem; }
.def-chip:hover { border-color: var(--nx-primary); }
.btn-check:checked + .def-chip { background: var(--nx-primary); border-color: var(--nx-primary); color: #fff; }
.btn-check:focus-visible + .def-chip { box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--nx-primary) 35%, transparent); }
.def-chips.is-invalid .def-chip { border-color: var(--nx-danger); }
.def-pill { font-size: .75rem; color: var(--nx-fg-muted); }
.def-tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--nx-muted-bg); border: 1px solid var(--nx-border); color: var(--nx-fg); }
.def-tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--nx-muted-bg); border: 1px solid var(--nx-border); color: var(--nx-fg); }

/* Alt bilgi (telif) */
.app-footer { text-align: center; font-size: .75rem; color: var(--nx-fg-subtle); padding: .25rem 1rem 1.25rem; letter-spacing: .01em; }
@media (max-width: 991.98px) {
  .app-content { padding-bottom: 1rem; }
  .app-footer { padding-bottom: calc(var(--nx-bottom-nav-h) + 1rem + env(safe-area-inset-bottom)); }
}
.auth-footer { position: fixed; left: 0; right: 0; bottom: 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); }

/* Bildirimler: zil, menü, sayfa */
.notif-bell { position: relative; }
.notif-badge, .nav-badge { min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; font-size: .68rem; font-weight: 700; line-height: 1.15rem; text-align: center;
  background: var(--nx-fg-muted); color: var(--nx-surface); }
.notif-badge { position: absolute; top: -.35rem; right: -.35rem; }
.notif-badge.is-mine, .nav-badge.is-mine { background: var(--nx-danger); color: #fff; box-shadow: 0 0 0 2px var(--nx-surface); }
.side-nav a .nav-badge { margin-left: auto; }
.notif-menu { width: min(24rem, calc(100vw - 1.5rem)); max-height: min(32rem, 75vh); overflow: hidden; display: none; flex-direction: column; }
.notif-menu.show { display: flex; }
.notif-head { display: flex; align-items: center; gap: .5rem; padding: .65rem .85rem; border-bottom: 1px solid var(--nx-border); }
.notif-list { overflow-y: auto; }
.notif-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nx-fg-muted); padding: .5rem .85rem .25rem; }
.notif-item { display: flex; gap: .6rem; padding: .55rem .85rem; text-decoration: none; color: inherit; border-left: 3px solid transparent; }
.notif-item:hover { background: var(--nx-muted-bg); color: inherit; }
.notif-item.is-unread { background: color-mix(in srgb, var(--nx-primary) 5%, transparent); }
.notif-item.is-mine { border-left-color: var(--nx-primary); background: color-mix(in srgb, var(--nx-primary) 9%, transparent); }
.notif-icon { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--nx-muted-bg); flex: none; }
.notif-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--nx-fg-muted); }
.notif-label.is-mine { color: var(--nx-primary); }
.notif-page .notif-item { border-bottom: 1px solid var(--nx-border); padding: .75rem 1rem; }
.notif-page .notif-item:last-child { border-bottom: 0; }
/* Oturum ayrıntısı (kullanıcı düzenleme) */
.session-meta { display: grid; grid-template-columns: 6.5rem 1fr; gap: .1rem .75rem; margin-top: .35rem; }
.session-meta dt { font-weight: 500; color: var(--nx-fg-muted); }
.session-meta dd { margin: 0; min-width: 0; }
@media (max-width: 575.98px) { .session-meta { grid-template-columns: 1fr; } .session-meta dd { margin-bottom: .25rem; } }
.conn-history li + li { border-top: 1px dashed var(--nx-border); }
.calc-result { border: 1px solid var(--nx-border); border-radius: var(--nx-radius); padding: .75rem .9rem; background: var(--nx-muted-bg); }

/* Operatör kılavuzu: sabit yükseklikli kartlar, tamamı "Tümünü göster" penceresinde */
.wa-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.wa-bubble { background: #e7f8e0; color: #1f2d1b; border-radius: .75rem; border-top-left-radius: .2rem; padding: .6rem .8rem; }
[data-bs-theme="dark"] .wa-bubble { background: #1f3a2a; color: #e3f1e6; }
.guide-head { display: flex; align-items: center; gap: .5rem; }
.guide-body { display: flex; flex-direction: column; gap: .6rem; height: 19rem; overflow: hidden; }
.guide-text { flex: 1 1 auto; min-height: 0; overflow: hidden; font-size: .9rem; }
.guide-text.is-clipped { -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
.guide-thumb { position: relative; flex: none; display: block; width: 100%; height: 10.5rem; padding: 0; border: 0; border-radius: var(--nx-radius); overflow: hidden; background: #000; cursor: pointer; }
.guide-thumb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(.55); transform: scale(1.2); }
.guide-thumb-img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.guide-thumb.is-short .guide-thumb-img { width: auto; aspect-ratio: 9 / 16; margin-inline: auto; }
.guide-thumb[data-guide-open="view"] .guide-thumb-img { object-fit: contain; }
.guide-thumb:hover .guide-thumb-img, .guide-thumb:focus-visible .guide-thumb-img { transform: scale(1.03); }
.guide-thumb .yt-play { z-index: 1; width: 3.4rem; height: 2.4rem; font-size: 1.6rem; }
.guide-note { background: var(--nx-muted-bg); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); padding: .6rem .8rem; }
.guide-media { display: block; max-width: 100%; max-height: 70vh; margin-inline: auto; object-fit: contain; border-radius: var(--nx-radius); }
.guide-preview { min-height: 8rem; }
.yt-lite { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--nx-radius); overflow: hidden; background: #000; cursor: pointer; flex: none; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .15s; }
.yt-lite:hover img, .yt-lite:focus-visible img { opacity: 1; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 4.25rem; height: 3rem; border-radius: .9rem; background: #ff0033; color: #fff; display: grid; place-items: center; font-size: 2rem; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--nx-radius); background: #000; flex: none; }
.yt-lite.is-short, .yt-frame.is-short { aspect-ratio: 9 / 16; width: auto; height: min(70vh, 36rem); max-width: 100%; margin-inline: auto; }
.guide-more { flex: none; align-self: flex-end; margin-top: -.25rem; padding: 0; border: 0; background: none; color: var(--nx-primary); font-size: .85rem; font-weight: 500; }
.guide-more:hover, .guide-more:focus-visible { text-decoration: underline; }

/* Telefon menüsü: Santral ile ara / Normal ara (call.js). Geniş ekranda bağlantının altında, dar ekranda alttan açılır. */
.call-menu { position: fixed; z-index: 1085; width: 300px; background: var(--nx-surface); color: var(--nx-fg); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); box-shadow: 0 10px 30px rgb(31 29 41 / .18); padding: .35rem; }
.call-menu-head { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem .5rem; font-weight: 600; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--nx-border); margin-bottom: .25rem; }
.call-menu-item { display: flex; gap: .65rem; align-items: flex-start; width: 100%; padding: .55rem .6rem; border: 0; border-radius: .5rem; background: none; color: inherit; text-align: left; text-decoration: none; }
.call-menu-item:hover, .call-menu-item:focus-visible { background: var(--nx-muted-bg); color: inherit; }
.call-menu-item:disabled { opacity: .55; }
.call-menu-item > i { font-size: 1.15rem; color: var(--nx-primary); margin-top: .05rem; }
.call-menu-item small { display: block; color: var(--nx-fg-muted); font-size: .75rem; line-height: 1.3; }
@media (max-width: 575.98px) {
  .call-menu { left: .5rem !important; right: .5rem; bottom: calc(var(--nx-bottom-nav-h) + .5rem + env(safe-area-inset-bottom)); top: auto !important; width: auto; }
  .call-menu-item { padding: .8rem .7rem; }
}
.timeline .tl-pbx_call .tl-dot, .timeline .tl-phone_call .tl-dot { border-color: var(--nx-info); }

/* İş sayfası: santral görüşmeleri */
.call-list { list-style: none; margin: 0; padding: 0; }
.call-list li { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .15rem .5rem; padding: .55rem 0; border-bottom: 1px solid var(--nx-border); font-size: .8125rem; }
.call-list li:last-child { border-bottom: 0; }
.call-list .call-dir { font-size: 1rem; line-height: 1.2; }
.call-list .call-dir.is-in { color: var(--nx-info); }
.call-list .call-dir.is-out { color: var(--nx-success); }
.call-list .call-dir.is-missed { color: var(--nx-danger); }
.call-list .call-when { color: var(--nx-fg-subtle); font-size: .75rem; }
.call-list .call-side { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Telefon penceresi (Telsam WebPhone gömülü) */
.phone-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; margin: 0; background: #1a1a2e; overflow: hidden; }
.phone-bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; padding-top: calc(.55rem + env(safe-area-inset-top)); background: var(--nx-sidebar-bg); color: var(--nx-sidebar-fg); }
.phone-bar .small { color: var(--nx-sidebar-muted); }
.phone-bar .btn-soft { color: inherit; }
.phone-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--nx-warning); flex: none; }
.phone-dot[data-state="ready"] { background: var(--nx-success); }
.phone-dot[data-state="calling"], .phone-dot[data-state="incall"] { background: var(--nx-info); box-shadow: 0 0 0 4px rgb(59 130 246 / .3); }
.phone-dot[data-state="error"] { background: var(--nx-danger); }
.phone-context { display: flex; gap: .75rem; align-items: center; padding: .4rem .75rem; background: var(--nx-primary-soft); color: var(--nx-fg); font-size: .8125rem; }
.phone-context a { margin-left: auto; font-weight: 600; }
.phone-frame { flex: 1; width: 100%; border: 0; display: block; }
.phone-page .flash-stack { top: auto; bottom: 1rem; left: 1rem; right: 1rem; }
.phone-btn[data-state="ready"] i { color: var(--nx-success); }
.phone-btn[data-state="calling"] i, .phone-btn[data-state="incall"] i { color: var(--nx-info); }
.phone-btn[data-state="error"] i { color: var(--nx-danger); }

/* Santral arama penceresi (call.js): onay ve arama sürerken durum */
.call-dialog-number { font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-bottom: .25rem; }
.call-dialog-timer { font-size: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--nx-primary); line-height: 1.1; margin: .25rem 0 .5rem; }
.call-dialog-timer.is-ended { color: var(--nx-fg-muted); }
.call-dialog-leg { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-top: 1px solid var(--nx-border); font-size: .875rem; }
.call-dialog-leg strong { font-weight: 600; text-align: right; }
