@font-face {
  font-family: Roboto;
  src: url("/fonts/roboto-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("/fonts/roboto-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("/fonts/roboto-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("/fonts/roboto-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #f8f9fa;
  --surface: #fff;
  --primary: #155eef;
  --text: #101828;
  --secondary: #667085;
  --border: #eaecf0;
  --input: #d0d5dd;
  --alternate: #f9fafb;
  --selected: #eff4ff;
  --success-bg: #ecfdf3;
  --success: #027a48;
  font-family:
    Roboto,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--page);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
main {
  padding: 8px 24px 0;
  max-width: 2000px;
  margin: auto;
  height: 100dvh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
button,
input,
select,
summary {
  font: inherit;
}
button,
select,
summary,
input[type="checkbox"] {
  cursor: pointer;
}
button {
  border: 1px solid var(--input);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 36px;
}
button:hover {
  background: var(--alternate);
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #84adff;
  outline-offset: 2px;
}
p {
  color: var(--secondary);
  margin: 0 0 18px;
}
.own-marker {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 4px;
  min-height: 32px;
  width: 32px;
  font-size: 16px;
}
.own-tooltip {
  position: absolute;
  z-index: 6;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--text);
  color: white;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
}
.matrix-table .own-column,
.detail .own-column {
  width: 40px;
  min-width: 40px;
  padding: 4px;
  text-align: center;
}
.own-column-heading {
  color: var(--secondary);
  font-size: 13px;
}
.own-column:focus-within,
.own-column:hover {
  position: relative;
  z-index: 4;
}
.tabs {
  display: flex;
  flex-shrink: 0;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.topbar .tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  margin-bottom: 0;
}
.master-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 0;
}
.customer-preview-label {
  flex-direction: row;
  align-items: center;
  font-size: 12px;
  gap: 8px;
}
.customer-preview-label select {
  font-size: 12px;
  min-height: 36px;
  max-width: 240px;
}

.admin-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}
.admin-heading {
  margin-bottom: 20px;
}
.admin-heading h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.admin-heading p {
  font-size: 12px;
  margin: 0;
}
.customer-cards,
.admin-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.admin-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}
.admin-card h3,
.admin-card h4 {
  margin: 0;
  font-size: 15px;
}
.admin-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.admin-card button {
  align-self: flex-start;
  margin-top: auto;
}
.connected-state,
.pending-state {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  align-self: flex-start;
  background: var(--alternate);
  color: var(--secondary);
}
.connected-state {
  background: var(--success-bg);
  color: var(--success);
}
@media (max-width: 1100px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0;
  }
  .topbar .tabs {
    flex-basis: 100%;
  }
  .customer-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .admin-settings,
  .customer-cards {
    grid-template-columns: 1fr;
  }
  .admin-view {
    padding: 14px;
  }
  .master-controls {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .customer-preview-label select {
    max-width: 200px;
  }
}
.tabs button {
  flex-shrink: 0;
  white-space: nowrap;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  padding: 12px 4px;
  color: var(--secondary);
}
.tabs button[aria-pressed="true"] {
  border-bottom-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.detail-pickup {
  flex-direction: row;
  align-items: center;
}
.filters {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #344054;
}
select,
input[type="date"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input);
  border-radius: 8px;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14px;
}
#branch {
  min-width: 185px;
}
#category {
  min-width: 160px;
}
.filters > .checkbox {
  min-height: 38px;
  white-space: nowrap;
  flex: 0 0 auto;
}
#brand-menu > summary,
.selection-menu > summary {
  min-height: 38px;
  white-space: nowrap;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
  font-size: 13px;
}
input[type="checkbox"] {
  accent-color: var(--primary);
}
details {
  position: relative;
}
summary {
  list-style: none;
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 8px 12px;
}
summary span {
  color: var(--secondary);
  margin-left: 10px;
  font-size: 12px;
}
.brand-popover {
  position: absolute;
  z-index: 5;
  top: 42px;
  left: 0;
  width: 260px;
  max-height: 370px;
  overflow: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px #1018281a;
  padding: 12px;
}
.brand-popover label {
  flex-direction: row;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 400;
}
.brand-popover button {
  width: 100%;
}
#status {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--secondary);
  min-height: 30px;
  padding: 7px 2px;
}
#status:empty {
  display: none;
}
#status.error {
  color: #b42318;
}
.report {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.detail-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.scroll-table {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th,
td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 12px 14px;
  text-align: right;
  min-width: 160px;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--alternate);
  font-weight: 500;
  vertical-align: top;
}
thead small {
  display: block;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 400;
  margin-top: 5px;
}
.brand-heading,
.brand-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  min-width: 160px;
  background: var(--surface);
}
thead .brand-heading {
  z-index: 3;
}
.brand-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.logo-frame {
  display: inline-block;
  position: relative;
  width: 120px;
  height: 42px;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-frame img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name {
  font-weight: 600;
}
.brand-cell {
  border-bottom: 2px solid var(--input);
}
.group-alternate td,
.group-alternate .brand-cell {
  background: var(--alternate);
}
.ordinal {
  min-width: 60px;
  width: 60px;
  text-align: center;
  color: var(--secondary);
  font-size: 12px;
}
.global-position {
  min-width: 85px;
  width: 85px;
}
.price {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.rank {
  display: block;
  color: var(--secondary);
  font-size: 11px;
  margin-top: 5px;
}
/* Keep the existing two-line offer footprint: summary above, vehicle below. */
.matrix-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 18px 13px;
  row-gap: 5px;
  height: 36px;
  min-width: 0;
}
.offer-summary,
.offer-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.offer-summary .price {
  line-height: 18px;
}
.daily-rate,
.offer-footer .rank {
  margin: 0;
  white-space: nowrap;
  line-height: 13px;
  font-size: 11px;
  color: var(--secondary);
}
.vehicle-model {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 13px;
  color: var(--secondary);
  text-align: right;
}
.winner {
  background: var(--success-bg) !important;
}
.winner .price,
.best-price {
  color: var(--success);
}
.empty {
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--secondary);
}
.dash {
  color: #98a2b3;
}
.matrix-no-offer {
  text-align: center;
  vertical-align: middle;
}
.date-button {
  border: none;
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
}
.winner-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
  max-width: 190px;
  white-space: normal;
}
.best-price {
  display: block;
  margin-top: 5px;
}
.report-toolbar {
  flex-shrink: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.report-toolbar p {
  margin: 0;
  font-size: 12px;
}
.detail td,
.detail th {
  text-align: left;
  min-width: 120px;
}
.detail td.number,
.detail th.number {
  text-align: right;
}
.detail td.model {
  min-width: 230px;
}
.empty-report {
  padding: 44px;
  overflow: auto;
  flex: 1;
  text-align: center;
  color: var(--secondary);
}
.matrix-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--alternate);
}
.matrix-table thead th {
  top: auto;
  position: static;
}
.matrix-table thead th,
.matrix-table thead td {
  padding: 8px 14px;
  background: var(--alternate);
}
.matrix-table thead .matrix-row-label,
.matrix-table thead .brand-heading {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: left;
}
.matrix-table .matrix-row-label {
  color: var(--secondary);
  font-size: 12px;
}
.rental-range {
  white-space: nowrap;
  font-size: 12px;
}
.matrix-table .matrix-row-label {
  white-space: nowrap;
}
.matrix-table .winner-name {
  margin-top: 0;
  font-size: 11px;
  font-weight: 500;
}
.matrix-table .best-price {
  margin-top: 4px;
  font-size: 15px;
}
.matrix-column-labels th,
.matrix-column-labels td {
  border-top: 1px solid var(--input);
}
.sort-header {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 32px;
  color: inherit;
  font-weight: 500;
  text-align: inherit;
  white-space: nowrap;
}
th[aria-sort="ascending"] .sort-header,
th[aria-sort="descending"] .sort-header {
  color: var(--primary);
}
@media (max-width: 760px) {
  main {
    padding: 8px 12px 0;
  }
  .filters {
    gap: 12px;
  }
  .filters > label {
    flex: 1;
    min-width: 120px;
  }
  #branch,
  #category {
    min-width: 0;
    width: 100%;
  }
  .brand-cell,
  .brand-heading {
    min-width: 148px;
  }
  .logo-frame {
    width: 104px;
    height: 36.4px;
  }
}

/* Best offer reuses the compact body card and keeps ties in a single selector. */
.best-offer-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin-top: 4px;
  min-height: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.best-offer-link .price {
  color: var(--success);
}
.best-offer-link:hover .price {
  text-decoration: underline;
}
.best-offer-link:focus-visible,
.matrix-table td.offer-target {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.best-offer-select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 20px;
  padding: 0 20px 0 0;
  border: 0;
  background-color: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
}

.selection-menu > summary {
  cursor: pointer;
  min-width: 160px;
}
.selection-menu .brand-popover {
  top: calc(100% + 6px);
}
.report.multiple-reports {
  overflow: auto;
  display: block;
}
.report-group {
  display: flex;
  flex-direction: column;
  height: 65vh;
  min-height: 360px;
  border-bottom: 1px solid var(--border);
}
.report-group h2 {
  font-size: 14px;
  margin: 0;
  padding: 12px 14px;
  background: var(--surface);
}
.matrix-table td:not(.brand-cell):not(.own-column):not(.ordinal) {
  min-width: 220px;
}

.company-airports {
  padding-left: 18px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 0;
}

.service-view {
  overflow: auto;
  padding: 24px;
  flex: 1;
}
.service-view h2 {
  margin: 0 0 12px;
  font-size: 20px;
}
.development-notice {
  background: #fffaeb;
  color: #854a0e;
  padding: 12px 14px;
  border: 1px solid #fedf89;
  border-radius: 8px;
}
.request-form {
  max-width: 1100px;
}
.request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.request-grid input {
  background: var(--surface);
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 38px;
  font-size: 14px;
  color: var(--text);
}
.request-grid select {
  min-width: 0;
  width: 100%;
}
.request-categories {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.request-categories legend {
  font-size: 13px;
  font-weight: 500;
}
.category-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.request-summary {
  max-width: 1100px;
  margin-top: 18px;
}
.request-summary:empty {
  display: none;
}
.request-summary dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
}
.request-summary dt {
  font-weight: 500;
}
.request-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.request-unavailable:disabled {
  cursor: not-allowed;
}
.history-scroll {
  overflow: auto;
  margin-bottom: 16px;
}
.history-scroll td,
.history-scroll th {
  white-space: nowrap;
  padding: 12px;
}
@media (max-width: 760px) {
  .request-grid,
  .category-choices {
    grid-template-columns: 1fr;
  }
  .request-summary dl {
    grid-template-columns: 1fr;
  }
}

.history-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}
.history-filters label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.history-filters input {
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 38px;
  background: var(--surface);
  color: var(--text);
}
.history-details {
  margin-top: 10px;
  max-width: 520px;
}
.history-details summary {
  cursor: pointer;
  color: var(--muted);
}
.history-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}
.history-details p {
  font-size: 12px;
  color: var(--muted);
}

/* Separate analysis surface: matrix offer cells retain their two original lines. */
.price-analysis {
  padding: 16px;
  min-width: 0;
}
.analysis-section + .analysis-section {
  margin-top: 28px;
}
.analysis-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.analysis-table {
  width: 100%;
}
.analysis-table th,
.analysis-table td {
  min-width: 90px;
  padding: 10px 12px;
  vertical-align: middle;
}
.analysis-table th {
  position: static;
  white-space: nowrap;
}
.analysis-table tbody tr:nth-child(even) {
  background: var(--alternate);
}
.analysis-table th:first-child,
.analysis-table td:first-child {
  text-align: left;
}
.analysis-table .analysis-brand {
  min-width: 150px;
  text-align: left;
}
.analysis-brand {
  display: table-cell;
}
.analysis-brand .brand-content {
  display: inline-flex;
  vertical-align: middle;
}
.analysis-brand .logo-frame {
  width: 72px;
  height: 25.2px;
}
.analysis-own {
  color: var(--primary);
  font-size: 12px;
  margin-left: 8px;
}
.analysis-table .analysis-state {
  min-width: 160px;
  text-align: left;
  font-size: 12px;
  color: var(--secondary);
}
.analysis-date {
  white-space: nowrap;
}
.analysis-table .analysis-count {
  min-width: 60px;
}
.analysis-link {
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
  padding: 6px 10px;
  min-height: 36px;
}
.analysis-note,
.analysis-empty {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
}
.analysis-day {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.analysis-day:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.analysis-day h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  padding: 12px;
  background: var(--alternate);
  border-bottom: 1px solid var(--border);
}
.analysis-day-metrics {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.6fr 0.8fr;
  gap: 16px;
  padding: 12px;
  margin: 0;
}
.analysis-day-metrics dt {
  color: var(--secondary);
  font-size: 12px;
  margin-bottom: 6px;
}
.analysis-day-metrics dt[title] {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}
.analysis-day-metrics dd {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.analysis-minimum-brands {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.analysis-identity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
}
.analysis-identity .logo-frame {
  width: 48px;
  height: 16.8px;
}
.analysis-minimum-brands details {
  font-size: 11px;
  font-weight: 400;
}
.analysis-minimum-brands details .analysis-identity {
  display: flex;
  margin-top: 6px;
}
.analysis-minimum-brands summary {
  color: var(--primary);
  cursor: pointer;
}
.analysis-day > .analysis-note,
.analysis-day > .analysis-empty {
  margin: 0;
  padding: 0 12px 12px;
}
.analysis-own-table .analysis-comparison {
  min-width: 175px;
  font-size: 12px;
  white-space: normal;
}
.analysis-own-table .analysis-goal {
  min-width: 225px;
  font-size: 13px;
}
.analysis-goal small {
  display: block;
  color: var(--secondary);
  font-size: 11px;
  margin-top: 4px;
}
.matrix-price-heading .analysis-shortcut {
  color: var(--primary);
  font-size: 11px;
  padding: 4px 6px;
  margin-left: 8px;
  min-height: 30px;
}
.analysis-own-table .analysis-goal-heading {
  white-space: normal;
  min-width: 225px;
  max-width: 280px;
  line-height: 1.4;
}
.analysis-own-vehicle {
  display: block;
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 400;
}
@media (max-width: 800px) {
  .analysis-day-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

.analysis-reference-vehicles {
  margin-top: 6px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}
.analysis-reference-vehicle {
  display: block;
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.analysis-reference-description {
  display: block;
  max-width: 260px;
  white-space: normal;
}
.analysis-reference-vehicles summary {
  cursor: pointer;
  color: var(--primary);
  margin-top: 4px;
}
.analysis-reference-vehicles details .analysis-reference-vehicle {
  margin-top: 4px;
}
.analysis-overview {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(0, 3fr);
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.top-three-presence {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.overview-label {
  color: var(--secondary);
  font-size: 13px;
}
.top-three-presence strong {
  font-size: 19px;
  line-height: 1.4;
}
.top-three-presence small {
  font-size: 11px;
  line-height: 1.5;
  color: var(--secondary);
}
.trend-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.trend-heading h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
}
.trend-heading label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--secondary);
}
.trend-heading select {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--secondary);
}
.trend-key::before {
  content: "";
  display: inline-block;
  width: 20px;
  margin-right: 6px;
  border-top: 2px solid;
  vertical-align: middle;
}
.trend-key.trend-own::before {
  border-color: var(--primary);
}
.trend-key.trend-minimum::before {
  border-color: var(--success);
  border-top-style: dashed;
}
.trend-key.trend-median::before {
  border-color: #6941c6;
  border-top-style: dotted;
}
.trend-plot svg {
  display: block;
  width: 100%;
  height: 210px;
  margin-top: 4px;
}
.trend-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.trend-axis {
  font-family: inherit;
  font-size: 11px;
  fill: var(--secondary);
}
.trend-line {
  fill: none;
  stroke-width: 2;
}
.trend-minimum {
  stroke-dasharray: 8 4;
}
.trend-point {
  fill: var(--surface);
  stroke-width: 2;
}
.trend-data summary {
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
}
.trend-data table {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .analysis-overview {
    grid-template-columns: 1fr;
  }
}

/* Live operational status stays outside the report: polling preserves scroll and filters. */
.live-progress {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  color: var(--secondary);
  font-size: 12px;
}
.live-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.live-progress strong {
  color: var(--text);
  font-size: 13px;
}
.live-progress progress {
  width: 100%;
  height: 6px;
  accent-color: var(--primary);
  display: block;
  margin: 8px 0;
}
.live-progress-current {
  display: inline-block;
  margin-right: 16px;
}
.live-progress > details {
  display: inline;
}
.live-progress summary {
  color: var(--primary);
  cursor: pointer;
  display: inline;
}
.live-progress-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-height: 230px;
  overflow: auto;
  margin-top: 12px;
}
.live-progress ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.live-progress li {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.live-progress li[data-state="published"] {
  color: var(--success);
}
.live-progress li[data-state="running"],
.live-progress li[data-state="retrying"] {
  color: var(--primary);
}
.live-progress small {
  flex-basis: 100%;
}

.trend-brand-menu > summary {
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}
.trend-brand-options {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  min-width: 210px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 12px #1018281a;
}
.trend-brand-options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 5px;
  font-size: 13px;
}
.trend-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trend-key::before {
  content: none;
}
.trend-key svg {
  flex-shrink: 0;
}

.trend-mean {
  stroke-dasharray: 2 4;
}
.trend-maximum {
  stroke-dasharray: 10 4 2 4;
}
.trend-data > summary {
  display: inline-block;
  width: auto;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  font-size: 11px;
}
.trend-data {
  overflow-x: auto;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
}
.login-card {
  min-height: 0;
  width: min(100%, 380px);
  height: auto;
  flex: initial;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.login-card h1 {
  font-size: 24px;
  margin: 0 0 8px;
}
.login-card p {
  color: var(--secondary);
  font-size: 13px;
}
.login-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.login-card input {
  width: 100%;
}
.auth-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.auth-controls button {
  font-size: 12px;
  padding: 5px 8px;
  white-space: nowrap;
}
.permission-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.permission-table th,
.permission-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.permission-table label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.password-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.password-form h3 {
  flex-basis: 100%;
  margin: 0;
}
.admin-users {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 16px;
}
.admin-users > label {
  max-width: 360px;
}
.admin-users p {
  font-size: 13px;
  color: var(--secondary);
}

.login-card input,
.password-form input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.login-card #login-status:empty {
  display: none;
}

.login-contact {
  margin-top: 20px;
  margin-bottom: 0;
  line-height: 1.5;
}
.login-contact a {
  color: var(--primary);
}
.create-user-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.create-user-form h4,
.create-user-form > p,
.create-user-form > small {
  flex-basis: 100%;
  margin: 0;
}
.create-user-form input:not([type="checkbox"]) {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.create-user-form > .checkbox {
  min-height: 38px;
}
.create-user-form small {
  color: var(--secondary);
}
