:root {
  --bg: #030712;
  --panel: rgba(8, 18, 40, 0.76);
  --panel-strong: rgba(10, 24, 56, 0.92);
  --line: rgba(90, 134, 255, 0.24);
  --line-strong: rgba(75, 124, 255, 0.55);
  --text: #f3f7ff;
  --muted: #9fb1d4;
  --blue: #2f45c5;
  --blue-hot: #3468ff;
  --cyan: #18d8ff;
  --green: #13c98b;
  --red: #ef4444;
  --yellow: #f8c14a;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.38), 0 0 38px rgba(24, 96, 255, 0.11);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
}

body::before,
.nexus-bg {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 216, 255, 0.22), transparent 28%),
    radial-gradient(circle at 84% 4%, rgba(52, 104, 255, 0.25), transparent 32%),
    linear-gradient(145deg, #020511, #07152f 52%, #020716);
}

.nexus-bg {
  opacity: 0.9;
  background-image:
    linear-gradient(rgba(24, 216, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 216, 255, 0.09) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 43%, rgba(24, 216, 255, 0.14) 48%, transparent 54%);
  background-size: 52px 52px, 52px 52px, 180% 180%;
  animation: commandGrid 24s linear infinite, sweepLayer 10s ease-in-out infinite;
}

.nexus-bg::after {
  content: "K12 NEXUS";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.035);
  font-size: clamp(72px, 14vw, 220px);
  font-weight: 950;
  letter-spacing: 0.08em;
  transform: rotate(-9deg);
}

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

button {
  cursor: pointer;
  border: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(2, 8, 23, 0.65);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(24, 216, 255, 0.14), 0 0 26px rgba(24, 216, 255, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: #dbe7ff;
  font-size: 0.86rem;
  font-weight: 800;
}

h1,
h2,
h3,
p { margin-top: 0; }

.app-view { display: none; }
.app-view.is-active { display: block; animation: viewIn 220ms ease both; }

.login-view.is-active {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  width: min(1120px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(24, 216, 255, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(24, 216, 255, 0.1), transparent 38%),
    rgba(5, 14, 34, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: loginRise 420ms ease both;
}

.login-brand {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 75% 25%, rgba(24, 216, 255, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(52, 104, 255, 0.18), transparent);
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.08) 50%, transparent 56%);
  animation: panelSweep 7s ease-in-out infinite;
  pointer-events: none;
}

.login-brand img {
  width: min(540px, 100%);
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.45)) drop-shadow(0 0 26px rgba(69,112,255,.2));
}

.login-brand h1,
.hero-panel h1,
.module-header h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.98;
  margin-bottom: 12px;
}

.login-brand p,
.hero-panel p,
.module-header p {
  max-width: 740px;
  color: var(--muted);
  font-weight: 750;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(6, 14, 31, 0.82);
  border-left: 1px solid rgba(24, 216, 255, 0.16);
}

.password-control,
.username-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-control button,
.username-control button,
.secondary-button,
.icon-button,
.nav-link,
.module-tabs button {
  min-height: 42px;
  padding: 9px 12px;
  color: #eaf4ff;
  background: rgba(31, 48, 92, 0.75);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--blue), var(--blue-hot) 55%, var(--cyan));
  border: 1px solid rgba(24, 216, 255, 0.42);
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(24, 216, 255, 0.18);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.nav-link:hover,
.module-tabs button:hover,
.password-control button:hover,
.username-control button:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 216, 255, 0.62);
  box-shadow: 0 14px 38px rgba(0,0,0,.25), 0 0 25px rgba(24,216,255,.18);
}

.primary-button:hover { filter: brightness(1.1); }

.form-message {
  min-height: 20px;
  margin: 0;
  color: #fecaca;
  font-size: 0.84rem;
  font-weight: 800;
}

.field-note {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.status-pill.is-active {
  color: #bbf7d0;
  background: rgba(19, 201, 139, 0.12);
  border-color: rgba(19, 201, 139, 0.38);
}

.status-pill.is-inactive {
  color: #fde68a;
  background: rgba(248, 193, 74, 0.12);
  border-color: rgba(248, 193, 74, 0.42);
}

.status-pill.is-deleted {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.42);
}

.status-pill.is-danger {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.46);
}

.status-pill.is-success {
  color: #bbf7d0;
  background: rgba(19, 201, 139, 0.13);
  border-color: rgba(19, 201, 139, 0.42);
}

.status-pill.is-info {
  color: #dffcff;
  background: rgba(24, 216, 255, 0.1);
  border-color: rgba(24, 216, 255, 0.36);
}

.permission-matrix {
  display: grid;
  gap: 14px;
}

.permission-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 9, 23, 0.38);
}

.permission-card h3 {
  margin-bottom: 8px;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.permission-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  color: #dbeafe;
  border: 1px solid rgba(24, 216, 255, 0.22);
  border-radius: 999px;
  background: rgba(24, 216, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 850;
}

.permission-list span.is-ok {
  color: #bbf7d0;
  border-color: rgba(19, 201, 139, 0.36);
  background: rgba(19, 201, 139, 0.1);
}

.permission-list span.is-warning {
  color: #fde68a;
  border-color: rgba(248, 193, 74, 0.42);
  background: rgba(248, 193, 74, 0.1);
}

.system-health-panel {
  display: grid;
  gap: 12px;
}

.compact-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.nexus-header {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 12px clamp(14px, 3vw, 34px);
  background: rgba(4, 12, 28, 0.82);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 46px rgba(0,0,0,.3);
  backdrop-filter: blur(20px);
}

.brand-button {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.brand-button img {
  width: 132px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.42)) drop-shadow(0 0 16px rgba(24,216,255,.14));
}

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

.brand-button strong {
  font-size: 1.16rem;
  letter-spacing: 0.02em;
}

.brand-button small { color: var(--muted); font-weight: 800; }

.header-actions {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search { width: min(320px, 24vw); }

.user-pill {
  display: grid;
  gap: 1px;
  min-width: 132px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(24, 216, 255, 0.12), rgba(47, 69, 197, 0.12));
  box-shadow: inset 0 0 18px rgba(24,216,255,.05);
  font-size: 0.76rem;
  font-weight: 900;
}

.user-pill strong,
.user-pill span {
  display: block;
}

.user-pill span {
  color: var(--cyan);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: 260px;
  padding: 12px;
  background: rgba(6, 16, 38, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: menuIn 150ms ease both;
}

.settings-menu span { color: var(--muted); font-size: .8rem; font-weight: 800; }
.settings-menu button {
  min-height: 38px;
  color: var(--text);
  background: rgba(30, 48, 90, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.side-nav {
  position: sticky;
  top: 82px;
  height: calc(100vh - 82px);
  padding: 18px;
  background: rgba(3, 10, 26, 0.6);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-brand-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(24,216,255,.18);
  border-radius: 14px;
  background: rgba(24,216,255,.055);
}

.nav-brand-panel img {
  width: 100%;
  max-width: 176px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.38));
}

.nav-brand-panel span,
.nav-section p {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-section {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
  border-radius: 12px;
  background: transparent;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(24,216,255,.2);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(24,216,255,.07);
  font-size: .8rem;
  font-weight: 950;
}

.nav-link.is-active,
.module-tabs button.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(47, 69, 197, 0.72), rgba(24, 216, 255, 0.16));
  border-color: rgba(24, 216, 255, 0.68);
  box-shadow: inset 0 0 28px rgba(24,216,255,.08), 0 0 24px rgba(24,216,255,.16);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px -1px;
  width: 3px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  animation: activeRail 1.8s ease-in-out infinite;
}

.nexus-main {
  min-width: 0;
  padding: clamp(16px, 3vw, 30px);
}

.ghost-footer {
  grid-column: 1 / -1;
  padding: 14px 24px 22px;
  color: rgba(220, 235, 255, 0.48);
  font-size: .78rem;
  font-weight: 850;
  text-align: center;
}

.hero-panel,
.module-header,
.pulse-panel,
.admin-card,
.trackpoint-shell article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(24, 216, 255, 0.08), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: center;
  padding: clamp(24px, 3.2vw, 38px);
  overflow: hidden;
}

.hero-panel h2 {
  margin: -2px 0 12px;
  color: #eef7ff;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
}

.system-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.system-status {
  display: inline-grid;
  gap: 2px;
  min-width: 132px;
  padding: 9px 11px;
  border: 1px solid rgba(24,216,255,.23);
  border-radius: 12px;
  background: rgba(2,8,23,.42);
}

.system-status strong {
  color: var(--cyan);
  font-size: .78rem;
  text-transform: uppercase;
}

.system-status {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 850;
}

.hero-signal {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(24,216,255,.25);
  border-radius: 14px;
  background: rgba(2, 8, 23, .46);
}

.hero-signal span {
  width: fit-content;
  padding: 4px 8px;
  color: #dffcff;
  border: 1px solid rgba(24,216,255,.38);
  border-radius: 999px;
  background: rgba(24,216,255,.1);
  font-size: .72rem;
  font-weight: 950;
}

.hero-signal strong { font-size: 2.4rem; }
.hero-signal small { color: var(--muted); font-weight: 800; }

.application-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.app-card,
.project-card,
.user-card,
.audit-item {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 18px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 12%, rgba(24,216,255,.14), transparent 28%),
    rgba(7, 18, 42, .78);
  box-shadow: 0 18px 46px rgba(0,0,0,.25);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--cyan), var(--blue-hot));
  box-shadow: 0 0 18px var(--cyan);
}

.app-card {
  min-height: 300px;
  grid-template-rows: auto auto auto minmax(72px, 1fr) auto auto;
  padding: 22px;
}

.app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(115deg, transparent 0 38%, rgba(24,216,255,.12) 48%, transparent 58%);
  transform: translateX(-18%);
  transition: opacity 180ms ease, transform 220ms ease;
  pointer-events: none;
}

.app-card:hover::after {
  opacity: 1;
  transform: translateX(18%);
}

.app-card:hover,
.project-card:hover,
.user-card:hover {
  transform: translateY(-5px);
  border-color: rgba(24,216,255,.66);
  box-shadow: 0 28px 74px rgba(0,0,0,.36), 0 0 34px rgba(24,216,255,.16);
}

.app-card .app-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(24,216,255,.12);
  color: var(--cyan);
  font-size: 1.7rem;
  font-weight: 950;
  box-shadow: inset 0 0 24px rgba(24,216,255,.08), 0 0 22px rgba(24,216,255,.08);
}

.app-card h2,
.project-card h3 {
  margin: 0;
}

.app-card p,
.project-card p,
.role-picker p,
.audit-item p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.access-pill,
.project-meta {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(24,216,255,.3);
  border-radius: 999px;
  color: #dffcff;
  background: rgba(24,216,255,.08);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.app-status {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.launch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 8px 13px;
  color: #fff;
  border: 1px solid rgba(24,216,255,.42);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(47,69,197,.9), rgba(24,216,255,.2));
  box-shadow: 0 0 20px rgba(24,216,255,.12);
  font-weight: 950;
}

.module-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 16px;
}

.module-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.pulse-panel,
.admin-card {
  padding: 18px;
}

.pulse-tab { display: none; }
.pulse-tab.is-active { display: block; animation: viewIn 180ms ease both; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-row article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2,8,23,.46);
}

.metric-row span,
.metric-row strong { display: block; }
.metric-row span { color: var(--muted); font-size: .8rem; font-weight: 850; }
.metric-row strong { margin-top: 8px; font-size: 2rem; }

.toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar-row > * { flex: 1 1 190px; }
.toolbar-row button { flex: 0 0 auto; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  min-height: 210px;
}

.project-actions,
.form-actions,
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-actions button,
.user-actions button {
  min-height: 34px;
  padding: 7px 10px;
  color: #eaf4ff;
  background: rgba(31, 48, 92, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 850;
}

.project-actions .danger-action {
  color: #ffe7e7;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.46);
}

.email-preview {
  min-height: 460px;
  font-family: Consolas, monospace;
}

.nexus-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.role-picker {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2,8,23,.38);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 16px;
}

.full-span { grid-column: 1 / -1; }

.user-list,
.audit-log {
  display: grid;
  gap: 10px;
}

.user-card {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.trackpoint-workspace {
  display: grid;
  gap: 16px;
}

.trackpoint-panel { display: none; }
.trackpoint-panel.is-active { display: block; animation: viewIn 180ms ease both; }

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

.trackpoint-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, .7fr);
  gap: 16px;
  align-items: start;
}

.trackpoint-table-card,
.trackpoint-detail,
.trackpoint-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 12%, rgba(24,216,255,.12), transparent 26%),
    rgba(7, 18, 42, .72);
  box-shadow: 0 18px 46px rgba(0,0,0,.24);
}

.trackpoint-table-card,
.trackpoint-detail {
  overflow: hidden;
}

.trackpoint-table-card .section-heading,
.trackpoint-detail .trackpoint-card,
.trackpoint-card {
  padding: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.section-heading h3,
.trackpoint-card h3 {
  margin-bottom: 6px;
}

.section-heading p,
.trackpoint-card p,
.trackpoint-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.data-table-wrap {
  max-height: min(62vh, 620px);
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(90, 134, 255, 0.16);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #dffcff;
  background: rgba(7, 18, 42, .96);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.data-table tbody tr {
  transition: background 160ms ease, box-shadow 160ms ease;
}

.data-table tbody tr:hover,
.data-table tbody tr.is-selected {
  background: rgba(24, 216, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.trackpoint-detail {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.detail-list div {
  padding: 10px;
  border: 1px solid rgba(24,216,255,.14);
  border-radius: 10px;
  background: rgba(2,8,23,.32);
}

.detail-list dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 900;
}

.trackpoint-line-list,
.trackpoint-card-list {
  display: grid;
  gap: 10px;
}

.trackpoint-line-list button,
.trackpoint-mini-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid rgba(24,216,255,.18);
  border-radius: 10px;
  background: rgba(2,8,23,.38);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.trackpoint-line-list button:hover,
.trackpoint-mini-card:hover,
.trackpoint-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24,216,255,.58);
  background: rgba(24,216,255,.08);
}

.trackpoint-mini-card span,
.trackpoint-line-list span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}

.mobile-only { display: none; }
[hidden] { display: none !important; }

@keyframes commandGrid {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 104px 156px, 156px 104px, 100% 100%; }
}

@keyframes sweepLayer {
  0%, 100% { filter: brightness(1); opacity: .74; }
  50% { filter: brightness(1.18); opacity: .98; }
}

@keyframes panelSweep {
  0%, 100% { transform: translateX(-8%); opacity: .45; }
  50% { transform: translateX(8%); opacity: .85; }
}

@keyframes loginRise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes activeRail {
  0%, 100% { opacity: .55; transform: scaleY(.72); }
  50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .side-nav {
    position: fixed;
    top: 82px;
    left: 0;
    z-index: 40;
    width: 280px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }
  .side-nav.is-open { transform: translateX(0); }
  .mobile-only { display: inline-grid; }
  .application-grid,
  .card-grid,
  .metric-row,
  .trackpoint-grid,
  .trackpoint-browser,
  .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trackpoint-detail { position: static; }
}

@media (max-width: 760px) {
  .login-card,
  .application-grid,
  .card-grid,
  .metric-row,
  .trackpoint-grid,
  .trackpoint-browser,
  .admin-grid,
  .form-grid,
  .hero-panel { grid-template-columns: 1fr; }
  .nexus-header,
  .module-header,
  .toolbar-row { align-items: stretch; flex-direction: column; }
  .header-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .global-search { width: 100%; }
  .brand-button img { width: 86px; }
}

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