/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/roboto-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;
}
/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/roboto-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;
}
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/assets/fonts/material-symbols.woff2) format('woff2');
}

/* Material 3 system roles: cool surfaces and a dark turquoise Ruuvi Hub accent. */
:root {
  --md-sys-color-primary: #005f60;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #b2ece8;
  --md-sys-color-on-primary-container: #002020;
  --md-sys-color-secondary: #466463;
  --md-sys-color-secondary-container: #d1e8e5;
  --md-sys-color-on-secondary-container: #0b2020;
  --md-sys-color-tertiary: #4e607c;
  --md-sys-color-tertiary-container: #d7e3ff;
  --md-sys-color-on-tertiary-container: #0b1b34;
  --md-sys-color-surface: #f3faf8;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #edf5f3;
  --md-sys-color-surface-container: #e7efed;
  --md-sys-color-surface-container-high: #e1e9e7;
  --md-sys-color-surface-container-highest: #dbe3e1;
  --md-sys-color-on-surface: #17201f;
  --md-sys-color-on-surface-variant: #3f4947;
  --md-sys-color-outline: #6f7976;
  --md-sys-color-outline-variant: #bec9c5;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-success: #315b35;
  --md-sys-color-success-container: #d4edcf;
  --md-sys-color-warning: #614300;
  --md-sys-color-warning-container: #ffebba;
  --control-chevron: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%233f4947%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%2010%205%205%205-5%22%2F%3E%3C%2Fsvg%3E');
  --scrim: #00000066;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;
  --md-sys-elevation-1: 0 1px 3px #17201f20, 0 1px 2px #17201f10;
  --md-sys-elevation-3: 0 6px 16px #17201f24, 0 2px 6px #17201f14;
  --md-sys-motion-standard: cubic-bezier(0.2, 0, 0, 1);
  --ink: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --line: var(--md-sys-color-outline-variant);
  --surface: var(--md-sys-color-surface-container-lowest);
  --bg: var(--md-sys-color-surface);
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  color-scheme: light;
}
/* Explicit choice overrides the OS. The media rule also works without JavaScript. */
:root[data-theme='dark'] {
  --md-sys-color-primary: #7bd5cf;
  --md-sys-color-on-primary: #003735;
  --md-sys-color-primary-container: #004f50;
  --md-sys-color-on-primary-container: #a1f0e9;
  --md-sys-color-secondary: #adcac6;
  --md-sys-color-secondary-container: #2f4b49;
  --md-sys-color-on-secondary-container: #d1e8e5;
  --md-sys-color-tertiary: #aec6ec;
  --md-sys-color-tertiary-container: #354861;
  --md-sys-color-on-tertiary-container: #d7e3ff;
  --md-sys-color-surface: #0e1514;
  --md-sys-color-surface-container-lowest: #09100f;
  --md-sys-color-surface-container-low: #161d1c;
  --md-sys-color-surface-container: #1a2220;
  --md-sys-color-surface-container-high: #252d2b;
  --md-sys-color-surface-container-highest: #303836;
  --md-sys-color-on-surface: #dee4e1;
  --md-sys-color-on-surface-variant: #bdc9c5;
  --md-sys-color-outline: #89938f;
  --md-sys-color-outline-variant: #3f4947;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-success: #b8dcb3;
  --md-sys-color-success-container: #173b1d;
  --md-sys-color-warning: #f5d68a;
  --md-sys-color-warning-container: #493500;
  --control-chevron: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23bdc9c5%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%2010%205%205%205-5%22%2F%3E%3C%2Fsvg%3E');
  --scrim: #00000099;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --md-sys-color-primary: #7bd5cf;
    --md-sys-color-on-primary: #003735;
    --md-sys-color-primary-container: #004f50;
    --md-sys-color-on-primary-container: #a1f0e9;
    --md-sys-color-secondary: #adcac6;
    --md-sys-color-secondary-container: #2f4b49;
    --md-sys-color-on-secondary-container: #d1e8e5;
    --md-sys-color-tertiary: #aec6ec;
    --md-sys-color-tertiary-container: #354861;
    --md-sys-color-on-tertiary-container: #d7e3ff;
    --md-sys-color-surface: #0e1514;
    --md-sys-color-surface-container-lowest: #09100f;
    --md-sys-color-surface-container-low: #161d1c;
    --md-sys-color-surface-container: #1a2220;
    --md-sys-color-surface-container-high: #252d2b;
    --md-sys-color-surface-container-highest: #303836;
    --md-sys-color-on-surface: #dee4e1;
    --md-sys-color-on-surface-variant: #bdc9c5;
    --md-sys-color-outline: #89938f;
    --md-sys-color-outline-variant: #3f4947;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-success: #b8dcb3;
    --md-sys-color-success-container: #173b1d;
    --md-sys-color-warning: #f5d68a;
    --md-sys-color-warning-container: #493500;
    --control-chevron: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23bdc9c5%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%2010%205%205%205-5%22%2F%3E%3C%2Fsvg%3E');
    --scrim: #00000099;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 24px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms var(--md-sys-motion-standard),
    box-shadow 160ms var(--md-sys-motion-standard);
}
button:hover,
.button:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
  text-decoration: none;
}
button:active,
.button:active {
  background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
}
button.primary,
.button.primary {
  background: var(--md-sys-color-primary);
  border-color: transparent;
  color: var(--md-sys-color-on-primary);
}
button.primary:hover,
.button.primary:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 92%, white);
  box-shadow: var(--md-sys-elevation-1);
}
button.primary:active,
.button.primary:active {
  background: color-mix(in srgb, var(--md-sys-color-primary) 85%, white);
  box-shadow: none;
}
button.tonal,
.button.tonal {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}
button.danger {
  color: var(--md-sys-color-error);
  border-color: var(--md-sys-color-error);
}
button.danger:hover {
  background: var(--md-sys-color-error-container);
}
button:disabled,
.button[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.full {
  width: 100%;
}
.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  white-space: nowrap;
  overflow: hidden;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
button .icon,
.button .icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}
.icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
}
.icon-button .icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 24px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  padding: 15px 16px;
  color: var(--ink);
  background: var(--surface);
  line-height: 24px;
  font-size: 16px;
}
/* Vector chevrons stay crisp at browser zoom and reserve space for long values. */
select:not([multiple]):not([size]),
select[size='1'] {
  appearance: none;
  background-image: var(--control-chevron);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 24px 24px;
  padding-right: 48px;
  cursor: pointer;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[readonly] {
  background: var(--md-sys-color-surface-container);
  color: var(--muted);
  border-color: var(--line);
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--md-sys-color-primary);
}
label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--muted);
}
label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  padding: 0 16px;
}
label.field {
  padding-top: 0;
  gap: 4px;
}
.field > .field-label {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: -8px;
  padding: 0 4px;
  background: var(--surface);
  line-height: 16px;
  font-weight: 400;
}
.field:focus-within > .field-label {
  color: var(--md-sys-color-primary);
}
:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 16px;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-radius: 28px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.skip-link:focus {
  width: auto;
  height: auto;
  padding: 12px 24px;
  clip-path: none;
}
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  height: 100dvh;
  position: sticky;
  top: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 12px 12px;
  background: var(--md-sys-color-surface-container-low);
}
.brand-row {
  display: flex;
  align-items: center;
  padding: 0 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.4px;
}
.brand:hover {
  text-decoration: none;
}
.brand small {
  display: block;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.1px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 16px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.brand-mark img {
  display: block;
  width: 44px;
  height: 44px;
}
.sidebar nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.nav-group {
  margin-bottom: 12px;
}
.nav-label {
  display: block;
  padding: 8px 16px 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--muted);
}
.nav-group a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  margin: 2px 0;
  border-radius: 28px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}
.nav-group a .icon {
  font-size: 22px;
}
.nav-group a:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  text-decoration: none;
}
.nav-group a.active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.nav-group a.active:hover {
  background: color-mix(
    in srgb,
    var(--md-sys-color-secondary-container) 90%,
    var(--md-sys-color-primary)
  );
}
.account {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 16px 8px 0;
}
.avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  font-size: 16px;
  font-weight: 500;
}
.account strong {
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-role {
  display: block;
  text-transform: capitalize;
  font-size: 12px;
}
.menu-toggle,
.drawer-close {
  display: none;
}
.nav-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  border: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
}
.nav-scrim:hover {
  background: var(--scrim);
}
main {
  min-width: 0;
}
main:focus {
  outline: none;
}
.topline {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
}
.topline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
}
.topline-title > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-label,
.breadcrumb-separator,
.workspace-meta {
  color: var(--muted);
}
.workspace-meta {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.breadcrumbs .breadcrumb-separator {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-self: center;
}
.page-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 8px 32px 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0 32px;
}
.eyebrow {
  color: var(--md-sys-color-primary);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0 0 8px;
}
h1 {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.4px;
  font-weight: 400;
  margin: 0 0 8px;
}
h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.page-heading p.muted {
  margin: 0;
  max-width: 760px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inline-form input {
  min-width: 172px;
}
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 24px 20px;
}
.source-filters {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.source-filters legend {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}
.source-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.source-option {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}
.source-option:hover {
  background: var(--md-sys-color-surface-container);
}
.source-option:has(input:checked) {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}
.source-option:focus-within {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}
.source-options > a {
  padding: 8px;
  font-weight: 500;
}
.status-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 0 8px;
}
.status-strip strong {
  color: var(--ink);
  font-weight: 500;
}
.status-strip a {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge .icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.badge.good {
  background: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}
.badge.bad {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
.badge.warm {
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 16px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--md-sys-color-surface-container-lowest);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--md-sys-color-surface-container-high);
  min-width: 0;
}
.kpi:first-child {
  background: var(--md-sys-color-primary-container);
  border-color: transparent;
}
.kpi-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
.kpi-heading .icon {
  color: var(--md-sys-color-primary);
}
.kpi strong {
  display: block;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 40px;
  font-weight: 400;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi:first-child strong {
  color: var(--md-sys-color-on-primary-container);
}
.kpi-comparison {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.kpi-comparison > span {
  font-size: 12px;
  font-weight: 500;
  background: var(--md-sys-color-surface-container);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 8px;
}
.kpi:first-child .kpi-comparison > span {
  background: color-mix(in srgb, var(--md-sys-color-surface) 60%, transparent);
}
.kpi-comparison small {
  font-size: 12px;
  color: var(--muted);
}
.panel {
  min-width: 0;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--md-sys-color-surface-container-high);
}
.panel > .section-heading {
  margin-top: 0;
}
.panel.flush {
  padding: 0;
  overflow: hidden;
}
.charts-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
}
.chart-wrap {
  position: relative;
  height: 280px;
}
.dimension-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
  font-size: 14px;
}
.dimension-row:last-child {
  border: 0;
}
.dimension-row > span {
  overflow-wrap: anywhere;
}
.dimension-row strong,
.dimension-row b {
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.split-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.split-metrics .dimension-row {
  font-size: 12px;
  padding: 8px 0;
  gap: 8px;
}
.three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.two-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--md-sys-color-surface-container);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.table-scroll {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--md-sys-color-surface-container-low);
  padding: 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
  white-space: nowrap;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td.wrap {
  white-space: normal;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--md-sys-color-surface-container-low);
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row-actions a {
  display: inline-block;
  padding: 6px 0;
  margin-right: 16px;
  font-weight: 500;
}
.row-actions a:last-child {
  margin-right: 0;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--md-sys-color-surface-container-high);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}
.toolbar > input {
  flex: 2 1 220px;
  max-width: 360px;
}
.toolbar > select {
  flex: 1 1 140px;
  max-width: 200px;
}
.toolbar label {
  min-width: 0;
  flex: 1 1 130px;
  max-width: 180px;
}
.toolbar .search-field {
  flex: 1.5 1 180px;
  max-width: 360px;
}
.toolbar label:has(select[name='type']) {
  flex: 1.3 0 224px;
  max-width: 256px;
}
.toolbar label:has(select[name='status']) {
  flex: 1 0 160px;
  max-width: 220px;
}
.toolbar label:has(input[type='date']) {
  flex: 1 0 172px;
  max-width: 200px;
}
.toolbar input[type='date'] {
  padding-inline: 12px;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.filter-actions > a {
  padding: 10px 12px;
  border-radius: 24px;
  font-weight: 500;
}
.filter-actions > a:hover {
  background: var(--md-sys-color-surface-container);
  text-decoration: none;
}
.toolbar > a,
.actions > a:not(.button) {
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 24px;
}
.toolbar > a:hover,
.actions > a:not(.button):hover {
  background: var(--md-sys-color-surface-container);
  text-decoration: none;
}
.sort-heading {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  color: inherit;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0;
  min-height: 24px;
  text-align: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sort-heading:hover {
  color: var(--md-sys-color-primary);
  background: transparent;
  text-decoration: none;
}
.sort-arrow {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m8%203-4%204m4-4%204%204M8%203v18m8%200-4-4m4%204%204-4M16%2021V3%22%2F%3E%3C%2Fsvg%3E')
    center / contain no-repeat;
}
th[aria-sort='ascending'] .sort-arrow,
th[aria-sort='descending'] .sort-arrow {
  mask-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%2010%206-6%206%206M12%204v16%22%2F%3E%3C%2Fsvg%3E');
}
th[aria-sort='descending'] .sort-arrow {
  transform: rotate(180deg);
}
th[aria-sort='ascending'],
th[aria-sort='descending'] {
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.job-actions {
  margin: 0 0 24px;
}
.empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 8px;
}
.empty.compact {
  padding: 32px 8px;
}
.empty .empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
  margin-bottom: 16px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.notice {
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
  border: 0;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0;
}
.notice a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}
.notice.success {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}
.notice[role='alert'] {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
/* Native radios make the theme cards work with Tab, arrows and screen readers. */
.theme-picker {
  border: 0;
  padding: 0;
  margin: 24px 0 0;
  min-width: 0;
}
.theme-picker legend {
  font-weight: 500;
  margin-bottom: 12px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.theme-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  color: var(--ink);
}
.theme-option:hover {
  background: var(--md-sys-color-surface-container-low);
}
.theme-option:has(:checked) {
  border-color: var(--md-sys-color-primary);
  box-shadow: inset 0 0 0 1px var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.theme-option:focus-within {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 3px;
}
.theme-option input {
  grid-row: 2;
}
.theme-option-text {
  grid-row: 2;
  display: grid;
  gap: 4px;
  font-weight: 400;
}
.theme-option strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}
.theme-preview {
  grid-column: 1 / -1;
  height: 80px;
  border: 1px solid #6f7976;
  border-radius: 8px;
  background: #f3faf8;
  padding: 12px 12px 12px 32px;
  position: relative;
  overflow: hidden;
}
.theme-preview::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 20px;
  background: #d1e8e5;
}
.theme-preview span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #b2ece8;
  border-top: 8px solid #005f60;
}
.theme-preview-dark {
  background: #0e1514;
}
.theme-preview-dark::before {
  background: #2f4b49;
}
.theme-preview-dark span {
  background: #004f50;
  border-color: #7bd5cf;
}
.theme-preview-system {
  background: linear-gradient(90deg, #f3faf8 50%, #0e1514 50%);
}
.theme-preview-system span {
  background: linear-gradient(90deg, #b2ece8 50%, #004f50 50%);
  border-color: #466463;
}
.theme-status {
  min-height: 20px;
  margin: 20px 0 0;
}
.settings-description {
  margin-bottom: 28px;
}
@media (max-width: 600px) {
  .theme-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .theme-option {
    grid-template-columns: 20px 64px minmax(0, 1fr);
  }
  .theme-option input {
    grid-column: 1;
    grid-row: 1;
  }
  .theme-preview {
    grid-column: 2;
    grid-row: 1;
    height: 48px;
    padding: 8px 8px 8px 20px;
  }
  .theme-preview::before {
    width: 12px;
  }
  .theme-option-text {
    grid-column: 3;
    grid-row: 1;
  }
}
@media (scripting: none) {
  .theme-picker,
  .theme-status {
    display: none;
  }
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]),
  select[size='1'] {
    appearance: auto;
    background-image: none;
  }
  .sort-arrow,
  summary::before {
    background: CanvasText;
  }
  .theme-option:has(:checked) {
    border: 2px solid Highlight;
  }
}
.form-panel {
  max-width: 1056px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  margin: 8px 0 32px;
}
.form-grid button {
  align-self: end;
  justify-self: start;
}
.form-end,
.resolution {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.resolution {
  margin-bottom: 0;
}
[data-contents] {
  min-width: 0;
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
[data-contents] legend {
  padding: 0 8px;
  font-size: 20px;
  font-weight: 500;
}
[data-contents] > p {
  margin: 0 0 24px;
}
[data-contents] > label {
  max-width: 300px;
  margin-bottom: 24px;
}
[data-contents] .table-scroll {
  margin: 16px 0;
}
[data-contents-rows] input {
  min-width: 140px;
}
[data-contents-rows] input[type='number'] {
  max-width: 180px;
}
[data-item-editor] > .actions {
  margin-top: 24px;
}
dialog {
  background: var(--md-sys-color-surface-container-high);
  color: var(--ink);
  max-width: 600px;
  width: calc(100% - 48px);
  max-height: calc(100dvh - 48px);
  border: 0;
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--md-sys-elevation-3);
}
dialog::backdrop {
  background: var(--scrim);
}
dialog h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 400;
}
dialog label {
  margin: 28px 0;
}
dialog .field-label {
  background: var(--md-sys-color-surface-container-high);
}
dialog input {
  background: transparent;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 28px;
  gap: 8px;
}
dialog .actions button {
  border: 0;
  padding: 10px 14px;
}
dialog .actions button[data-content-action='version'] {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: '';
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: currentColor;
  mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%2010%205%205%205-5%22%2F%3E%3C%2Fsvg%3E')
    center / contain no-repeat;
  transform: rotate(-90deg);
}
details[open] > summary::before {
  transform: none;
}
details[open] summary {
  margin-bottom: 24px;
}
details table {
  margin-top: 20px;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-layout {
  width: 1120px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  align-items: center;
}
.login-intro {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  background: var(--md-sys-color-primary-container);
  border-radius: 32px;
}
.login-intro h1 {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -1px;
  color: var(--md-sys-color-on-primary-container);
}
.login-intro p:not(.eyebrow) {
  font-size: 16px;
  color: var(--muted);
  max-width: 370px;
}
.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.login-features > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 60%, transparent);
  padding: 8px 12px;
  border-radius: 16px;
}
.login-features .icon {
  font-size: 20px;
  width: 20px;
}
.login-caption {
  color: var(--muted);
  font-size: 12px;
}
.login-card {
  width: 440px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--md-sys-color-surface-container-high);
  border-radius: 28px;
  padding: 40px;
}
.login-card h2 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
  margin: 20px 0 8px;
}
.login-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-primary);
}
.login-card form {
  margin-top: 32px;
}
.login-card label {
  margin-bottom: 28px;
}
.login-card .primary {
  min-height: 48px;
}
.login-card .primary .icon {
  margin-left: auto;
}
.login-card .primary {
  justify-content: space-between;
}
.login-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 24px 0 0;
}
.login-note .icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.error-panel {
  margin-top: 32px;
}
.login-card .error-panel {
  padding: 0;
  border: 0;
  background: none;
}
#email-lines input {
  min-width: 120px;
}
#email-lines td:first-child input {
  min-width: 200px;
}
#email-lines {
  margin-bottom: 16px;
}
@media (min-width: 1800px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .kpi {
    padding: 20px;
  }
  .kpi strong {
    font-size: 28px;
  }
}
@media (max-width: 1250px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .three-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .actions {
    justify-content: flex-end;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }
  .page-content {
    padding-left: 24px;
    padding-right: 24px;
  }
  .topline {
    padding: 0 24px;
  }
  .workspace-meta {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading {
    flex-direction: column;
    gap: 16px;
  }
  .two-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .login-layout {
    gap: 32px;
  }
  .login-intro {
    padding: 28px;
  }
  .login-intro h1 {
    font-size: 32px;
    line-height: 40px;
  }
}
@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
  }
  .js .sidebar {
    position: fixed;
    z-index: 30;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, calc(100vw - 48px));
    height: 100dvh;
    border-radius: 0 28px 28px 0;
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 220ms var(--md-sys-motion-standard),
      visibility 220ms;
  }
  .js .nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    box-shadow: var(--md-sys-elevation-3);
  }
  .js .menu-toggle,
  .js .drawer-close {
    display: inline-flex;
  }
  .brand-row {
    padding: 8px 4px 20px;
    justify-content: space-between;
  }
  .nav-open {
    overflow: hidden;
  }
  .topline {
    height: 64px;
    padding: 0 16px;
  }
  .topline-title {
    gap: 4px;
  }
  .workspace-label,
  .breadcrumb-separator {
    display: none;
  }
  .page-content {
    padding: 8px 16px 24px;
  }
  .page-heading {
    margin-top: 8px;
    margin-bottom: 24px;
  }
  h1 {
    font-size: 28px;
    line-height: 36px;
  }
  .dashboard-filters {
    gap: 20px;
  }
  .status-strip a {
    margin-left: 0;
  }
  .login-page {
    padding: 24px;
  }
  .login-layout {
    max-width: 480px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .login-intro {
    min-height: 0;
    background: none;
    padding: 0;
  }
  .login-intro > div,
  .login-caption {
    display: none;
  }
  .login-card {
    width: 100%;
    padding: 32px;
  }
}
@media (max-width: 520px) {
  .panel {
    padding: 20px;
    border-radius: 16px;
  }
  .panel.flush {
    padding: 0;
  }
  .kpi-grid {
    gap: 12px;
  }
  .kpi {
    padding: 16px;
    border-radius: 16px;
  }
  .kpi-heading {
    gap: 4px;
  }
  .kpi-heading .icon {
    display: none;
  }
  .kpi-label {
    font-size: 12px;
  }
  .kpi strong {
    font-size: 21px;
    line-height: 32px;
  }
  .kpi-comparison {
    margin-top: 12px;
  }
  .kpi-comparison small {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    padding: 24px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar label,
  .toolbar .search-field,
  .toolbar > input,
  .toolbar > select {
    max-width: none;
  }
  .toolbar label {
    flex-basis: calc(50% - 12px);
  }
  .toolbar .search-field {
    grid-column: 1 / -1;
  }
  .toolbar label:has(select[name='status']) {
    grid-column: 1 / -1;
    max-width: none;
  }
  .toolbar label:has(select[name='type']) {
    grid-column: 1 / -1;
    max-width: none;
  }
  .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .inline-form {
    width: 100%;
  }
  .inline-form label {
    flex: 1;
  }
  .inline-form input {
    min-width: 0;
  }
  .split-metrics {
    gap: 16px;
  }
  .split-metrics .dimension-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  [data-contents] {
    padding: 16px;
  }
  .actions {
    gap: 8px;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  dd {
    margin-bottom: 16px;
  }
  dialog {
    padding: 24px;
  }
  dialog .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  :root,
  :root[data-theme] {
    --md-sys-color-primary: #005f60;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #b2ece8;
    --md-sys-color-on-primary-container: #002020;
    --md-sys-color-secondary: #466463;
    --md-sys-color-secondary-container: #d1e8e5;
    --md-sys-color-on-secondary-container: #0b2020;
    --md-sys-color-tertiary: #4e607c;
    --md-sys-color-tertiary-container: #d7e3ff;
    --md-sys-color-on-tertiary-container: #0b1b34;
    --md-sys-color-surface: #f3faf8;
    --md-sys-color-surface-container-lowest: #ffffff;
    --md-sys-color-surface-container-low: #edf5f3;
    --md-sys-color-surface-container: #e7efed;
    --md-sys-color-surface-container-high: #e1e9e7;
    --md-sys-color-surface-container-highest: #dbe3e1;
    --md-sys-color-on-surface: #17201f;
    --md-sys-color-on-surface-variant: #3f4947;
    --md-sys-color-outline: #6f7976;
    --md-sys-color-outline-variant: #bec9c5;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;
    --md-sys-color-success: #315b35;
    --md-sys-color-success-container: #d4edcf;
    --md-sys-color-warning: #614300;
    --md-sys-color-warning-container: #ffebba;
    --control-chevron: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%233f4947%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7%2010%205%205%205-5%22%2F%3E%3C%2Fsvg%3E');
    --scrim: #00000066;
    color-scheme: light;
  }
  .sidebar,
  .toolbar,
  .actions,
  .topline,
  .nav-scrim,
  .skip-link,
  .dashboard-filters {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .page-content {
    padding: 0;
  }
  .panel,
  .kpi {
    break-inside: avoid;
  }
  .chart-wrap {
    height: 220px;
  }
  body {
    background: white;
  }
}

.batch-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  align-items: start;
}
.batch-remove {
  align-self: center;
  justify-self: start;
}
[data-incoming-batches] {
  margin-block: 1.5rem;
}
[data-incoming-batches] [data-add-batch] {
  margin-top: 1rem;
}
[hidden] {
  display: none !important;
}

.batch-entry .checkbox,
[data-cost-correction] .checkbox {
  flex-direction: row;
  align-items: center;
  align-self: center;
  gap: 0.6rem;
}
[data-item-cost] {
  padding: 0.5rem 0;
}
[data-item-cost] p {
  margin: 0.5rem 0;
}

/* A shared floating list stays visible outside horizontally scrolling tables. */
.item-picker-popup {
  position: fixed;
  z-index: 1200;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
  color: var(--ink);
  box-shadow: 0 8px 24px #0003;
}
.item-picker-option {
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
}
.item-picker-option strong,
.item-picker-option span {
  display: block;
  overflow-wrap: anywhere;
}
.item-picker-option span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.item-picker-option:hover,
.item-picker-option[aria-selected='true'] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.item-picker-option[aria-selected='true'] {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
}
.item-picker-status {
  margin: 8px;
  font-size: 12px;
  color: var(--muted);
}
.item-picker-selection {
  display: block;
  margin-top: 6px;
  white-space: normal;
  max-width: 32rem;
}
[data-contents-rows] td:first-child,
#email-lines td:first-child {
  min-width: 240px;
}
.recipe-summary {
  font-size: 13px;
  color: var(--muted);
}
@media print {
  .item-picker-popup {
    display: none !important;
  }
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.report-grid > *,
.item-details > * {
  min-width: 0;
}
.item-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.item-details dt {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}
.item-details dd {
  margin: 6px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.metadata-hint {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}
.report-links {
  margin-bottom: 24px;
}
.history-note {
  min-width: 180px;
  max-width: 400px;
  white-space: normal;
}
@media (max-width: 1000px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
  .item-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .item-details {
    grid-template-columns: 1fr;
  }
}

.topline-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.infoscreen-link {
  font-size: 14px;
  white-space: nowrap;
}

/* Task-oriented workspace: compact navigation, actionable summaries and print labels. */
.workspace-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.workspace-card {
  display: block;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}
.workspace-card h2 {
  color: var(--md-sys-color-primary);
}
.workspace-card:hover {
  border-color: var(--md-sys-color-primary);
}
.actionable-kpi {
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}
.actionable-kpi:hover {
  border-color: var(--md-sys-color-primary);
}
.actionable-kpi small {
  line-height: 1.5;
}
.shipment-summary > a {
  min-width: 0;
  overflow-wrap: anywhere;
}
.shipment-summary > span {
  flex-shrink: 0;
  white-space: nowrap;
}
.attention-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.attention-row > div {
  flex: 1;
}
.attention-row p {
  margin: 6px 0;
}
.order-products {
  min-width: 180px;
  max-width: 400px;
}
.purchase-entry {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 16px;
  padding: 22px;
  margin: 18px 0;
}
.purchase-entry legend {
  padding: 0 8px;
  font-weight: 600;
}
.maintenance-action {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 18px 0;
}
.global-search {
  white-space: nowrap;
}
.batch-label {
  background: white;
  color: black;
  border: 2px solid black;
  border-radius: 6px;
  padding: 24px;
  width: 100%;
  max-width: 550px;
}
.batch-label h2 {
  font-size: 26px;
  overflow-wrap: anywhere;
}
.label-identifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 24px;
  border-block: 2px solid black;
  padding: 12px 0;
}
.batch-label p {
  margin: 10px 0;
}
@media (max-width: 800px) {
  .attention-row,
  .maintenance-action {
    flex-wrap: wrap;
  }
  .topline-actions .global-search {
    padding: 6px;
  }
}
@media print {
  body:has(.batch-label) .sidebar,
  body:has(.batch-label) .topline,
  body:has(.batch-label) .page-heading,
  body:has(.batch-label) .skip-link {
    display: none !important;
  }
  body:has(.batch-label) .shell {
    display: block;
  }
  body:has(.batch-label) main,
  body:has(.batch-label) .page-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  body:has(.batch-label) {
    background: white !important;
  }
  .batch-label {
    break-inside: avoid;
    width: 95mm;
    font-size: 10pt;
    max-width: none;
    padding: 4mm;
  }
  .batch-label h2 {
    font-size: 14pt;
  }
  .label-identifiers {
    font-size: 13pt;
  }
}

/* One navigation tree; status choices are controls belonging to their list. */
.nav-tree,
.nav-children,
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-tree .nav-group {
  margin-bottom: 2px;
}
.nav-group .nav-parent.section-active {
  color: var(--ink);
  font-weight: 700;
}
.nav-group .nav-children {
  margin: 0 0 8px 26px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.nav-group .nav-children a {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 18px;
  border-radius: 12px;
}
.breadcrumbs {
  min-width: 0;
}
.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.breadcrumbs li > a,
.breadcrumbs li > span:not(.icon) {
  overflow-wrap: anywhere;
}
.breadcrumbs li:last-child {
  color: var(--ink);
  font-weight: 500;
}
.topline {
  min-height: 72px;
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
}
.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-basis: 100%;
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}
.status-filters legend {
  padding: 0;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.status-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--ink);
  font-size: 13px;
}
.status-filters a.selected {
  background: var(--md-sys-color-secondary-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 700;
}
.status-filters a.selected::before {
  content: '✓';
  margin-right: 6px;
}
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.recipe-version {
  margin-top: 16px;
}
@media (max-width: 800px) {
  .breadcrumbs .breadcrumb-separator {
    display: inline-block;
  }
  .breadcrumbs {
    font-size: 12px;
  }
}

/* Administration forms stay readable on wide desktops and wrap on small screens. */
.display-connect > p {
  max-width: 760px;
  margin: 0 0 28px;
}
.display-pairing-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(200px, 360px) auto;
  align-items: start;
  gap: 24px 16px;
  max-width: 800px;
}
.display-pairing-form button {
  margin-top: 6px;
  justify-self: start;
}
.display-pairing-form input[name='code'] {
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.account-form {
  max-width: 880px;
}
.account-form .form-grid {
  margin-top: 24px;
}
.account-form .role-guide {
  margin: 0 0 24px;
}
.account-password {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin: 0 0 24px;
}
.account-password > label {
  max-width: 440px;
  margin-top: 24px;
}
.role-descriptions {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  max-width: 760px;
  margin: 20px 0 0;
}
.role-descriptions dt,
.role-descriptions dd {
  margin: 0;
}
.role-descriptions dt {
  color: var(--ink);
  font-weight: 500;
}
#displays > p {
  margin-bottom: 24px;
}
#displays .empty h3 {
  color: var(--ink);
  font-size: 16px;
  margin: 12px 0 4px;
}
#displays .empty p {
  margin: 0;
}
@media (max-width: 1100px) {
  .display-pairing-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .display-pairing-form button {
    margin-top: 0;
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .display-pairing-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Account security: QR setup stays local and usable with or without JavaScript. */
.account-link {
  display: block;
  white-space: nowrap;
}
.account-security h2 {
  overflow-wrap: anywhere;
}
.mfa-setup .actions {
  margin-top: 16px;
}
.account-security {
  max-width: 1100px;
}
.security-form {
  display: grid;
  gap: 24px;
  max-width: 480px;
  margin-top: 28px;
}
.security-form button {
  justify-self: start;
}
.security-action {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.security-action summary {
  cursor: pointer;
  font-weight: 600;
}
.mfa-setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 32px;
}
.mfa-qr {
  display: block;
  width: 256px;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: 12px;
  background: white;
}
.mfa-secret {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  margin-block: 16px;
}
.recovery-panel {
  margin-top: 32px;
}
.recovery-codes {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  margin-block: 24px;
}
.recovery-codes code {
  user-select: all;
  overflow-wrap: anywhere;
}
.verification-card {
  width: min(100%, 520px);
}
.verification-card h1 {
  font-size: 2rem;
}
@media (max-width: 760px) {
  .mfa-setup {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
