/* Duralux lock-in — measured against https://bestwpware.com/html/tf/duralux-demo/index.html */

body, #app {
  font-family: Manrope, "Segoe UI", sans-serif !important;
  font-size: .9rem !important;
  line-height: 1.55 !important;
  color: #5b6b78 !important;
  background-color: #eef2f4 !important;
}

:root {
  --primary: #0f6a6e;
  --success: #1b8a5a;
  --warning: #b86a00;
  --danger: #c0392b;
  --info: #1f7a8c;
  --secondary: #5b6b78;
  --dark: #12202b;
  --body: #5b6b78;
  --caption: #5b6b78;
  --bg: #eef2f4;
  --light: #e8eef2;
  --header-line: #d7dee5;
  --muted: #5b6b78;
  --line: #d7dee5;
  --line-soft: #cfd8df;
  --soft-primary: #e3f3f3;
  --soft-success: #e5f7ee;
  --soft-warning: #fff1d9;
  --soft-danger: #fdeceb;
  --soft-dark: #e8eef2;
  --soft-primary-border: #b9d9da;
  --soft-success-border: #b7e7cb;
  --soft-warning-border: #f5d39a;
  --soft-danger-border: #f3c2bc;
  --shadow: 0 8px 24px rgba(18, 32, 43, .08);
  --bs-primary: #0f6a6e;
  --bs-success: #1b8a5a;
  --bs-warning: #b86a00;
  --bs-danger: #c0392b;
  --bs-info: #1f7a8c;
  --bs-secondary: #5b6b78;
  --bs-dark: #12202b;
  --bs-body-color: #5b6b78;
  --bs-body-bg: #eef2f4;
  --bs-light: #e8eef2;
  --bs-card-spacer-y: 25px;
  --bs-card-spacer-x: 25px;
  --bs-border-color: #e5e7eb;
  --bs-border-radius: .5rem;
}

/* Duralux color lock — force theme surfaces */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-dark { color: var(--dark) !important; }
.text-muted, .muted { color: var(--body) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-soft-primary { background-color: var(--soft-primary) !important; color: var(--primary) !important; }
.bg-soft-success { background-color: var(--soft-success) !important; color: var(--success) !important; }
.bg-soft-warning { background-color: var(--soft-warning) !important; color: var(--warning) !important; }
.bg-soft-danger { background-color: var(--soft-danger) !important; color: var(--danger) !important; }
.progress,
.progress.ht-3 {
  background-color: var(--light) !important;
}
.progress-bar.bg-primary { background-color: var(--primary) !important; }
.progress-bar.bg-success { background-color: var(--success) !important; }
.progress-bar.bg-warning { background-color: var(--warning) !important; }
.progress-bar.bg-danger { background-color: var(--danger) !important; }
.avatar-text,
.avatar.sm,
.avatar {
  background: var(--soft-primary) !important;
  color: var(--primary) !important;
}

h1, h2, h3, h4, h5, h6,
.hello, .fs-4, .counter, .text-dark {
  color: #283c50 !important;
}

.nxl-container,
.nxl-content {
  background-color: transparent !important;
}

.main-content {
  background-color: transparent !important;
  padding: 16px 20px 12px !important;
}

/* —— Shell / nav —— */
.nxl-header {
  height: 80px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--header-line) !important;
}

.nxl-header .header-wrapper {
  height: 80px;
  padding: 0 30px !important;
}

.nxl-navigation {
  width: 280px !important;
  background: #fff !important;
}

.nxl-navigation .m-header {
  height: 80px !important;
  padding: 15px 30px !important;
  border-bottom: 1px solid var(--header-line) !important;
}

.nxl-navigation .m-header .logo.logo-lg {
  height: 30px !important;
  max-height: 30px !important;
  max-width: 140px !important;
  width: auto !important;
}

.nxl-caption label {
  color: var(--caption) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .7px !important;
  text-transform: uppercase !important;
}

.nxl-navigation button.nxl-link,
.nxl-navigation .nxl-link {
  padding: 8px 12px !important;
  margin: 2px 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #283c50 !important;
  line-height: 1.2 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.nxl-navigation button.nxl-link:focus,
.nxl-navigation button.nxl-link:focus-visible,
.nxl-navigation button.nxl-link:active,
.nxl-navigation .nxl-link:focus,
.nxl-navigation .nxl-link:focus-visible,
.nxl-navigation .nxl-link:active {
  color: var(--primary) !important;
  background-color: var(--soft-primary) !important;
  box-shadow: none !important;
  outline: none !important;
}

.nxl-navigation .nxl-link {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  width: calc(100% - 30px) !important;
}

.nxl-navigation .nxl-mtext {
  flex: 1 1 auto;
  text-align: left;
}

.nxl-navigation .nxl-arrow {
  margin-left: auto;
  display: inline-flex;
  transition: transform .2s ease;
}

.nxl-navigation .nxl-hasmenu.nxl-trigger > .nxl-link .nxl-arrow,
.nxl-navigation .nxl-hasmenu.nxl-trigger > button.nxl-link .nxl-arrow {
  transform: rotate(90deg);
}

.nxl-navigation .nxl-submenu .nxl-link,
.nxl-navigation .nxl-submenu button.nxl-link {
  font-size: .8rem !important;
  padding: 7px 10px !important;
  margin: 1px 10px 1px 18px !important;
  font-weight: 500 !important;
  color: #283c50 !important;
  width: calc(100% - 28px) !important;
  background: transparent !important;
}

.nxl-navigation .nxl-submenu .nxl-micon {
  margin-right: 8px !important;
  width: 18px;
  display: inline-flex;
  justify-content: center;
}

.nxl-navigation .nxl-item:hover > .nxl-link,
.nxl-navigation .nxl-item:hover > button.nxl-link {
  color: var(--primary) !important;
  background-color: var(--soft-primary) !important;
}

.nxl-navigation .nxl-item.active > .nxl-link,
.nxl-navigation .nxl-item.active > button.nxl-link,
.nxl-navigation .nxl-submenu .nxl-item.active > .nxl-link,
.nxl-navigation .nxl-submenu .nxl-item.active > button.nxl-link {
  color: var(--primary) !important;
  background-color: var(--soft-primary) !important;
}

.nxl-navigation .nxl-hasmenu.nxl-trigger > .nxl-link,
.nxl-navigation .nxl-hasmenu.nxl-trigger > button.nxl-link {
  color: #283c50 !important;
  background-color: transparent !important;
}

.nxl-navigation .nxl-micon,
.nxl-navigation .nxl-micon i {
  margin-right: 10px;
  color: inherit !important;
}

.nxl-navigation .nxl-item.active > .nxl-link .nxl-micon i,
.nxl-navigation .nxl-item.active > button.nxl-link .nxl-micon i,
.nxl-navigation .nxl-item:hover > .nxl-link .nxl-micon i,
.nxl-navigation .nxl-item:hover > button.nxl-link .nxl-micon i {
  color: var(--primary) !important;
}

.page-header {
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 20px !important;
  background: #fff !important;
  margin: 0 !important;
  border-bottom: 0 !important;
  box-shadow: var(--shadow) !important;
  display: flex !important;
  align-items: center !important;
}

.page-header-title h5 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #283c50 !important;
  border-right: 1px solid #cdd4e8;
  margin: 0 8px 0 0 !important;
  padding-right: 10px;
}

.breadcrumb,
.breadcrumb-item,
.breadcrumb-item a {
  color: var(--caption) !important;
  font-size: 13px !important;
}

.page-header-title h5,
.page-header .m-b-10 {
  color: var(--dark) !important;
}

.nxl-header .avatar-text.avatar-md {
  width: 30px !important;
  height: 30px !important;
  font-size: 13px !important;
}

/* —— Cards —— */
.card {
  margin-bottom: 14px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  box-shadow: var(--shadow) !important;
  background: #fff !important;
  color: var(--dark) !important;
}

.card .card-body { padding: 16px !important; }
.card .card-body.p-0 { padding: 0 !important; }

.card .card-header,
.card-header {
  padding: 12px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card .card-header .card-title,
.card-header .card-title,
.card .card-header h5 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #283c50 !important;
}

.main-content .stretch,
.main-content .stretch-full,
.card.identity,
.card.panel,
.split > .card {
  height: auto !important;
  min-height: 0 !important;
}

/* —— Buttons —— */
.btn,
button.primary,
button.ghost,
.primary:not(.badge):not(.progress-bar),
.ghost:not(.badge) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 12px 16px !important;
  border-radius: 3px !important;
  font-family: Inter, sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  line-height: 1 !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

.btn-primary,
button.primary,
.primary:not(.badge):not(.progress-bar) {
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 10px -1px rgba(15, 106, 110, .22) !important;
}

.btn-primary:hover,
button.primary:hover,
.primary:not(.badge):not(.progress-bar):hover {
  background: #0b5356 !important;
  border-color: #0b5356 !important;
  color: #fff !important;
}

.btn-light-brand,
button.ghost,
.ghost:not(.badge) {
  background: var(--soft-primary) !important;
  border: 1px solid transparent !important;
  color: var(--primary) !important;
}

.btn-light-brand:hover,
button.ghost:hover,
.ghost:not(.badge):hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.btn-icon {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
}

.btn.md, .btn-md {
  padding: 10px 15px !important;
}

.with-icon svg {
  width: 14px !important;
  height: 14px !important;
}

/* —— Forms / filters —— */
.form-control,
.form-select,
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
select,
textarea {
  background: #fff !important;
  border: 1px solid #dcdee4 !important;
  border-radius: 5px !important;
  min-height: 39px !important;
  height: 39px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #283c50 !important;
  box-shadow: none !important;
}

textarea {
  height: auto !important;
  min-height: 88px !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 .2rem rgba(15, 106, 110, .18) !important;
}

.toolbar,
.filter-bar,
.actions-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.toolbar .form-control,
.filter-bar .form-control,
.toolbar input,
.filter-bar input {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 360px;
}

.toolbar .form-select,
.filter-bar .form-select,
.toolbar select,
.filter-bar select {
  flex: 0 1 200px;
  min-width: 160px;
}

.filter-card .card-body,
.card.filter-card .card-body {
  padding: 10px 14px !important;
}

.list-toolbar {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.list-toolbar .form-control,
.list-toolbar input {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 320px;
}

.list-toolbar .form-select,
.list-toolbar select {
  flex: 0 1 180px;
  min-width: 140px;
}

.list-toolbar .btn {
  margin-left: auto;
}

.list-toolbar .btn + .btn {
  margin-left: 0;
}

.list-meta {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  color: #6b7885 !important;
}

.list-block {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.list-block > .card {
  margin-bottom: 0 !important;
}

.main-content > .card.stretch,
.main-content > .card.stretch-full {
  margin-bottom: 0 !important;
}

.table-responsive,
.m-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Tek dikey kaydırma: tarayıcı viewport. İç kabuklarda ikinci scrollbar oluşmasın. */
html {
  overflow-x: visible !important;
  overflow-y: visible !important;
}
body {
  overflow-x: clip;
  overflow-y: visible !important;
}
.nxl-container,
.nxl-content,
.main-content {
  overflow-y: visible !important;
}
.nxl-container .nxl-content .main-content {
  overflow-x: clip;
  overflow-y: visible !important;
}
.list-card.stretch,
.list-card.stretch-full,
.card.stretch.stretch-full.list-card {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* —— Tables —— */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: #283c50;
  margin-bottom: 0 !important;
  color: #283c50 !important;
  font-size: .82rem !important;
  width: 100%;
}

.table > :not(caption) > * > * {
  border-bottom-color: #e5e7eb !important;
}

.table thead th,
.table > thead > tr > th,
.panel > table th,
.sheet > table th {
  background: transparent !important;
  color: var(--dark) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  padding: 9px 10px !important;
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap;
  vertical-align: middle !important;
}

.table thead th:first-child,
.panel > table th:first-child,
.sheet > table th:first-child {
  padding-left: 14px !important;
}

.table thead th:last-child,
.panel > table th:last-child,
.sheet > table th:last-child {
  padding-right: 14px !important;
}

.table tbody td,
.panel > table td,
.sheet > table td {
  padding: 9px 10px !important;
  font-size: .82rem !important;
  font-weight: 500 !important;
  color: var(--dark) !important;
  border-bottom: 1px solid var(--line) !important;
  vertical-align: middle !important;
  background: transparent !important;
  white-space: nowrap;
}

.table tbody td:first-child,
.panel > table td:first-child,
.sheet > table td:first-child {
  padding-left: 14px !important;
  font-weight: 600 !important;
}

.table tbody td:last-child,
.panel > table td:last-child,
.sheet > table td:last-child {
  padding-right: 14px !important;
}

.table-hover > tbody > tr:hover > *,
.table tbody tr:hover td {
  background: var(--light) !important;
  --bs-table-bg-state: #eff0f6;
}

.table tbody tr[data-org],
.table tbody tr[data-person],
.table tbody tr[data-vehicle],
.table tbody tr[data-visit],
.table tbody tr[data-node],
.table tbody tr[data-plan],
.table tbody tr[data-event],
.table tbody tr[data-camera],
.table tbody tr[data-entrance],
.table tbody tr[data-barrier] {
  cursor: pointer;
}

.table .avatar,
.table .avatar.sm,
.table .avatar-text {
  width: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
}

/* —— Badges (Duralux soft / light) —— */
.badge,
.pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 6px !important;
  min-height: 0 !important;
  height: auto !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  border-radius: 3px !important;
  border: 0 !important;
  background: var(--light) !important;
  color: var(--dark) !important;
}

.badge.rounded-pill,
.pill.rounded-pill {
  border-radius: 50rem !important;
  padding: 5px 10px !important;
}

.pill.ok,
.badge.Authorized,
.badge.Inside,
.badge.Online,
.badge.Sent,
.badge.SYNCED,
.badge.ok,
.bg-soft-success {
  background: var(--soft-success) !important;
  color: var(--success) !important;
  border-color: var(--soft-success-border) !important;
}

.pill.bad,
.badge.Denied,
.badge.Offline,
.badge.PermanentFailed,
.badge.AuthError,
.badge.bad,
.bg-soft-danger {
  background: var(--soft-danger) !important;
  color: var(--danger) !important;
  border-color: var(--soft-danger-border) !important;
}

.pill.wait,
.badge.Pending,
.badge.Unknown,
.badge.Queued,
.badge.wait,
.bg-soft-warning {
  background: var(--soft-warning) !important;
  color: var(--warning) !important;
  border-color: var(--soft-warning-border) !important;
}

.pill.sim,
.badge.sim,
.bg-soft-primary {
  background: var(--soft-primary) !important;
  color: var(--primary) !important;
  border-color: var(--soft-primary-border) !important;
}

.pill.neutral,
.badge.neutral,
.bg-soft-dark {
  background: var(--soft-dark) !important;
  color: var(--dark) !important;
}

/* —— Tabs (chips) vs filter pills (chips.slim) —— */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 24px;
  padding: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  overflow-x: auto;
  border-bottom: 1px solid #e5e7eb;
}

.chips button {
  border: 0 !important;
  background: transparent !important;
  color: #283c50 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  min-height: 52px !important;
  height: auto !important;
  padding: 20px 30px !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

.chips button.on {
  color: var(--primary) !important;
  background: var(--soft-primary) !important;
  border-bottom-color: var(--primary) !important;
}

.chips button:hover { background: var(--light) !important; }

.chips.slim {
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.chips.slim button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  border: 1px solid #dcdee4 !important;
  background: #fff !important;
  color: #283c50 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid #dcdee4 !important;
}

.chips.slim button.on {
  background: rgba(15, 106, 110, .1) !important;
  border-color: #0f6a6e !important;
  color: #0f6a6e !important;
  border-bottom-color: #0f6a6e !important;
}

.dash-jump {
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.dash-jump:hover {
  box-shadow: 0 8px 18px rgba(15, 106, 110, .14) !important;
}

.dash-jump-hint {
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.dash-quad {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 6px;
  color: inherit;
}

.dash-quad:hover {
  background: var(--soft-primary);
}

.dash-quad span {
  font-size: 12px;
  color: var(--body);
}

.dash-quad b {
  font-size: 18px;
  color: var(--dark);
}

/* —— KPI / strip / metrics —— */
.metric-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
  align-items: stretch !important;
}

.metric-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  text-align: left !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: var(--shadow) !important;
  color: var(--dark) !important;
  cursor: pointer;
}

.metric-card:hover {
  border-color: transparent !important;
  background: var(--soft-primary) !important;
}

.metric-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--soft-primary);
  color: var(--primary);
  font-size: 16px;
}

.metric-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.metric-copy b,
.metric-copy .counter {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  color: var(--dark) !important;
}

.metric-copy > span {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--body) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpis,
.strip {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.kpi,
.strip > div {
  background: #fff !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid transparent !important;
  padding: 14px !important;
  margin: 0 !important;
}

.kpi b,
.strip > div > b {
  display: block !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--dark) !important;
  line-height: 1.2 !important;
  margin-bottom: 4px !important;
}

.kpi span,
.strip > div > span {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--body) !important;
}

.strip.slim {
  margin-top: 0 !important;
}

.avatar-text.avatar-lg {
  width: 36px !important;
  height: 36px !important;
  font-size: 15px !important;
}

.avatar-text.avatar-lg.bg-gray-200 {
  background: var(--soft-primary) !important;
  color: var(--primary) !important;
}

.fs-4.fw-bold.text-dark,
.fs-4.text-dark,
.counter {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #283c50 !important;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .metric-card {
    min-height: 64px !important;
    padding: 10px 12px !important;
  }
}

.fs-13 {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #283c50 !important;
}

.progress.ht-3 {
  height: 3px !important;
}

/* —— Panels / identity / profile —— */
.panel {
  padding: 14px !important;
  margin-bottom: 12px !important;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.card.panel {
  padding: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden;
}

.card.panel.fill {
  margin-bottom: 0 !important;
}

.card.panel > h2:first-child,
.card.panel > h2:not(:first-child),
.panel h2,
.panel h3 {
  padding: 12px 14px 0 !important;
  margin: 0 0 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #283c50 !important;
}

.card.panel > .card-body,
.card.panel > .facts,
.card.panel > p,
.card.panel > dl,
.card.panel > .rows,
.card.panel > .quad,
.card.panel > .activity,
.card.panel > .muted {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.card.panel > .table-responsive {
  padding: 0 !important;
}

.card.panel > :last-child:not(.table-responsive):not(.panel-head):not(h2) {
  padding-bottom: 14px !important;
}

.card.panel > .table-responsive:last-child,
.card.panel > .card-body.p-0:last-child {
  padding-bottom: 0 !important;
}

.card.panel > .card-header,
.card.panel > .panel-head,
.panel-head {
  padding: 10px 14px !important;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 !important;
  background: #fff;
}

.card.panel > .panel-head h2,
.panel-head h2 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #283c50 !important;
}

.list-card {
  margin-bottom: 0 !important;
}

.command {
  gap: 12px !important;
}

.command-body,
.split,
.ops3,
.board,
.report-center {
  gap: 12px !important;
}

.stack,
.rail {
  gap: 12px !important;
}

.profile-layout {
  display: grid !important;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.profile-side {
  margin-bottom: 0 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(40, 60, 80, 0.04) !important;
}

.profile-side .card-body {
  padding: 14px !important;
  text-align: center;
}

.profile-side .profile-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 3px solid var(--soft-primary-border);
  background: var(--soft-primary);
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
}

.profile-side .profile-name {
  display: block;
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #283c50;
  letter-spacing: 0.02em;
}

.profile-side .profile-meta {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 400;
  color: #6b7885;
  line-height: 1.35;
}

.profile-side .profile-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 12px;
}

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

.profile-side .profile-mini-stats .stat {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--soft-primary-border);
  border-radius: 6px;
  background: var(--soft-primary);
  text-align: center;
}

.profile-side .profile-mini-stats .stat b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #283c50;
  line-height: 1.2;
}

.profile-side .profile-mini-stats .stat span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  color: #6b7885;
  line-height: 1.2;
}

.profile-side .profile-facts {
  text-align: left;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  border-top: 1px solid #eef1f4;
}

.profile-side .profile-facts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #eef1f4;
  font-size: 12px;
}

.profile-side .profile-facts li span { color: #6b7885; flex-shrink: 0; }
.profile-side .profile-facts li b {
  color: #283c50;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-side .profile-facts li .pill { font-size: 10px; }

.profile-side .actions,
.profile-side .profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 !important;
}

.profile-side .actions .btn,
.profile-side .profile-actions .btn {
  width: 100%;
  white-space: nowrap;
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}

.profile-main {
  min-width: 0;
  margin-bottom: 0 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(40, 60, 80, 0.04) !important;
  overflow: hidden;
}

.profile-main > .chips,
.profile-main > .profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 !important;
  padding: 0 8px;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
  border-radius: 0 !important;
}

.profile-main > .chips button,
.profile-main > .profile-tabs button {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #6b7885 !important;
  box-shadow: none !important;
  min-height: 40px !important;
  padding: 10px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.profile-main > .chips button.on,
.profile-main > .profile-tabs button.on {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
  background: transparent !important;
}

.profile-main > .chips button:hover,
.profile-main > .profile-tabs button:hover {
  color: var(--primary) !important;
  background: var(--soft-primary) !important;
}

.profile-pane {
  padding: 4px 14px 10px;
}

.profile-pane .list-toolbar {
  margin: 8px 0 10px !important;
}

.profile-kv {
  margin: 0 !important;
}

.profile-kv > div {
  display: grid !important;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 0 !important;
  border-bottom: 1px solid #eef1f4;
}

.profile-kv > div:last-child { border-bottom: 0; }

.profile-kv dt {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #6b7885 !important;
}

.profile-kv dd {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #283c50 !important;
  text-align: left !important;
}

.profile-note {
  margin: 10px 0;
  font-size: 13px;
  color: #283c50;
  line-height: 1.5;
}

.card.identity {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 25px !important;
  margin-bottom: 24px !important;
}

.card.identity h2,
.identity h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #283c50;
}

.card.identity p,
.identity p {
  margin: 2px 0 0;
  color: #6b7885;
  font-size: 12px;
}

.identity .actions,
.card.identity .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  margin-left: auto;
}

.avatar {
  width: 50px !important;
  height: 50px !important;
  background: #e9ecef !important;
  color: #283c50 !important;
  border: 1px solid #dcdee4;
}

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

.profile-stats .stat {
  background: #fff;
  border-radius: 2px;
  padding: 16px 12px;
  border: 1px dashed #dadfe4;
  text-align: center;
}

.profile-stats .stat b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #283c50;
}

.profile-stats .stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7885;
}

.facts div { padding: 10px 0 !important; }
.facts dt { color: #6b7885 !important; }
.facts dd { color: #283c50 !important; font-weight: 600 !important; }

.rows > div,
.activity {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.activity b {
  flex: 0 0 48px;
  color: #6b7885;
  font-size: 13px;
}

.activity span {
  flex: 1;
  min-width: 0;
  color: #283c50;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  background: var(--soft-primary);
  color: var(--primary);
}

.quad {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quad > div {
  padding: 14px !important;
  border: 1px dashed #dadfe4 !important;
  border-radius: 2px !important;
  background: #fff !important;
  display: grid !important;
  gap: 4px;
}

.quad > div span {
  font-size: 12px;
  color: #6b7885;
}

.quad > div b {
  font-size: 18px;
  font-weight: 700;
  color: #283c50;
}

.split { align-items: start; gap: 14px; }

.card.panel.fill > .card.panel-head,
.card.panel .card.panel-head {
  margin: 0 !important;
}

button.link,
.card panel-head .link,
.panel-head .link,
.card.panel-head .link {
  border: 0 !important;
  background: transparent !important;
  color: var(--primary) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  min-height: auto !important;
  height: auto !important;
  padding: 0 !important;
  letter-spacing: 0 !important;
}

.lead, .page-lead, .muted, .eyebrow { color: #6b7885 !important; }
.page-lead { margin: 0 0 16px; font-size: 13px; }

.settings-nav button {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #283c50 !important;
  text-transform: none !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 10px 15px !important;
  border-radius: 5px !important;
}

.settings-nav button.on,
.settings-nav button:hover {
  background: #eaebef !important;
}

.editor {
  border: 0;
  border-radius: 10px;
  padding: 0;
  width: min(640px, calc(100vw - 24px));
}

.editor form {
  display: grid;
  gap: 12px;
  padding: 25px;
  background: #fff;
}

.editor h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #283c50;
  text-transform: none;
}

.editor .btn,
.editor button {
  text-transform: uppercase;
}

.owner-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.owner-picker-row .form-control,
.owner-picker-row input[type="text"],
.owner-picker-row input:not([type]) {
  flex: 1;
  min-width: 0;
}

.owner-picker-row .btn-icon {
  flex: 0 0 38px;
}

.person-vehicle-bar {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.personnel-picker {
  width: min(480px, calc(100vw - 24px));
}

.personnel-picker-list {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.personnel-picker-item {
  display: grid !important;
  gap: 2px;
  text-align: left !important;
  text-transform: none !important;
  width: 100%;
  padding: 10px 12px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #283c50 !important;
  cursor: pointer;
}

.personnel-picker-item strong {
  font-size: 13px;
}

.personnel-picker-item span {
  font-size: 11px;
  color: #6b7885;
}

.personnel-picker-item.on,
.personnel-picker-item:hover {
  background: var(--soft-primary) !important;
  border-color: var(--primary) !important;
}

/* —— Anlık geçişler —— */
.live-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.live-stat {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  padding: 18px 20px;
}

.live-stat b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #283c50;
  line-height: 1.2;
}

.live-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7885;
}

.live-stat.ok b { color: var(--success); }
.live-stat.bad b { color: var(--danger); }

.live-filters {
  margin-bottom: 16px !important;
}

.live-filters button i {
  font-style: normal;
  margin-left: 6px;
  opacity: .7;
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
  gap: 24px;
  align-items: start;
}

.live-feed-card,
.live-detail-card {
  margin-bottom: 0 !important;
}

.live-list {
  max-height: calc(100dvh - 320px);
  overflow: auto;
  padding: 8px;
}

.live-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.2fr) auto minmax(90px, .7fr);
  gap: 10px 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 4px;
  color: #283c50;
}

.live-row:hover { background: var(--light); }
.live-row.on {
  background: var(--soft-primary);
  border-color: var(--primary);
}

.live-row-time {
  font-size: 13px;
  font-weight: 700;
  color: #6b7885;
}

.live-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.live-row-main strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #283c50;
}

.live-row-main span {
  font-size: 12px;
  color: #6b7885;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.live-row-place {
  font-size: 12px;
  color: #6b7885;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dir,
.live-dec {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

.live-dir.in { background: var(--soft-success); color: var(--success); }
.live-dir.out { background: var(--soft-warning); color: var(--warning); }
.live-dec.ok { background: var(--soft-success); color: var(--success); }
.live-dec.bad { background: var(--soft-danger); color: var(--danger); }
.live-dec.wait { background: var(--soft-primary); color: var(--primary); }

.live-detail-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.live-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7587a7;
  margin-bottom: 6px;
}

.live-plate {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: .04em;
  color: #283c50;
  line-height: 1.1;
}

.live-who {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #283c50;
}

.live-who span {
  font-weight: 500;
  color: #6b7885;
}

.live-flags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.live-facts {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
}

.live-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.live-facts dt {
  margin: 0;
  color: #6b7885;
  font-size: 13px;
}

.live-facts dd {
  margin: 0;
  color: #283c50;
  font-weight: 600;
  text-align: right;
}

.live-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.live-actions .btn {
  width: 100%;
}

.live-hint {
  margin: 0;
  font-size: 12px;
  color: #7587a7;
}

.live-empty {
  padding: 36px 20px;
  text-align: center;
}

.live-empty b {
  display: block;
  font-size: 15px;
  color: #283c50;
  margin-bottom: 6px;
}

.live-empty p {
  margin: 0;
  color: #6b7885;
  font-size: 13px;
}

.pass {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

.lane-card {
  border: 1px dashed #dadfe4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 20px !important;
}

@media (max-width: 1199.98px) {
  .live-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-grid { grid-template-columns: 1fr; }
  .live-list { max-height: 420px; }
}

@media (max-width: 575.98px) {
  .live-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .live-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .live-row-meta,
  .live-row-place {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }
  .live-plate { font-size: 22px; }
  .live-detail-top { flex-direction: column; }
  .live-flags { flex-direction: row; align-items: center; }
}

.gate-card {
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1) !important;
}

@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr !important; }
}

@media (max-width: 1024px) {
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nxl-container .nxl-content .main-content { padding: 14px 16px 10px !important; }
  .nxl-container .nxl-content .page-header { padding: 0 16px !important; }
  .nxl-header .header-wrapper { padding: 0 16px !important; }
  .nxl-navigation .m-header { padding: 12px 16px !important; }
  .chips:not(.slim) button { padding: 10px 14px !important; min-height: 40px !important; }
  .table thead th:first-child,
  .table tbody td:first-child { padding-left: 12px !important; }
  .table thead th:last-child,
  .table tbody td:last-child { padding-right: 12px !important; }
}

@media (max-width: 575.98px) {
  .nxl-container .nxl-content .main-content { padding: 12px 12px 14px !important; }
  .nxl-container .nxl-content .page-header { padding: 0 12px !important; }
  .nxl-header .header-wrapper { padding: 0 12px !important; }
  .card .card-body { padding: 12px !important; }
  .card .card-body.p-0 { padding: 0 !important; }
  .card.identity { padding: 20px !important; }
  .kpis, .strip { grid-template-columns: 1fr 1fr; gap: 12px !important; }
  .toolbar .form-control,
  .filter-bar .form-control,
  .toolbar input,
  .filter-bar input,
  .toolbar .form-select,
  .filter-bar .form-select,
  .toolbar select,
  .filter-bar select {
    flex: 1 1 100%;
    max-width: none;
  }
  .identity .actions,
  .card.identity .actions {
    width: 100%;
    flex: 1 1 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-left: 0;
  }
  .chips:not(.slim) button {
    min-height: 44px !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
  }
  .chips.slim button {
    min-height: 36px !important;
    height: auto !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    text-transform: none !important;
  }
  /* Eski gate mobil kuralları kaldırıldı — giriş lm-login kullanıyor */
}

@media (min-width: 1025px) {
  .nxl-navigation:not(.mob-navigation-active) {
    visibility: visible;
    pointer-events: auto;
  }
  /* Theme zeroes container margin below 1200px; keep offset while desktop nav stays visible. */
  .nxl-container {
    margin-left: 280px !important;
  }
  .profile-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .card .table { min-width: 0; }
}

/* —— Personel (mobil öncelikli) —— */
.person-screen {
  display: grid;
  gap: 12px;
}

.person-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  position: relative;
  top: auto;
  z-index: 1;
  padding: 8px 0 4px;
  background: transparent;
}

.person-search {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
}

.person-search .form-control,
.person-search .form-select,
.person-search input,
.person-search select {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.person-add-btn {
  white-space: nowrap;
  min-height: 39px !important;
  padding-inline: 16px !important;
}

.person-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #7587a7;
  font-size: 12px;
}

.person-summary b {
  color: #283c50;
  font-weight: 700;
}

.person-list {
  display: grid;
  gap: 8px;
}

.person-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px 12px 12px 10px;
  color: #283c50;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}

.person-card:hover,
.person-card:focus-visible {
  border-color: var(--soft-primary-border);
  box-shadow: 0 4px 14px rgba(15, 106, 110, .14);
  outline: none;
}

.person-card:active {
  transform: scale(.992);
}

.person-card.is-passive {
  opacity: .78;
  background: #f8fafc;
}

.person-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(145deg, #128086, #0b5356);
}

.person-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.person-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.person-card-top strong {
  font-size: 14px;
  font-weight: 700;
  color: #283c50;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card-meta {
  font-size: 12px;
  color: #6b7885;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  background: #eff0f6;
  color: #64748b;
}

.person-chip.on {
  background: var(--soft-primary);
  color: var(--primary);
}

.person-chip.soft {
  background: #e9eff4;
  color: #283c50;
}

.person-card-chevron {
  color: #a0aec0;
  font-size: 20px;
  line-height: 1;
}

.person-empty {
  border: 1px dashed #d5d9e2;
  border-radius: 12px;
  background: #fff;
  padding: 28px 18px;
  text-align: center;
}

.person-empty b {
  display: block;
  color: #283c50;
  margin-bottom: 4px;
}

.person-empty p,
.person-empty-inline {
  margin: 0;
  color: #7587a7;
}

.person-detail {
  display: grid;
  gap: 12px;
}

.person-hero {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(15, 106, 110, .16), transparent 55%),
    linear-gradient(180deg, #fff, #f5fafa);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow);
}

.person-hero.is-passive {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(100, 116, 139, .12), transparent 55%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.person-hero-main {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.person-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #128086, #0b5356);
  box-shadow: 0 8px 18px rgba(15, 106, 110, .28);
}

.person-hero-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.person-hero-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #283c50;
  line-height: 1.25;
}

.person-hero-text p {
  margin: 4px 0 0;
  color: #6b7885;
  font-size: 12px;
}

.person-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.person-hero-stats > div {
  background: rgba(255, 255, 255, .85);
  border: 1px solid #eef0f5;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.person-hero-stats b {
  display: block;
  color: #283c50;
  font-size: 15px;
  font-weight: 700;
}

.person-hero-stats span {
  display: block;
  margin-top: 2px;
  color: #7587a7;
  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: 40px !important;
}

.person-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.person-tabs::-webkit-scrollbar {
  display: none;
}

.person-tabs button {
  flex: 0 0 auto;
  border-radius: 999px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  color: #64748b !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.person-tabs button.on {
  background: var(--soft-primary) !important;
  border-color: var(--soft-primary-border) !important;
  color: var(--primary) !important;
}

.person-pane {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.person-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #6b7885;
}

.person-kv,
.person-glance {
  display: grid;
  gap: 8px;
}

.person-kv > div,
.person-glance > div {
  display: grid;
  grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f5;
}

.person-kv > div:last-child,
.person-glance > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.person-kv span,
.person-glance span {
  color: #7587a7;
  font-size: 12px;
}

.person-kv b,
.person-glance b {
  color: #283c50;
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.person-glance {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
}

.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 #eef0f5;
  border-radius: 10px;
  background: #f8f9fc;
  padding: 10px 12px;
  color: #283c50;
  cursor: pointer;
}

.person-mini-item.static {
  cursor: default;
}

.person-mini-item strong {
  grid-column: 1;
  font-size: 13px;
}

.person-mini-item span {
  grid-column: 1;
  font-size: 11px;
  color: #6b7885;
}

.person-mini-item .pill {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.person-perm-grid {
  display: grid !important;
  gap: 8px !important;
}

.person-perm-grid label {
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8f9fc;
}

@media (max-width: 720px) {
  .person-toolbar {
    grid-template-columns: 1fr;
  }
  .person-search {
    grid-template-columns: 1fr;
  }
  .person-add-btn {
    width: 100%;
  }
  .person-hero-actions {
    grid-template-columns: 1fr;
  }
  .person-hero-actions .btn-primary {
    order: -1;
  }
}

@media (min-width: 900px) {
  .person-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .person-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr);
    grid-template-areas:
      "main stats"
      "actions actions";
    align-items: center;
  }
  .person-hero-main { grid-area: main; }
  .person-hero-stats { grid-area: stats; }
  .person-hero-actions {
    grid-area: actions;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
  }
}
