/* LIVAMAP mobil arayüz — temiz, yüksek kontrast, Türkçe öncelikli */

:root {
  --lm-ink: #12202b;
  --lm-muted: #5b6b78;
  --lm-line: #d7dee5;
  --lm-bg: #eef2f4;
  --lm-card: #ffffff;
  --lm-primary: #0f6a6e;
  --lm-primary-strong: #0b5356;
  --lm-primary-soft: #e3f3f3;
  --lm-ok: #1b8a5a;
  --lm-ok-soft: #e5f7ee;
  --lm-warn: #b86a00;
  --lm-warn-soft: #fff1d9;
  --lm-bad: #c0392b;
  --lm-bad-soft: #fdeceb;
  --lm-radius: 16px;
  --lm-shadow: 0 8px 24px rgba(18, 32, 43, .08);
}

html {
  -webkit-text-size-adjust: 100%;
  /* overflow-x html'de olursa overflow-y auto olur ve body ile çift dikey scrollbar çıkar */
  overflow-x: visible;
  overflow-y: visible;
  overscroll-behavior-x: none;
}

body {
  overflow-x: clip;
  overflow-y: visible;
  overscroll-behavior-y: auto;
}

/* Tüm mobil sayfalar: klavye / focus kaymasını kes */
@media (max-width: 900px) {
  html {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  body, #app {
    overflow-x: clip !important;
    overflow-y: visible !important;
    max-width: 100vw !important;
  }

  input, select, textarea, .form-control, .form-select {
    font-size: 16px !important;
    scroll-margin: 0 !important;
    scroll-margin-block: 0 !important;
  }

  .nxl-container,
  .nxl-content,
  .main-content,
  .staff-page,
  .shell.mobile,
  .staff-shell {
    overflow-x: clip;
    overflow-y: visible;
  }

  .shell.mobile,
  .staff-shell {
    min-height: 100svh !important;
  }

  /* Tema fixed header kullanıyor; sticky'ye çevirme (kaydırma titremesi) */
}

body,
#app {
  background: var(--lm-bg) !important;
  color: var(--lm-ink) !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.main-content,
.nxl-content .main-content {
  background: transparent !important;
}

/* Marka renklerini mobil deneyimde ez */
.btn-primary,
.bg-primary,
.nxl-navigation .nxl-item.active > .nxl-link,
.nxl-navigation .nxl-link.active {
  background: var(--lm-primary) !important;
  border-color: var(--lm-primary) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--lm-primary-strong) !important;
  border-color: var(--lm-primary-strong) !important;
}

.btn-light-brand {
  background: var(--lm-primary-soft) !important;
  border: 1px solid #b9d9da !important;
  color: var(--lm-primary-strong) !important;
}

.text-primary,
.nxl-navigation .nxl-link:hover,
.page-header-title h5 {
  color: var(--lm-ink) !important;
}

.pill.ok,
.badge.pill.ok {
  background: var(--lm-ok-soft) !important;
  color: var(--lm-ok) !important;
}

.pill.bad,
.badge.pill.bad {
  background: var(--lm-bad-soft) !important;
  color: var(--lm-bad) !important;
}

.pill.wait,
.badge.pill.wait {
  background: var(--lm-warn-soft) !important;
  color: var(--lm-warn) !important;
}

.pill.neutral,
.badge.pill.neutral,
.pill.sim,
.badge.pill.sim {
  background: #e8eef2 !important;
  color: #3d5160 !important;
}

.m-screen,
.person-screen,
.person-detail {
  display: grid;
  gap: 12px;
}

.m-stack { display: grid; gap: 12px; }

.m-lead {
  margin: 0;
  color: var(--lm-muted);
  font-size: 13px;
}

.m-toolbar,
.person-toolbar,
.list-toolbar.m-toolbar {
  /* sticky + sabit header kaydırırken titreme / yukarı sıçrama yapıyor */
  position: relative;
  top: auto;
  z-index: 1;
  padding: 8px 0 6px;
  background: transparent;
}

.m-toolbar .btn,
.list-toolbar .btn,
.person-add-btn {
  min-height: 44px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.m-card-list,
.person-list {
  display: grid;
  gap: 10px;
}

.m-card,
.person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  background: var(--lm-card);
  box-shadow: var(--lm-shadow);
  padding: 14px;
  color: var(--lm-ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}

.m-card:hover,
.m-card:focus-visible,
.person-card:hover,
.person-card:focus-visible {
  border-color: #9fc8c9;
  box-shadow: 0 10px 28px rgba(15, 106, 110, .14);
  outline: none;
}

.m-card:active,
.person-card:active {
  transform: scale(.985);
}

.m-card-avatar,
.person-card-avatar,
.person-hero-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(145deg, #128086, #0b5356);
  box-shadow: 0 8px 16px rgba(15, 106, 110, .28);
}

.person-hero-avatar {
  width: 58px;
  height: 58px;
  font-size: 22px;
  border-radius: 18px;
}

.m-card-body,
.person-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.m-card-top,
.person-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.m-card-top strong,
.person-card-top strong,
.person-hero-title h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--lm-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.m-card-meta,
.person-card-meta,
.person-hero-text p {
  font-size: 12.5px;
  color: var(--lm-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 2px 0 0;
}

.m-card-flags,
.person-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8eef2;
  color: #456071;
}

.person-chip.on {
  background: var(--lm-primary-soft);
  color: var(--lm-primary-strong);
}

.person-chip.soft {
  background: #f3f6f8;
  color: var(--lm-ink);
}

.m-card-chevron,
.person-card-chevron {
  color: #90a0ab;
  font-size: 22px;
  line-height: 1;
}

.m-empty,
.person-empty {
  border: 1px dashed #c5d0d8;
  border-radius: var(--lm-radius);
  background: #fff;
  padding: 28px 16px;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--lm-muted);
}

.m-empty b,
.person-empty b {
  color: var(--lm-ink);
  font-size: 15px;
}

.person-hero {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(15, 106, 110, .16), transparent 52%),
    linear-gradient(180deg, #fff, #f5fafA);
  border: 1px solid var(--lm-line);
  box-shadow: var(--lm-shadow);
}

.person-hero-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.person-hero-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.person-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.person-hero-stats > div {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #e3eaef;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.person-hero-stats b {
  display: block;
  color: var(--lm-ink);
  font-size: 15px;
  font-weight: 800;
}

.person-hero-stats span {
  display: block;
  margin-top: 2px;
  color: var(--lm-muted);
  font-size: 11px;
}

.person-hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.person-hero-actions .btn {
  width: 100%;
  min-height: 44px !important;
  border-radius: 12px !important;
}

.person-tabs,
.chips.person-tabs,
.profile-tabs.person-tabs,
.settings-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.person-tabs::-webkit-scrollbar { display: none; }

.person-tabs button,
.chips.person-tabs button {
  flex: 0 0 auto;
  border-radius: 999px !important;
  border: 1px solid var(--lm-line) !important;
  background: #fff !important;
  color: var(--lm-muted) !important;
  padding: 9px 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  min-height: 38px;
}

.person-tabs button.on,
.chips.person-tabs button.on {
  background: var(--lm-primary) !important;
  border-color: var(--lm-primary) !important;
  color: #fff !important;
}

.person-pane,
.card.panel,
.list-card,
.m-inspector {
  background: var(--lm-card) !important;
  border: 1px solid var(--lm-line) !important;
  border-radius: var(--lm-radius) !important;
  box-shadow: var(--lm-shadow) !important;
}

dialog.pass-detail {
  width: min(920px, calc(100vw - 24px));
  max-height: min(86vh, 760px);
  margin: max(24px, env(safe-area-inset-top)) auto auto;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #fff;
  box-shadow: 0 24px 64px rgba(18, 32, 43, .22);
  overflow: auto;
}

dialog.pass-detail::backdrop {
  background: rgba(10, 22, 33, .48);
}

.pass-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--lm-line);
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff;
}

.pass-detail-head h2 {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.pass-detail-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.pass-detail-sub {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.pass-detail-head .btn {
  color: #0f172a !important;
  background: #fff !important;
}

.pass-detail-media {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .9fr);
  gap: 14px;
  padding: 16px 18px 18px;
}

.pass-detail-scene {
  min-height: 240px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid var(--lm-line);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
}

.pass-detail-scene img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.pass-detail-scene .muted,
.pass-detail-plate-box .muted {
  margin: 0;
  max-width: 100%;
  text-align: center;
  color: var(--lm-muted) !important;
  font-size: 13px;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: anywhere;
}

.pass-detail-plate-box {
  min-height: 72px;
  border: 1px solid var(--lm-line);
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 8px;
}

.pass-detail-facts {
  margin-top: 8px;
}

.pass-detail-facts dd {
  overflow-wrap: anywhere;
}

.pass-detail-side {
  display: grid;
  gap: 8px;
  align-content: start;
}

.pass-detail-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--lm-muted);
}

.pass-detail-side img {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
  background: #f7f8fa;
  border: 1px solid var(--lm-line);
  border-radius: 10px;
  padding: 6px;
}

.pass-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pass-detail-body {
  padding: 0 18px 18px;
}

.pass-detail-no-media {
  margin: 0 18px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--lm-line);
}

.list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.m-date-row,
.m-export-row {
  display: contents;
}

.m-filter-more {
  display: contents;
}

.m-filter-more > summary {
  display: none;
}

.m-filter-more-body {
  display: contents;
}

#logs-kpis {
  margin: 8px 0 12px;
}

@media (max-width: 760px) {
  dialog.pass-detail {
    width: 100vw;
    max-width: 100vw;
    max-height: 100svh;
    margin: 0;
    border-radius: 0;
  }

  .pass-detail-media {
    grid-template-columns: 1fr;
  }

  .pass-detail-scene {
    min-height: 200px;
  }
}

.person-pane { padding: 14px; }

.person-kv > div,
.person-glance > div {
  display: grid;
  grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid #e8eef2;
}

.person-kv > div:last-child,
.person-glance > div:last-child { border-bottom: 0; padding-bottom: 0; }

.person-kv span,
.person-glance span { color: var(--lm-muted); font-size: 12px; }
.person-kv b,
.person-glance b { color: var(--lm-ink); font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }

.person-mini-list { display: grid; gap: 8px; }

.person-mini-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid #e4ebf0;
  border-radius: 12px;
  background: #f7fafb;
  padding: 12px;
  color: var(--lm-ink);
}

.person-mini-item.static { cursor: default; }
.person-mini-item strong { font-size: 13.5px; }
.person-mini-item span { font-size: 12px; color: var(--lm-muted); }
.person-mini-item .pill { grid-column: 2; grid-row: 1 / span 2; }

.person-summary,
.m-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--lm-muted);
  font-size: 12.5px;
}

.person-summary b { color: var(--lm-ink); font-weight: 800; }

.m-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.m-status-row > div {
  background: #fff;
  border: 1px solid var(--lm-line);
  border-radius: 12px;
  padding: 12px 8px;
  display: grid;
  gap: 6px;
  text-align: center;
}

.metric-card,
.live-stat,
.dash-quad {
  border-radius: 14px !important;
  border: 1px solid var(--lm-line) !important;
  box-shadow: var(--lm-shadow) !important;
  background: #fff !important;
}

.metric-icon {
  background: var(--lm-primary-soft) !important;
  color: var(--lm-primary-strong) !important;
}

/* Tablolar → kart */
@media (max-width: 900px) {
  .m-table-wrap,
  .list-card .table-responsive { overflow: visible !important; }

  .m-card-table,
  .list-card .table { min-width: 0 !important; width: 100% !important; }

  .m-card-table thead,
  .list-card .table thead { display: none; }

  .m-card-table tbody,
  .list-card .table tbody {
    display: grid;
    gap: 10px;
  }

  .m-card-table tbody tr,
  .list-card .table tbody tr {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--lm-line) !important;
    border-radius: var(--lm-radius);
    background: #fff;
    box-shadow: var(--lm-shadow);
  }

  .m-card-table tbody td,
  .list-card .table tbody td {
    display: flex !important;
    justify-content: space-between;
    gap: 12px;
    border: 0 !important;
    padding: 2px 0 !important;
    white-space: normal !important;
    color: var(--lm-ink);
  }

  .m-card-table tbody td::before,
  .list-card .table tbody td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 38%;
    color: var(--lm-muted);
    font-size: 11.5px;
    font-weight: 700;
  }

  .list-toolbar.m-toolbar,
  .list-toolbar,
  .person-toolbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    align-items: stretch;
  }

  .person-search { grid-template-columns: 1fr !important; }

  .list-toolbar > input[type="search"],
  .list-toolbar > .form-control[type="search"],
  .list-toolbar > #q,
  .list-toolbar > #report-q,
  .list-toolbar > .m-filter-more,
  .list-toolbar > .m-export-row,
  .list-toolbar > .m-date-row,
  .list-pager {
    grid-column: 1 / -1;
  }

  .list-toolbar > .btn-primary,
  .list-toolbar > #show-person,
  .list-toolbar > #show-vehicle,
  .list-toolbar > #new-guest,
  .list-toolbar > #new-plate,
  .list-toolbar > #new-group,
  .list-toolbar > #add-block,
  .list-toolbar > #new-entrance,
  .list-toolbar > #new-location,
  .list-toolbar > #new-camera,
  .list-toolbar > #new-user {
    grid-column: 1 / -1;
  }

  .list-toolbar .form-control,
  .list-toolbar .form-select,
  .list-toolbar input,
  .list-toolbar select,
  .list-toolbar .btn,
  .person-add-btn,
  .person-search .form-control,
  .person-search .form-select,
  .m-filter-more-body .form-control,
  .m-filter-more-body .form-select,
  .m-filter-more-body input,
  .m-filter-more-body select,
  .m-filter-more-body .btn {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border-radius: 12px !important;
  }

  .m-date-row,
  .m-export-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .m-filter-more {
    display: block;
    border: 1px solid var(--lm-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--lm-shadow);
    overflow: hidden;
  }

  .m-filter-more > summary {
    list-style: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--lm-ink);
    user-select: none;
  }

  .m-filter-more > summary::-webkit-details-marker { display: none; }

  .m-filter-more > summary::after {
    content: "▾";
    color: var(--lm-muted);
    font-size: 14px;
    transition: transform .15s ease;
  }

  .m-filter-more[open] > summary::after { transform: rotate(180deg); }

  .m-filter-more-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px 12px;
  }

  .m-filter-more-body > .m-date-row,
  .m-filter-more-body > .m-export-row,
  .m-filter-more-body > .m-span-all,
  .m-filter-more-body > #logs-apply-dates,
  .m-filter-more-body > #people-clear {
    grid-column: 1 / -1;
  }

  .chips.slim.live-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow-x: visible !important;
    margin: 0 0 10px !important;
    padding: 2px 0 4px !important;
  }

  #logs-range,
  #report-range {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #logs-range::-webkit-scrollbar,
  #report-range::-webkit-scrollbar { display: none; }

  .chips.slim.live-filters button,
  .chips.slim button {
    flex: 0 0 auto !important;
    min-height: 36px !important;
    height: auto !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  .list-card .table tbody td.empty,
  .m-card-table tbody td.empty,
  .list-card .table tbody td[colspan],
  .m-card-table tbody td[colspan] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 18px 8px !important;
    color: var(--lm-muted) !important;
  }

  .list-card .table tbody td.empty::before,
  .m-card-table tbody td.empty::before,
  .list-card .table tbody td[colspan]::before,
  .m-card-table tbody td[colspan]::before {
    display: none !important;
    content: none !important;
  }

  .list-pager {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 8px !important;
  }

  .list-pager .btn {
    width: auto !important;
    min-width: 0 !important;
    padding-inline: 12px !important;
  }

  .list-pager .muted {
    text-align: center;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .split,
  .ops2,
  .ops3,
  .board,
  .profile-layout,
  .settings {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .settings-nav {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
  }

  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }

  .card.identity .actions,
  .identity .actions,
  .person-hero-actions,
  .profile-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100%;
  }

  dialog.editor {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100svh !important;
    max-height: 100svh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  dialog.editor form,
  dialog.editor .m-editor-form {
    display: grid;
    gap: 12px;
    padding: 14px 16px max(22px, env(safe-area-inset-bottom));
    max-height: 100svh;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .m-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    padding-bottom: 8px;
  }

  .m-editor-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--lm-ink);
  }

  dialog.editor .form-grid,
  dialog.editor .form-grid label {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  dialog.editor input,
  dialog.editor select,
  dialog.editor textarea {
    min-height: 44px !important;
    border-radius: 12px !important;
    border: 1px solid var(--lm-line) !important;
    font-size: 16px !important;
  }

  dialog.editor .actions,
  .m-editor-actions {
    position: sticky;
    bottom: 0;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
    background: #fff;
  }

  .main-content {
    padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 575.98px) {
  .person-hero-stats,
  .m-status-row { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (min-width: 901px) {
  .m-card-list,
  .person-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

button,
.btn,
.m-card,
.person-card,
.chips button {
  touch-action: manipulation;
}

/* Personel giriş sonrası uygulama */
html.staff-app,
body.staff-app,
body.staff-app #app {
  background: #e8eef0 !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.shell.mobile.staff-shell {
  min-height: 100svh;
  background: #e8eef0 !important;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.staff-appbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0f6a6e !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(15, 106, 110, .28);
  min-height: 58px;
  padding: max(10px, env(safe-area-inset-top)) 16px 12px !important;
}

.staff-brand {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
}

.staff-brand span {
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-logout {
  border: 1px solid rgba(255, 255, 255, .35) !important;
  background: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
  border-radius: 999px !important;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 13px;
}

.staff-page {
  padding: 16px 14px 28px !important;
}

.staff-home {
  display: grid;
  gap: 14px;
}

.staff-welcome h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #12202b;
  line-height: 1.15;
}

.staff-date,
.staff-org {
  margin: 0;
  color: #5b6b78;
  font-size: 13px;
}

.staff-date {
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 4px;
}

.staff-cta {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #128086, #0b5356);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 106, 110, .28);
}

.staff-cta span {
  font-size: 16px;
  font-weight: 800;
}

.staff-cta em {
  font-style: normal;
  font-size: 12px;
  opacity: .86;
}

.staff-cta.solid {
  place-items: center;
  text-align: center;
}

.staff-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.staff-metrics > div {
  background: #fff;
  border: 1px solid #d7dee5;
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(18, 32, 43, .06);
}

.staff-metrics b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #12202b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-metrics span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #5b6b78;
}

.staff-panel {
  background: #fff;
  border: 1px solid #d7dee5;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(18, 32, 43, .06);
  overflow: hidden;
}

.staff-panel-head {
  padding: 12px 14px 0;
}

.staff-panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #12202b;
}

.staff-panel-body {
  padding: 6px 8px 10px;
}

.staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 8px;
  border-radius: 12px;
  color: inherit;
}

.staff-row:not(.static):active {
  background: #f3f7f8;
}

.staff-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-row-main b {
  font-size: 14px;
  color: #12202b;
}

.staff-row-main small {
  font-size: 12px;
  color: #5b6b78;
}

.staff-row-side {
  flex: 0 0 auto;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8eef2;
  color: #3d5160;
}

.staff-pill.ok { background: #e5f7ee; color: #1b8a5a; }
.staff-pill.bad { background: #fdeceb; color: #c0392b; }
.staff-pill.wait { background: #fff1d9; color: #b86a00; }

.staff-empty {
  padding: 18px 12px;
  text-align: center;
  color: #5b6b78;
}

.staff-empty b {
  display: block;
  color: #12202b;
  margin-bottom: 4px;
}

.staff-empty p { margin: 0; font-size: 13px; }

.staff-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.staff-tabs::-webkit-scrollbar { display: none; }

.staff-tabs button {
  flex: 0 0 auto;
  border: 1px solid #d7dee5;
  background: #fff;
  color: #5b6b78;
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 13px;
}

.staff-tabs button.on {
  background: #0f6a6e;
  border-color: #0f6a6e;
  color: #fff;
}

.staff-list {
  display: grid;
  gap: 10px;
}

.staff-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid #d7dee5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 32, 43, .06);
  padding: 14px;
  color: inherit;
}

.staff-card.static {
  grid-template-columns: 46px minmax(0, 1fr);
  cursor: default;
}

.staff-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #128086, #0b5356);
}

.staff-avatar.lg {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 22px;
}

.staff-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.staff-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.staff-card-top strong {
  font-size: 15px;
  font-weight: 800;
  color: #12202b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-card-meta {
  font-size: 12.5px;
  color: #5b6b78;
}

.staff-chevron {
  color: #90a0ab;
  font-size: 22px;
}

.staff-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d7dee5;
  box-shadow: 0 8px 20px rgba(18, 32, 43, .06);
}

.staff-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #12202b;
}

.staff-hero p {
  margin: 0 0 8px;
  color: #5b6b78;
  font-size: 13px;
}

.staff-form {
  display: grid;
  gap: 12px;
}

.staff-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5b6b78;
}

.staff-form input {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d7dee5;
  padding: 0 12px;
  font-size: 16px;
  color: #12202b;
  background: #fff;
}

.staff-checks {
  display: grid;
  gap: 8px;
}

.staff-checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d7dee5;
  background: #fff;
  font-size: 14px;
  color: #12202b;
}

.staff-back {
  justify-self: start;
  border: 1px solid #d7dee5;
  background: #fff;
  color: #0f6a6e;
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
}

.staff-kv {
  display: grid;
  gap: 0;
  padding: 4px 8px 8px !important;
}

.staff-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid #eef2f4;
}

.staff-kv > div:last-child { border-bottom: 0; }
.staff-kv span { color: #5b6b78; font-size: 12px; }
.staff-kv b { color: #12202b; font-size: 13.5px; text-align: right; }

.staff-note {
  margin: 0;
  color: #5b6b78;
  font-size: 13px;
  text-align: center;
}

.staff-tabbar {
  background: #fff !important;
  border-top: 1px solid #d7dee5 !important;
  box-shadow: 0 -10px 28px rgba(18, 32, 43, .08) !important;
}

.staff-tabbar button {
  color: #7a8b98 !important;
  font-weight: 600 !important;
  font-size: 11px !important;
}

.staff-tabbar button.active {
  color: #0f6a6e !important;
  font-weight: 800 !important;
}

.staff-tabbar svg {
  width: 22px;
  height: 22px;
}

.person-back {
  justify-self: start;
  min-height: 40px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

/* Mobil giriş — iOS klavye kaymasına dayanıklı */
html.lm-login-app,
body.lm-login-app {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: manipulation;
  background: #0f6a6e !important;
  font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body.lm-login-app #app {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  background: #0f6a6e !important;
}

.lm-login {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background:
    radial-gradient(120% 70% at 50% -20%, rgba(255, 255, 255, .18), transparent 50%),
    linear-gradient(165deg, #0b5356 0%, #0f6a6e 45%, #12343a 100%);
  transform: translate3d(0, var(--kb-offset, 0px), 0);
  will-change: transform;
}

.lm-login-sheet {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}

.lm-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lm-login-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.lm-login-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #12202b;
  line-height: 1.1;
}

.lm-login-lead {
  margin: 0;
  font-size: 12.5px;
  color: #5b6b78;
  line-height: 1.35;
}

.lm-login-sheet h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #12202b;
}

.lm-login-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #5b6b78;
}

.lm-login-field input,
.lm-login-pass input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d7dee5;
  padding: 0 12px;
  font-size: 16px !important;
  line-height: 1.2;
  color: #12202b;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.lm-login-field input:focus,
.lm-login-pass input:focus {
  border-color: #0f6a6e;
  box-shadow: 0 0 0 3px rgba(15, 106, 110, .15);
}

.lm-login-pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.lm-login-reveal {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #b9d9da;
  background: #e3f3f3;
  color: #0b5356;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.lm-login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: #0f6a6e;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(15, 106, 110, .28);
}

.lm-login-error {
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
}

@media (min-width: 901px) {
  .lm-login {
    display: grid;
    align-content: center;
  }
}

@media (max-width: 900px) {
  .lm-login {
    display: block;
  }

  .lm-login-sheet {
    max-width: none;
    margin: 0;
  }

  .gate,
  .gate-shell,
  .shell.gate,
  .staff-gate {
    place-items: start stretch !important;
    align-content: start !important;
  }
}

/* Mobil kabuk — eski mavi Duralux kalıntılarını tamamen ez */
@media (max-width: 900px) {
  :root {
    --bs-primary: #0f6a6e !important;
    --bs-link-color: #0f6a6e !important;
    --primary: #0f6a6e !important;
  }

  body,
  #app,
  .nxl-container,
  .nxl-content,
  .main-content {
    background: #e8eef0 !important;
    font-family: "Manrope", "Segoe UI", sans-serif !important;
  }

  .nxl-header {
    background: #0f6a6e !important;
    border: 0 !important;
    box-shadow: 0 8px 20px rgba(15, 106, 110, .28) !important;
  }

  .nxl-header .header-wrapper {
    min-height: 56px;
    padding-inline: 12px;
  }

  .nxl-header .hamburger-inner,
  .nxl-header .hamburger-inner::before,
  .nxl-header .hamburger-inner::after,
  .nxl-header .feather-align-left,
  .nxl-header .nxl-head-link,
  .nxl-header .page-header-right-close-toggle {
    background-color: #fff !important;
    color: #fff !important;
  }

  .nxl-header .hamburger-inner,
  .nxl-header .hamburger-inner::before,
  .nxl-header .hamburger-inner::after {
    background-color: #fff !important;
  }

  .nxl-header .avatar-text {
    background: #0b5356 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .35);
  }

  .page-header {
    background: transparent !important;
    border: 0 !important;
    padding: 14px 4px 6px !important;
    min-height: 0 !important;
  }

  .page-header .breadcrumb { display: none !important; }

  .page-header-title h5 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #12202b !important;
    margin: 0 !important;
  }

  .nxl-navigation {
    background: #0b5356 !important;
  }

  .nxl-navigation .m-header {
    background: #0b5356 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
  }

  .nxl-navigation .nxl-caption label,
  .nxl-navigation .nxl-mtext,
  .nxl-navigation .nxl-arrow,
  .nxl-navigation .nxl-micon {
    color: #e8f6f6 !important;
  }

  .nxl-navigation .nxl-item.active > .nxl-link,
  .nxl-navigation .nxl-link.active,
  .nxl-navigation .nxl-item.active > button.nxl-link {
    background: #128086 !important;
    color: #fff !important;
    border-radius: 12px !important;
  }

  .nxl-navigation .nxl-submenu {
    background: rgba(0, 0, 0, .12) !important;
  }

  .card,
  .list-card,
  .panel,
  .gate-card {
    border-radius: 16px !important;
    border: 1px solid #d7dee5 !important;
    box-shadow: 0 8px 24px rgba(18, 32, 43, .08) !important;
  }

  .gate-card,
  .staff-gate-card {
    background: #fff !important;
  }

  .gate,
  .gate-shell,
  .shell.gate,
  .staff-gate {
    background:
      radial-gradient(120% 80% at 50% -10%, rgba(18, 128, 134, .35), transparent 55%),
      linear-gradient(160deg, #0b5356 0%, #0f6a6e 42%, #12343a 100%) !important;
    place-items: start stretch !important;
    align-content: start !important;
  }

  .btn-primary,
  button.primary,
  .primary:not(.badge):not(.progress-bar) {
    background: #0f6a6e !important;
    border-color: #0f6a6e !important;
    color: #fff !important;
    border-radius: 12px !important;
    min-height: 44px;
    font-weight: 700;
  }

  /* Eski maviyi öldür */
  .text-primary,
  a,
  .nxl-navigation .nxl-item:hover > button.nxl-link {
    color: #0f6a6e !important;
  }
}
