/* Sirb Admin shared components.
   Buttons, forms, dropdowns, modals, tables, chips, badges, empty states, and reusable controls. */

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .search-box {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  .search-box input,
  .search-box kbd {
    display: none;
  }

  .search-box.focused {
    position: absolute;
    z-index: 40;
    inset: 9px 12px;
    display: flex;
    width: auto;
    padding: 0 12px;
  }

  .search-box.focused input {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border-radius: 17px;
  }

  .modal > header,
  .modal form {
    padding-inline: 18px;
  }

  .toast {
    width: calc(100% - 28px);
    justify-content: center;
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 800;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(7,18,10,.62);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s;
}

.modal {
  width: min(540px, 100%);
  overflow: visible;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 25px 80px rgba(0,0,0,.25);
  animation: slideUp .25s ease;
}

.modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 21px 23px 18px;
  border-bottom: 1px solid var(--line);
}

.modal > header > div {
  display: flex;
  gap: 12px;
}

.modal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.modal h2 {
  margin: 0;
  font-size: 15px;
}

.modal header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.modal form {
  display: grid;
  gap: 15px;
  padding: 22px 23px;
}

.modal label {
  display: grid;
  gap: 6px;
  color: #445148;
  font-size: 9px;
  font-weight: 700;
}

.modal input,
.modal select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #dfe5e0;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 10px;
}

.modal input:focus,
.modal select:focus {
  border-color: rgba(25,176,0,.55);
  box-shadow: 0 0 0 3px rgba(25,176,0,.07);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 5px;
}

.dark-theme .search-box,
.dark-theme .icon-button,
.dark-theme .secondary-button,
.dark-theme .filter-button,
.dark-theme .panel-header select {
  color: #a8b3ab;
  border-color: #324039;
  background: #1c2920;
}

.dark-theme .search-box kbd {
  color: #8d9a91;
  border-color: #39473e;
  background: #243129;
}

.dark-theme th {
  background: #1b281f;
}

.dark-theme tbody tr:hover {
  background: #1a271e;
}

.dark-theme .chart-lines i,
.dark-theme th,
.dark-theme td {
  border-color: #29352d;
}

.dark-theme .bars .previous {
  background: #354239;
}

.dark-theme .modal input,
.dark-theme .modal select,
.dark-theme .sirb-dropdown-trigger,
.dark-theme .sirb-dropdown-menu {
  color: var(--ink);
  border-color: #344139;
  background: #1c2920;
}

.dark-theme .sirb-dropdown-icon {
  color: #9cf28e;
  background: #1d3021;
}

.dark-theme .sirb-dropdown-search {
  border-color: #344139;
}

.dark-theme .sirb-dropdown-search input {
  color: var(--ink);
}

.dark-theme .sirb-dropdown-options button:hover,
.dark-theme .sirb-dropdown-options button.selected {
  color: #9cf28e;
  background: #1d3021;
}

.dark-theme .sirb-dropdown.invalid .sirb-dropdown-trigger,
.dark-theme .modal .field-invalid input {
  border-color: #8f3d3d;
  background: #2a1e1e;
  box-shadow: 0 0 0 4px rgba(239,68,68,.1);
}

.dark-theme .sirb-dropdown.invalid .sirb-dropdown-icon {
  color: #ff9a9a;
  background: #3a2323;
}

.dark-theme .field-invalid,
.dark-theme .field-error,
.dark-theme .field-error .material-symbols-rounded {
  color: #ff9a9a !important;
}

.material-symbols-rounded {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  vertical-align: middle;
  font-size: 21px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 430, 'GRAD' 0, 'opsz' 24;
}

.sirb-dropdown {
  position: relative;
  min-width: 0;
}

.sirb-dropdown.open {
  z-index: 330;
}

.sirb-dropdown-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--surface);
  text-align: inherit;
  transition: .18s ease;
}

.sirb-dropdown-trigger:hover,
.sirb-dropdown.open .sirb-dropdown-trigger {
  border-color: rgba(25,176,0,.45);
  box-shadow: 0 0 0 4px rgba(25,176,0,.07);
}

.sirb-dropdown.invalid .sirb-dropdown-trigger {
  border-color: #ef9b9b;
  background: color-mix(in srgb, var(--surface) 88%, #fff1f1);
  box-shadow: 0 0 0 4px rgba(239,68,68,.08);
}

.sirb-dropdown.invalid .sirb-dropdown-icon {
  color: #c83f3f;
  background: #ffe5e5;
}

.sirb-dropdown-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 19px;
}

.sirb-dropdown-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.sirb-dropdown-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.sirb-dropdown-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sirb-dropdown-copy strong.placeholder {
  color: var(--muted);
  font-weight: 700;
}

.sirb-dropdown-chevron {
  color: var(--muted);
  font-size: 20px;
  transition: .18s ease;
}

.sirb-dropdown.open .sirb-dropdown-chevron {
  transform: rotate(180deg);
}

.sirb-dropdown-menu {
  position: fixed;
  z-index: 10060;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(10,25,15,.18);
}

.sirb-dropdown-menu.above {
  box-shadow: 0 -18px 42px rgba(10,25,15,.16);
}

.sirb-dropdown-search,
.modal .sirb-dropdown-search {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  color: var(--muted);
  background: inherit;
  font-size: 13px;
  font-weight: 700;
}

.sirb-dropdown-search .material-symbols-rounded {
  width: 20px;
  height: 20px;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 20px;
}

.sirb-dropdown-search input,
.modal .sirb-dropdown-search input {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.sirb-dropdown-search input:focus,
.modal .sirb-dropdown-search input:focus {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.sirb-dropdown-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

.sirb-dropdown-options {
  min-height: 0;
  overflow-y: auto;
  padding: 5px;
}

.sirb-dropdown-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: inherit;
}

.sirb-dropdown-options button:hover,
.sirb-dropdown-options button.selected {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.sirb-dropdown-options .material-symbols-rounded {
  color: var(--brand-dark);
  font-size: 18px;
}

.sirb-dropdown-empty {
  margin: 0;
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.compact-dropdown {
  width: 180px;
}

.compact-dropdown .sirb-dropdown-trigger {
  min-height: 39px;
  border-radius: 10px;
}

.compact-dropdown .sirb-dropdown-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 17px;
}

.compact-dropdown .sirb-dropdown-copy small {
  display: none;
}

.compact-dropdown .sirb-dropdown-copy strong {
  font-size: 12px;
}

.field-invalid {
  color: #a83232 !important;
}

.modal label.field-invalid {
  gap: 4px;
}

.modal .field-invalid input {
  border-color: #ef9b9b;
  background: color-mix(in srgb, var(--surface) 88%, #fff1f1);
  box-shadow: 0 0 0 4px rgba(239,68,68,.08);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 0;
  color: #b43d3d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.modal label.field-invalid .field-error {
  margin-top: 0;
}

.field-error .material-symbols-rounded {
  color: #d74242;
  font-size: 16px;
}

.soft-link {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.soft-link:hover {
  color: var(--brand-dark);
}

.school-monogram {
  color: #056d0b;
  background: linear-gradient(135deg, #d8ffd9, #c7f6df);
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 190px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #647069;
  background: color-mix(in srgb, var(--surface) 88%, #effff0);
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
}

.location-chip .material-symbols-rounded {
  color: var(--brand-dark);
  font-size: 17px;
}

button,
a,
input,
.sirb-dropdown-trigger {
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 30px;
  padding: 8px;
  border-radius: 22px;
  color: var(--ink);
}

.brand:hover {
  background: transparent;
}

.sirb-brand-logo {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  flex-basis: 54px;
  width: 54px;
  height: 54px;
  padding: 8px;
  border-radius: 18px;
  background: var(--sirb-brand-solid, var(--brand));
  box-shadow: 0 18px 34px rgba(18,183,0,.2);
}

.sirb-brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  gap: 6px;
}

.brand strong,
.brand small,
.login-brand strong,
.login-brand small {
  display: block;
}

.brand strong {
  font-size: 22px;
  line-height: 1;
}

.brand small {
  font-size: 11px;
  line-height: 1.25;
}

.nav-label {
  margin: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
}

.app-version-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 7px 0;
  padding: 8px 10px;
  border: 1px solid rgba(18,183,0,.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(18,183,0,.045);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.app-version-note b {
  color: var(--brand-dark);
  font-weight: 900;
  white-space: nowrap;
}

.footer-version {
  color: var(--muted-strong);
  font-weight: 800;
}

.avatar {
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
}

/* Shared top-bar control structure. Visual refinement remains below so this
   foundation can safely replace the equivalent legacy styles.css rules. */
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #e2e7e3;
  transition: .2s ease;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input::placeholder {
  color: #a7b0aa;
}

.search-box kbd {
  padding: 2px 6px;
  border: 1px solid #dfe4e0;
  border-radius: 5px;
  font: 9px Arial;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 40px;
  width: 40px;
  padding: 0;
  place-content: center;
  line-height: 1;
  transition: .2s ease;
}

.icon-button > .material-symbols-rounded {
  width: 1em;
  height: 1em;
}

.notification-button {
  position: relative;
}

.notification-button i {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1.5px solid white;
  border-radius: 50%;
  background: #ef4444;
}

.primary-button,
.secondary-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  transition: .2s ease;
}

.primary-button {
  border: 1px solid var(--brand);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
}

.search-box,
.icon-button,
.language-switch,
.filter-search,
.filter-panel-toggle,
.primary-button,
.secondary-button,
.filter-button,
.pagination button {
  border-radius: 16px;
}

.search-box {
  width: min(460px, 32vw);
  height: var(--control-h);
  padding: 0 14px;
  border-color: rgba(207,225,214,.9);
  color: var(--muted);
  background: rgba(250,253,251,.92);
}

.search-box.focused {
  width: min(520px, 38vw);
  border-color: rgba(18,183,0,.34);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(18,183,0,.08);
}

.search-box input {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.search-box kbd {
  border-color: rgba(207,225,214,.9);
  color: #7c8b82;
  background: #fff;
  font-size: 11px;
}

.icon-button,
.language-switch {
  display: inline-grid;
  min-width: var(--control-h);
  height: var(--control-h);
  place-items: center;
  border: 1px solid rgba(207,225,214,.9);
  color: var(--muted-strong);
  background: rgba(250,253,251,.9);
}

.language-switch {
  display: inline-flex;
  gap: 8px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
}

.icon-button:hover,
.language-switch:hover,
.secondary-button:hover,
.filter-panel-toggle:hover,
.filter-panel-toggle.active {
  color: var(--brand-dark);
  border-color: rgba(18,183,0,.28);
  background: rgba(239,252,239,.92);
  box-shadow: 0 10px 22px rgba(18,183,0,.08);
}

.notification-button i {
  top: 12px;
  right: 12px;
}

.primary-button {
  min-height: var(--control-h);
  border: 0;
  background: linear-gradient(135deg, #18c900 0%, #0aa000 58%, #078600 100%);
  box-shadow: 0 15px 30px rgba(18,183,0,.2);
  font-size: 15px;
  font-weight: 900;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(18,183,0,.26);
}

.secondary-button,
.filter-button {
  min-height: var(--control-h);
  border-color: rgba(207,225,214,.9);
  color: var(--muted-strong);
  background: rgba(255,255,255,.74);
  font-size: 15px;
  font-weight: 900;
}

.eyebrow,
.panel-kicker {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .02em;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
}

/* Dashboard card primitives. The current scale and responsive refinements
   intentionally follow these structural declarations. */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  min-width: 0;
  min-height: 176px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.kpi-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
  font-size: 19px;
}

.kpi-icon.green { color: #148b03; background: #eaf8e8; }
.kpi-icon.blue { color: #0781b5; background: #e7f5fc; }
.kpi-icon.purple { color: #7445c2; background: #f0eafd; }
.kpi-icon.orange { color: #c87800; background: #fff3dc; }

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  direction: ltr;
}

.trend .material-symbols-rounded { font-size: 14px; }
.trend.up { color: #149002; }
.trend.down { color: #e44949; }

.kpi-card > small { display: block; font-size: 9px; }
.kpi-card > strong {
  display: block;
  margin-top: 2px;
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: -.03em;
  direction: ltr;
  text-align: right;
}
.kpi-card > p { margin: 0; color: #9aa39d; font-size: 8px; }

.spark {
  position: absolute;
  left: 17px;
  bottom: 18px;
  display: flex;
  align-items: end;
  gap: 3px;
  width: 62px;
  height: 28px;
  opacity: .75;
}

.spark i {
  flex: 1;
  min-height: 4px;
  border-radius: 3px;
  background: linear-gradient(to top, #b9e8b2, var(--brand));
}

.kpi-card > strong {
  font-size: 32px;
}

.kpi-card > small,
.kpi-card > p,
.chart-summary div:first-child span,
.bar-group > span,
.live-stats p,
.alert-item p,
.alert-item small {
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
}

.panel-header p {
  margin-inline: 0;
  margin-bottom: 0;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.6;
}

.panel-header select {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: #6c766f;
  background: #fff;
  font-size: 11px;
}

/* Dashboard visualization structure. Visual scale and colors are refined
   later in this file, while radial artwork remains page-owned. */
.chart-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 19px 21px 0;
}

.chart-summary div:first-child strong,
.chart-summary div:first-child span {
  display: block;
}

.chart-summary div:first-child strong {
  font-size: 23px;
  line-height: 1.2;
  direction: ltr;
}

.chart-summary div:first-child span {
  font-size: 8px;
}

.chart-legend {
  display: flex;
  gap: 15px;
  font-size: 8px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.bar-chart {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-around;
  height: 205px;
  padding: 10px 20px 20px;
  direction: rtl;
}

.chart-lines {
  position: absolute;
  inset: 14px 20px 39px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-lines i {
  display: block;
  border-top: 1px dashed #eef1ee;
}

.bar-group {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 10%;
  height: 100%;
}

.bars {
  display: flex;
  align-items: end;
  gap: 4px;
  width: 22px;
  height: 145px;
}

.bars i {
  width: 9px;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  transition: height .4s ease;
}

.bars .previous {
  background: #dfe7e0;
}

.bars .current {
  background: linear-gradient(to top, #22bb0b, #5fd94d);
  box-shadow: 0 4px 10px rgba(25,176,0,.12);
}

.bar-group > span {
  margin-top: 9px;
  font-size: 8px;
  white-space: nowrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 20px;
  color: #168d06;
  background: #ecf9ea;
  font-size: 8px;
  font-weight: 700;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(25,176,0,.12);
  animation: pulse 1.8s infinite;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 18px 16px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.live-stats > div {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--line);
}

.live-stats > div:last-child {
  border: 0;
}

.live-stats p {
  margin: 0;
  font-size: 7px;
}

.live-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.live-panel > .secondary-button {
  display: flex;
  width: calc(100% - 36px);
  margin: 0 18px 18px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  min-width: 0;
  height: var(--control-h);
  padding-inline: 14px;
  border: 1px solid var(--sirb-border);
  color: var(--sirb-muted);
}

.filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.filter-panel-toggle {
  min-height: var(--control-h);
  padding: 0 18px;
  color: var(--muted-strong);
  background: rgba(255,255,255,.74);
  font-size: 15px;
}

.filter-panel-toggle b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  margin-inline: 1px;
  color: var(--brand);
  background: rgba(0, 190, 20, .14);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.filter-panel {
  border-color: rgba(207,225,214,.92);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 70px rgba(17,37,24,.16);
  backdrop-filter: blur(18px);
}

.filter-panel h2 {
  font-size: 21px;
}

.filter-panel p {
  font-size: 14px;
}

.date-range-filter {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border-color: rgba(18,183,0,.15);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(240,253,240,.75), rgba(255,255,255,.86));
}

.date-range-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.date-range-title > .material-symbols-rounded {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--sirb-brand-solid);
  background: var(--sirb-brand-soft);
  font-size: 22px;
}

.date-range-title div,
.date-range-title strong,
.date-range-title small {
  min-width: 0;
}

.date-range-title strong,
.date-range-title small {
  display: block;
  overflow-wrap: anywhere;
}

.date-range-title strong {
  color: var(--sirb-text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
}

.date-range-title small {
  margin-top: 3px;
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.date-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.date-range-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 850;
}

.date-range-grid input,
.modal input,
.modal select {
  min-height: var(--control-h);
  border-color: rgba(207,225,214,.95);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  font-size: 15px;
  font-weight: 800;
}

.date-range-grid input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.date-range-grid input:focus,
.modal input:focus,
.modal select:focus {
  border-color: rgba(18,183,0,.34);
  box-shadow: 0 0 0 5px rgba(18,183,0,.08);
}

.sirb-dropdown-trigger {
  min-height: 58px;
  border-color: rgba(207,225,214,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
}

.sirb-dropdown-trigger:hover,
.sirb-dropdown.open .sirb-dropdown-trigger {
  border-color: rgba(18,183,0,.34);
  box-shadow: 0 0 0 5px rgba(18,183,0,.08);
}

.sirb-dropdown.disabled .sirb-dropdown-trigger,
.sirb-dropdown.disabled .sirb-dropdown-trigger:hover {
  cursor: default;
  border-style: dashed;
  border-color: rgba(117,142,130,.34);
  background: rgba(117,142,130,.075);
  box-shadow: none;
  opacity: 1;
}

.sirb-dropdown.disabled .sirb-dropdown-icon {
  color: var(--muted-strong);
  background: rgba(117,142,130,.12);
}

.sirb-dropdown.disabled .sirb-dropdown-chevron {
  opacity: 0;
}

.field-note {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.sirb-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.sirb-dropdown-copy small {
  font-size: 12px;
}

.sirb-dropdown-copy strong {
  font-size: 16px;
}

.sirb-dropdown-options {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px 8px 16px;
}

.sirb-dropdown-options button {
  min-height: 44px;
  border-radius: 14px;
  font-size: 14px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(222,236,227,.46);
  text-align: right;
  font-size: 15px;
}

.ltr th,
.ltr td {
  text-align: left;
}

tbody td {
  border-bottom-color: rgba(222,236,227,.38);
}

th {
  color: #718078;
  background: rgba(245,250,246,.92);
  font-size: 13px;
  font-weight: 900;
}

tbody tr {
  background: rgba(255,255,255,.64);
  transition: background .15s;
}

tbody tr:hover {
  background: rgba(240,253,240,.66);
}

.org-link {
  gap: 13px;
}

.org-link strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.org-link small {
  max-width: 210px;
  color: var(--muted);
  font-size: 12px;
}

.org-monogram {
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  flex-basis: 48px;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  overflow: hidden;
}

.state {
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.state i {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.state.active i {
  background: #25b70f;
}

.state.pending i {
  background: #f59e0b;
}

.state.paused {
  color: #c74444;
  background: #fff0f0;
}

.state.paused i {
  background: #ef4444;
}

.plan-chip,
.country-chip,
.date-chip-small,
.location-chip {
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(207,225,214,.9);
  background: rgba(255,255,255,.72);
  font-size: 14px;
}

.plan-chip {
  color: var(--brand-dark);
  background: rgba(232,251,232,.82);
}

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted-strong);
  font-weight: 800;
}

.count-chip .material-symbols-rounded,
.date-chip-small .material-symbols-rounded,
.location-chip .material-symbols-rounded {
  color: #789084;
  font-size: 21px;
}

.row-action {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.row-action .material-symbols-rounded {
  font-size: 24px;
  line-height: 1;
}

.row-action:hover,
.row-action.active {
  color: var(--brand);
  border-color: rgba(25,176,0,.18);
  background: rgba(25,176,0,.08);
}

.row-action.active {
  box-shadow: inset 0 0 0 1px rgba(25,176,0,.16);
}

.row-action-menu {
  position: fixed;
  z-index: 240;
  display: grid;
  width: 214px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(10,25,15,.2);
}

.row-action-menu a,
.row-action-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: inherit;
  white-space: nowrap;
}

.row-action-menu a:hover,
.row-action-menu button:hover {
  background: var(--canvas);
}

.row-action-menu .material-symbols-rounded {
  color: var(--muted);
  font-size: 20px;
}

.row-action-menu button.danger {
  color: #b43d3d;
}

.row-action-menu button.danger .material-symbols-rounded {
  color: #c64b4b;
}

.pagination {
  min-height: 74px;
  padding: 14px 20px;
  border-top-color: rgba(207,225,214,.82);
  font-size: 14px;
}

.pagination button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
}

.reusable-empty {
  padding: 90px 24px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.empty-illustration {
  width: 96px;
  height: 84px;
  border-color: rgba(18,183,0,.16);
  border-radius: 30px;
  background: linear-gradient(145deg, #fbfffb, #e8fbe9);
}

.empty-illustration > .material-symbols-rounded {
  font-size: 42px;
}

.empty-state h3 {
  margin: 10px 0 3px;
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
}

.list-feedback,
.detail-skeleton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 340px;
  font-size: 15px;
  text-align: center;
}

.detail-skeleton.compact {
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.list-error {
  margin: 28px;
  padding: 22px;
  border-color: #f2d0d0;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff8f8, #fff);
}

.modal-backdrop {
  background: rgba(7,18,10,.48);
  backdrop-filter: blur(10px);
}

.modal {
  display: flex;
  flex-direction: column;
  max-height: min(860px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(207,225,214,.82);
  border-radius: 28px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 34px 90px rgba(8,22,13,.24);
}

.ltr .modal {
  text-align: left;
}

.modal > header {
  flex: 0 0 auto;
  padding: 24px 26px 20px;
  border-color: rgba(207,225,214,.82);
}

.modal h2 {
  font-size: 23px;
  letter-spacing: -.025em;
}

.modal header p,
.modal label {
  font-size: 14px;
}

.modal form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 18px;
  padding: 24px 26px 0;
  scrollbar-color: rgba(25,176,0,.32) transparent;
  scrollbar-width: thin;
}

.modal form::-webkit-scrollbar {
  width: 8px;
}

.modal form::-webkit-scrollbar-track {
  background: transparent;
}

.modal form::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(25,176,0,.28);
  background-clip: padding-box;
}

.modal form > footer {
  position: sticky;
  z-index: 3;
  bottom: 0;
  margin: 8px -26px 0;
  padding: 16px 26px 22px;
  border-top: 1px solid rgba(207,225,214,.72);
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.98) 34%);
  backdrop-filter: blur(16px);
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 26px;
}

.field-error {
  margin-top: 5px;
  color: #c24141;
  font-size: 12px;
}

.status-modal {
  border-radius: 28px;
}

.status-modal-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
}

.toast {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: -80px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 18px;
  color: #fff;
  background: rgba(16,32,24,.94);
  box-shadow: 0 20px 55px rgba(0,0,0,.22);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-50%);
  transition: .3s ease;
}

.toast .material-symbols-rounded {
  color: #62da50;
}

.toast.error {
  background: rgba(74, 24, 22, .96);
  border-color: rgba(255, 143, 133, .35);
}

.toast.error .material-symbols-rounded {
  color: #ff8f85;
}

.phone-input input,
.otp-input {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.dark-theme {
  --ink: #edf6ef;
  --muted: #9aac9f;
  --muted-strong: #c1d1c6;
  --line: #273c30;
  --surface: rgba(19,31,23,.92);
  --surface-solid: #142019;
  --canvas: #0b130e;
  --sidebar: #111d15;
  --shadow: 0 18px 48px rgba(0,0,0,.24);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.2);
  color-scheme: dark;
}

.dark-theme .modal form > footer {
  border-color: rgba(49,70,56,.82);
  background: linear-gradient(180deg, rgba(19,31,23,.84), rgba(15,25,18,.98) 34%);
}

.dark-theme .search-box,
.dark-theme .icon-button,
.dark-theme .language-switch,
.dark-theme .secondary-button,
.dark-theme .filter-panel-toggle,
.dark-theme .filter-search,
.dark-theme .modal input,
.dark-theme .modal select,
.dark-theme .date-range-grid input,
.dark-theme .sirb-dropdown-trigger,
.dark-theme .pagination button,
.dark-theme .country-chip,
.dark-theme .date-chip-small,
.dark-theme .location-chip {
  border-color: rgba(49,70,56,.95);
  color: var(--muted-strong);
  background: rgba(21,35,25,.86);
}

.dark-theme th {
  color: #9dafa4;
  background: rgba(20,33,24,.96);
  border-bottom-color: rgba(220,244,226,.18);
}

.dark-theme tbody tr {
  background: rgba(18,30,22,.62);
}

.dark-theme tbody td {
  border-bottom-color: rgba(220,244,226,.13);
}

.dark-theme tbody tr:hover {
  background: rgba(38,62,43,.52);
}

.dark-theme .app-version-note {
  border-color: rgba(113,242,96,.13);
  color: #82938a;
  background: rgba(113,242,96,.045);
}

.dark-theme .app-version-note b {
  color: #71f260;
}

.dark-theme .phone-input input,
.dark-theme .otp-input {
  color: var(--ink);
  background: transparent;
}

.dark-theme .phone-input span {
  color: var(--muted-strong);
  border-color: rgba(68,91,76,.95);
  background: rgba(15,25,18,.86);
}

.dark-theme .list-error {
  border-color: rgba(149,65,65,.82);
  background: linear-gradient(145deg, rgba(62,31,31,.9), rgba(33,24,24,.92));
}

@media (max-width: 640px) {
  .search-box.focused {
      inset: 12px;
      height: 46px;
      border-radius: 16px;
    }

  .modal {
      border-radius: 24px;
    }

  .modal > header,
    .modal form {
      padding-inline: 20px;
    }

}

.sirb-dropdown-menu {
  position: fixed;
  z-index: 10060;
}

.modal input,
.modal select,
.modal .sirb-dropdown-trigger,
.modal .date-range-grid input,
.modal .phone-input,
.modal .otp-input {
  box-sizing: border-box;
  outline: 0;
}

.modal input:focus,
.modal select:focus,
.modal .date-range-grid input:focus,
.modal .otp-input:focus,
.modal .sirb-dropdown-trigger:hover,
.modal .sirb-dropdown.open .sirb-dropdown-trigger {
  border-color: rgba(18,183,0,.42) !important;
  box-shadow: inset 0 0 0 2px rgba(18,183,0,.12) !important;
  transform: none !important;
}

.modal .field-invalid input,
.modal .sirb-dropdown.invalid .sirb-dropdown-trigger {
  box-shadow: inset 0 0 0 2px rgba(239,68,68,.1) !important;
}

.sirb-dropdown-search,
.modal .sirb-dropdown-search {
  border: 0 !important;
  background: inherit !important;
  box-shadow: none !important;
}

.sirb-dropdown-search input,
.modal .sirb-dropdown-search input,
.sirb-dropdown-search input:focus,
.modal .sirb-dropdown-search input:focus {
  min-height: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.access-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  font-weight: 800;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-scope-chip .material-symbols-rounded { font-size: 19px; color: var(--brand-dark); }

.compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.compact-action:hover { border-color: var(--brand); color: var(--brand-dark); }

.compact-action .material-symbols-rounded { font-size: 19px; }

.readonly-field {
  opacity: 1;
}

.readonly-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px dashed rgba(117, 142, 130, .42);
  border-radius: 18px;
  padding: 6px 8px 6px 14px;
  background: rgba(117, 142, 130, .08);
}

.readonly-control input[readonly] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  box-shadow: none;
  cursor: default;
}

.readonly-control .icon-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.status-readonly {
  justify-content: flex-start;
  color: var(--muted-strong);
}

.status-readonly > .material-symbols-rounded {
  color: var(--brand);
}

.invite-landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.invite-card {
  width: min(620px, 100%);
  border: 1px solid rgba(188, 224, 203, .72);
  border-radius: 34px;
  padding: clamp(28px, 6vw, 56px);
  background: rgba(245, 255, 250, .9);
  box-shadow: 0 30px 90px rgba(16, 55, 27, .16);
  text-align: center;
}

.invite-card-icon {
  width: 74px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  border-radius: 24px;
  margin-bottom: 18px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 34px;
}

.invite-card h1 {
  max-width: 520px;
  margin: 10px auto 12px;
  color: var(--ink);
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.invite-unavailable h1 {
  font-size: clamp(26px, 2.8vw, 34px);
}

.invite-card p {
  margin: 0 auto 24px;
  max-width: 480px;
  color: var(--muted-strong);
  font-size: 18px;
}

.invite-token-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--muted-strong);
  background: rgba(117, 142, 130, .08);
}

.invite-token-preview code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-summary {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.invite-summary > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(188,224,203,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.46);
  text-align: start;
}

.invite-summary .material-symbols-rounded {
  grid-row: span 2;
  color: var(--brand);
}

.invite-summary small {
  color: var(--muted);
  font-weight: 800;
}

.invite-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-method .primary-button {
  width: 100%;
}

.readonly-phone {
  border-style: dashed;
  background: rgba(117,142,130,.075);
}

.readonly-phone input[readonly] {
  cursor: default;
}

.invite-unavailable {
  display: grid;
  gap: 14px;
}

.dark-theme .invite-card {
  border-color: rgba(179, 245, 194, .18);
  background: rgba(13, 35, 22, .9);
}

.dark-theme .readonly-control,
.dark-theme .invite-token-preview,
.dark-theme .invite-summary > div,
.dark-theme .readonly-phone {
  border-color: rgba(179, 245, 194, .2);
  background: rgba(255, 255, 255, .045);
}

.dark-theme .readonly-control input[readonly] {
  color: rgba(224, 244, 233, .76);
}

.inline-access-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.inline-access-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.inline-access-title > .material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--brand-dark);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}

.inline-access-title strong,
.inline-access-title small { display: block; }

.inline-access-title small { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scope-options > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
  text-align: start;
  font: inherit;
  cursor: pointer;
}

.scope-options > button > .material-symbols-rounded:first-child { color: var(--muted); font-size: 25px; }

.scope-options strong, .scope-options small { display: block; }

.scope-options strong { font-size: 15px; }

.scope-options small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.scope-options .scope-check { color: transparent; font-size: 21px; }

.scope-options > button.selected { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, transparent); }

.scope-options > button.selected > .material-symbols-rounded:first-child,
.scope-options > button.selected .scope-check { color: var(--brand-dark); }

.scope-options.compact > button {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
}

.scope-options.compact small { display: none; }

@media (max-width: 620px) {
  .scope-options { grid-template-columns: 1fr; }

  .compact-action > span:last-child { display: none; }

  .compact-action { width: 38px; padding: 6px; }

}

.date-chip-small,
.location-chip,
.country-chip,
.plan-chip,
.state {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
}

.date-chip-small,
.location-chip {
  display: inline-flex;
  overflow: hidden;
  justify-content: center;
  text-overflow: ellipsis;
}

.date-chip-small {
  max-width: 142px;
  padding-inline: 9px;
}

.location-chip {
  max-width: 166px;
  padding-inline: 9px;
}

.table-text-clip {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--muted-strong, var(--muted));
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiet-danger-button,
.quiet-danger-button:hover,
.quiet-danger-button:focus {
  border-color: rgba(207,225,214,.9) !important;
  color: var(--muted-strong) !important;
  background: rgba(255,255,255,.74) !important;
  box-shadow: none !important;
  transform: none !important;
}

.quiet-danger-button:hover,
.quiet-danger-button:focus {
  border-color: rgba(190,76,76,.42) !important;
  color: #b64a4a !important;
  background: rgba(190,76,76,.075) !important;
}

.dark-theme .quiet-danger-button,
.dark-theme .quiet-danger-button:hover,
.dark-theme .quiet-danger-button:focus {
  box-shadow: none !important;
}

.dark-theme .quiet-danger-button {
  border-color: rgba(93,122,103,.52) !important;
  color: var(--muted-strong) !important;
  background: rgba(18,31,23,.78) !important;
}

.dark-theme .quiet-danger-button:hover,
.dark-theme .quiet-danger-button:focus {
  border-color: rgba(190,76,76,.35) !important;
  color: #e1aaa8 !important;
  background: rgba(190,76,76,.09) !important;
}

@media (max-width: 640px) {
  .modal-backdrop {
      padding: 10px;
    }

  .modal {
      max-height: calc(100dvh - 20px);
    }

  .modal form > footer {
      margin-inline: -20px;
      padding: 14px 20px 18px;
    }

}

.date-chip-small .material-symbols-rounded,
.location-chip .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 18px;
}

.chip-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-chip-small,
.location-chip,
.state {
  gap: 7px;
}

.date-chip-small .chip-label,
.location-chip .chip-label,
.state .chip-label {
  max-width: 100%;
}

.date-chip-small {
  width: min(100%, 142px);
}

.location-chip {
  width: min(100%, 166px);
}

.state {
  max-width: 112px;
}

@media (max-width: 940px) {
  .search-box,
    .search-box.focused {
      position: relative !important;
      inset: auto !important;
      display: grid !important;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      justify-content: stretch;
      flex: 1 1 auto !important;
      width: min(380px, 48vw) !important;
      min-width: 180px !important;
      height: 46px !important;
      padding: 0 12px !important;
      gap: 8px !important;
      border-radius: 16px !important;
      overflow: hidden;
      line-height: 1 !important;
    }

  .search-box input,
    .search-box.focused input {
      display: block !important;
      min-width: 0 !important;
      width: 100% !important;
      font-size: 14px !important;
      text-overflow: ellipsis;
    }

  .search-box kbd,
    .search-box.focused kbd {
      display: none !important;
    }

  .search-box > .material-symbols-rounded {
      position: static !important;
      width: auto !important;
      height: auto !important;
      font-size: 23px !important;
      line-height: 1 !important;
      transform: none !important;
    }

}

@media (max-width: 640px) {
  .search-box,
    .search-box.focused {
      position: relative !important;
      inset: auto !important;
      display: grid !important;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      justify-content: stretch;
      flex: 1 1 auto !important;
      width: 100% !important;
      min-width: 0 !important;
      height: 46px !important;
      padding: 0 12px !important;
      gap: 8px !important;
      border-radius: 16px !important;
    }

  .search-box input,
    .search-box.focused input {
      display: block !important;
      min-width: 0 !important;
      width: 100% !important;
      font-size: 14px !important;
      text-overflow: ellipsis;
    }

  .search-box kbd,
    .search-box.focused kbd {
      display: none !important;
    }

  .search-box > .material-symbols-rounded {
      position: static !important;
      font-size: 23px !important;
      transform: none !important;
    }

}

.dark-theme th {
  border-bottom-color: rgba(220,244,226,.08) !important;
}

.dark-theme tbody td {
  border-bottom-color: rgba(220,244,226,.075) !important;
}

/* Login feedback: action loading stays inside the card; the full splash is boot-only. */
.auth-error {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 38px !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 18px !important;
  padding: 14px !important;
  border: 1px solid rgba(220, 72, 72, .22) !important;
  border-radius: 18px !important;
  color: #9f2f2f !important;
  background: linear-gradient(135deg, rgba(255, 246, 246, .96), rgba(255, 255, 255, .9)) !important;
  box-shadow: 0 18px 40px rgba(180, 45, 45, .08) !important;
}

.auth-error > .material-symbols-rounded {
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  place-items: center !important;
  border-radius: 14px !important;
  color: #c43b3b !important;
  background: rgba(244, 63, 94, .1) !important;
  font-size: 24px !important;
}

.auth-error p {
  min-width: 0 !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
}

.auth-error button {
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #a04444 !important;
  background: transparent !important;
  cursor: pointer !important;
}

.auth-error button:hover {
  color: #c43b3b !important;
  background: rgba(244, 63, 94, .1) !important;
}

.auth-error button .material-symbols-rounded {
  font-size: 22px !important;
}

.dark-theme .auth-error {
  border-color: rgba(255, 118, 118, .22) !important;
  color: #ffc9c9 !important;
  background: linear-gradient(135deg, rgba(68, 31, 31, .88), rgba(28, 20, 20, .9)) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .2) !important;
}

.dark-theme .auth-error > .material-symbols-rounded {
  color: #ff9b9b !important;
  background: rgba(255, 118, 118, .12) !important;
}

.dark-theme .auth-error button {
  color: #f0b0b0 !important;
}

.auth-inline-loading {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: -2px 0 16px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(18, 183, 0, .16) !important;
  border-radius: 14px !important;
  color: var(--muted-strong) !important;
  background: rgba(18, 183, 0, .055) !important;
  font-weight: 800 !important;
}

.auth-inline-loading span {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(18, 183, 0, .18) !important;
  border-top-color: var(--brand-dark) !important;
  border-radius: 999px !important;
  animation: spin .7s linear infinite !important;
}

.auth-inline-loading p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.dark-theme .auth-inline-loading {
  border-color: rgba(113, 242, 96, .16) !important;
  color: #b9c9be !important;
  background: rgba(113, 242, 96, .06) !important;
}

.dark-theme .auth-inline-loading span {
  border-color: rgba(113, 242, 96, .18) !important;
  border-top-color: #71f260 !important;
}

@media (max-width: 560px) {
  .auth-error {
      grid-template-columns: 38px minmax(0, 1fr) 34px !important;
      gap: 10px !important;
      padding: 12px !important;
    }

  .auth-error > .material-symbols-rounded {
      width: 38px !important;
      height: 38px !important;
      font-size: 22px !important;
    }

  .auth-error p {
      font-size: 14px !important;
    }

}

.human-check {
  display: grid !important;
  gap: 8px !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.human-check-copy {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 22px !important;
}

.human-check-copy > .material-symbols-rounded {
  display: inline-grid !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  place-items: center !important;
  color: var(--brand-dark) !important;
  background: transparent !important;
  font-size: 18px !important;
}

.human-check-copy strong {
  display: inline !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
}

.human-check-copy p {
  display: none !important;
}

.dark-theme .human-check-copy > .material-symbols-rounded {
  color: #71f260 !important;
}

.dark-theme .human-check-copy strong {
  color: #e6f6ea !important;
}

.human-check.has-error .human-check-copy > .material-symbols-rounded {
  color: #c43b3b !important;
}

.dark-theme .human-check.has-error .human-check-copy > .material-symbols-rounded {
  color: #ff9b9b !important;
}

.sirb-map-canvas {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 28%, rgba(0, 194, 0, .2), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(0, 194, 0, .13), transparent 22%),
    linear-gradient(90deg, rgba(0, 128, 0, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 128, 0, .08) 1px, transparent 1px),
    rgba(226, 251, 244, .58);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.dark-theme .sirb-map-canvas {
  background:
    radial-gradient(circle at 24% 28%, rgba(0, 194, 0, .2), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(0, 194, 0, .13), transparent 22%),
    linear-gradient(90deg, rgba(193, 224, 203, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(193, 224, 203, .06) 1px, transparent 1px),
    rgba(6, 20, 13, .9);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.sirb-map-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sirb-map-canvas polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sirb-map-canvas polyline.planned {
  stroke: rgba(0, 180, 0, .78);
  stroke-width: 2.8;
}

.sirb-map-canvas polyline.tracking {
  stroke: rgba(0, 92, 255, .74);
  stroke-width: 2;
  stroke-dasharray: 3 3;
}

.map-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(224, 255, 233, .94);
  border-radius: 999px;
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(0, 80, 0, .25);
}

.map-marker i {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.map-marker.skipped,
.map-marker.absent {
  background: #7a7f80;
}

.map-empty-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  max-width: 360px;
  margin: auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.map-empty-copy .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 4px;
  border-radius: 22px;
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
  font-size: 36px;
}

.map-empty-copy strong {
  color: var(--ink);
  font-size: 22px;
}

.stop-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
  font-weight: 900;
}

.plain-table-text {
  display: inline-block;
  max-width: 260px;
  color: var(--text);
  font-weight: 850;
}

.detail-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px solid rgba(207, 225, 214, .35);
}

.detail-list-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.detail-list-note .material-symbols-rounded {
  color: var(--brand);
  font-size: 18px;
}

.table-stacked-value {
  display: grid;
  gap: 4px;
}

.table-stacked-value strong {
  color: var(--ink);
}

.table-stacked-value small {
  color: var(--muted);
  font-weight: 700;
}

.readonly-select-card {
  display: grid;
  align-content: center;
  min-height: 82px;
  padding: 14px 16px;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
}

.readonly-select-card label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.readonly-select-card div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.readonly-select-card .material-symbols-rounded {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--brand);
  background: rgba(0, 188, 0, .10);
}

.readonly-select-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.modal textarea,
.polished-textarea-field textarea.polished-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 128px;
  padding: 16px 18px;
  resize: vertical;
  border: 1px solid rgba(207, 225, 214, .95);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.modal textarea::placeholder,
.polished-textarea-field textarea.polished-textarea::placeholder {
  color: var(--muted);
  font-weight: 800;
}

.modal textarea:hover,
.polished-textarea-field textarea.polished-textarea:hover {
  border-color: rgba(18, 183, 0, .34);
  box-shadow: inset 0 0 0 2px rgba(18, 183, 0, .08);
}

.modal textarea:focus,
.polished-textarea-field textarea.polished-textarea:focus {
  border-color: rgba(18, 183, 0, .42);
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 2px rgba(18, 183, 0, .12);
}

.detail-skeleton.compact {
  justify-content: center;
  padding: 16px;
}

.dark-theme .readonly-select-card {
  border-color: rgba(196, 214, 198, .20);
  background: rgba(11, 33, 23, .84);
}

.dark-theme .readonly-select-card strong {
  color: #e8f5e9;
}

.dark-theme .modal textarea,
.dark-theme .polished-textarea-field textarea.polished-textarea {
  border-color: rgba(49, 70, 56, .95);
  color: var(--muted-strong);
  background: rgba(7, 24, 16, .72);
  box-shadow: none;
}

.dark-theme .modal textarea::placeholder,
.dark-theme .polished-textarea-field textarea.polished-textarea::placeholder {
  color: rgba(196, 214, 198, .58);
}

.dark-theme .modal textarea:hover,
.dark-theme .polished-textarea-field textarea.polished-textarea:hover {
  border-color: rgba(113, 242, 96, .32);
  box-shadow: inset 0 0 0 2px rgba(113, 242, 96, .08);
}

.dark-theme .modal textarea:focus,
.dark-theme .polished-textarea-field textarea.polished-textarea:focus {
  border-color: rgba(113, 242, 96, .45);
  background: rgba(7, 24, 16, .72);
  box-shadow: inset 0 0 0 2px rgba(113, 242, 96, .12);
}

@media (max-width: 980px) {
  .sirb-map-canvas {
      min-height: 340px;
    }

}

.dark-theme {
  --sirb-bg: #09120d;
  --sirb-bg-elevated: #101d15;
  --sirb-surface: rgba(18, 30, 22, .9);
  --sirb-surface-solid: #101d15;
  --sirb-surface-muted: #15271b;
  --sirb-border: rgba(197, 220, 203, .16);
  --sirb-border-strong: rgba(197, 220, 203, .24);
  --sirb-text: #edf7ef;
  --sirb-text-soft: #c6d6ca;
  --sirb-muted: #9cafa2;
  --sirb-muted-2: #7e9086;
  --sirb-brand: #36d229;
  --sirb-brand-hover: #86f17c;
  --sirb-brand-active: #b7ffb2;
  --sirb-brand-soft: rgba(54, 210, 41, .13);
  --sirb-focus: 0 0 0 4px rgba(54, 210, 41, .13);
  --sirb-shadow-sm: 0 12px 30px rgba(0, 0, 0, .2);
  --sirb-shadow-md: 0 22px 58px rgba(0, 0, 0, .28);
  --sirb-shadow-lg: 0 36px 96px rgba(0, 0, 0, .42);
}

.brand {
  margin-bottom: 26px;
}

.table-wrap {
  border-color: var(--sirb-border);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  padding: 18px 20px;
  color: var(--sirb-muted);
  background: color-mix(in srgb, var(--sirb-surface-muted) 76%, transparent);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .005em;
}

td {
  padding: 18px 20px;
  color: var(--sirb-text-soft);
  font-size: 14px;
  font-weight: 750;
}

tbody tr {
  background: transparent;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--sirb-brand-soft) 44%, transparent);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.primary-button {
  border-color: var(--sirb-brand);
  background: linear-gradient(135deg, var(--sirb-brand), var(--sirb-brand-hover));
  box-shadow: 0 14px 30px rgba(22, 163, 11, .22);
}

.primary-button:hover {
  background: linear-gradient(135deg, #20b714, var(--sirb-brand-hover));
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(22, 163, 11, .28);
}

.secondary-button,
.filter-button,
.filter-panel-toggle,
.icon-button,
.language-switch {
  border-color: var(--sirb-border);
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-surface-solid) 86%, transparent);
}

.secondary-button:hover,
.filter-button:hover,
.filter-panel-toggle:hover,
.icon-button:hover,
.language-switch:hover {
  color: var(--sirb-brand-hover);
  border-color: rgba(22, 163, 11, .24);
  background: color-mix(in srgb, var(--sirb-brand-soft) 52%, var(--sirb-surface-solid));
}

.search-box,
.filter-search,
.candidate-search,
.modal input,
.modal select,
.modal textarea,
.date-range-grid input,
.sirb-dropdown-trigger {
  border-color: var(--sirb-border);
  border-radius: var(--sirb-radius-sm);
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-surface-solid) 82%, transparent);
}

.search-box:focus-within,
.filter-search:focus-within,
.candidate-search:focus-within,
.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.date-range-grid input:focus,
.sirb-dropdown.open .sirb-dropdown-trigger {
  border-color: rgba(22, 163, 11, .34);
  background: color-mix(in srgb, var(--sirb-surface-solid) 92%, var(--sirb-brand-soft));
  box-shadow: var(--sirb-focus);
}

.modal-backdrop {
  background: rgba(5, 12, 8, .52);
  backdrop-filter: blur(12px);
}

.modal {
  border: 1px solid var(--sirb-border-strong);
  border-radius: var(--sirb-radius-xl);
  background: color-mix(in srgb, var(--sirb-surface-solid) 96%, transparent);
  box-shadow: var(--sirb-shadow-lg);
}

.modal > header {
  padding: 26px 30px 22px;
  border-color: var(--sirb-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sirb-surface-solid) 94%, var(--sirb-brand-soft)), transparent);
}

.modal h2 {
  color: var(--sirb-text);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 950;
}

.modal header p {
  color: var(--sirb-muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.65;
}

.modal form {
  gap: 20px;
  padding: 26px 30px 0;
}

.modal label {
  gap: 8px;
  color: var(--sirb-text-soft);
  font-size: 14px;
  font-weight: 900;
}

.modal form > footer,
.modal footer {
  gap: 12px;
}

.modal form > footer {
  margin-inline: -30px;
  padding: 18px 30px 24px;
  border-color: var(--sirb-border);
}

.modal form > footer .primary-button,
.modal form > footer .secondary-button,
.modal footer .primary-button,
.modal footer .secondary-button {
  min-width: 132px;
}

.field-error {
  min-height: 18px;
  color: var(--sirb-danger);
  font-size: 12px;
  font-weight: 900;
}

.sirb-dropdown-search,
.modal .sirb-dropdown-search {
  min-height: 46px;
  height: 46px;
  color: var(--sirb-muted);
  background: color-mix(in srgb, var(--sirb-surface-muted) 62%, transparent);
}

.sirb-dropdown-search input,
.modal .sirb-dropdown-search input {
  color: var(--sirb-text);
}

.sirb-dropdown-options button:hover,
.sirb-dropdown-options button.selected,
.row-action-menu a:hover,
.row-action-menu button:hover {
  color: var(--sirb-brand-hover);
  background: var(--sirb-brand-soft);
}

.state {
  border-radius: 999px;
  font-weight: 950;
}

.dark-theme th {
  color: var(--sirb-muted);
  background: rgba(22, 38, 27, .76);
  border-bottom-color: var(--sirb-border);
}

.dark-theme td {
  color: var(--sirb-text-soft);
  border-bottom-color: rgba(197, 220, 203, .12);
}

.dark-theme tbody tr:hover {
  background: rgba(54, 210, 41, .075);
}

.dark-theme .search-box,
.dark-theme .filter-search,
.dark-theme .candidate-search,
.dark-theme .modal input,
.dark-theme .modal select,
.dark-theme .modal textarea,
.dark-theme .date-range-grid input,
.dark-theme .sirb-dropdown-trigger,
.dark-theme .secondary-button,
.dark-theme .filter-button,
.dark-theme .filter-panel-toggle,
.dark-theme .icon-button,
.dark-theme .language-switch {
  border-color: var(--sirb-border);
  color: var(--sirb-text-soft);
  background: rgba(18, 32, 23, .82);
}

.dark-theme .search-box input,
.dark-theme .filter-search input {
  color: #f0f7f1;
}

.dark-theme .search-box input::placeholder,
.dark-theme .filter-search input::placeholder {
  color: #9cab9f;
}

.dark-theme .search-box.focused {
  background: #1c2920;
}

.dark-theme .search-box:focus-within,
.dark-theme .filter-search:focus-within,
.dark-theme .candidate-search:focus-within,
.dark-theme .modal input:focus,
.dark-theme .modal select:focus,
.dark-theme .modal textarea:focus,
.dark-theme .date-range-grid input:focus,
.dark-theme .sirb-dropdown.open .sirb-dropdown-trigger {
  border-color: rgba(54, 210, 41, .38);
  background: rgba(19, 42, 24, .86);
  box-shadow: var(--sirb-focus);
}

.dark-theme .modal > header {
  background: linear-gradient(180deg, rgba(21, 38, 26, .96), rgba(16, 29, 21, .9));
}

.dark-theme .modal form > footer {
  background: linear-gradient(180deg, rgba(16, 29, 21, .76), rgba(10, 20, 14, .98) 38%);
}

@media (max-width: 640px) {
  .modal {
      max-height: calc(100dvh - 20px);
      border-radius: 22px;
    }

  .modal > header,
    .modal form {
      padding-inline: 18px;
    }

  .modal form > footer {
      margin-inline: -18px;
      padding-inline: 18px;
    }

}

.search-box {
  width: min(420px, 34vw);
}

.search-box.focused {
  width: min(470px, 38vw);
}

.search-box input,
.filter-search input,
.candidate-search input,
.modal input,
.modal select,
.modal textarea {
  caret-color: var(--sirb-brand);
}

.date-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--sirb-border);
  border-radius: 999px;
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-surface-solid) 82%, transparent);
  font-size: 13px;
  font-weight: 850;
}

.date-chip .material-symbols-rounded {
  color: var(--brand-dark);
  font-size: 17px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sirb-page-gap);
  margin-bottom: var(--sirb-page-gap);
}

.kpi-card {
  min-height: 184px;
  padding: 22px;
  isolation: isolate;
}

.kpi-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .78;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--sirb-brand-soft) 80%, transparent), transparent 38%),
    linear-gradient(145deg, transparent, rgba(255, 255, 255, .32));
  pointer-events: none;
}

.kpi-top {
  margin-bottom: 18px;
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--sirb-radius-sm);
  font-size: 24px;
}

.kpi-card > small {
  color: var(--sirb-muted);
  font-size: 13px;
  font-weight: 850;
}

.kpi-card > strong {
  margin-top: 4px;
  color: var(--sirb-text);
  font-size: 34px;
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.ltr .kpi-card > strong {
  text-align: left;
}

.kpi-card > p {
  margin-top: 8px;
  color: var(--sirb-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.trend {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sirb-surface-solid) 76%, transparent);
  font-size: 12px;
  font-weight: 900;
}

.trend .material-symbols-rounded {
  font-size: 18px;
}

.trend.up {
  color: var(--sirb-success);
  background: color-mix(in srgb, var(--sirb-brand-soft) 68%, transparent);
}

.trend.down {
  color: var(--sirb-danger);
  background: rgba(214, 74, 69, .09);
}

.spark {
  width: 74px;
  height: 34px;
  opacity: .72;
}

.ltr .spark {
  right: 17px;
  left: auto;
}

.spark i {
  border-radius: 999px;
}

.performance-panel,
.live-panel {
  min-height: 390px;
}

.chart-summary {
  margin: 22px 24px 0;
}

.chart-summary div:first-child strong {
  color: var(--sirb-text);
  font-size: 30px;
  font-weight: 950;
}

.chart-summary div:first-child span,
.chart-legend,
.bar-group > span {
  color: var(--sirb-muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-chart {
  height: 238px;
  padding: 18px 28px 24px;
}

.chart-lines {
  inset: 20px 28px 48px;
}

.chart-lines i {
  border-top-color: color-mix(in srgb, var(--sirb-border) 72%, transparent);
}

.bars {
  width: 28px;
  height: 166px;
}

.bars i {
  width: 11px;
  border-radius: 999px 999px 4px 4px;
}

.bars .previous {
  background: color-mix(in srgb, var(--sirb-border-strong) 72%, transparent);
}

.bars .current {
  background: linear-gradient(to top, var(--sirb-brand-hover), var(--sirb-accent));
}

.live-pill,
.plan-chip,
.country-chip,
.date-chip-small,
.location-chip,
.count-chip {
  border: 1px solid var(--sirb-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--sirb-surface-solid) 74%, transparent);
}

.live-pill {
  font-size: 11px;
}

.live-stats {
  gap: 10px;
  padding-inline: 22px;
}

.live-stats p {
  font-size: 10px;
}

.live-stats strong {
  font-size: 16px;
}

.live-stats div {
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-md);
  background: color-mix(in srgb, var(--sirb-surface-solid) 72%, transparent);
}

.alerts-panel .panel-header {
  padding-bottom: 14px;
}

.alert-count {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--sirb-brand-soft);
  color: var(--sirb-brand-hover);
  font-size: 12px;
  font-weight: 900;
}

.alert-icon {
  display: grid;
  flex: 0 0 40px;
  flex-basis: 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--sirb-radius-sm);
  font-size: 22px;
}

.alert-icon.danger {
  color: #db4545;
  background: #ffeded;
}

.alert-icon.warning {
  color: #c77a00;
  background: #fff3dd;
}

.alert-icon.info {
  color: #1481ae;
  background: #e9f5fb;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 18px 12px;
  padding: 14px;
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-md);
  background: color-mix(in srgb, var(--sirb-surface-solid) 78%, transparent);
}

.alert-item:last-child {
  margin-bottom: 18px;
}

.alert-item > div {
  flex: 1;
  min-width: 0;
}

.alert-item strong {
  display: block;
  color: var(--sirb-text);
  font-size: 14px;
  font-weight: 950;
}

.alert-item p,
.alert-item small {
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 750;
}

.alert-item p {
  margin: 3px 0;
  line-height: 1.6;
}

.alert-item button {
  align-self: center;
  padding: 0;
  border: 0;
  color: var(--sirb-muted);
  background: none;
}

.alert-item button:hover {
  color: var(--sirb-brand-hover);
}

.table-wrap {
  overflow-x: auto;
  scrollbar-color: rgba(22, 163, 11, .28) transparent;
  scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(22, 163, 11, .28);
  background-clip: padding-box;
}

.sortable-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 950;
  text-align: inherit;
}

.sortable-header .material-symbols-rounded {
  color: var(--sirb-muted-2);
  font-size: 18px;
}

.sortable-header:hover,
.sortable-header.active,
.sortable-header.active .material-symbols-rounded {
  color: var(--sirb-brand-hover);
}

.org-link small,
.muted-block,
.plain-table-text,
.table-text-clip {
  color: var(--sirb-muted);
}

.muted-block,
.plain-table-text,
.table-text-clip {
  font-weight: 750;
}

.row-action {
  color: var(--sirb-muted);
}

.row-action:hover,
.row-action.active {
  color: var(--sirb-brand-hover);
  border-color: rgba(22, 163, 11, .22);
  background: var(--sirb-brand-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 80px;
  padding: 16px 22px;
  color: var(--sirb-muted);
}

.pagination > span strong {
  color: var(--sirb-text);
  font-weight: 950;
}

.pagination > div {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination small {
  white-space: nowrap;
}

.pagination button {
  border-radius: var(--sirb-radius-sm);
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 74%, transparent);
}

.pagination button:not(:disabled):hover {
  color: var(--sirb-brand-hover);
  border-color: rgba(22, 163, 11, .24);
  background: var(--sirb-brand-soft);
}

.reusable-empty,
.empty-state {
  border-radius: var(--sirb-radius-lg);
}

.empty-illustration {
  border-color: rgba(22, 163, 11, .16);
  background:
    radial-gradient(circle at 30% 12%, rgba(22, 163, 11, .14), transparent 40%),
    linear-gradient(145deg, var(--sirb-surface-solid), var(--sirb-surface-muted));
}

.empty-state h3 {
  color: var(--sirb-text);
  font-weight: 950;
}

.empty-state p {
  color: var(--sirb-muted);
  font-weight: 750;
}

.list-feedback,
.detail-skeleton {
  color: var(--sirb-muted);
  font-weight: 850;
}

.list-error {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(214, 74, 69, .24);
  background: linear-gradient(145deg, rgba(214, 74, 69, .075), color-mix(in srgb, var(--sirb-surface-solid) 88%, transparent));
}

.list-error > .material-symbols-rounded {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--sirb-radius-sm);
  color: var(--sirb-danger);
  background: rgba(214, 74, 69, .11);
}

.list-error strong {
  color: var(--sirb-text);
  font-weight: 950;
}

.list-error p {
  color: var(--sirb-muted);
  font-weight: 750;
}

.filter-panel {
  padding: 0;
  overflow: hidden;
}

.filter-panel > header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--sirb-border);
}

.filter-panel .filter-grid {
  padding: 18px 22px;
}

.filter-panel > footer {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-muted) 48%, transparent);
}

.filter-panel > footer .text-button {
  min-height: 44px;
  padding-inline: 12px;
  border-radius: var(--sirb-radius-xs);
}

.text-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: var(--brand-dark);
  background: none;
  font-size: 12px;
  font-weight: 700;
}

.text-button .material-symbols-rounded {
  font-size: 19px;
}

.dark-theme .kpi-card::before {
  opacity: .48;
  background:
    radial-gradient(circle at 18% 0%, rgba(54, 210, 41, .13), transparent 38%),
    linear-gradient(145deg, transparent, rgba(255, 255, 255, .025));
}

.dark-theme .trend,
.dark-theme .date-chip,
.dark-theme .live-stats div,
.dark-theme .alert-item,
.dark-theme .plan-chip,
.dark-theme .country-chip,
.dark-theme .date-chip-small,
.dark-theme .location-chip,
.dark-theme .count-chip,
.dark-theme .pagination button {
  border-color: var(--sirb-border);
  background: rgba(19, 33, 24, .76);
}

.dark-theme .trend.up,
.dark-theme .plan-chip,
.dark-theme .row-action:hover,
.dark-theme .row-action.active,
.dark-theme .pagination button:not(:disabled):hover {
  background: rgba(54, 210, 41, .12);
}

.dark-theme .filter-panel > footer {
  background: rgba(16, 29, 21, .72);
}

.dark-theme .empty-illustration {
  background:
    radial-gradient(circle at 30% 12%, rgba(54, 210, 41, .18), transparent 40%),
    linear-gradient(145deg, rgba(18, 32, 23, .92), rgba(13, 24, 17, .92));
}

@media (max-width: 1180px) {
  .kpi-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 560px) {
  .kpi-grid {
      grid-template-columns: 1fr;
    }

  .pagination {
      align-items: stretch;
      flex-direction: column;
    }

  .pagination > div {
      justify-content: space-between;
    }

  .list-error {
      align-items: flex-start;
      flex-direction: column;
}

@media (max-width: 480px) {
  .date-range-grid {
    grid-template-columns: 1fr;
  }
}

}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--sirb-muted);
  font-size: 14px;
  font-weight: 850;
}

.back-link:hover {
  color: var(--sirb-brand-hover);
  border-color: rgba(22, 163, 11, .18);
  background: var(--sirb-brand-soft);
}

.detail-list-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--sirb-muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-list-note .material-symbols-rounded {
  color: var(--sirb-brand-hover);
  font-size: 19px;
}

.detail-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.relation-actions {
  gap: 8px;
}

.relation-actions .icon-button {
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 72%, transparent);
}

.relation-mode-switch button.active,
.relation-mode-switch button:hover {
  border-color: rgba(22, 163, 11, .24);
  background: var(--sirb-brand-soft);
}

.candidate-search {
  min-height: 56px;
}

@media (max-width: 860px) {
  .detail-list-tools {
      align-items: stretch;
      flex-direction: column;
    }

}

.dark-theme {
  --sirb-brand: #19b000;
  --sirb-brand-hover: #4edc3f;
  --sirb-brand-active: #86f17c;
  --sirb-brand-soft: rgba(25, 176, 0, .14);
}

.primary-button .material-symbols-rounded {
  color: currentColor;
}

.primary-button,
.secondary-button,
.filter-button,
.filter-panel-toggle,
.icon-button,
.language-switch {
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.table-wrap table {
  max-width: none;
}

.modal-backdrop {
  align-items: center;
  justify-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(6, 18, 10, .48);
  backdrop-filter: blur(14px);
}

.modal-icon.danger {
  color: var(--sirb-danger);
  background: color-mix(in srgb, var(--sirb-danger) 10%, var(--sirb-bg-elevated));
  border-color: color-mix(in srgb, var(--sirb-danger) 22%, var(--sirb-border));
}

.stable-error {
  visibility: hidden;
}

.stable-error.visible {
  visibility: visible;
}

.relation-mode-switch button {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--sirb-border);
  border-radius: 18px;
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 86%, var(--sirb-surface-muted));
  box-shadow: none;
  text-align: start;
  transform: none;
}

.relation-mode-switch button:hover,
.relation-mode-switch button.active {
  border-color: color-mix(in srgb, var(--sirb-brand) 42%, var(--sirb-border));
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-brand-soft) 64%, var(--sirb-bg-elevated));
  box-shadow: none;
  transform: none;
}

.relation-mode-switch .material-symbols-rounded {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--sirb-brand);
  background: var(--sirb-brand-soft);
}

.relation-mode-switch strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relation-mode-switch small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-search,
.modal label.candidate-search,
.relation-modal label.candidate-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--sirb-border);
  border-radius: 18px;
  color: var(--sirb-muted);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 88%, var(--sirb-surface-muted));
  box-shadow: none;
}

.candidate-search:focus-within {
  border-color: color-mix(in srgb, var(--sirb-brand) 46%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 38%, var(--sirb-bg-elevated));
  box-shadow: none;
}

.candidate-search input,
.modal .candidate-search input,
.relation-modal .candidate-search input {
  width: 100%;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: var(--sirb-text);
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.candidate-search input:focus,
.modal .candidate-search input:focus,
.relation-modal .candidate-search input:focus {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.relation-toggle,
.primary-contact-toggle {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--sirb-border);
  border-radius: 18px;
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 84%, var(--sirb-surface-muted));
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  text-align: start;
  transform: none;
}

.primary-contact-toggle.active,
.relation-toggle:focus-within,
.primary-contact-toggle:hover {
  border-color: color-mix(in srgb, var(--sirb-brand) 40%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 56%, var(--sirb-bg-elevated));
}

.modal > footer {
  margin: 0;
}

.modal form > footer {
  margin: 0 -28px;
}

.dark-theme .modal-backdrop {
  background: rgba(2, 9, 5, .66);
}

@media (max-width: 700px) {
  .modal-backdrop {
      padding: 12px;
    }

}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.state,
.plan-chip,
.country-chip,
.date-chip-small,
.location-chip,
.count-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--sirb-border);
  border-radius: 999px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.state {
  min-width: 86px;
}

.count-chip {
  min-width: 54px;
}

.date-chip-small {
  min-width: 126px;
}

.state .chip-label,
.plan-chip .chip-label,
.country-chip .chip-label,
.date-chip-small .chip-label,
.location-chip .chip-label,
.count-chip .chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.count-chip .material-symbols-rounded,
.date-chip-small .material-symbols-rounded,
.country-chip .material-symbols-rounded,
.plan-chip .material-symbols-rounded,
.location-chip .material-symbols-rounded {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--sirb-brand) 48%, var(--sirb-muted));
  font-size: 18px;
}

.dark-theme .state,
.dark-theme .plan-chip,
.dark-theme .country-chip,
.dark-theme .date-chip-small,
.dark-theme .location-chip,
.dark-theme .count-chip {
  border-color: rgba(191, 214, 197, .18);
  color: #d7e8dc;
  background: rgba(20, 36, 25, .82);
}

.dark-theme .state.active {
  color: #0d7c05;
  background: #d9f9dc;
  border-color: rgba(217, 249, 220, .72);
}

.dark-theme .state.pending {
  color: #946308;
  background: #fff1cf;
  border-color: rgba(255, 225, 157, .72);
}

.dark-theme .state.paused {
  border-color: rgba(191, 214, 197, .18);
  color: #d7e8dc;
  background: rgba(20, 36, 25, .82);
}

.dark-theme .count-chip .material-symbols-rounded,
.dark-theme .date-chip-small .material-symbols-rounded,
.dark-theme .country-chip .material-symbols-rounded,
.dark-theme .plan-chip .material-symbols-rounded,
.dark-theme .location-chip .material-symbols-rounded {
  color: #a9c7b0;
}

.relation-confirm-modal,
.confirm-modal,
.status-modal {
  width: min(640px, calc(100vw - 48px));
}

.relation-confirm-modal > header,
.confirm-modal > header {
  min-height: auto;
  padding: 24px 28px;
}

.relation-confirm-modal .modal-icon,
.confirm-modal .modal-icon {
  flex-basis: 50px;
  width: 50px;
  height: 50px;
  border-radius: 18px;
}

.relation-confirm-modal h2,
.confirm-modal h2,
.status-modal h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}

.relation-confirm-body,
.confirm-body {
  margin: 24px 28px;
  padding: 18px 20px;
  border: 1px solid var(--sirb-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 84%, var(--sirb-surface-muted));
}

.relation-confirm-body strong,
.confirm-body strong {
  display: block;
  color: var(--sirb-text);
  font-size: 18px;
  font-weight: 800;
}

.relation-confirm-body small,
.confirm-body p {
  display: block;
  margin-top: 6px;
  color: var(--sirb-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.relation-confirm-modal > footer,
.confirm-modal > footer {
  position: static;
  justify-content: flex-end;
  margin: 0;
  padding: 18px 28px 24px;
}

.relation-confirm-modal .primary-button,
.relation-confirm-modal .secondary-button,
.relation-confirm-modal .danger-button,
.confirm-modal .secondary-button,
.confirm-modal .danger-button {
  min-width: 132px;
}

.status-modal {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.status-modal .status-modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
}

.status-modal > strong {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--sirb-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 84%, var(--sirb-surface-muted));
}

.status-modal footer {
  position: static;
  width: 100%;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dark-theme .relation-confirm-body,
.dark-theme .confirm-body,
.dark-theme .status-modal > strong {
  border-color: rgba(191, 214, 197, .16);
  background: rgba(20, 36, 25, .82);
}

@media (max-width: 700px) {
  .date-chip-small {
      min-width: 96px;
    }

  .relation-confirm-modal,
    .confirm-modal,
    .status-modal {
      width: min(100%, calc(100vw - 24px));
    }

  .relation-confirm-body,
    .confirm-body {
      margin: 18px;
    }

  .relation-confirm-modal > footer,
    .confirm-modal > footer {
      padding: 14px 18px 18px;
    }

}

.relation-modal .form-row,
.modal .form-row {
  align-items: start;
}

.dark-theme {
  --sirb-brand-solid: #22c918;
  --sirb-brand-solid-hover: #32db28;
  --sirb-brand-solid-active: #6af061;
  --sirb-control-bg: rgba(18, 32, 23, .86);
  --sirb-row-hover: rgba(54, 210, 41, .075);
}

.table-wrap {
  width: 100%;
  border: 1px solid var(--sirb-border);
  overflow-x: auto;
  overflow-y: hidden;
  background: color-mix(in srgb, var(--sirb-surface-solid) 90%, transparent);
}

.table-wrap table {
  min-width: 960px;
}

th,
td {
  padding-inline: 22px;
}

th {
  color: var(--sirb-muted);
  background: color-mix(in srgb, var(--sirb-surface-muted) 82%, transparent);
}

td {
  vertical-align: middle;
}

tbody tr {
  background: transparent;
}

tbody tr:hover {
  background: var(--sirb-row-hover);
}

.state,
.plan-chip,
.country-chip,
.date-chip-small,
.location-chip,
.count-chip {
  min-height: 30px;
  padding-inline: 12px;
  border: 1px solid var(--sirb-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.state.active {
  color: #0b7603;
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 22%, transparent);
  background: color-mix(in srgb, var(--sirb-brand-soft) 78%, #fff);
}

.state.pending {
  color: #855906;
  border-color: color-mix(in srgb, var(--sirb-warning) 22%, transparent);
  background: color-mix(in srgb, #fff2c9 76%, #fff);
}

.state.inactive,
.state.archived,
.state.suspended,
.state.cancelled {
  color: var(--sirb-muted);
  background: color-mix(in srgb, var(--sirb-surface-muted) 82%, transparent);
}

.search-box,
.filter-search,
.candidate-search,
.modal input,
.modal select,
.modal textarea,
.date-range-grid input,
.sirb-dropdown-trigger,
.readonly-control,
.readonly-select-card {
  border-color: var(--sirb-border);
  background: var(--sirb-control-bg);
  box-shadow: none;
}

.search-box:focus-within,
.filter-search:focus-within,
.candidate-search:focus-within,
.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.date-range-grid input:focus,
.sirb-dropdown.open .sirb-dropdown-trigger,
.sirb-dropdown-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 38%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-control-bg) 88%, var(--sirb-brand-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sirb-brand-soft) 58%, transparent);
  outline: 0;
}

.relation-confirm-modal,
.confirm-modal,
.status-modal {
  width: min(620px, calc(100vw - 44px));
  overflow: hidden;
}

.relation-confirm-body,
.confirm-body,
.status-modal > strong {
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-muted) 70%, transparent);
}

.relation-confirm-modal > footer,
.confirm-modal > footer,
.status-modal footer {
  border-top: 1px solid var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 92%, var(--sirb-surface-muted));
}

.danger-button,
.quiet-danger-button {
  color: #b82722;
  border-color: color-mix(in srgb, var(--sirb-danger) 30%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-danger) 8%, var(--sirb-surface-solid));
}

.danger-button:hover,
.quiet-danger-button:hover {
  color: #fff;
  border-color: var(--sirb-danger);
  background: var(--sirb-danger);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--sirb-danger) 24%, transparent);
}

.dark-theme .state.active {
  color: #dffedd;
  border-color: rgba(126, 244, 118, .28);
  background: rgba(34, 201, 24, .18);
}

.dark-theme .state.pending {
  color: #ffdf91;
  border-color: rgba(255, 198, 76, .26);
  background: rgba(117, 80, 10, .24);
}

.filter-panel-toggle {
  gap: 9px;
  border-color: var(--sirb-border);
  box-shadow: none;
}

.filter-panel-toggle:hover,
.filter-panel-toggle.active,
.filter-panel-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 32%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 44%, var(--sirb-surface-solid));
  box-shadow: none;
  outline: 0;
  transform: none;
}

.filter-panel-toggle .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.filter-panel-toggle .chevron {
  margin-inline-start: 2px;
  font-size: 20px;
}

.date-range-filter {
  padding: 18px;
}

.date-range-title {
  margin-bottom: 4px;
}

.date-range-title > .material-symbols-rounded {
  flex: 0 0 auto;
  border-radius: 15px;
}

.date-range-grid {
  gap: 14px;
}

.date-range-grid label {
  gap: 8px;
  font-size: 13px;
}

.date-range-grid input {
  min-height: 52px;
  padding-inline: 14px 38px;
  border: 1px solid var(--sirb-border);
  border-radius: 15px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  color: var(--sirb-text);
  background: var(--sirb-control-bg);
  box-shadow: none;
}

.date-range-grid input:focus,
.date-range-grid input:focus-visible {
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 34%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-control-bg) 92%, var(--sirb-brand-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sirb-brand-soft) 48%, transparent);
  outline: 0;
}

.filter-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel > footer .text-button {
  min-height: 44px;
  padding-inline: 8px;
  white-space: nowrap;
}

.filter-panel > footer .primary-button {
  min-width: 142px;
  min-height: 52px;
  border-radius: 16px;
}

.pagination {
  min-height: 76px;
  padding: 14px 22px;
}

.pagination > div {
  gap: 14px;
}

.pagination button {
  min-width: 104px;
  min-height: 48px;
  border-radius: 16px;
  box-shadow: none;
}

.pagination button:disabled {
  color: color-mix(in srgb, var(--sirb-muted) 70%, transparent);
  border-color: color-mix(in srgb, var(--sirb-border) 72%, transparent);
  background: color-mix(in srgb, var(--sirb-surface-solid) 52%, transparent);
  box-shadow: none;
  opacity: 1;
}

.pagination button:disabled .material-symbols-rounded {
  color: currentColor;
}

@media (max-width: 560px) {
  .filter-panel > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel > footer .primary-button,
  .filter-panel > footer .text-button {
    width: 100%;
    justify-content: center;
  }
}

.floating-filter-panel {
  position: fixed !important;
  z-index: 260;
  isolation: isolate;
  width: min(460px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
}

.floating-filter-panel.trip-filter-panel,
.floating-filter-panel.student-filter-panel {
  width: min(540px, calc(100vw - 24px));
}

.floating-filter-panel::before {
  content: none;
  display: none;
}

.school-location-editor {
  margin: 0;
}

.school-modal {
  width: min(620px, 100%);
}

.toast.show {
  bottom: 25px;
  opacity: 1;
}

.notification-icon.warning {
  color: #c27a00;
  background: #fff5df;
}
@keyframes pulse {
  50% {
    opacity: .4;
    box-shadow: 0 0 0 6px rgba(25,176,0,.03);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
}

/* Authoritative modal overrides kept last in the shared component cascade. */
.modal-backdrop {
  z-index: 800;
}

section.modal.status-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: 560px;
  min-height: 0;
  max-height: calc(100dvh - 32px);
  gap: 14px;
  padding: 28px;
  overflow: auto;
  text-align: center;
}

section.modal.status-modal .status-modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 18px;
}

section.modal.status-modal h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

section.modal.status-modal p {
  max-width: 46ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

section.modal.status-modal > strong {
  box-sizing: border-box;
  width: 100%;
  margin: 4px 0 0;
  padding: 16px 18px;
  text-align: start;
}

section.modal.status-modal footer {
  position: static;
  display: flex;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 0;
  padding: 18px 0 0 !important;
  border-top: 1px solid var(--sirb-border);
  background: transparent;
  box-shadow: none;
}

section.modal.status-modal footer button {
  min-width: 132px;
}

@media (max-width: 560px) {
  section.modal.status-modal {
    width: calc(100vw - 20px) !important;
    padding: 22px 18px;
  }

  section.modal.status-modal footer {
    flex-direction: column-reverse;
  }

  section.modal.status-modal footer button {
    width: 100%;
  }
}
