@font-face {
  font-family: "Manrope";
  src: url("./assets/brand/parceo/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/brand/parceo/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --ink: #142d27;
  --muted: #53665d;
  --line: #d9e3dc;
  --brand: #0b6e58;
  --brand-strong: #085440;
  --accent: #d6f279;
  --danger: #b42336;
  --shadow: 0 18px 45px rgba(24, 32, 27, 0.08);
  --soft: #eaf0e9;
  --soft-hover: #edf3ed;
  --topbar: rgba(255, 255, 255, 0.82);
  --input: #ffffff;
  --notice: #f2f7e4;
  --notice-line: #c9dca1;
  --danger-soft: #fae7e4;
  --site-soft: #fbf4df;
  --site-ink: #8b6813;
  --chart-grid: rgba(223, 229, 220, 0.7);
  --nav-active: #142d27;
  --nav-active-ink: #ffffff;
  --toast-bg: #142d27;
  --toast-ink: #ffffff;
  --on-brand: #ffffff;
  --on-danger: #ffffff;
  --focus: #0b6e58;
  --accent-ink: #596f1f;
  --control-line: #789184;
  --warning: #855000;
  --success: #176b45;
  --workspace-sticky-top: 112px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f211c;
  --surface: #142d27;
  --ink: #ffffff;
  --muted: #bdcdc4;
  --line: #3e574b;
  --brand: #d6f279;
  --brand-strong: #e4faa0;
  --accent: #d6f279;
  --danger: #fda4af;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  --soft: #213e32;
  --soft-hover: #2b493c;
  --topbar: rgba(15, 33, 28, 0.94);
  --input: #10251e;
  --notice: #292619;
  --notice-line: #554a25;
  --danger-soft: #38211f;
  --site-soft: #302b1d;
  --site-ink: #d6f279;
  --chart-grid: rgba(75, 86, 77, 0.55);
  --nav-active: #d6f279;
  --nav-active-ink: #142d27;
  --toast-bg: #d6f279;
  --on-brand: #142d27;
  --on-danger: #142d27;
  --focus: #d6f279;
  --accent-ink: #d6f279;
  --control-line: #789184;
  --warning: #e8c16a;
  --success: #8bd9a9;
  --toast-ink: #142d27;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Manrope",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

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

button,
a.secondary {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary {
  background: var(--brand);
  color: var(--on-brand);
}

.primary:hover {
  background: var(--brand-strong);
}

.secondary {
  background: var(--soft);
  color: var(--ink);
}

.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
}

.danger-button:hover {
  background: var(--danger);
  color: var(--on-danger);
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions > button {
  flex: 1;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.action-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell {
  position: relative;
}

.notification-menu {
  position: relative;
  flex: 0 0 auto;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.notification-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-panel-list {
  display: grid;
  gap: 8px;
  max-height: min(520px, 62vh);
  overflow: auto;
}

.notification-panel-empty {
  margin: 18px 8px;
  color: var(--muted);
  text-align: center;
}

.notification-panel-link {
  width: 100%;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 8px 4px;
  background: transparent;
  color: var(--brand);
  text-align: center;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--danger);
  color: var(--on-danger);
  font-size: 10px;
  font-weight: 900;
}

.session-label {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.session-role-badge {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 999px;
  padding: 0 10px;
  background: color-mix(in srgb, currentColor 8%, var(--surface));
  color: var(--brand);
}

.session-role-badge svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-role-badge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand-title {
  flex: 1 1 430px;
  min-width: min(100%, 430px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.brand-title h1 {
  max-width: 520px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 0.96;
}

.brand-lockup {
  width: clamp(132px, 14vw, 176px);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 8px;
  background: transparent;
}

.brand-lockup img {
  display: block;
  width: 100%;
  height: auto;
}

.topbar-actions {
  flex: 1 1 540px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-toggle,
.language-toggle,
.time-format-toggle,
.weather-toggle {
  min-height: 42px;
  width: 42px;
  min-width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.theme-toggle:hover,
.language-toggle:hover,
.time-format-toggle:hover,
.weather-toggle:hover {
  background: var(--soft);
}

.theme-toggle svg,
.time-format-toggle svg,
.weather-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.time-format-toggle {
  width: auto;
  min-width: 74px;
  grid-template-columns: 18px auto;
  gap: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.time-format-toggle span {
  line-height: 1;
}

.current-time {
  min-height: 42px;
  min-width: 194px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.weather-toggle {
  width: auto;
  min-width: 82px;
  grid-template-columns: 19px auto;
  gap: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.weather-icon {
  display: grid;
  place-items: center;
}

.weather-toggle span {
  line-height: 1;
}

.language-switcher {
  position: relative;
}

.language-toggle {
  font-size: 20px;
  line-height: 1;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 154px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.language-menu button:hover,
.language-menu button.is-active {
  background: var(--soft);
}

.language-menu button span {
  font-size: 18px;
}

.sun-icon {
  display: none;
}

:root[data-theme="dark"] .sun-icon {
  display: block;
}

:root[data-theme="dark"] .moon-icon {
  display: none;
}

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

h1 {
  font-size: clamp(28px, 4vw, 44px);
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
}

h3 {
  font-size: 20px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tabs,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  background: transparent;
  color: var(--muted);
}

.tab.is-active {
  background: var(--nav-active);
  color: var(--nav-active-ink);
}

main {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
}

.view,
.is-hidden {
  display: none !important;
}

.permission-hidden {
  display: none !important;
}

.view.is-active {
  display: block !important;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.panel-head.inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.notice,
.helper,
.empty-state,
.detail-empty {
  color: var(--muted);
  line-height: 1.5;
}

.notice {
  background: var(--notice);
  border: 1px solid var(--notice-line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

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

.form-grid.one {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.required-marker {
  color: var(--danger);
  font-weight: 900;
}

.field-error {
  min-height: 16px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--ink);
  padding: 11px 12px;
}

.device-open {
  background: transparent;
  border: 0;
  padding: 2px;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.device-open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.field-invalid input,
.field-invalid select {
  border-color: var(--danger);
  outline: 3px solid var(--danger-soft);
}

.password-field {
  grid-column: 1 / -1;
}

.password-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  gap: 8px;
  align-items: center;
}

.password-action {
  border: 1px solid var(--line);
}

.switch-field {
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--ink);
  cursor: pointer;
}

.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-switch {
  width: 58px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px;
  background: var(--soft);
  border: 1px solid var(--line);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.switch-knob {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 4px 12px rgba(24, 32, 27, 0.16);
  transform: translateX(0);
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}

.switch-knob svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.switch-icon-on {
  display: none;
}

.switch-field input:checked + .account-switch {
  background: color-mix(in srgb, var(--brand) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
}

.switch-field input:checked + .account-switch .switch-knob {
  color: var(--brand);
  transform: translateX(26px);
}

.switch-field input:checked + .account-switch .switch-icon-on {
  display: block;
}

.switch-field input:checked + .account-switch .switch-icon-off {
  display: none;
}

.switch-field input:focus-visible + .account-switch {
  outline: 2px solid var(--focus);
}

.switch-copy {
  display: grid;
  gap: 2px;
}

.switch-copy strong {
  font-size: 14px;
}

.switch-copy small {
  color: var(--muted);
  font-size: 12px;
}

.wide,
.form-grid .primary {
  grid-column: 1 / -1;
}

body.account-invite-mode #collect,
body.account-invite-mode #admin,
body.account-invite-mode .topbar-actions {
  display: none !important;
}

.account-invite-page {
  width: min(760px, 100%);
  margin: clamp(16px, 5vh, 64px) auto 0;
}

.account-invite-panel {
  padding: clamp(20px, 4vw, 36px);
}

.account-invite-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.account-invite-state.is-error {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.account-invite-state.is-success {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: account-invite-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation-duration: 1.6s;
  }
}

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

.account-invite-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.account-invite-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-invite-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.role-description,
.role-guidance {
  color: var(--muted);
  line-height: 1.5;
}

.role-description {
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.account-password-visibility {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  cursor: pointer;
}

.account-password-visibility input {
  width: 18px;
  height: 18px;
}

.account-management-section {
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.account-management-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

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

.section-heading.inline {
  align-items: center;
}

.section-heading h4 {
  margin: 0 0 4px;
}

.account-invite-composer .form-grid {
  align-items: end;
}

.role-guidance {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 12px;
  border-left: 3px solid var(--brand);
}

.role-guidance strong {
  color: var(--ink);
}

.invite-link-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.invite-link-result > div:first-child {
  display: grid;
  gap: 3px;
}

.invite-link-result span {
  color: var(--muted);
}

.account-invites-table,
.users-table {
  min-width: 920px;
}

.account-manual-editor > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.account-manual-editor[open] > summary {
  margin-bottom: 14px;
}

.token-state.pending {
  color: var(--warning, #a75f00);
}

.token-state.accepted {
  color: var(--brand);
}

pre {
  margin: 16px 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #17211d;
  color: #f2f7f2;
  border-radius: 8px;
  padding: 16px;
}

.narrow {
  max-width: 520px;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-nav {
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.admin-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  background: transparent;
  color: var(--muted);
}

.admin-nav-button svg,
.organization-icon svg,
.map-empty svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav-button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 32, 27, 0.1);
}

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

.valuation-toolbar {
  margin-bottom: 18px;
}

.valuation-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.valuation-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.icon-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-meta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.enrichment-workflow {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.enrichment-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.enrichment-workflow progress {
  width: 100%;
  height: 10px;
  accent-color: var(--brand);
}

.enrichment-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enrichment-steps li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft);
}

.enrichment-step-marker {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.enrichment-steps li.status-running .enrichment-step-marker {
  border-color: var(--brand);
  border-top-color: transparent;
  animation: enrichment-spin 0.8s linear infinite;
}

.enrichment-steps li.status-success .enrichment-step-marker {
  border-color: var(--brand);
  background: var(--brand);
}

.enrichment-steps li.status-failed .enrichment-step-marker {
  border-color: var(--danger);
  background: var(--danger);
}

.enrichment-steps li.status-skipped {
  opacity: 0.56;
}

.enrichment-steps strong,
.enrichment-steps small {
  display: block;
}

.enrichment-step-detail {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.enrichment-step-detail.is-error {
  color: var(--danger);
}

.enrichment-steps em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

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

.enrichment-summary > span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.enrichment-summary small {
  color: var(--muted);
}

.enrichment-summary strong {
  font-size: 22px;
}

.valuation-advanced {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.valuation-advanced summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.valuation-advanced .actions {
  margin-top: 10px;
}

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

.valuation-note {
  margin-top: 14px;
}

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

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

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

.metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.token-manager {
  margin-bottom: 18px;
}

.invite-banner,
.support-token-details,
.support-token-admin {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

.invite-banner {
  display: grid;
  gap: 4px;
  border-color: rgba(67, 192, 163, 0.5);
}

.invite-banner strong {
  color: var(--accent);
}

.support-token-details summary,
.support-token-admin summary {
  cursor: pointer;
  font-weight: 800;
}

.support-token-details label {
  margin-top: 12px;
}

.support-token-admin {
  margin-top: 22px;
}

.invite-manager-grid {
  margin-bottom: 20px;
}

.token-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.token-result {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.token-result pre {
  margin: 10px 0;
}

.generated-token-field {
  position: relative;
  margin-top: 10px;
  min-height: 58px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #17211d;
  color: #f2f7f2;
}

.generated-token-field code {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 18px 62px 18px 20px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.token-copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.token-copy-button:hover,
.token-copy-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.token-copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.token-prefix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-prefix .icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
}

.token-table-wrap {
  margin-top: 20px;
}

.token-table {
  min-width: 850px;
}

.token-table tbody tr {
  cursor: default;
}

.token-state {
  font-weight: 800;
}

.token-state.valid {
  color: var(--brand);
}

.token-state.expired,
.token-state.revoked,
.token-state.exhausted {
  color: var(--danger);
}

.token-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.token-actions button {
  min-height: 36px;
  padding: 0 11px;
}

.collector-privacy {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--brand) 4%);
}

.collector-privacy h3,
.collector-options h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.collector-privacy p,
.collector-privacy ul {
  margin: 8px 0 0;
  color: var(--muted);
}

.collector-privacy ul {
  padding-left: 18px;
}

.collector-token-box {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 16px 62px 16px 16px;
  border-radius: 8px;
  background: #17211d;
  color: #f2f7f2;
}

.collector-token-box span {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.collector-token-box code {
  overflow-x: auto;
  white-space: nowrap;
}

.collector-options {
  display: block;
  margin: 16px 0 12px;
}

.collector-options article:first-child {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface), var(--brand) 5%);
}

.collector-options article:nth-child(2),
.collector-options .platform-downloads,
#collector-releases-link {
  display: none;
}

.collector-options p {
  margin: 0 0 14px;
  color: var(--muted);
}

.launcher-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
  max-width: 720px;
  width: 100%;
}

.launcher-downloads .action-button {
  min-height: 48px;
  justify-content: center;
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.launcher-downloads.is-ready-to-open #collector-open-app {
  order: -1;
}

.collector-os-icon {
  align-items: center;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.collector-os-icon svg {
  height: 20px;
  width: 20px;
}

.platform-downloads {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.platform-downloads span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-downloads a {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.platform-downloads a:hover,
.platform-downloads a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.ubuntu-install-guide,
.platform-install-guide {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
}

.ubuntu-install-guide h4,
.platform-install-guide h4 {
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.ubuntu-install-guide p,
.platform-install-guide p {
  margin: 0;
}

.ubuntu-install-guide pre,
.platform-install-guide pre {
  background: color-mix(in srgb, var(--bg), #000 6%);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  overflow-x: auto;
  padding: 12px;
}

.ubuntu-install-guide code,
.platform-install-guide code {
  color: var(--text);
  font-size: 0.88rem;
  white-space: pre;
}

.ubuntu-install-guide button,
.platform-install-guide button {
  justify-self: start;
}

.script-preview {
  margin-top: 14px;
}

.script-preview summary,
.support-tools summary {
  cursor: pointer;
  font-weight: 800;
}

.support-tools {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.support-tools > summary {
  align-items: center;
  color: var(--muted);
  display: flex;
  min-height: 44px;
}

.support-tools[open] > summary {
  color: var(--ink);
}

.pending-changes-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.pending-change-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.pending-change-item.status-approved,
.pending-change-item.status-modified {
  border-left-color: var(--brand);
}

.pending-change-item.status-rejected {
  border-left-color: var(--danger);
}

.pending-change-item p,
.pending-change-item small {
  color: var(--muted);
}

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

.pending-change-form .actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.organization-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1.2fr);
  gap: 18px;
}

.organization-list-panel,
.organization-editor {
  min-width: 0;
}

.organization-list {
  display: grid;
  gap: 6px;
}

.organization-sort-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
}

.organization-sort-row:hover {
  border-color: var(--line);
}

.organization-sort-row.is-inactive {
  opacity: 0.5;
}

.organization-sort-row.drop-before,
.organization-sort-row.drop-after {
  position: relative;
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.organization-sort-row.drop-before::before,
.organization-sort-row.drop-after::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.organization-sort-row.drop-before::before {
  top: -4px;
}

.organization-sort-row.drop-after::after {
  bottom: -4px;
}

.organization-sort-row.is-dragging {
  opacity: 0.45;
  background: var(--soft);
  transform: scale(0.99);
}

.drag-handle,
.sort-step {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.drag-handle {
  cursor: grab;
  font-size: 15px;
  letter-spacing: -3px;
}

.sort-buttons {
  display: grid;
}

.sort-step {
  font-size: 13px;
}

.sort-step:disabled {
  opacity: 0.2;
  cursor: default;
}

.organization-item {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.organization-item:hover,
.organization-item:focus-visible {
  border-color: var(--line);
  background: var(--soft-hover);
  outline: none;
}

.organization-item strong,
.organization-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-item .organization-meta {
  display: grid;
  gap: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.organization-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.organization-count-chip {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.organization-count-chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.organization-count-chip strong {
  color: var(--ink);
  font-size: 12px;
}

.organization-count-chip.type-stock {
  color: var(--site-ink);
}

.organization-count-chip.type-unassigned {
  color: var(--danger);
}

.organization-unused {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.organization-unused > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.organization-unused > summary strong {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  text-align: center;
}

.organization-unused-list {
  opacity: 0.78;
}

.organization-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.organization-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--item-color, var(--brand)) 14%, var(--surface));
  color: var(--item-color, var(--brand));
}

.organization-chevron {
  color: var(--muted);
  font-size: 22px;
}

.color-field input {
  height: 44px;
  padding: 5px;
}

.color-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.organization-editor .switch-field {
  grid-template-columns: 20px 1fr;
  align-items: center;
  align-self: end;
  min-height: 44px;
}

.organization-editor .switch-field input {
  position: static;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 1;
  pointer-events: auto;
  accent-color: var(--brand);
}

.establishment-map {
  min-height: 260px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}

.address-search-field {
  position: relative;
}

.address-search-control {
  position: relative;
  display: block;
}

.address-search-control svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.address-search-control input {
  padding-left: 40px;
}

.address-suggestions {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  z-index: 15;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.address-suggestion {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.address-suggestion:hover,
.address-suggestion:focus-visible {
  background: var(--soft);
  outline: none;
}

.address-suggestion svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#address-search-status:empty {
  display: none;
}

.establishment-map iframe {
  width: 100%;
  height: 260px;
  display: block;
  border: 0;
}

.establishment-map > a {
  display: block;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.os-badge {
  display: inline-flex;
  max-width: 180px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--soft), var(--surface) 36%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.os-badge svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.os-badge:not(.windows-10):not(.windows-11):not(.windows-server) svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.os-badge.ubuntu {
  background: color-mix(in srgb, #dd4814 13%, var(--surface));
  color: color-mix(in srgb, #dd4814 80%, var(--ink));
}

.os-badge.macos {
  background: color-mix(in srgb, #68736d 13%, var(--surface));
  color: color-mix(in srgb, #68736d 65%, var(--ink));
}

.os-badge.linux {
  background: color-mix(in srgb, #d7a928 14%, var(--surface));
  color: color-mix(in srgb, #9a7210 80%, var(--ink));
}

.os-badge.windows-11 {
  background: color-mix(in srgb, #1687d9 12%, var(--surface));
  color: color-mix(in srgb, #1687d9 82%, var(--ink));
}

.os-badge.windows-10 {
  background: color-mix(in srgb, #0078d4 9%, var(--surface));
  color: color-mix(in srgb, #0078d4 78%, var(--ink));
}

.manufacturer-badge {
  display: inline-flex;
  max-width: 190px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.manufacturer-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 8%, var(--surface));
  color: var(--oem-color, var(--muted));
}

.manufacturer-logo svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manufacturer-logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  object-position: center;
  display: block;
}

:root[data-theme="dark"] .manufacturer-logo img {
  filter: grayscale(1) brightness(0) invert(1);
}

.manufacturer-hero .manufacturer-logo img {
  width: 38px;
  height: 38px;
  margin: auto;
}

.team-badge,
.location-badge {
  display: inline-flex;
  max-width: 150px;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 999px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--badge-color, currentColor) 10%, var(--surface));
  color: var(--badge-color, var(--ink));
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.team-badge svg,
.location-badge svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-badge span,
.location-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-tech {
  color: #21806f;
}
.team-sales,
.team-b2c {
  color: #9a6a22;
}
.team-design {
  color: #7b5aa6;
}
.team-logistics,
.team-purchase {
  color: #3f7694;
}
.team-finance {
  color: #5d7d35;
}
.team-management {
  color: #886a22;
}
.team-marketing {
  color: #a0506e;
}
.team-marketplace {
  color: #8f6b22;
}
.team-ads {
  color: #a0506e;
}
.location-store,
.location-general {
  color: #9a5971;
}
.location-bike {
  color: #267b68;
}
.location-racket {
  color: #6f63a6;
}
.location-football {
  color: #4f7f45;
}
.location-golf {
  color: #7c7530;
}
.location-lifestyle {
  color: #a0506e;
}
.location-running {
  color: #b86632;
}
.location-warehouse {
  color: #9a6a22;
}
.location-headquarters,
.location-office {
  color: #406f9e;
}
.location-remote {
  color: #527967;
}

.manufacturer-logo text {
  fill: currentColor;
  stroke: none;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  text-anchor: middle;
}

.oem-dell {
  --oem-color: #1683c4;
}
.oem-hp {
  --oem-color: #1685b8;
}
.oem-lenovo {
  --oem-color: #d43b31;
}
.oem-asus {
  --oem-color: #3472a4;
}
.oem-acer {
  --oem-color: #6a9b25;
}
.oem-apple {
  --oem-color: #65706a;
}
.oem-microsoft,
.oem-surface {
  --oem-color: #2676bd;
}
.oem-msi {
  --oem-color: #c63f36;
}
.oem-samsung {
  --oem-color: #385ab4;
}
.oem-fujitsu {
  --oem-color: #bd3434;
}
.oem-dynabook,
.oem-toshiba {
  --oem-color: #b83e35;
}
.oem-huawei {
  --oem-color: #cc3d3d;
}
.oem-intel-nuc {
  --oem-color: #197aa9;
}
.oem-gigabyte {
  --oem-color: #4477a7;
}
.oem-framework {
  --oem-color: #8a6c20;
}

.manufacturer-cell small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  padding-left: 36px;
}

.manufacturer-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.manufacturer-hero .manufacturer-logo {
  width: 52px;
  height: 52px;
}

.manufacturer-hero .manufacturer-logo svg {
  width: 30px;
  height: 30px;
}

.manufacturer-hero strong,
.manufacturer-hero > span:not(.manufacturer-logo) {
  display: block;
}

.manufacturer-hero strong {
  font-size: 18px;
}

.manufacturer-hero > span:not(.manufacturer-logo) span {
  margin-top: 3px;
  color: var(--muted);
}

.assignment-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.assignment-form h3 {
  margin: 0 0 12px;
}

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

.oem-metrics .metric {
  min-height: 78px;
}

.confirm-icon.neutral {
  background: var(--soft);
  color: var(--brand);
}

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(5, 10, 7, 0.62);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.confirm-dialog h3,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog p {
  color: var(--muted);
  line-height: 1.5;
}

.confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.map-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-empty svg {
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.filters {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.clear-filters-button {
  align-self: end;
  justify-content: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(420px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.table-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--workspace-sticky-top) - 24px);
  overflow: hidden;
}

.detail-panel {
  position: sticky;
  top: var(--workspace-sticky-top);
  align-self: start;
  max-height: calc(100vh - var(--workspace-sticky-top) - 24px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.table-wrap {
  overflow: auto;
}

.table-panel .table-wrap {
  flex: 1;
  min-height: 0;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-panel th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: var(--soft-hover);
}

tbody tr.is-selected {
  box-shadow: inset 3px 0 0 var(--brand);
}

#devices-table tr[class*="device-row-status-"] {
  --row-accent: var(--brand);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--row-accent) 14%, transparent), transparent 42%), var(--surface);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--row-accent) 76%, transparent);
}

#devices-table tr[class*="device-row-status-"]:hover,
#devices-table tr[class*="device-row-status-"].is-selected {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--row-accent) 20%, transparent), transparent 48%), var(--soft-hover);
}

#devices-table tr[class*="device-row-status-"].is-selected {
  box-shadow: inset 3px 0 0 var(--row-accent);
}

#devices-table tr.device-row-status-active {
  --row-accent: #199b78;
}

#devices-table tr.device-row-status-replace {
  --row-accent: #d97706;
}

#devices-table tr.device-row-status-stock {
  --row-accent: #c48a18;
}

#devices-table tr.device-row-status-in_repair {
  --row-accent: #7c3aed;
}

#devices-table tr.device-row-status-lost {
  --row-accent: #b45309;
}

#devices-table tr.device-row-status-retired {
  --row-accent: #79827a;
}

.cell-primary,
.cell-secondary {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-secondary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hostname-quality {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  gap: 6px;
}

.hostname-quality .cell-primary {
  min-width: 0;
}

.data-quality-signal {
  --quality-color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--quality-color) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--quality-color) 10%, var(--surface));
  color: var(--quality-color);
}

.data-quality-signal svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.data-quality-ok {
  --quality-color: #64748b;
  opacity: 0.72;
}

.data-quality-review {
  --quality-color: #0f766e;
}

.data-quality-warning {
  --quality-color: #b45309;
}

.data-quality-critical {
  --quality-color: #b91c1c;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: color-mix(in srgb, currentColor 8%, var(--surface));
  font-size: 12px;
  font-weight: 800;
}

.role-badge,
.notification-severity {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: color-mix(in srgb, currentColor 8%, var(--surface));
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.role-admin {
  color: var(--danger);
}
.role-manager {
  color: var(--brand);
}
.role-viewer,
.role-read_only {
  color: var(--muted);
}

.notifications-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.notification-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  cursor: pointer;
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: var(--soft-hover);
  outline: none;
  transform: translateY(-1px);
}

.notification-item.is-read {
  opacity: 0.68;
}

.notification-item.severity-success {
  border-left-color: var(--brand);
}
.notification-item.severity-warning {
  border-left-color: var(--accent);
}
.notification-item.severity-error {
  border-left-color: var(--danger);
}

.notification-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), var(--soft) 46%);
}

.notification-icon img {
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
}

.notification-initial {
  color: var(--brand);
  font-weight: 900;
}

.notification-content {
  min-width: 0;
}

.notification-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-item strong,
.notification-item p,
.notification-item small {
  display: block;
}

.notification-item.is-compact {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.notification-item.is-compact .notification-icon {
  width: 34px;
  height: 34px;
}

.notification-item.is-compact .notification-icon img {
  max-width: 22px;
  max-height: 22px;
}

.notification-item.is-compact .notification-heading {
  gap: 5px;
}

.notification-item.is-compact p {
  margin: 4px 0;
  font-size: 12px;
}

.notification-item.is-compact .mark-notification-read {
  grid-column: 2;
  justify-self: start;
  min-height: 30px;
  padding: 6px 9px;
  font-size: 11px;
}

.notification-item p {
  margin: 6px 0;
  color: var(--muted);
}

.notification-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}

.notification-facts span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--soft), transparent 18%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.notification-facts strong {
  display: inline;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.notification-item small {
  color: var(--muted);
  font-size: 11px;
}

.status.active {
  color: #13775f;
}

.status.stock {
  color: #9a6500;
}

.status.in_repair {
  color: #6d28d9;
}

.status.retired {
  color: #667067;
}

.status.replace,
.status.lost {
  background: var(--danger-soft);
  color: var(--danger);
}

:root[data-theme="dark"] .status.active {
  color: #50d0ad;
}

:root[data-theme="dark"] .status.stock {
  color: #f0c35b;
}

:root[data-theme="dark"] .status.in_repair {
  color: #c4b5fd;
}

:root[data-theme="dark"] .status.retired {
  color: #bcc6bd;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.detail-list div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface), var(--soft) 36%);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.detail-tab {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.detail-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 32, 27, 0.08);
}

.detail-tab-panel {
  display: none;
}

.detail-tab-panel.is-active {
  display: block;
}

.assignment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.invoice-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.invoice-content {
  min-width: 0;
  flex: 1 1 auto;
}

.invoice-item strong,
.invoice-item small {
  display: block;
}

.invoice-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.invoice-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.invoice-type-purchase {
  border-color: rgba(52, 171, 143, 0.32);
  color: var(--brand-strong);
  background: rgba(52, 171, 143, 0.1);
}

.invoice-type-warranty_extension {
  border-color: rgba(73, 125, 208, 0.28);
  color: #2f6fc2;
  background: rgba(73, 125, 208, 0.11);
}

.invoice-type-repair {
  border-color: rgba(216, 142, 60, 0.32);
  color: #9f631e;
  background: rgba(216, 142, 60, 0.12);
}

.warranty-status {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.warranty-status-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

.warranty-status-header span {
  color: var(--ink);
  font-weight: 800;
}

.warranty-status-header strong {
  color: var(--muted);
  font-size: 11px;
}

.warranty-status-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 58%, transparent);
}

.warranty-status-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease-out;
}

.warranty-status-active {
  border-color: rgba(52, 171, 143, 0.28);
}

.warranty-status-active .warranty-status-track span {
  background: linear-gradient(90deg, #34ab8f, #6bd7b6);
}

.warranty-status-warning {
  border-color: rgba(223, 177, 64, 0.36);
}

.warranty-status-warning .warranty-status-track span {
  background: linear-gradient(90deg, #dca73c, #f2cf62);
}

.warranty-status-expired {
  border-color: rgba(224, 91, 91, 0.4);
}

.warranty-status-expired .warranty-status-track span {
  background: linear-gradient(90deg, #d94f4f, #ff8377);
}

.warranty-status-unknown .warranty-status-track span {
  background: color-mix(in srgb, var(--muted) 62%, transparent);
}

.detail-warranty-summary {
  margin: 12px 0 14px;
}

.detail-warranty-summary .warranty-status {
  margin-top: 0;
}

.invoice-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.invoice-data-grid div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.invoice-data-grid dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-data-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.invoice-note {
  margin: 10px 0 0;
  padding: 8px 9px;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  text-decoration: none;
}

.invoice-form {
  margin-top: 14px;
}

.invoice-form .wide {
  grid-column: 1 / -1;
}

.invoice-warranty-preset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.invoice-warranty-preset label {
  display: grid;
  gap: 5px;
  min-width: 160px;
  margin: 0;
}

.invoice-warranty-preset select {
  min-height: 38px;
}

.invoice-warranty-preset small {
  color: var(--muted);
  font-weight: 700;
}

.invoice-form:not(.is-warranty) .invoice-warranty-field {
  display: none;
}

.history-note-form {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.history-note-form textarea {
  width: 100%;
}

.history-timeline {
  display: grid;
  gap: 0;
}

.history-event {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.history-event::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--line);
}

.history-marker {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.history-event time,
.history-event strong,
.history-event small {
  display: block;
}

.history-event time,
.history-event small {
  color: var(--muted);
  font-size: 11px;
}

.history-event strong {
  margin: 2px 0 4px;
}

.history-event p {
  display: grid;
  gap: 3px;
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
}

.history-event-note {
  color: var(--muted);
}

.history-admin-note {
  gap: 6px;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.history-admin-note span {
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-change {
  grid-template-columns: minmax(0, 1fr);
}

.history-change-list {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.history-change-list li {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.history-change-list strong {
  color: var(--ink);
  font-size: 12px;
}

.legacy-history-change {
  gap: 6px;
}

.legacy-history-change span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}

.history-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.history-meta div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.history-meta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-meta dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.assignment-period {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.assignment-period + .assignment-period {
  margin-top: 8px;
}

.assignment-period p {
  display: block;
  margin: 0;
  color: var(--muted);
}

.scan-history {
  margin-top: 18px;
}

.detail-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-actions button,
.detail-enrich-button {
  width: 100%;
}

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

.chart {
  min-height: 260px;
}

.chart h3 {
  margin-bottom: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) minmax(80px, 1.2fr) 42px;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 3px;
  background: var(--brand);
}

.fleet-dashboard {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.fleet-kpi-card {
  display: grid;
  min-height: 142px;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--fleet-level-color, var(--brand)) 12%, transparent),
      transparent 58%
    ),
    var(--surface);
  box-shadow: var(--shadow);
}

.fleet-kpi-card strong {
  color: var(--ink);
  font-size: clamp(26px, 2.3vw, 36px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fleet-kpi-card small,
.fleet-card-note,
.fleet-stat-row small,
.fleet-empty-state span {
  color: var(--muted);
  line-height: 1.45;
}

.fleet-kpi-label,
.fleet-section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fleet-kpi-state {
  justify-self: start;
  border: 1px solid color-mix(in srgb, var(--fleet-level-color, var(--brand)) 34%, transparent);
  border-radius: 999px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--fleet-level-color, var(--brand)) 12%, var(--surface));
  color: var(--fleet-level-color, var(--brand));
  font-size: 11px;
  font-weight: 900;
}

.fleet-level-ok {
  --fleet-level-color: var(--brand);
}

.fleet-level-info {
  --fleet-level-color: #2f89c7;
}

.fleet-level-warning {
  --fleet-level-color: #d08a20;
}

.fleet-level-critical {
  --fleet-level-color: var(--danger);
}

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

.fleet-card-head h3 {
  margin: 2px 0 0;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.15;
}

.fleet-card-note {
  max-width: 340px;
  text-align: right;
}

.fleet-priority-panel {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 52%), var(--surface);
}

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

.fleet-priority-table {
  min-width: 1180px;
}

.fleet-priority-table th {
  font-size: 11px;
}

.fleet-priority-table td {
  padding-block: 13px;
}

.fleet-priority-table td strong,
.fleet-priority-table td small {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-priority-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.risk-pill {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.risk-info {
  color: #2f89c7;
}

.risk-warning {
  color: #d08a20;
}

.risk-critical {
  color: var(--danger);
}

.fleet-empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--soft);
}

.fleet-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.fleet-section-card {
  min-height: 360px;
}

.fleet-age-cpu-card {
  grid-column: 1 / -1;
}

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

.fleet-mini-grid section {
  min-width: 0;
}

.fleet-stat-list {
  display: grid;
  gap: 12px;
}

.fleet-stat-row {
  display: grid;
  gap: 6px;
}

.fleet-stat-label {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.fleet-stat-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-stat-label strong {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.fleet-stat-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.fleet-stat-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #57c2aa);
}

.fleet-health-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 22px;
}

.fleet-health-layout > div:first-child {
  grid-row: span 2;
}

.health-score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--fleet-level-color, var(--brand)) 38%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--fleet-level-color, var(--brand)) 10%, var(--surface));
  color: var(--fleet-level-color, var(--brand));
}

.health-score strong {
  font-size: 34px;
  line-height: 1;
}

.health-reasons {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.health-reasons li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft);
}

.fleet-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.fleet-value-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

.fleet-value-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fleet-value-grid small {
  color: var(--muted);
  line-height: 1.4;
}

.fleet-value-grid strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.age-cpu-chart {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 34%), var(--soft);
}

.age-cpu-chart svg {
  width: 100%;
  max-width: 1120px;
  height: auto;
  aspect-ratio: 16 / 7;
  max-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, #0b1511);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 7%, transparent);
}

.age-cpu-chart .chart-frame {
  fill: color-mix(in srgb, var(--surface) 62%, transparent);
  stroke: color-mix(in srgb, var(--ink) 14%, transparent);
  stroke-width: 1;
}

.age-cpu-chart .zone {
  opacity: 0.18;
}

.age-cpu-chart .zone-good {
  fill: var(--brand);
}

.age-cpu-chart .zone-watch {
  fill: var(--accent-ink);
}

.age-cpu-chart .zone-replace {
  fill: var(--danger);
}

.age-cpu-chart .grid-line {
  stroke: color-mix(in srgb, var(--muted) 18%, transparent);
  stroke-width: 1;
}

.age-cpu-chart .threshold-line {
  stroke: color-mix(in srgb, var(--accent) 68%, transparent);
  stroke-width: 1.5;
  stroke-dasharray: 7 7;
}

.age-cpu-chart .axis-line {
  stroke: color-mix(in srgb, var(--muted) 62%, transparent);
  stroke-width: 1.4;
}

.age-cpu-chart .axis-label,
.age-cpu-chart .zone-label,
.age-cpu-chart .axis-title {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.age-cpu-chart .axis-x,
.age-cpu-chart .axis-title-x {
  text-anchor: middle;
}

.age-cpu-chart .axis-y {
  text-anchor: end;
}

.age-cpu-chart .axis-title {
  fill: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: 14px;
}

.age-cpu-chart .zone-label {
  fill: color-mix(in srgb, var(--ink) 72%, var(--muted));
  letter-spacing: 0;
}

.age-point {
  stroke: var(--surface);
  stroke-width: 2.4;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35));
}

.age-point.ok {
  fill: var(--brand);
}

.age-point.watch {
  fill: var(--accent-ink);
}

.age-point.replace {
  fill: var(--danger);
}

.age-cpu-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 0;
  color: var(--muted);
  font-weight: 800;
}

.age-cpu-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.age-cpu-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
}

.age-cpu-legend .legend-watch {
  background: var(--accent-ink);
}

.age-cpu-legend .legend-replace {
  background: var(--danger);
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  border-radius: 8px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  background: var(--toast-bg);
  color: var(--toast-ink);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow);
  z-index: 30;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

#toast[data-type="error"] {
  background: #812d27;
  color: #ffffff;
}

#toast[data-type="success"] {
  background: #155f50;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .split,
  .dashboard-grid,
  .token-manager-grid,
  .collector-options,
  .pending-change-item,
  .organization-layout {
    grid-template-columns: 1fr;
  }

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

  .fleet-kpi-grid,
  .fleet-section-grid,
  .fleet-mini-grid,
  .fleet-health-layout,
  .fleet-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .table-panel {
    display: block;
    max-height: none;
    overflow: visible;
  }

  .table-panel .table-wrap {
    flex: initial;
    min-height: auto;
  }

  .table-panel th {
    position: static;
  }

  .detail-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .notification-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .notification-item .mark-notification-read {
    grid-column: 2;
    justify-self: flex-start;
  }

  .enrichment-steps,
  .enrichment-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1600px) {
  main {
    width: min(2200px, 100%);
    padding-inline: clamp(24px, 2.5vw, 64px);
  }

  .dashboard-grid {
    grid-template-columns: minmax(1080px, 1fr) minmax(520px, 640px);
  }

  .cell-primary,
  .cell-secondary {
    max-width: 260px;
  }
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-title {
    flex-basis: 100%;
  }

  .brand-title h1 {
    max-width: none;
  }

  .topbar-actions {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar,
  .dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-title {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .brand-lockup {
    width: min(188px, 100%);
  }

  .topbar-actions {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .topbar-actions .tabs {
    flex: 0 1 auto;
    min-width: 0;
  }

  .form-grid,
  .filters,
  .pending-change-form,
  .metric-grid,
  .charts-grid,
  .fleet-kpi-grid,
  .fleet-section-grid,
  .fleet-mini-grid,
  .fleet-health-layout,
  .fleet-value-grid {
    grid-template-columns: 1fr;
  }

  .account-invite-summary {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .section-heading.inline {
    align-items: stretch;
    flex-direction: column;
  }

  .fleet-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .valuation-toolbar .panel-head.inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .valuation-meta {
    justify-items: start;
    text-align: left;
  }

  .fleet-card-note {
    max-width: none;
    text-align: left;
  }

  .fleet-health-layout > div:first-child {
    grid-row: auto;
  }

  .age-cpu-chart svg {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }

  .admin-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav-button {
    min-width: 0;
    justify-content: center;
    padding: 0 8px;
  }

  .current-time {
    min-width: 0;
    flex: 1 1 190px;
  }

  .weather-toggle {
    flex: 0 0 auto;
  }

  .history-meta {
    grid-template-columns: 1fr;
  }

  .dashboard-head .action-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
  }

  .dashboard-head .action-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .panel {
    padding: 16px;
  }
}

/* Parcéo Sillage: native logo variants and technical typography. */
.brand-lockup .brand-logo-dark {
  display: none;
}
:root[data-theme="dark"] .brand-logo-light {
  display: none;
}
:root[data-theme="dark"] .brand-lockup .brand-logo-dark {
  display: block;
}
code,
pre,
.token-prefix,
.generated-token-field input {
  font-family: "IBM Plex Mono", Consolas, monospace;
}
table,
.fleet-stat,
.stat-card {
  font-variant-numeric: tabular-nums;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border-color: var(--control-line);
}
