/* WhisprX / Signal Intel design system and flat layout; shared by the side panel and the fleet hub dashboard. Layout rules: .cursor/rules/ui-layout.mdc */
@font-face {
  font-family: Quicksand;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/quicksand-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Quicksand;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/quicksand-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --brand: #7c63ff;
  --brand-2: #78b8ff;
  --accent: #8b75ff;
  --bg: oklch(0.17 0.02 260);
  --surface: oklch(0.2 0.02 260);
  --raised: oklch(0.24 0.02 260);
  --ink: oklch(0.96 0.01 260);
  --muted: oklch(0.65 0.02 260);
  --line: oklch(0.3 0.02 260);
  --bad: oklch(0.7 0.17 20);
  --good: oklch(0.77 0.13 163);
  --warn: oklch(0.82 0.13 80);
  --radius: 0.25rem;
  --header: 64px;
}
* {
  box-sizing: border-box;
  border: 0 solid var(--line);
}
body {
  margin: 0;
  min-height: 100dvh;
  font:
    500 14px/1.5 Quicksand,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: rgba(124, 99, 255, 0.4);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-radius: 999px;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--brand-2);
}
h1,
h2,
h3,
p {
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Shell: sidebar (wide pages only), sticky header, full-bleed main. */
.app {
  display: flex;
  min-height: 100dvh;
  background:
    radial-gradient(900px circle at 18% 22%, rgba(124, 99, 255, 0.14), transparent 60%),
    radial-gradient(820px circle at 82% 10%, rgba(120, 184, 255, 0.1), transparent 58%), var(--bg);
}
.sidebar {
  display: none;
  position: sticky;
  top: 0;
  flex-direction: column;
  width: 240px;
  height: 100dvh;
  flex: none;
  background: var(--surface);
  border-right-width: 1px;
}
@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header);
  padding: 0 16px;
  border-bottom-width: 1px;
  font-size: 16px;
  font-weight: 700;
}
.sidebar .brand img {
  width: 32px;
  height: 32px;
}
.sidebar nav {
  padding: 12px;
}
.nav-group {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.account {
  margin-top: auto;
  padding: 12px 16px;
  border-top-width: 1px;
  overflow-wrap: anywhere;
}
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 360px;
  margin: 18vh auto 0;
  padding: 0 16px;
  text-align: center;
}
.login img {
  width: 48px;
  height: 48px;
}
.login form,
.login button {
  width: 100%;
}
.nav-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--raised);
  border-radius: var(--radius);
}
.nav-item .icon {
  width: 16px;
  height: 16px;
}
.nav-item[aria-current='page'] {
  font-weight: 600;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 10%, transparent),
    color-mix(in srgb, var(--brand-2) 5%, transparent)
  );
}
.nav-item[aria-current='page'] span {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 15px -3px rgba(124, 99, 255, 0.25);
}
.content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: var(--header);
  padding: 8px 16px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom-width: 1px;
}
.topbar > .icon {
  color: var(--accent);
}
.topbar img {
  width: 28px;
  height: 28px;
}
.topbar h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.topbar p {
  font-size: 12px;
  color: var(--muted);
}
.topbar > :last-child:not(:nth-child(2)) {
  margin-left: auto;
}
main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-bottom: 64px;
  background: var(--surface);
}

/* Blocks are separated by 1px lines only: no gaps, margins, cards or shadows at page level. */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--raised) 40%, transparent);
  border-bottom-width: 1px;
}
.section-head .pill {
  letter-spacing: normal;
  text-transform: none;
}
.block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  border-bottom-width: 1px;
}
.notice {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom-width: 1px;
  background: color-mix(in srgb, var(--raised) 40%, transparent);
  overflow-wrap: anywhere;
}
.notice:empty {
  display: none;
}
.notice.good {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 5%, transparent);
}
.notice.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 5%, transparent);
}
.notice.bad,
#error {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 10%, transparent);
}
.notice.fine {
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--warn) 5%, transparent);
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom-width: 1px;
}
@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-left-width: 1px;
}
.stats > div:nth-child(odd) {
  border-left-width: 0;
}
@media (min-width: 640px) {
  .stats > div:nth-child(odd) {
    border-left-width: 1px;
  }
  .stats > div:first-child {
    border-left-width: 0;
  }
}
.stats span {
  font-size: 12px;
  color: var(--muted);
}
.stats strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-bottom-width: 1px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
}
.toolbar.sticky {
  position: sticky;
  top: var(--header);
  z-index: 20;
  backdrop-filter: blur(8px);
}
.search {
  position: relative;
  flex: 1;
  min-width: 224px;
}
.search .icon {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  padding-left: 36px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.good {
  color: var(--good);
}
.warn {
  color: var(--warn);
}
.bad {
  color: var(--bad);
}

/* Controls. */
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
label.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
}
input:not([type='checkbox']),
textarea,
select {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea {
  resize: vertical;
}
#steps {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input:not([type='checkbox']):hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
input:not([type='checkbox']):focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
input:disabled,
textarea:disabled {
  opacity: 0.5;
}
input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand);
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.15s;
}
button:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
}
button.primary {
  color: #fff;
  border: 0;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 15px -3px rgba(124, 99, 255, 0.25);
}
button.primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(124, 99, 255, 0.3);
}
button.danger:hover {
  border-color: color-mix(in srgb, var(--bad) 50%, transparent);
  color: var(--bad);
}
button.small {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
button:disabled {
  pointer-events: none;
  opacity: 0.5;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  background: var(--raised);
}
.pill.good {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 15%, transparent);
}
.pill.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 15%, transparent);
}
.pill.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 15%, transparent);
}

/* Flat table and divided list. */
.table {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
thead {
  background: color-mix(in srgb, var(--raised) 40%, transparent);
  border-bottom-width: 1px;
}
th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}
td {
  padding: 10px 16px;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
tbody tr + tr {
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
tbody {
  border-bottom-width: 1px;
}
tbody tr:not(.group):hover {
  background: color-mix(in srgb, var(--raised) 40%, transparent);
}
tr.group th {
  padding: 6px 16px;
  letter-spacing: 0.08em;
  background: color-mix(in srgb, var(--raised) 40%, transparent);
}
tr.off td {
  color: var(--muted);
}
td small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  border-bottom-width: 1px;
}
.list li {
  padding: 10px 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.list li + li {
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.list li:hover {
  background: color-mix(in srgb, var(--raised) 40%, transparent);
}

/* Side panel specifics. */
.out {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#proposal {
  font-weight: 600;
}
#details,
#downloads,
#diagnostics {
  font-size: 12px;
  color: var(--muted);
}
#results .muted {
  margin-right: auto;
}
