:root {
  color-scheme: dark;
  --canvas: #050b14;
  --canvas-raised: #081321;
  --surface: #0b1726;
  --surface-raised: #101f31;
  --surface-soft: #0d1a2a;
  --border: rgba(148, 177, 204, 0.16);
  --border-strong: rgba(148, 177, 204, 0.3);
  --text: #f1f7fb;
  --text-secondary: #a8bacb;
  --text-muted: #71869a;
  --teal: #32dfbd;
  --teal-strong: #75f2d8;
  --teal-soft: rgba(50, 223, 189, 0.11);
  --blue: #75aef5;
  --orange: #ffb45f;
  --orange-soft: rgba(255, 180, 95, 0.12);
  --red: #ff8b91;
  --red-soft: rgba(255, 139, 145, 0.12);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --sidebar-width: 17rem;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% -10%, rgba(34, 132, 165, 0.15), transparent 30rem),
    linear-gradient(180deg, #06101d, var(--canvas) 40rem);
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
a,
input,
select {
  border-radius: 0.45rem;
}

:where(button, a, input, select):focus-visible {
  outline: 3px solid var(--teal-strong);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

::selection {
  color: #04241d;
  background: var(--teal);
}

.environment-banner {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: 2rem;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(255, 180, 95, 0.34);
  color: #1b1105;
  background: linear-gradient(90deg, #ff9e43, #ffc36c 45%, #ffad4f);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.control-shell {
  min-height: 100vh;
  padding-top: 2rem;
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 2rem;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(10, 26, 42, 0.98), rgba(5, 14, 25, 0.99)), var(--surface);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand img {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.65rem;
  box-shadow: 0 0 22px rgba(50, 223, 189, 0.14);
}

.sidebar-brand div {
  display: grid;
  gap: 0.08rem;
}

.sidebar-brand strong {
  font-size: 1.03rem;
  letter-spacing: 0.02em;
}

.sidebar-brand span {
  color: var(--teal);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.7rem 1.5rem;
  scrollbar-color: var(--border-strong) transparent;
}

.nav-group-label {
  display: block;
  margin: 1.1rem 0.7rem 0.42rem;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-group-label:first-child {
  margin-top: 0;
}

.nav-item {
  position: relative;
  min-height: 2.72rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.13rem 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.89rem;
  font-weight: 620;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(2px);
}

.nav-item-active {
  border-color: rgba(50, 223, 189, 0.18);
  color: var(--teal-strong);
  background:
    linear-gradient(90deg, rgba(50, 223, 189, 0.13), rgba(50, 223, 189, 0.035)), var(--surface-soft);
}

.nav-item-active::before {
  position: absolute;
  top: 0.52rem;
  bottom: 0.52rem;
  left: -0.72rem;
  width: 0.2rem;
  border-radius: 0 0.2rem 0.2rem 0;
  background: var(--teal);
  content: '';
}

.nav-icon {
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.nav-item-active .nav-icon {
  border-color: rgba(50, 223, 189, 0.28);
  color: var(--teal-strong);
  background: var(--teal-soft);
}

.nav-label {
  flex: 1;
}

.nav-pending {
  padding: 0.18rem 0.36rem;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.05rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.read-only-chip,
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(50, 223, 189, 0.18);
  color: var(--teal-strong);
  background: var(--teal-soft);
  font-size: 0.73rem;
  font-weight: 750;
}

.read-only-chip::before,
.source-chip::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px rgba(50, 223, 189, 0.7);
  content: '';
}

.control-workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.global-header {
  position: sticky;
  z-index: 40;
  top: 2rem;
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.72rem clamp(1rem, 2.4vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 14, 25, 0.9);
  backdrop-filter: blur(18px);
}

.menu-button {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
}

.global-search-wrap {
  position: relative;
  width: min(36rem, 44vw);
  display: flex;
  align-items: center;
}

.global-search-wrap > span {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 1.18rem;
}

.global-search {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem 0 2.55rem;
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  background: rgba(10, 25, 40, 0.82);
}

.global-search::placeholder {
  color: var(--text-muted);
}

.global-search:focus {
  border-color: rgba(50, 223, 189, 0.42);
  box-shadow: 0 0 0 3px rgba(50, 223, 189, 0.08);
}

.search-results {
  position: absolute;
  top: 3.05rem;
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: rgba(9, 23, 38, 0.99);
  box-shadow: var(--shadow);
}

.search-result {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.search-result:hover {
  background: var(--teal-soft);
}

.search-result strong {
  color: var(--teal-strong);
  font-size: 0.87rem;
}

.search-result span,
.search-empty {
  color: var(--text-secondary);
  font-size: 0.77rem;
  line-height: 1.45;
}

.search-empty {
  display: block;
  padding: 1rem;
}

.header-signals {
  display: flex;
  gap: 0.45rem;
  margin-left: auto;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.62rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem;
}

.signal-chip strong {
  color: var(--text);
}

.signal-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 139, 145, 0.52);
}

.signal-dot-warning {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 180, 95, 0.52);
}

.workforce-menu {
  position: relative;
}

.workforce-button {
  min-width: 12rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--border);
  text-align: left;
  background: var(--surface-soft);
  cursor: pointer;
}

.workforce-avatar {
  width: 2rem;
  height: 2rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(50, 223, 189, 0.25);
  border-radius: 50%;
  color: #06261f;
  background: linear-gradient(135deg, var(--teal-strong), #49aebf);
  font-size: 0.7rem;
  font-weight: 850;
}

.workforce-copy {
  min-width: 0;
  display: grid;
  flex: 1;
}

.workforce-copy strong,
.workforce-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workforce-copy strong {
  font-size: 0.78rem;
}

.workforce-copy small {
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: capitalize;
}

.workforce-popover {
  position: absolute;
  top: 3.15rem;
  right: 0;
  width: 18rem;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  background: rgba(9, 22, 37, 0.99);
  box-shadow: var(--shadow);
}

.workforce-popover p {
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
}

.sign-out-button {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  cursor: pointer;
}

.page-main {
  width: min(100%, 104rem);
  margin: 0 auto;
  padding: 1.3rem clamp(1rem, 2.4vw, 2.25rem) 4rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.breadcrumbs strong {
  color: var(--text-secondary);
  font-weight: 650;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.55rem;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, 2.3rem);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 50rem;
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.55;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.correlation-summary {
  max-width: 15rem;
  overflow: hidden;
  padding: 0.35rem 0.5rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-content {
  display: grid;
  gap: 1rem;
}

.section-block,
.filter-bar,
.tenant-header-card,
.ai-boundary-card,
.prepaid-rule,
.control-pulse,
.denied-panel,
.error-panel,
.empty-panel {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(15, 34, 53, 0.88), rgba(8, 21, 35, 0.9)), var(--surface);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
}

.section-block {
  padding: 1.05rem;
}

.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.control-pulse {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  gap: 2rem;
  padding: clamp(1.3rem, 2.4vw, 2.1rem);
  border-color: rgba(50, 223, 189, 0.2);
}

.control-pulse::after {
  position: absolute;
  top: -9rem;
  right: 18%;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(50, 223, 189, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(50, 223, 189, 0.025),
    0 0 0 6rem rgba(50, 223, 189, 0.018);
  content: '';
  pointer-events: none;
}

.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse-copy h2,
.ai-boundary-card h2,
.tenant-header-card h2,
.denied-panel h2,
.error-panel h2,
.empty-panel h3 {
  margin: 0;
  letter-spacing: -0.025em;
}

.pulse-copy h2 {
  max-width: 42rem;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.pulse-copy p,
.ai-boundary-card p,
.prepaid-rule p,
.denied-panel p,
.error-panel p,
.empty-panel p {
  max-width: 50rem;
  margin: 0.7rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pulse-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(10rem, 1fr));
  gap: 0.62rem;
}

.metric-card {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 0.55rem;
  min-height: 7.2rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.pulse-stats .metric-card {
  min-height: 8.2rem;
  background: rgba(3, 15, 26, 0.56);
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 650;
  line-height: 1.35;
  text-transform: capitalize;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 720;
}

.status-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1;
  text-transform: capitalize;
}

.status-badge::before {
  width: 0.33rem;
  height: 0.33rem;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.status-good {
  color: var(--teal-strong);
  background: var(--teal-soft);
}

.status-warning {
  color: var(--orange);
  background: var(--orange-soft);
}

.status-danger {
  color: var(--red);
  background: var(--red-soft);
}

.status-muted {
  color: var(--text-muted);
  background: rgba(148, 177, 204, 0.06);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  min-width: 55rem;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button:hover,
.sort-button:focus-visible,
.tenant-link {
  color: var(--teal-strong);
}

.data-table td {
  padding: 0.72rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.78rem;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

.service-name,
.service-id {
  display: block;
}

.service-name {
  color: var(--text);
  font-weight: 650;
}

.service-id,
.table-muted {
  margin-top: 0.18rem;
  color: var(--text-muted);
  font-size: 0.69rem;
}

.table-detail {
  max-width: 32rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 0.35fr) auto;
  align-items: end;
  gap: 0.7rem;
  padding: 0.9rem;
}

.tenant-directory-table {
  min-width: 110rem;
}

.pagination-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-align: center;
}

.pagination-bar .secondary-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.filter-control {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 650;
}

.filter-control input,
.filter-control select {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 0.82rem;
}

.secondary-button,
.primary-button {
  min-height: 2.55rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--border-strong);
  font-size: 0.82rem;
  font-weight: 720;
  cursor: pointer;
}

.secondary-button {
  background: var(--surface-raised);
}

.primary-button {
  border-color: transparent;
  color: #03221c;
  background: linear-gradient(135deg, var(--teal-strong), #4cc6bb);
  box-shadow: 0 10px 30px rgba(50, 223, 189, 0.13);
}

.primary-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.empty-panel,
.denied-panel,
.error-panel {
  display: grid;
  justify-items: center;
  padding: clamp(2rem, 5vw, 4.5rem) 1.4rem;
  text-align: center;
}

.section-block .empty-panel {
  border: 0;
  background: rgba(0, 0, 0, 0.09);
  box-shadow: none;
}

.empty-mark,
.denied-mark,
.error-mark {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 1.4rem;
}

.denied-mark,
.error-mark {
  color: var(--red);
  background: var(--red-soft);
}

.correlation-label {
  margin-top: 1rem;
  padding: 0.4rem 0.55rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.7rem;
}

.tenant-header-card {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(30rem, 1.2fr);
  align-items: center;
  gap: 2rem;
  padding: 1.4rem;
}

.tenant-id {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tenant-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
}

.tenant-state {
  min-height: 5.4rem;
  display: grid;
  align-content: center;
  gap: 0.32rem;
  padding: 0.7rem;
  border-right: 1px solid var(--border);
}

.tenant-state:last-child {
  border-right: 0;
}

.tenant-state span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.tenant-state strong {
  font-size: 0.8rem;
  text-transform: capitalize;
}

.tenant-tabs {
  overflow-x: auto;
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.tenant-tab {
  flex: 0 0 auto;
  padding: 0.58rem 0.72rem;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.73rem;
  cursor: pointer;
}

.tenant-tab[aria-selected='true'] {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: inset 0 -2px 0 var(--teal-strong);
}

.tenant-tab-panel {
  min-height: 12rem;
  padding: 1.35rem;
}

.tenant-tab-panel h3 {
  margin: 0.4rem 0 0;
}

.tenant-tab-panel p,
.comparison-note {
  max-width: 55rem;
  margin: 0.65rem 0 0;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.55;
}

.commercial-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.65rem;
}

.comparison-node {
  min-height: 7rem;
  display: grid;
  align-content: center;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.13);
}

.comparison-node > span {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.comparison-node > strong {
  font-size: 1.05rem;
}

.comparison-arrow {
  display: grid;
  place-items: center;
  color: var(--teal-strong);
  font-size: 1.25rem;
}

.ai-boundary-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-color: rgba(117, 174, 245, 0.24);
  background:
    radial-gradient(circle at 90% 5%, rgba(87, 118, 208, 0.16), transparent 22rem),
    linear-gradient(145deg, rgba(16, 33, 58, 0.94), rgba(7, 20, 34, 0.96));
}

.ai-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 174, 245, 0.35);
  color: #c7ddff;
  background: rgba(117, 174, 245, 0.09);
  font-size: 0.82rem;
  font-weight: 850;
}

.guard-grid,
.inventory-grid,
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.3rem;
}

.guard-item,
.inventory-card,
.readiness-card {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.13);
}

.guard-icon {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(148, 177, 204, 0.08);
  font-weight: 800;
}

.guard-item span:nth-child(2) {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.guard-item strong {
  color: var(--orange);
  font-size: 0.76rem;
}

.prepaid-rule {
  padding: 1.25rem 1.4rem;
  border-color: rgba(255, 180, 95, 0.24);
  background: linear-gradient(90deg, rgba(255, 180, 95, 0.075), transparent 62%), var(--surface);
}

.prepaid-rule .eyebrow {
  color: var(--orange);
}

.prepaid-rule strong {
  display: block;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.inventory-card,
.readiness-card {
  min-height: 5.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
}

.inventory-card strong,
.readiness-card strong {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.inventory-value {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 1rem;
}

.readiness-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.readiness-card {
  grid-template-columns: auto 1fr;
}

.readiness-card .status-badge {
  grid-column: 2;
}

.readiness-dot {
  width: 0.62rem;
  height: 0.62rem;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
}

.audit-list {
  display: grid;
  gap: 0.5rem;
}

.audit-row {
  display: grid;
  grid-template-columns: 1fr auto minmax(10rem, auto);
  align-items: center;
  gap: 1rem;
  padding: 0.72rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
}

.audit-row > div {
  display: grid;
  gap: 0.25rem;
}

.audit-row strong {
  font-size: 0.8rem;
  text-transform: capitalize;
}

.audit-row code {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-skeleton {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.skeleton-line {
  min-height: 7.5rem;
  border: 1px solid var(--border);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.025) 20%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0.025) 56%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.loading-screen,
.fatal-screen,
.sign-in-screen {
  min-height: 100vh;
}

.loading-screen {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.loading-logo {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
}

.loading-logo::after {
  position: absolute;
  inset: -0.7rem;
  border: 1px solid rgba(50, 223, 189, 0.24);
  border-top-color: var(--teal);
  border-radius: 50%;
  content: '';
  animation: spin 1.2s linear infinite;
}

.loading-logo img {
  width: 100%;
  height: 100%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sign-in-screen {
  display: grid;
  grid-template-columns: minmax(24rem, 0.86fr) minmax(28rem, 1.14fr);
  background:
    linear-gradient(90deg, rgba(4, 12, 21, 0.98) 0 43%, rgba(4, 12, 21, 0.32)),
    radial-gradient(circle at 76% 34%, rgba(50, 223, 189, 0.12), transparent 25rem),
    linear-gradient(145deg, #081729, #030812);
}

.sign-in-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 7rem);
  border-right: 1px solid var(--border);
  background: rgba(4, 13, 23, 0.9);
}

.sign-in-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sign-in-brand img {
  width: 4rem;
  height: 4rem;
  border-radius: 0.9rem;
}

.sign-in-brand h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  letter-spacing: -0.04em;
}

.sign-in-lead {
  max-width: 38rem;
  margin: 1.4rem 0 1.2rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.sign-in-panel .primary-button {
  width: 100%;
  max-width: 30rem;
  min-height: 3.15rem;
}

.sign-in-controls {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.sign-in-control {
  max-width: 34rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.65rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--border);
}

.control-check {
  grid-row: 1 / span 2;
  color: var(--teal);
}

.sign-in-control strong {
  font-size: 0.82rem;
}

.sign-in-control p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.sign-in-notice {
  max-width: 34rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 180, 95, 0.25);
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 0.8rem;
}

.release-label {
  width: fit-content;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.sign-in-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 7vw, 7rem);
}

.sign-in-art h2 {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.sign-in-art p {
  max-width: 34rem;
  margin: 1.2rem 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.signal-rings {
  position: absolute;
  top: 8%;
  right: -5%;
  width: min(48vw, 38rem);
  aspect-ratio: 1;
  border: 1px solid rgba(50, 223, 189, 0.25);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(50, 223, 189, 0.035),
    0 0 0 8rem rgba(50, 223, 189, 0.025),
    0 0 0 12rem rgba(50, 223, 189, 0.015),
    inset 0 0 100px rgba(50, 223, 189, 0.06);
}

.signal-rings::before,
.signal-rings::after {
  position: absolute;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 24px rgba(50, 223, 189, 0.8);
  content: '';
}

.signal-rings::before {
  top: 12%;
  left: 20%;
  width: 0.7rem;
  height: 0.7rem;
}

.signal-rings::after {
  right: 9%;
  bottom: 30%;
  width: 0.45rem;
  height: 0.45rem;
}

.fatal-screen {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.fatal-card {
  width: min(38rem, 100%);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.fatal-logo {
  width: 3.2rem;
  margin-bottom: 1rem;
}

.fatal-card h1 {
  margin: 0;
}

.fatal-card p {
  color: var(--text-secondary);
  line-height: 1.55;
}

.fatal-help {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

@media (max-width: 86rem) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
  }

  .header-signals {
    display: none;
  }

  .tenant-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tenant-state:nth-child(2) {
    border-right: 0;
  }

  .tenant-state:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 70rem) {
  :root {
    --sidebar-width: 15rem;
  }

  .control-pulse {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .guard-grid,
  .inventory-grid,
  .readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tenant-header-card {
    grid-template-columns: 1fr;
  }

  .commercial-comparison {
    grid-template-columns: 1fr;
  }

  .comparison-arrow {
    transform: rotate(90deg);
  }

  .global-search-wrap {
    width: min(30rem, 50vw);
  }

  .workforce-button {
    min-width: 3rem;
  }

  .workforce-copy,
  .workforce-button > span:last-child {
    display: none;
  }
}

@media (max-width: 54rem) {
  .environment-banner {
    padding: 0 0.5rem;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .control-workspace {
    margin-left: 0;
  }

  .menu-button {
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
  }

  .global-search-wrap {
    width: auto;
    flex: 1;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    grid-template-columns: 1fr 1fr;
  }

  .pagination-bar span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .sign-in-screen {
    grid-template-columns: 1fr;
  }

  .sign-in-panel {
    min-height: 100vh;
    border-right: 0;
  }

  .sign-in-art {
    display: none;
  }

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

  .audit-row code {
    grid-column: 1 / -1;
  }
}

@media (max-width: 38rem) {
  .global-header {
    gap: 0.45rem;
    padding: 0.55rem;
  }

  .workforce-menu {
    display: none;
  }

  .page-main {
    padding: 1rem 0.7rem 3rem;
  }

  .metric-grid,
  .guard-grid,
  .inventory-grid,
  .readiness-grid,
  .pulse-stats,
  .tenant-state-grid,
  .view-skeleton {
    grid-template-columns: 1fr;
  }

  .tenant-state {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .tenant-state:last-child {
    border-bottom: 0;
  }

  .page-meta {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .environment-banner,
  .sidebar,
  .global-header {
    position: static;
  }

  .control-workspace {
    margin-left: 0;
  }

  body {
    color: #111;
    background: #fff;
  }
}
