:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --panel: #0f0f12;
  --panel-soft: #14151a;
  --panel-raised: #16171c;
  --line: #24262e;
  --line-soft: rgba(255, 255, 255, 0.06);
  --muted: #9d9fab;
  --faint: #6b6e7c;
  --text: #f1f1f3;
  --text-soft: #d4d5dc;
  --green: #5df2ad;
  --blue: #4dd2ff;
  --amber: #f7c548;
  --orange: #ffa94d;
  --red: #ff4d6d;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03", "cv02";
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(22, 23, 28, 0.82);
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

button:hover {
  border-color: #4a4d59;
  color: var(--text);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(77, 210, 255, 0.7);
  outline-offset: 2px;
}

button.primary,
.header-action-primary {
  border-color: rgba(93, 242, 173, 0.36);
  background: rgba(93, 242, 173, 0.12);
  color: var(--green);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #0d0e12;
  color: var(--text);
}

textarea {
  min-height: 190px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #2a2c34;
}

*::-webkit-scrollbar-thumb:hover {
  background: #3a3c45;
}

.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(16px);
}

.app-header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 18px;
}

.header-top-row {
  display: grid;
  grid-template-columns: minmax(235px, max-content) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
}

.app-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(93, 242, 173, 0.32);
  border-radius: var(--radius);
  background: rgba(93, 242, 173, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.brand-copy {
  min-width: 0;
}

.app-title {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.connection-status {
  display: inline-flex;
  min-height: 22px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(157, 159, 171, 0.18);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.connection-status span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--faint);
}

.connection-live {
  border-color: rgba(93, 242, 173, 0.28);
  color: var(--green);
}

.connection-live span {
  background: var(--green);
  box-shadow: 0 0 14px rgba(93, 242, 173, 0.55);
}

.view-tabs {
  display: flex;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  padding: 4px;
  background: rgba(15, 15, 18, 0.84);
}

.view-tab-button {
  min-height: 34px;
  border-color: transparent;
  padding: 0 12px;
  background: transparent;
  color: #8b8d99;
  font-size: 12px;
  font-weight: 800;
}

.view-tab-button:hover,
.view-tab-active {
  border-color: rgba(157, 159, 171, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.header-control-cluster {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.mini-stat {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(157, 159, 171, 0.16);
  border-radius: var(--radius);
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.mini-stat strong {
  color: var(--text);
}

.header-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.app-main {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.app-scroll {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 16px 18px 56px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.page-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 27px;
}

.page-heading p,
.panel-head p,
.weather-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.loading-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(77, 210, 255, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(77, 210, 255, 0.08);
  color: #79ddff;
  font-size: 11px;
  font-weight: 800;
}

.loading-pill span,
.loading-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 1.15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.panel,
.command-card,
.kpi-card,
.weather-card,
.signal-card,
.candidate-card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 15, 18, 0.78);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}

.panel {
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.panel-head.compact {
  align-items: center;
}

.panel-head.standalone {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(15, 15, 18, 0.78);
}

.panel-head h2,
.weather-toolbar h2,
.weather-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 20px;
}

.panel-count {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(157, 159, 171, 0.18);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) repeat(4, minmax(140px, 0.55fr));
  gap: 12px;
  margin-bottom: 14px;
}

.command-card {
  padding: 14px;
}

.command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.command-card h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 28px;
}

.risk-mix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.risk-mix-item {
  min-height: 58px;
  border: 1px solid rgba(157, 159, 171, 0.13);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.028);
}

.risk-mix-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.risk-mix-item strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  line-height: 24px;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.command-actions button,
.action-grid button {
  font-size: 12px;
  font-weight: 800;
}

.kpi-card {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

.kpi-value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 25px;
  font-weight: 850;
  line-height: 30px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.kpi-green { border-color: rgba(93, 242, 173, 0.18); }
.kpi-blue { border-color: rgba(77, 210, 255, 0.18); }
.kpi-amber { border-color: rgba(247, 197, 72, 0.2); }
.kpi-red { border-color: rgba(255, 77, 109, 0.2); }

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.watchlist,
.alert-list,
.signal-list,
.candidate-list {
  display: grid;
  gap: 9px;
}

.watch-row,
.alert-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.028);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.alert-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.watch-row:hover,
.alert-card:hover,
.signal-card:hover {
  border-color: rgba(157, 159, 171, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

.rank {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(77, 210, 255, 0.1);
  color: #79ddff;
  font-size: 12px;
  font-weight: 900;
}

.watch-main,
.watch-title,
.alert-title {
  min-width: 0;
}

.watch-title,
.alert-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.meta,
.signal-meta,
.weather-metrics,
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.subtle {
  margin-top: 6px;
  color: var(--faint);
}

.metric-stack {
  display: grid;
  gap: 8px;
}

.metric-stack div {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
}

.metric-stack div:last-child {
  border-bottom: 0;
}

.metric-stack strong {
  color: var(--text);
  font-size: 16px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(15, 15, 18, 0.76);
}

.filter-controls {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 0.65fr));
  gap: 8px;
}

.filter-controls:has(.filter-select:nth-child(2):last-child) {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.35fr);
}

.filter-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 10px 11px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  color: #7f8290;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

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

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

.metric-cell {
  color: var(--text-soft);
  font-weight: 800;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.risk-badge,
.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(157, 159, 171, 0.16);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(157, 159, 171, 0.07);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.risk-critical {
  border-color: rgba(255, 77, 109, 0.42) !important;
  background: rgba(255, 77, 109, 0.1) !important;
  color: #ff8aa0 !important;
}

.risk-warning {
  border-color: rgba(255, 169, 77, 0.4) !important;
  background: rgba(255, 169, 77, 0.1) !important;
  color: #ffc075 !important;
}

.risk-watch {
  border-color: rgba(247, 197, 72, 0.35) !important;
  background: rgba(247, 197, 72, 0.1) !important;
  color: #f7d772 !important;
}

.risk-low {
  border-color: rgba(157, 159, 171, 0.16) !important;
  background: rgba(157, 159, 171, 0.07) !important;
  color: #d4d5dc !important;
}

.pill-green {
  border-color: rgba(93, 242, 173, 0.3);
  background: rgba(93, 242, 173, 0.1);
  color: var(--green);
}

.pill-amber {
  border-color: rgba(247, 197, 72, 0.32);
  background: rgba(247, 197, 72, 0.1);
  color: var(--amber);
}

.pill-red {
  border-color: rgba(255, 77, 109, 0.34);
  background: rgba(255, 77, 109, 0.1);
  color: #ff8aa0;
}

.pill-neutral {
  color: var(--muted);
}

.score-bar {
  display: block;
  width: 92px;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--muted);
}

.score-critical span { background: var(--red); }
.score-warning span { background: var(--orange); }
.score-watch span { background: var(--amber); }
.score-low span { background: var(--green); }

.social-sections {
  display: grid;
  gap: 14px;
}

.social-section.is-empty {
  opacity: 0.75;
}

.signal-card {
  padding: 12px;
}

.signal-actionable {
  border-color: rgba(255, 77, 109, 0.26);
  background: linear-gradient(90deg, rgba(255, 77, 109, 0.08), rgba(255, 255, 255, 0.028) 34%);
}

.signal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

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

.signal-card p {
  margin: 8px 0 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 18px;
}

.weather-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(15, 15, 18, 0.78);
}

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

.weather-card {
  padding: 13px;
}

.weather-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.weather-card h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.weather-metrics {
  margin-top: 12px;
}

.weather-metrics span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border: 1px solid rgba(157, 159, 171, 0.16);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(157, 159, 171, 0.055);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 780;
}

.weather-forecast {
  margin-top: 12px !important;
}

.split,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.settings-grid {
  grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1.45fr);
}

.candidate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.028);
}

.candidate-card strong,
.candidate-card span {
  display: block;
}

.candidate-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.inline-actions,
.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-form .field:last-of-type {
  margin-bottom: 12px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.job-grid {
  display: grid;
  gap: 8px;
}

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

.job-chip {
  min-width: 0;
  border: 1px solid rgba(157, 159, 171, 0.13);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.job-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-meta {
  margin-top: 7px;
  font-size: 11px;
}

.job-error {
  margin-top: 8px;
  color: #ff9aac;
  font-size: 11px;
  line-height: 16px;
}

.credential-grid {
  display: grid;
  gap: 8px;
}

.credential {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid rgba(157, 159, 171, 0.13);
  border-radius: var(--radius);
  padding: 9px;
  background: rgba(255, 255, 255, 0.026);
}

.credential > span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.4);
}

.credential-present > span {
  background: var(--green);
  box-shadow: 0 0 12px rgba(93, 242, 173, 0.4);
}

.credential strong,
.credential small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential strong {
  color: var(--text);
  font-size: 12px;
}

.credential small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.training-panel {
  max-width: 860px;
}

.training-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.result-panel {
  margin: 12px 0 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #0d0e12;
  color: var(--text-soft);
}

.loading-state,
.empty {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(93, 242, 173, 0.3);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(22, 34, 31, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .header-top-row {
    grid-template-columns: 1fr;
  }

  .view-tabs,
  .header-control-cluster {
    justify-self: stretch;
  }

  .view-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .header-control-cluster {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .command-card {
    grid-column: 1 / -1;
  }

  .dashboard-columns,
  .split,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .job-grid-large,
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .app-main,
  .app-scroll {
    height: auto;
    overflow: visible;
  }

  .app-header-inner,
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-brand {
    align-items: flex-start;
  }

  .connection-status {
    margin-left: auto;
  }

  .view-tab-button {
    flex: 0 0 auto;
    padding: 0 11px;
  }

  .mini-stat {
    display: none;
  }

  .page-heading {
    display: block;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .dashboard-grid,
  .risk-mix,
  .weather-grid,
  .form-grid,
  .filter-controls,
  .job-grid-large,
  .action-grid,
  .training-form {
    grid-template-columns: 1fr;
  }

  .filter-controls:has(.filter-select:nth-child(2):last-child) {
    grid-template-columns: 1fr;
  }

  .filter-controls > * {
    min-width: 0;
    width: 100%;
  }

  .kpi-card {
    min-height: 96px;
  }

  .filter-bar,
  .weather-toolbar,
  .panel-head,
  .candidate-card,
  .weather-card-head {
    display: block;
  }

  .filter-summary,
  .panel-head button,
  .weather-toolbar button {
    margin-top: 10px;
  }

  .watch-row,
  .alert-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .watch-metrics,
  .alert-card > .risk-badge {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .watch-title,
  .alert-title,
  .weather-card h2 {
    white-space: normal;
  }

  .table-wrap {
    overflow: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 0;
  }

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

  .data-table td {
    display: block;
    border-bottom: 0;
    padding: 7px 10px;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
  }
}
