/* BT Envanter Takip — AdminUIUX (mavi tema) esinli tasarım
   Tema: <html data-theme="light|dark"> ; boşsa sistem ayarı kullanılır. */
@import url("/vendor/fonts/opensans.css");

:root {
  --bg: #eef3fc;
  --bg-2: #d9e7fb;
  --surface: #ffffff;
  --surface-2: #f4f7fd;
  --surface-3: #e9effa;
  --border: #e1e8f4;
  --input-border: #d3dcec;
  --text: #1b2340;
  --muted: #657792;
  --faint: #8e9ab4;
  --primary: #0049e8;
  --primary-hover: #003fc7;
  --primary-ink: #ffffff;
  --primary-soft: rgba(0, 73, 232, .09);
  --primary-2: #4cbdff;
  --accent: #03045e;
  --accent-2: #ab13c5;
  --ok: #0f7b0f;       --ok-mark: #0ca30c;   --ok-soft: rgba(12, 163, 12, .11);
  --warn: #9a6400;     --warn-mark: #fab219; --warn-soft: rgba(250, 178, 25, .18);
  --danger: #c22f2f;   --danger-mark: #d03b3b; --danger-soft: rgba(208, 59, 59, .1);
  --kky: #7a2fa0;      --kky-soft: rgba(171, 19, 197, .1);
  --shadow: 0 1px 2px rgba(3, 4, 94, .04), 0 4px 18px rgba(0, 73, 232, .07);
  --shadow-lg: 0 18px 48px rgba(3, 4, 94, .22);
  --card-border: transparent;
  --radius: 14px;
  --r-sm: 9px;
  /* seri renkleri (dataviz referans paleti, doğrulanmış sıra) */
  --t-kasa: #2a78d6; --t-monitor: #eb6834; --t-yazici: #1baf7a; --t-tarayici: #eda100;
  --t-dizustu: #e87ba4; --t-net: #008300; --t-ups: #4a3aa7; --t-other: #8e9ab4;
  --grid: #e6ebf3;
  --tile-filter: none;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #01051b;
  --bg-2: #09113d;
  --surface: #0b1434;
  --surface-2: #111c44;
  --surface-3: #1a2653;
  --border: #1e2a57;
  --input-border: #2a3869;
  --text: #e9edfb;
  --muted: #a0abcb;
  --faint: #7280a8;
  --primary: #3d7bff;
  --primary-hover: #1960fa;
  --primary-ink: #ffffff;
  --primary-soft: rgba(61, 123, 255, .16);
  --primary-2: #4cbdff;
  --accent: #1d306f;
  --accent-2: #c95be0;
  --ok: #3fd13f;       --ok-mark: #0ca30c;   --ok-soft: rgba(12, 163, 12, .18);
  --warn: #fab219;     --warn-mark: #fab219; --warn-soft: rgba(250, 178, 25, .15);
  --danger: #ff7a7a;   --danger-mark: #d03b3b; --danger-soft: rgba(208, 59, 59, .2);
  --kky: #d79af0;      --kky-soft: rgba(201, 91, 224, .18);
  --shadow: none;
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --card-border: #18244f;
  --t-kasa: #3987e5; --t-monitor: #d95926; --t-yazici: #199e70; --t-tarayici: #c98500;
  --t-dizustu: #d55181; --t-net: #008300; --t-ups: #9085e9; --t-other: #7280a8;
  --grid: #1e2a57;
  --tile-filter: brightness(.62) invert(1) contrast(2.6) hue-rotate(200deg) saturate(.35) brightness(.75);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #01051b;
    --bg-2: #09113d;
    --surface: #0b1434;
    --surface-2: #111c44;
    --surface-3: #1a2653;
    --border: #1e2a57;
    --input-border: #2a3869;
    --text: #e9edfb;
    --muted: #a0abcb;
    --faint: #7280a8;
    --primary: #3d7bff;
    --primary-hover: #1960fa;
    --primary-ink: #ffffff;
    --primary-soft: rgba(61, 123, 255, .16);
    --primary-2: #4cbdff;
    --accent: #1d306f;
    --accent-2: #c95be0;
    --ok: #3fd13f;       --ok-mark: #0ca30c;   --ok-soft: rgba(12, 163, 12, .18);
    --warn: #fab219;     --warn-mark: #fab219; --warn-soft: rgba(250, 178, 25, .15);
    --danger: #ff7a7a;   --danger-mark: #d03b3b; --danger-soft: rgba(208, 59, 59, .2);
    --kky: #d79af0;      --kky-soft: rgba(201, 91, 224, .18);
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
    --card-border: #18244f;
    --t-kasa: #3987e5; --t-monitor: #d95926; --t-yazici: #199e70; --t-tarayici: #c98500;
    --t-dizustu: #d55181; --t-net: #008300; --t-ups: #9085e9; --t-other: #7280a8;
    --grid: #1e2a57;
    --tile-filter: brightness(.62) invert(1) contrast(2.6) hue-rotate(200deg) saturate(.35) brightness(.75);
    color-scheme: dark;
  }
}


* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg) linear-gradient(160deg, var(--bg) 0%, var(--bg) 35%, var(--bg-2) 100%) fixed;
  color: var(--text);
  font: 14.5px/1.5 "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { color: var(--text); letter-spacing: -.01em; }
.bi { display: inline-block; line-height: 1; font-size: 18px; flex: none; }
.bi.xs { font-size: 13px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.nowrap { white-space: nowrap; }
.grad-text { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 45%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand h1 { font-size: 18px; margin: 0; font-weight: 700; }
.brand p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------- layout ---------- */
.app { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .tb-brand { width: 32px; height: 32px; border-radius: 9px; }
.topbar .title { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .tb-search { display: none; }
.topbar .tb-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px; border-radius: 999px; }
.topbar .tb-user .uname { display: none; }
main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1320px; margin: 0 auto; }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: var(--faint); font-size: 11px; font-weight: 600; }
.tabbar a .bi { font-size: 20px; }
.tabbar a.active { color: var(--primary); }
.tabbar a.scan span.circle { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 8px 20px rgba(0, 73, 232, .35); }
.tabbar a.scan .bi { font-size: 22px; }

@media (min-width: 992px) {
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 16px; }
  .sidebar .brand { padding: 2px 6px; margin-bottom: 18px; }
  .sidebar .brand img { width: 40px; height: 40px; }
  .sidebar .brand h1 { font-size: 17px; color: var(--primary); }
  .sidebar .nav-h { font-size: 13px; font-weight: 700; color: var(--text); margin: 16px 8px 6px; }
  .sidebar .nav-h:first-of-type { margin-top: 0; }
  .sidebar a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px; }
  .sidebar a.nav .bi { font-size: 18px; width: 20px; text-align: center; }
  .sidebar a.nav:hover { color: var(--primary); background: var(--primary-soft); }
  .sidebar a.nav.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(0, 73, 232, .28); }
  .sidebar a.nav .cnt { margin-left: auto; font-size: 11.5px; font-weight: 700; background: var(--danger-soft); color: var(--danger); border-radius: 999px; padding: 1px 7px; }
  .sidebar a.nav.active .cnt { background: rgba(255,255,255,.2); color: #fff; }
  .sidebar .spacer { flex: 1; min-height: 16px; }
  .sidebar .side-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--card-border); font-size: 12.5px; color: var(--muted); }
  .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; padding: 16px 28px 4px; }
  .topbar .tb-brand, .topbar .title { display: none; }
  .topbar .tb-search { display: block; flex: 1; max-width: 460px; position: relative; }
  .topbar .tb-search .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
  .topbar .tb-search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--surface); padding: 0 14px 0 42px; box-shadow: var(--shadow); outline: none; }
  .topbar .tb-search input:focus { border-color: var(--primary); }
  .topbar .grow { flex: 1; }
  .topbar .tb-user .uname { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.2; padding-right: 6px; }
  .topbar .tb-user .uname small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
  .tabbar { display: none; }
  main { padding: 12px 28px 48px; width: 100%; }
}

/* ---------- ortak ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 16px; }
.page-head h1 { font-size: 21px; font-weight: 700; margin: 0; flex: 1; min-width: 180px; }
.page-head h1 small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 15px;
  border-radius: var(--r-sm); border: 1px solid var(--input-border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn .bi { font-size: 16px; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 12px rgba(0, 73, 232, .22); }
.btn.primary:hover { background: var(--primary-hover); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.sm .bi { font-size: 14px; }
.btn.icon { padding: 8px; width: 40px; }
.btn.sm.icon { width: 32px; padding: 5px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px 6px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.card-h h3 small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.card-b { padding: 10px 18px 18px; }
.section-title { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title .grow { flex: 1; display: flex; align-items: center; gap: 6px; }
.section-title .btn { text-transform: none; letter-spacing: normal; }

.avatar { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 12%, transparent); }
.avatar .bi { font-size: 19px; }
.avatar.lg { width: 56px; height: 56px; } .avatar.lg .bi { font-size: 24px; }
.avatar.xl { width: 72px; height: 72px; } .avatar.xl .bi { font-size: 30px; }
.avatar.sm { width: 32px; height: 32px; } .avatar.sm .bi { font-size: 15px; }
.avatar.solid { background: var(--c, var(--primary)); color: #fff; }
.avatar.photo { background: var(--surface-2) center / cover no-repeat; }
.avatar.user { background: linear-gradient(135deg, var(--primary), var(--accent-2)); color: #fff; font-weight: 700; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field > span:first-child { display: block; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--input-border);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--faint); font-weight: 400; }
.input-group { display: flex; gap: 6px; }
.input-group .input { flex: 1; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.error-msg { color: var(--danger); font-size: 13px; min-height: 18px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.kky { background: var(--kky-soft); color: var(--kky); }
.badge.sivil { background: var(--ok-soft); color: var(--ok); }
.badge.approx { background: var(--warn-soft); color: var(--warn); }

.t-kasa { --tc: var(--t-kasa); } .t-monitor { --tc: var(--t-monitor); } .t-yazici { --tc: var(--t-yazici); }
.t-tarayici { --tc: var(--t-tarayici); } .t-dizustu { --tc: var(--t-dizustu); } .t-net { --tc: var(--t-net); } .t-ups { --tc: var(--t-ups); }
.ticon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--tc, var(--t-other)); background: color-mix(in srgb, var(--tc, var(--t-other)) 13%, transparent); }
.ticon .bi { font-size: 18px; }

/* ---------- envanter ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbox { position: relative; flex: 1; }
.searchbox .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.searchbox .input { padding-left: 42px; min-height: 46px; font-size: 15.5px; border-color: var(--card-border); box-shadow: var(--shadow); }
.stats { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 8px; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat {
  flex: 1 0 auto; min-width: 128px; display: flex; align-items: center; gap: 11px; padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--card-border); border-radius: var(--radius); text-align: left; box-shadow: var(--shadow);
}
.stat .n { font-size: 20px; font-weight: 700; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.on { border-color: var(--tc, var(--primary)); }
.filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.filters select.input { min-height: 40px; font-size: 13.5px; padding: 7px 10px; border-color: var(--card-border); box-shadow: var(--shadow); }
@media (min-width: 700px) { .filters { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .filters { grid-template-columns: repeat(8, 1fr); } }
.filters.collapsed { display: none; }
@media (min-width: 992px) { .filters.collapsed { display: grid; } #filterToggle { display: none; } }
.result-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.result-bar .grow { flex: 1; }
.seg { display: inline-flex; border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--card-border); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--primary); color: #fff; }
.seg-lg { display: flex; }
.seg-lg button { flex: 1; padding: 9px 12px; font-size: 14px; justify-content: center; }

.dlist { display: flex; flex-direction: column; gap: 8px; }
.drow {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ic main right" "ic ids ids" "ic loc loc";
  gap: 3px 12px; align-items: start; padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.drow:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.drow > .ticon { grid-area: ic; }
.drow .main { grid-area: main; min-width: 0; }
.drow .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .sub2 { font-size: 12.5px; color: var(--muted); }
.drow .ids { grid-area: ids; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.drow .ids b { color: var(--text); font-weight: 600; }
.drow .loc { grid-area: loc; font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .right { grid-area: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dlist .thead { display: none; }
@media (min-width: 992px) {
  .dlist.table { gap: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--card-border); }
  .dlist.table .drow > *, .dlist.table .drow .ids { grid-area: auto; }
  .dlist.table .drow, .dlist.table .thead { grid-template-areas: none; grid-template-columns: 40px minmax(180px, 1.3fr) 110px 150px minmax(200px, 2fr) 110px; }
  .dlist.table .drow { align-items: center; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 9px 16px; gap: 12px; }
  .dlist.table .drow:last-child { border-bottom: 0; }
  .dlist.table .drow:hover { background: var(--surface-2); }
  .dlist.table .ticon { width: 36px; height: 36px; }
  .dlist.table .drow .ids { display: contents; }
  .dlist.table .drow .ids span { font-size: 13.5px; }
  .dlist.table .drow .ids .lbl { display: none; }
  .dlist.table .drow .loc { font-size: 13.5px; color: var(--muted); }
  .dlist.table .thead { display: grid; gap: 12px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .dlist.table .thead span { cursor: pointer; user-select: none; }
}
.group-h { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 8px; }
.group-h h3 { margin: 0; font-size: 14.5px; }
.group-h.il h2 { margin: 0; font-size: 18px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .bi { font-size: 34px; color: var(--faint); display: block; margin-bottom: 8px; }
.more-btn { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- birimler ---------- */
.il-block { margin-bottom: 20px; }
.il-head { display: flex; align-items: center; gap: 10px; padding: 8px 2px 10px; cursor: pointer; user-select: none; flex-wrap: wrap; }
.il-head h2 { margin: 0; font-size: 18px; }
.il-head .chev { transition: transform .15s; color: var(--faint); }
.il-block.closed .chev { transform: rotate(-90deg); }
.il-block.closed .bgrid { display: none; }
@media (max-width: 520px) { .il-head [data-ilf] span { display: none; } }
.bgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .bgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .bgrid { grid-template-columns: repeat(3, 1fr); } }
.bcard { display: flex; gap: 14px; padding: 14px; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.bcard:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.bcard .info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.bcard .bname { font-weight: 700; font-size: 14px; line-height: 1.3; }
.bcard .chips, .chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tc, var(--t-other)) 13%, transparent); color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tc, var(--t-other)); }
.bhead { display: flex; gap: 16px; align-items: center; }
.bhead .avatar { cursor: default; }

.info-grid { display: grid; grid-template-columns: 1fr; gap: 12px 24px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv .k { font-size: 11.5px; color: var(--faint); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kv .v { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pre { white-space: pre-wrap; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; box-shadow: var(--shadow); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konum-card { margin-bottom: 12px; overflow: hidden; }
.konum-card .kh { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; background: var(--surface-2); }
.konum-card .kh .grow { flex: 1; }
.konum-card .kh .konum-input { min-width: 0; height: 34px; padding: 4px 10px; font-weight: 600; }
.konum-card .drow, #netList .drow, #upsList .drow { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); box-shadow: none; }
.konum-card .drow:last-child, #netList .drow:last-child, #upsList .drow:last-child { border-bottom: 0; }
#netList, #upsList { overflow: hidden; }

/* ikon seçici */
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-pick button { height: 44px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); cursor: pointer; color: var(--muted); }
.icon-pick button .bi { font-size: 19px; }
.icon-pick button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--input-border); background: var(--sw); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--text); }
.icon-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); }

/* ---------- specs ---------- */
.specs { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.specs div { padding: 8px 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.specs .sk { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.specs .sfull { grid-column: 1 / -1; }
.specs div:nth-last-child(-n+2):not(.sfull), .specs .sfull:last-child { border-bottom: 0; }
.results { display: flex; flex-direction: column; gap: 8px; }
.result { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.result .rt { font-weight: 700; font-size: 14px; }
.result .ru { font-size: 12px; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .rs { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.pairs { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
.pairs label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; cursor: pointer; }
.pairs label:last-child { border-bottom: 0; }
.pairs input { margin-top: 3px; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 1000; background: rgba(3, 4, 40, .45); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { width: 100%; max-height: 94vh; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); animation: up .2s ease-out; }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal .mh h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .mb { padding: 18px; overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.modal .mf .grow { flex: 1; }
@media (min-width: 700px) {
  .modal-back { align-items: center; padding: 24px; }
  .modal { max-width: 740px; border-radius: 18px; max-height: 90vh; }
  .modal.wide { max-width: 1000px; }
  .modal.narrow { max-width: 480px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.lightbox img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.lightbox .lb-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); color: #fff; }
.lightbox .lb-bar .grow { flex: 1; min-width: 0; }
.lightbox .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }

/* ---------- tarama ---------- */
.scan-area { border-radius: 14px; overflow: hidden; background: #000; min-height: 220px; position: relative; }
.scan-area video { width: 100% !important; display: block; }
.scan-placeholder { display: grid; place-items: center; gap: 8px; align-content: center; min-height: 220px; color: #a9b4c2; text-align: center; padding: 20px; font-size: 14px; }
.scan-placeholder .bi { font-size: 34px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.token { border: 1px solid var(--input-border); background: var(--surface); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.token.hit { border-color: var(--ok-mark); background: var(--ok-soft); color: var(--ok); }
.ocr-preview { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; margin: 0 auto; }
.tabs { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.tabs button.on { background: var(--primary); color: #fff; }

/* ---------- açılır liste ---------- */
.combo { position: relative; flex: 1; min-width: 0; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px; }
.combo-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 11px; cursor: pointer; font-size: 14.5px; color: var(--text); font-weight: 500; border-radius: 8px; }
.combo-item small { color: var(--faint); font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-item:hover, .combo-item.on { background: var(--primary-soft); }
.combo-item.cur { font-weight: 700; color: var(--primary); }
.field-warn { color: var(--warn); font-size: 12.5px; font-weight: 600; }
.field-warn:empty { display: none; }
.ups-box { border: 1px solid color-mix(in srgb, var(--t-ups) 30%, var(--border)); background: color-mix(in srgb, var(--t-ups) 5%, var(--surface)); border-radius: 12px; padding: 14px; }
.ups-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--t-ups); margin-bottom: 10px; }

.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.doc { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.doc .dthumb { aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 4px; background: var(--surface-2) center / cover no-repeat; color: var(--danger); font-size: 12px; font-weight: 700; }
.doc .dthumb .bi { font-size: 32px; }
.doc .dmeta { padding: 7px 9px; font-size: 12px; }
.doc .dname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.doc .ddel { position: absolute; top: 5px; right: 5px; background: var(--surface); }

/* ---------- dashboard ---------- */
.dash-hero { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; margin: 6px 0 20px; }
.dash-hero h1 { margin: 0; font-size: 26px; font-weight: 500; line-height: 1.2; }
.dash-hero h1 b { font-size: 34px; font-weight: 700; display: block; }
.dash-hero p { margin: 6px 0 0; color: var(--muted); }
@media (min-width: 992px) { .dash-hero { grid-template-columns: 1fr auto; } .dash-hero h1 b { font-size: 42px; } }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(8, 1fr); } }
.kpi { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; color: var(--text); }
.kpi:hover { border-color: color-mix(in srgb, var(--c, var(--primary)) 40%, transparent); }
.kpi .kv2 { min-width: 0; }
.kpi .kl { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.kpi .kn { font-size: 22px; font-weight: 700; line-height: 1.2; }
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 992px) { .dash-grid.two { grid-template-columns: 1fr 1fr; } .dash-grid.wide-left { grid-template-columns: 1.6fr 1fr; } .dash-grid.three { grid-template-columns: repeat(3, 1fr); } }
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 30%) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; cursor: default; }
.bar-row .bl { display: flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bl .bi { color: var(--c); }
.bar-row .bt { height: 10px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-row .bt > div { height: 100%; background: var(--c, var(--primary)); border-radius: 4px; min-width: 3px; }
.bar-row .bv { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.bar-row .bv small { color: var(--faint); font-weight: 600; margin-left: 4px; }
a.bar-row { color: var(--text); cursor: pointer; border-radius: 6px; }
a.bar-row:hover .bl { color: var(--primary); }
.stack-row { display: grid; grid-template-columns: 76px 1fr 42px; align-items: center; gap: 10px; font-size: 13.5px; margin-bottom: 12px; }
.stack-row .sl { font-weight: 700; }
.stack-row .sv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 22px; gap: 2px; }
.stack > div { background: var(--tc); min-width: 2px; }
.stack > div:first-child { border-radius: 4px 0 0 4px; }
.stack > div:last-child { border-radius: 0 4px 4px 0; }
.stack > div:only-child { border-radius: 4px; }
.stack > div:hover { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--tc); }
.viz-tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--accent); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-lg); max-width: 260px; }
.viz-tip b { font-weight: 700; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; cursor: pointer; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .ft { font-weight: 600; }
.feed-item .fd { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed-item .fw { color: var(--faint); font-size: 12px; }
.alt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.alt-tile { border-radius: 12px; padding: 12px; background: var(--surface-2); text-align: center; cursor: pointer; }
.alt-tile .an { font-size: 22px; font-weight: 700; }
.alt-tile .al { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-list .mi { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; cursor: pointer; }
.mini-list .mi:last-child { border-bottom: 0; }
.mini-list .mi .grow { flex: 1; min-width: 0; }
.mini-list .mi .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .mi .t2 { font-size: 12.5px; color: var(--muted); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- harita ---------- */
.map-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 992px) { .map-wrap { grid-template-columns: 320px 1fr; } }
.map-box { height: 62vh; min-height: 380px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--card-border); background: var(--surface-2); }
.map-box.mini { height: 320px; min-height: 0; box-shadow: none; border: 0; border-radius: 12px; }
.map-box.pick { height: 360px; }
@media (min-width: 992px) { .map-box { height: calc(100vh - 170px); } }
.map-side { display: flex; flex-direction: column; gap: 12px; }
.map-side .list { max-height: 50vh; overflow: auto; }
.leaflet-container { font-family: inherit; background: var(--surface-2); }
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.45; }
.leaflet-popup-content b { font-size: 14px; }
.leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
.bmark { position: relative; }
.bmark .avatar { width: 38px; height: 38px; border: 3px solid var(--surface); box-shadow: 0 3px 10px rgba(3,4,94,.35); background-color: var(--surface); }
.bmark .avatar:not(.photo)::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--c) 15%, transparent); }
.bmark .avatar .bi { position: relative; z-index: 1; font-size: 16px; }
.bmark.approx .avatar { border-style: dashed; border-color: var(--warn-mark); }
.bmark .cnt { position: absolute; top: -6px; right: -8px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 6px; border: 2px solid var(--surface); }
.bmark.alarm .cnt { background: var(--danger-mark); }

/* ---------- içe aktarma ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 992px) { .steps { grid-template-columns: 1fr 1fr; } }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.drop { border: 2px dashed var(--input-border); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; display: block; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.drop .bi { font-size: 34px; display: block; margin-bottom: 6px; }
.prev-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prev-table th, .prev-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prev-table th { background: var(--surface-2); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; }
.prev-table tr.hata td { background: var(--danger-soft); }
.prev-table .msg { font-size: 12px; }
.prev-table .msg .e { color: var(--danger); display: block; }
.prev-table .msg .w { color: var(--warn); display: block; }

/* ---------- menü (mobil) ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.menu-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; color: var(--text); font-weight: 700; }
.menu-tile small { color: var(--muted); font-weight: 500; font-size: 12.5px; }

/* ---------- çeşitli ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 3000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 992px) { .toast-wrap { bottom: 24px; } }
.toast { background: var(--accent); color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; max-width: 520px; animation: up .2s; }
.toast.err { background: var(--danger-mark); }
.toast.ok { background: #0b7a0b; }
.history { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.history div { border-left: 3px solid var(--primary-soft); padding-left: 10px; }
.table-simple { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-simple th, .table-simple td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.table-simple th { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; justify-content: center; padding: 40px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.warn-box { background: var(--warn-soft); color: var(--warn); padding: 11px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500; margin-bottom: 12px; }
.model-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.model-row:last-child { border-bottom: 0; }
.model-row:hover { background: var(--surface-2); }
.model-row .grow { flex: 1; min-width: 0; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-pick button { border: 2px solid var(--input-border); background: var(--surface); border-radius: 12px; padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.theme-pick button .bi { font-size: 22px; }
.theme-pick button.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
/* Leaflet katmanlarının üst çubuk / alt menü üzerine çıkmasını engelle */
.map-box { position: relative; z-index: 0; isolation: isolate; }
/* Üst çubuk: masaüstünde en üstte saydam, kaydırınca buzlu cam zemin */
@media (min-width: 992px) {
  .topbar { transition: background-color .2s, box-shadow .2s, backdrop-filter .2s; }
  .topbar.scrolled {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 1px 0 var(--border), 0 6px 20px rgba(3, 4, 94, .08);
  }
}

/* ---------- depo / transfer / teknik destek ---------- */
.drow > .pick-ic { grid-area: ic; display: flex; align-items: center; gap: 10px; }
.drow input[type=checkbox], .pick-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex: none; }
.drow.picked { border-color: color-mix(in srgb, var(--primary) 55%, transparent); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
@media (min-width: 992px) {
  .dlist.table.picking .drow, .dlist.table.picking .thead { grid-template-columns: 68px minmax(180px, 1.3fr) 110px 150px minmax(200px, 2fr) 110px; }
  .dlist.table .drow.picked { background: var(--primary-soft); }
}
.sel-bar { position: sticky; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .15s; }
.sel-bar .btn { background: #fff; color: var(--primary); border-color: transparent; }
.sel-bar .btn.ghost { background: transparent; color: #fff; }
.sel-bar .grow { flex: 1; }
@media (min-width: 992px) { .sel-bar { bottom: 16px; } }
.pick-list { max-height: min(42vh, 380px); overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13.5px; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--surface-2); }
.pick-item.on { background: var(--primary-soft); }
.pick-item .grow { flex: 1; min-width: 0; }
.pick-item .ticon { width: 32px; height: 32px; }
.pick-item .ticon .bi { font-size: 15px; }
.tr-card { padding: 14px 16px; margin-bottom: 10px; }
.tr-h { display: flex; align-items: center; gap: 12px; }
.tr-h .grow { flex: 1; min-width: 0; }
.tr-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; font-weight: 600; font-size: 13.5px; }
.tr-route .place { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 8px; }
.tr-route > .bi { color: var(--primary); }
.tr-items { margin-top: 8px; font-size: 13px; }
.tr-items summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 12.5px; width: max-content; }
.tr-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.tr-item:last-child { border-bottom: 0; }
.tr-item[data-dev] { cursor: pointer; }
.tr-item .grow { flex: 1; min-width: 0; }
.tr-item .ticon { width: 30px; height: 30px; }
.tr-item .ticon .bi { font-size: 14px; }
.mini-list .mi.tk .tk-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.history div.sys { border-left-color: var(--surface-3); }
.history div.sys b { font-weight: 600; color: var(--muted); }
.history .pre { white-space: pre-wrap; }
.tk-filters select.input { width: auto; flex: 1 1 170px; }
@media (max-width: 640px) { .searchbar select.input { max-width: 40%; } }

/* ---------- kurum kimliği (TCDD logosu) ---------- */
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand img { width: 118px; height: auto; display: block; margin: 0 auto 16px; }
.login-brand img.btd-logo { width: 148px; height: 148px; border-radius: 50%; box-shadow: 0 8px 28px rgba(0, 79, 159, .25); }
.login-brand .kurum { font-size: 17px; font-weight: 800; color: #004f9f; letter-spacing: .01em; }
.login-brand .kurum-2 { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: .02em; margin-top: 2px; }
.login-brand p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
:root[data-theme="dark"] .login-brand .kurum { color: #6fa8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-brand .kurum { color: #6fa8ff; } }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  box-shadow: 0 1px 2px rgba(3, 4, 94, .08), 0 4px 12px rgba(0, 79, 159, .18); }
.brand .brand-logo img { width: 48px; height: 48px; border-radius: 50%; }
.sidebar .brand p { line-height: 1.3; }
.topbar .tb-brand { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 79, 159, .18); }
.tk-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tk-photos .ph { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; border: 1px solid var(--border); }
.tk-photos .ph .btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; border: 0; min-height: 28px; width: 28px; padding: 0; }
.tk-photos .ph.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; border: 2px dashed var(--input-border);
  color: var(--muted); font-size: 12px; font-weight: 600; background: transparent; }
.tk-photos .ph.add:hover { border-color: var(--primary); color: var(--primary); }
.tk-photos .ph.add .bi { font-size: 20px; }
:root[data-theme="dark"] .login-brand img:not(.btd-logo) { background: #fff; padding: 10px 16px; border-radius: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-brand img:not(.btd-logo) { background: #fff; padding: 10px 16px; border-radius: 18px; } }
