:root {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  color: #1d2738;
  background: #f3f5f8;
  font-synthesis: none;
  --muted: #647084;
  --line: #e4e8ef;
  --accent: #ea663b;
}
.driver-picker {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.driver-picker legend {
  font-weight: 600;
  font-size: 0.875rem;
}
.driver-picker > small {
  display: block;
  margin-bottom: 12px;
}
.driver-picker-list {
  display: grid;
  gap: 12px;
  max-height: 240px;
  overflow: auto;
  margin-top: 14px;
}
.driver-picker-list small {
  display: block;
  font-weight: 400;
}
.maintenance-item {
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 10px;
  display: grid;
  gap: 12px;
}
.maintenance-item-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: end;
  gap: 10px;
}
.maintenance-total {
  margin: 12px 0 0;
  font-size: 0.875rem;
}
.maintenance-breakdown {
  margin-top: 14px;
}
.maintenance-lines {
  display: grid;
  gap: 10px;
  padding: 14px 0;
}
.maintenance-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
}
.maintenance-lines small {
  display: block;
}
@media (max-width: 420px) {
  .maintenance-item-values {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .maintenance-item-values > label:first-child {
    grid-column: 1 / -1;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  background: white;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}
button:hover {
  background: #f2f4f8;
  border-color: #c9d0da;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button.primary:hover {
  background: #d85931;
}
button.danger {
  color: #b32e3b;
}
button.quiet {
  background: transparent;
  border-color: transparent;
}
:focus-visible {
  outline: 3px solid #3675bc;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd6e1;
  border-radius: 9px;
  padding: 11px 12px;
  background: white;
  color: inherit;
}
input[type='checkbox'] {
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
}
textarea {
  min-height: 80px;
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
p {
  line-height: 1.55;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
  margin-bottom: 7px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.loading,
.empty {
  padding: 45px 24px;
  text-align: center;
  color: var(--muted);
}
.empty p {
  max-width: 450px;
  margin: 12px auto 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.brand em {
  font-weight: 400;
  font-style: normal;
  color: #98a6bb;
}
.topbar {
  min-height: 76px;
  background: #172131;
  color: #fff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar small {
  color: #b7c0cf;
}
.topbar button {
  color: #dce3ef;
  border-color: #3c4656;
  background: transparent;
}
.account {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: right;
}
.account strong {
  display: block;
  font-size: 0.875rem;
}
.workspace {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}
.workspace.driver {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
}
.fleet {
  border-right: 1px solid var(--line);
  padding: 26px 18px;
  background: #fafbfc;
}
.fleet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.fleet-head h2 {
  font-size: 1rem;
  margin: 0;
}
.fleet-actions {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.fleet-actions button {
  font-size: 0.8125rem;
  padding: 8px;
}
.vehicle-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.vehicle-option {
  text-align: left;
  width: 100%;
  background: transparent;
  padding: 15px 12px;
  border-color: transparent;
}
.vehicle-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9375rem;
}
.vehicle-option small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
}
.vehicle-option.active {
  background: white;
  border-color: #efd2c7;
  box-shadow: 0 3px 14px #22314c05;
  border-left: 3px solid var(--accent);
}
.content {
  padding: 32px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
  color: var(--muted);
}
.tabs button.active {
  border-bottom-color: var(--accent);
  color: #182232;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  min-height: 122px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.metric-copy {
  min-width: 0;
  flex: 1;
}
.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 9px;
}
.metric-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.metric-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.metric-value.text {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.metric-value em {
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.metric small {
  display: block;
  margin-top: 7px;
}
.tank {
  width: 50px;
  height: 72px;
  flex: none;
}
.tank-outline {
  fill: #f0f5f6;
  stroke: #c5d2d8;
  stroke-width: 1.5;
}
.tank-fill {
  fill: #45a997;
}
.tank-fill.low {
  fill: #e7a149;
}
.tank-fill.stale {
  fill: #a1b2b5;
}
.tank-line {
  stroke: #fff;
  stroke-width: 1.5;
  opacity: 0.55;
}
.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}
.subhead h3 {
  margin: 0;
}
details.more {
  margin-top: 18px;
}
details.more > summary {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 9px 0;
}
details.more > .metrics {
  margin-top: 10px;
}
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 22px;
  margin-top: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.fuel-summary {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.fuel-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fuel-summary-head > div {
  min-width: 0;
}
.fuel-summary-head h3 {
  margin: 0 0 3px;
}
.fuel-summary-head small {
  display: block;
}
.fuel-summary-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.fuel-summary-value {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border-radius: 10px;
  background: #f6f8fa;
}
.fuel-summary-value .metric-icon {
  margin-top: 2px;
  color: var(--muted);
}
.fuel-summary-value span {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.fuel-summary-value strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.fuel-summary-value strong.empty-value {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0;
}
.fuel-summary-value strong em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.fuel-summary-value small {
  display: block;
  margin-top: 5px;
}
.fuel-summary-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.fuel-summary-details > summary {
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.fuel-summary-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 14px 0 0;
}
.fuel-summary-details dl > div {
  min-width: 0;
}
.fuel-summary-details dt {
  color: var(--muted);
  font-size: 0.75rem;
}
.fuel-summary-details dd {
  margin: 3px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.fuel-diagnostics {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff6e9;
  color: #855a22;
  font-size: 0.8125rem;
}
.fuel-diagnostics ul {
  margin: 5px 0 0;
  padding-left: 18px;
}
.state {
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 0.8125rem;
  display: inline-block;
  white-space: nowrap;
  background: #eff2f6;
  color: #637086;
}
.state.ok {
  background: #e6f4ef;
  color: #20735d;
}
.state.warn {
  background: #fff3df;
  color: #8c5b0d;
}
.state.bad {
  background: #fae8e9;
  color: #a53844;
}
.record {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.record:last-child {
  border-bottom: 0;
}
.record strong {
  font-size: 0.9375rem;
  display: block;
  margin-bottom: 5px;
}
.record p {
  margin: 5px 0;
}
.record-main {
  min-width: 0;
  overflow-wrap: anywhere;
}
.driver-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.driver-identity > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.driver-assignment {
  display: block;
  margin-top: 4px;
  color: #394b63;
}
.avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.avatar.initials {
  display: grid;
  place-items: center;
  background: #edf1f6;
  color: #6d7e94;
  font-weight: 600;
  font-size: 1.1rem;
}
.avatar.large {
  width: 80px;
  height: 80px;
}
.driver-photo-current {
  display: flex;
  align-items: center;
  gap: 20px;
}
.record-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.note {
  background: #f4f6f9;
  color: var(--muted);
  padding: 14px 16px;
  font-size: 0.875rem;
  border-radius: 9px;
  line-height: 1.55;
}
.note.warning {
  background: #fff6e9;
  color: #855a22;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(130deg, #1b283b, #111924);
}
.login-card {
  background: white;
  border-radius: 20px;
  padding: 34px;
  width: min(100%, 430px);
  box-shadow: 0 20px 80px #0003;
}
.login-card .brand {
  margin-bottom: 28px;
}
.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.form-stack .primary {
  min-height: 44px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-error {
  color: #ab3442;
  font-size: 0.875rem;
  line-height: 1.5;
}
.form-error:empty {
  display: none;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 110px #0c16264d;
  color: inherit;
}
dialog::backdrop {
  background: #14203280;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 26px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head small {
  display: block;
  margin-top: 7px;
}
.dialog-head button {
  padding: 5px 10px;
  font-size: 1.1rem;
}
.dialog-body {
  padding: 24px 26px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.tile-config {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.tile-config > div:first-child {
  flex: 1;
  min-width: 0;
}
.tile-config strong {
  font-size: 0.875rem;
  display: block;
}
.tile-config .actions {
  flex-wrap: nowrap;
  gap: 2px;
}
.tile-config button {
  padding: 7px;
}
.editor {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 12px;
  margin-top: 16px;
}
.editor h3 {
  margin-bottom: 18px;
}
.source-preview {
  border-left: 3px solid #74a599;
  background: #f1f7f5;
  padding: 12px 14px;
  font-size: 0.875rem;
}
.binding-controls {
  display: grid;
  gap: 18px;
}
.binding-source {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.binding-source label {
  min-width: 0;
}
.binding-source .source-preview,
.binding-source .note {
  grid-column: 1 / -1;
}
.inspection-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.inspection-item > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9375rem;
}
.inspection-item .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.choices label {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  padding: 9px;
  border-radius: 9px;
  font-weight: 400;
}
.choices input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
}
.calendar .weekday {
  text-align: center;
  color: var(--muted);
  padding: 5px;
  font-size: 0.8125rem;
}
.calendar-day {
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.875rem;
}
.calendar-day .state {
  display: block;
  margin-top: 8px;
  text-align: center;
}
.calendar-day:not(button) {
  color: var(--muted);
  background: #f8fafc;
}
.comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.comparison div {
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
}
.comparison small,
.comparison strong {
  display: block;
}
.comparison strong {
  margin-top: 8px;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #172131;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px #17213133;
  max-width: calc(100% - 32px);
  font-size: 0.875rem;
  z-index: 100;
}
#notice:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 225px minmax(0, 1fr);
  }
  .content {
    padding: 24px;
  }
  .metric {
    padding: 16px;
    gap: 10px;
  }
  .metric-value {
    font-size: 1.3rem;
  }
  .page-head {
    align-items: flex-start;
  }
}
@media (max-width: 800px) {
  .workspace {
    display: block;
  }
  .fleet {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }
  .fleet .vehicle-list {
    display: flex;
    overflow: auto;
  }
  .vehicle-option {
    min-width: 180px;
    width: auto;
  }
  .fleet-actions {
    margin-bottom: 10px;
  }
  .content {
    padding: 22px 18px;
  }
  .topbar {
    padding: 16px 18px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-head {
    flex-wrap: wrap;
  }
  .comparison {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 500px) {
  .binding-source {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .topbar .account strong {
    display: none;
  }
  .account {
    gap: 8px;
  }
  .brand {
    font-size: 1rem;
  }
  .metric {
    padding: 14px;
    min-height: 112px;
  }
  .metric-value {
    font-size: 1.25rem;
  }
  .tank {
    width: 36px;
    height: 58px;
  }
  .metric-label {
    font-size: 0.8125rem;
  }
  .fuel-summary {
    padding: 14px;
  }
  .fuel-summary-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .fuel-summary-values {
    gap: 7px;
  }
  .fuel-summary-value {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    padding: 10px;
  }
  .fuel-summary-value strong {
    font-size: 1.1rem;
  }
  .fuel-summary-details dl {
    grid-template-columns: 1fr;
  }
  .record {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .dialog-body,
  .dialog-head {
    padding: 20px;
  }
  .calendar {
    gap: 3px;
  }
  .calendar-day {
    min-height: 65px;
    padding: 5px;
  }
  .calendar-day .state {
    padding: 3px;
  }
  .tile-config {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.14s,
      border-color 0.14s;
  }
}

/* Progressive analytics: three quiet cards, one drill-down explorer. */
.auto-update-label {
  color: var(--muted);
  font-size: 0.8125rem;
}
.metric-link {
  text-align: left;
  font-weight: 400;
  width: 100%;
}
.metric-link:hover {
  background: #fffdfa;
  border-color: #eda65b;
}
.metric-link .metric-copy {
  width: 100%;
}
.metric-link .metric-label {
  display: flex;
}
.inspection-tone-ok,
.metric.inspection-tone-ok {
  background: #edf7f0;
  border-color: #c8e3d0;
  color: #245b36;
}
.inspection-tone-issue,
.metric.inspection-tone-issue {
  background: #fff3e6;
  border-color: #f0d2ae;
  color: #874711;
}
.inspection-tone-unchecked,
.metric.inspection-tone-unchecked {
  background: #f0f2f5;
  border-color: #dce1e8;
  color: #525e70;
}
.metric[class*='inspection-tone-'] .metric-label,
.metric[class*='inspection-tone-'] small {
  color: inherit;
}
.metric-link[class*='inspection-tone-']:hover {
  border-color: currentColor;
}
.inspection-mark {
  display: inline-block;
  margin-right: 7px;
  font-weight: 700;
}
.inspection-tile-comment {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  line-height: 1.45;
  margin-top: 9px;
}
.inspection-preview-comment {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin: 8px 0;
}
.source-preview small {
  display: block;
  margin-top: 6px;
  color: inherit;
}
.inspection-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
}
.inspection-legend span {
  padding: 6px 9px;
  border: 1px solid;
  border-radius: 8px;
}
.vehicle-analytics {
  margin: 24px 0;
}
.analytics-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.analytics-heading h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}
.analytics-heading small,
.analytics-status,
.chart-status {
  color: var(--muted);
  font-size: 0.8125rem;
}
.analytics-status {
  max-width: 290px;
  text-align: right;
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.analytics-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.analytics-card:hover {
  border-color: #eda65b;
  background: #fffdfa;
}
.analytics-card:focus-visible,
.chart-column:focus-visible {
  outline: 3px solid #d77a24;
  outline-offset: 3px;
}
.analytics-card .metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-arrow {
  margin-left: auto;
  color: #a1a8b0;
  font-size: 1rem;
}
.analytics-card strong {
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  margin: 15px 0 12px;
  color: #1b2937;
}
.analytics-card em {
  font-size: 0.8125rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  margin-left: 6px;
  color: #65717d;
}
.analytics-card small {
  font-size: 0.8125rem;
  color: #6a7682;
}
.analytics-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-width: 1040px;
}
.analytics-dialog .dialog-head {
  padding: 23px 28px;
  position: sticky;
  top: 0;
  z-index: 4;
  background: white;
}
.analytics-content {
  padding: 24px 28px;
}
.chart-switch {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 3px;
  border-radius: 10px;
  background: #f1f3f6;
}
.chart-switch button {
  border: 0;
  background: transparent;
  color: #64717e;
  padding: 10px 17px;
  border-radius: 7px;
}
.chart-switch button[aria-pressed='true'] {
  background: white;
  color: #192838;
  box-shadow: 0 1px 4px #17213115;
}
.chart-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-top: 24px;
}
.chart-heading h3 {
  margin: 0 0 5px;
  text-transform: none;
  font-size: 1.2rem;
}
.chart-heading small {
  color: #75808c;
  font-size: 0.8125rem;
}
.chart-unit {
  color: #6d7883;
  font-size: 0.8125rem;
  text-align: right;
}
.chart-back {
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 15px;
  color: #986019;
  font-size: 0.875rem;
}
.chart-status {
  min-height: 20px;
  margin: 14px 0;
}
.bar-chart {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
}
.chart-axis {
  height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #81909c;
  font-size: 0.75rem;
  text-align: right;
  padding-top: 1px;
}
.bar-scroll {
  overflow-x: auto;
  padding: 3px 3px 7px;
}
.chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(39px, 1fr);
  gap: 13px;
  min-width: 660px;
  align-items: end;
  background: repeating-linear-gradient(
    to bottom,
    #e9edf1 0px,
    #e9edf1 1px,
    transparent 1px,
    transparent 90px
  );
}
.chart-bars.daily {
  grid-auto-columns: minmax(18px, 1fr);
  gap: 7px;
  min-width: 730px;
}
.chart-column {
  border: 0;
  border-radius: 3px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  min-width: 0;
  color: #667582;
  position: relative;
}
.chart-column:hover {
  background: transparent;
}
.bar-space {
  position: relative;
  display: block;
  height: 180px;
  width: 100%;
  max-width: 48px;
  align-self: center;
}
.bar-fill {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  bottom: 0;
  fill: #9eafb9;
  overflow: visible;
}
.chart-column:hover .bar-fill,
.chart-column.selected .bar-fill,
.chart-column:focus-visible .bar-fill {
  fill: #e99945;
}
.chart-column.zero .bar-space::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #9eafb9;
}
.bar-label {
  display: block;
  padding-top: 12px;
  font-size: 0.8125rem;
  background: white;
}
.bar-label.weekend {
  color: #c34646;
}
.bar-refill {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: #647d71;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}
.bar-refill .metric-icon {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
}
.chart-column:hover .bar-refill,
.chart-column:focus-visible .bar-refill {
  visibility: hidden;
}
.bar-year {
  font-size: 0.75rem;
  color: #99a2ab;
  background: white;
  padding-top: 4px;
}
.bar-value {
  display: none;
  position: absolute;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  background: #243445;
  color: white;
  padding: 5px 7px;
  font-size: 0.75rem;
  border-radius: 5px;
  pointer-events: none;
  white-space: nowrap;
}
.chart-column:hover .bar-value,
.chart-column:focus-visible .bar-value {
  display: block;
}
.bar-missing {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  color: #a9b2ba;
}
.chart-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 24px;
  padding: 16px 18px;
  margin-top: 20px;
  border-radius: 10px;
  background: #f4f6f8;
  min-height: 66px;
  font-size: 0.8125rem;
  color: #667482;
}
.chart-detail > strong {
  color: #293a49;
  font-weight: 600;
}
.chart-detail .detail-break {
  flex-basis: 100%;
  height: 0;
}
.chart-detail b {
  color: #2a3a49;
  font-weight: 600;
  margin-left: 5px;
}
.chart-detail small {
  font-size: 0.75rem;
}
.chart-note {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: #798590;
  line-height: 1.5;
}
.chart-empty {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: #7a8793;
  font-size: 0.875rem;
}
@media (max-width: 1150px) {
  .analytics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .analytics-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .analytics-status {
    text-align: left;
    max-width: none;
  }
  .analytics-cards {
    gap: 10px;
  }
  .analytics-card {
    padding: 15px;
  }
  .analytics-card strong {
    font-size: 1.3rem;
  }
  .analytics-card .card-arrow {
    display: none;
  }
  .analytics-dialog {
    width: calc(100vw - 20px);
  }
  .analytics-content,
  .analytics-dialog .dialog-head {
    padding: 20px;
  }
}
@media (max-width: 500px) {
  .analytics-cards {
    grid-template-columns: 1fr;
  }
  .analytics-card strong {
    margin: 10px 0;
    font-size: 1.5rem;
  }
  .chart-switch {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chart-switch button {
    flex: 1;
    padding: 10px 5px;
    font-size: 0.8125rem;
  }
  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .bar-chart {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
  }
  .chart-detail {
    gap: 9px;
    flex-direction: column;
    align-items: flex-start;
  }
}

dialog:has(#component-history) {
  width: min(840px, calc(100% - 32px));
}
.component-help {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}
.component-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.component-toolbar label {
  flex: 1;
  max-width: 270px;
}
.component-toolbar button {
  min-height: 44px;
}
.component-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 12px 0;
}
.component-legend > span {
  padding: 4px 8px;
  border-radius: 6px;
}
.component-timezone {
  display: block;
  margin: 8px 0 16px;
}
.component-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.component-calendar .weekday {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 4px;
}
.component-day {
  position: relative;
  min-height: 72px;
  padding: 10px;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  font-size: 0.9375rem;
  text-align: left;
}
.component-day.is-selected {
  outline: 2px solid #356d9d;
  outline-offset: 1px;
}
.component-tone-ok {
  color: #226348;
  background: #eff8f2;
  border-color: #d2e8d8;
}
.component-tone-issue {
  color: #8b4c18;
  background: #fff3e4;
  border-color: #f0d5b2;
}
.component-tone-unchecked {
  color: #586777;
  background: #eef1f5;
  border-color: #dbe1e8;
}
.component-tone-empty {
  color: #657084;
  background: #fafbfc;
  border-color: #edf0f4;
}
.component-day:hover {
  filter: brightness(0.98);
}
.component-service-mark {
  font-size: 0.875rem;
  justify-self: end;
  grid-column: 2;
}
.component-day-count {
  font-size: 0.75rem;
  grid-column: 1;
  grid-row: 2;
  white-space: nowrap;
}
.component-day-details {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.component-day-details h3 {
  margin-bottom: 12px;
}
.component-day-details .record {
  align-items: flex-start;
}
.component-day-details .record-main {
  min-width: 0;
}
.component-inspection p,
.component-maintenance p {
  overflow-wrap: anywhere;
}
.component-result {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  margin: 10px 0 4px;
  font-size: 0.875rem;
}
.component-scope {
  display: block;
  color: #506178;
  font-size: 0.875rem;
  margin: 10px 0;
}
.component-loading {
  padding: 32px 10px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 500px) {
  dialog:has(#component-history) .dialog-body {
    padding: 18px 14px;
  }
  .component-toolbar {
    gap: 8px;
  }
  .component-toolbar button {
    padding: 10px;
  }
  .component-calendar {
    gap: 4px;
  }
  .component-day {
    min-height: 60px;
    padding: 6px;
    font-size: 0.875rem;
    gap: 3px;
  }
  .component-day-count {
    display: none;
  }
  .component-day-details .record {
    flex-wrap: wrap;
  }
}
/* The overview keeps three primary decisions visible; systems disclose detail. */
.primary-metrics {
  align-items: stretch;
}
.primary-metrics > .metric {
  align-items: flex-start;
  min-height: 172px;
  padding: 18px;
}
.primary-metrics .metric-label {
  margin-bottom: 16px;
}
.primary-metrics .metric-value.text {
  font-size: 1.125rem;
  line-height: 1.4;
}
.combined-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.combined-values button {
  min-width: 0;
  text-align: left;
  padding: 0 0 8px;
  border: 0;
  background: none;
  border-radius: 4px;
}
.combined-values button:hover strong {
  color: #c64a22;
}
.combined-values button + button {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.combined-values strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.combined-values em {
  font-size: 0.875rem;
  font-weight: 400;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0;
}
.combined-values span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.service-overview.tone-issue {
  background: #fff7ed;
  border-color: #edcfa9;
}
.service-tile-detail {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.4;
}
.tile-destination {
  display: block;
  font-size: 0.8125rem;
  margin-top: 10px;
}
.systems-head {
  margin: 28px 0 16px;
}
.systems-head h2 {
  margin: 0 0 4px;
  font-size: 1.125rem;
}
.system-groups {
  display: grid;
  gap: 12px;
}
.system-group {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.system-group.system-tone-ok {
  background: #edf7f0;
  border-color: #c8e3d0;
  --system-status-color: #245b36;
}
.system-group.system-tone-issue {
  background: #fff7db;
  border-color: #ecd491;
  --system-status-color: #785414;
}
.system-group.system-tone-unchecked {
  --system-status-color: var(--muted);
}
.system-group > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 19px 20px;
  list-style: none;
  border-radius: 14px;
}
.system-group > summary::-webkit-details-marker {
  display: none;
}
.system-group > summary:hover {
  background: #f7f9fc;
}
.system-group.system-tone-ok > summary:hover {
  background: #e1f1e6;
}
.system-group.system-tone-issue > summary:hover {
  background: #fff0bf;
}
.system-group[open] > summary {
  border-radius: 14px 14px 0 0;
}
.system-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.system-heading strong {
  font-size: 1rem;
}
.system-symbol {
  display: grid;
  place-items: center;
  background: #f1f4f8;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #65758c;
}
.system-summary {
  margin-left: auto;
  display: flex;
  min-width: 0;
  max-width: 56%;
  align-items: center;
  gap: 7px;
  color: var(--system-status-color);
  font-size: 0.875rem;
  line-height: 1.5;
}
.system-summary.has-issues {
  font-weight: 600;
}
.system-summary-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.system-group.system-tone-ok .system-symbol,
.system-group.system-tone-issue .system-symbol {
  background: #ffffffb3;
  color: var(--system-status-color);
}
.system-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #9aa5b2;
}
.system-dot.tone-ok {
  background: #328365;
}
.system-dot.tone-issue {
  background: #c37127;
}
.system-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1.2rem;
}
.system-group[open] > summary .system-chevron {
  transform: rotate(180deg);
}
.system-body {
  padding: 16px 20px 20px;
  background: white;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
}
.system-observed {
  display: block;
  margin-bottom: 12px;
}
.component-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.component-tile {
  padding: 16px;
  border-radius: 10px;
  text-align: left;
  font-weight: 400;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.component-title {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: flex-start;
  color: #283347;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
}
.component-tile strong {
  font-size: 0.9375rem;
  line-height: 1.3;
}
.component-tile small {
  margin-top: auto;
  color: inherit;
  opacity: 0.85;
  font-size: 0.8125rem;
}
.component-tile .inspection-mark {
  margin-right: 7px;
}
.component-comment {
  font-size: 0.875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.component-tile:hover {
  box-shadow: 0 2px 10px #1721310d;
  filter: brightness(0.985);
}
.system-metrics {
  margin-top: 12px;
}
.system-additional {
  margin-top: 14px;
}
.system-additional > summary {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 6px 0;
}
.system-body .vehicle-analytics {
  margin-top: 16px;
}
.system-body .analytics-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.service-plans {
  margin-top: 20px;
}
.service-plan {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 12px;
}
.service-plan-overdue,
.service-plan-due,
.service-plan-soon {
  background: #fff8ef;
  border-color: #edcfa9;
}
.service-plan-status {
  display: inline-block;
  margin: 0 0 8px;
  font-weight: 650;
}
.maintenance-scope {
  display: block;
  margin: 6px 0;
  color: #53657c;
  font-size: 0.875rem;
}
.service-plan-remaining {
  font-size: 0.9375rem;
  line-height: 1.5;
}
.service-plan-warning {
  color: #805722;
  font-size: 0.875rem;
  line-height: 1.5;
}
@media (max-width: 1200px) {
  .primary-metrics {
    grid-template-columns: 1.25fr 1fr 1fr;
  }
  .combined-values {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .combined-values button + button {
    border: 0;
    padding-left: 0;
  }
  .combined-values button {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }
  .combined-values strong {
    font-size: 1.25rem;
  }
  .component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .system-group > summary {
    gap: 10px;
  }
}
@media (max-width: 800px) {
  .primary-metrics {
    grid-template-columns: 1fr;
  }
  .primary-metrics > .metric {
    min-height: 0;
  }
  .combined-values {
    grid-template-columns: 1fr 1fr;
  }
  .combined-values button {
    display: block;
  }
  .combined-values button + button {
    border-left: 1px solid var(--line);
    padding-left: 12px;
  }
  .systems-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .system-group > summary {
    flex-wrap: wrap;
    padding: 16px;
    column-gap: 10px;
    row-gap: 6px;
  }
  .system-heading {
    flex: 1;
  }
  .system-summary {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 44px;
  }
  .system-body {
    padding: 16px;
  }
}
@media (max-width: 500px) {
  .component-grid,
  .system-metrics,
  .system-body .analytics-cards {
    grid-template-columns: 1fr;
  }
  .component-tile {
    gap: 10px;
  }
}

/* Vehicle archive, inspection photographs and SOS messages. */
.fleet-status {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: #edf0f5;
  border-radius: 12px;
}
.fleet-status button {
  flex: 1;
  padding: 9px 8px;
  border-color: transparent;
  background: transparent;
  font-size: 0.8rem;
}
.fleet-status button.active {
  background: white;
  box-shadow: 0 1px 4px #15264212;
  color: #1d2738;
}
.archive-note {
  border-left: 4px solid #8995a5;
}
.archive-settings {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.archive-settings h3 {
  margin-top: 0;
}
button.sos-button,
button.destructive-button {
  background: #bf303b;
  border-color: #bf303b;
  color: white;
}
button.sos-button {
  min-height: 46px;
  padding: 12px 20px;
  font-weight: 750;
}
button.sos-button:hover,
button.destructive-button:hover {
  background: #a7212c;
  border-color: #a7212c;
}
.sos-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: #b52b36;
  color: white;
  font-size: 0.76rem;
  line-height: 1.4;
  font-weight: 750;
  white-space: nowrap;
  vertical-align: middle;
}
.state.sos-state {
  background: #ffe6e8;
  color: #a3222d;
}
.sos-note {
  background: #fff0f1;
  border-left: 4px solid #bf303b;
}
.sos-journal {
  margin: 20px 0;
}
.sos-journal .panel-head {
  margin-bottom: 6px;
}
.sos-journal h2 {
  font-size: 1rem;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sos-record {
  border-left: 3px solid #cb3b46;
  padding-left: 14px;
}
.sos-record .record-main p {
  margin: 8px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.sos-record.sos-resolved {
  border-left-color: #a8b6ad;
}
.sos-record.sos-resolved .sos-tag {
  background: #8f5157;
}
.sos-question,
.event-photos {
  margin: 0;
  padding: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sos-question legend,
.event-photos legend {
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0 5px;
}
.sos-question .choices {
  margin: 0;
}
.event-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sos-details {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
.sos-details > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.7fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sos-details dt {
  color: var(--muted);
}
.sos-details dd {
  margin: 0;
  font-weight: 600;
}
.photo-picker {
  display: block;
  max-width: 100%;
  margin: 0 0 8px;
}
.photo-picker input {
  margin-top: 8px;
  font-size: 0.8rem;
}
.photo-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.photo-previews:empty {
  margin-top: 0;
}
.photo-preview {
  position: relative;
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: white;
}
.photo-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.photo-preview figcaption {
  padding: 7px 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}
.photo-preview > button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: #c8cdd4;
  box-shadow: 0 1px 5px #0002;
  font-size: 1.2rem;
}
.photo-preview > small {
  font-size: 0.7rem;
  padding: 4px 2px 0;
  color: #357456;
}
.photo-progress {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0;
}
.photo-progress:empty {
  display: none;
}
.report-photos {
  margin: 24px 0;
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.photo-gallery a {
  min-width: 0;
  display: block;
  color: #31598d;
  font-size: 0.8rem;
}
.photo-gallery img {
  width: 100%;
  height: 130px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
  display: block;
  margin-bottom: 6px;
}
.calendar-day .sos-state {
  display: block;
  margin-top: 4px;
}
.notifications {
  position: relative;
}
.notification-bell {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 10px;
}
.notification-bell svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  padding: 0 4px;
  background: #be2d39;
  color: white;
  font-size: 0.68rem;
  border: 2px solid white;
}
.notification-count[hidden],
.notification-panel[hidden],
.sos-notification-toast[hidden] {
  display: none;
}
.notification-panel {
  position: absolute;
  z-index: 60;
  top: 54px;
  right: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - 100px));
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 50px #13223924;
  padding: 16px;
  color: #1d2738;
  text-align: left;
}
.notification-panel button {
  color: #1d2738;
  border-color: var(--line);
}
.notification-panel small {
  color: var(--muted);
}
.topbar .notification-panel strong {
  display: block;
}
.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.notification-head h3 {
  margin: 0;
  font-size: 1rem;
}
.notification-head button {
  padding: 4px 9px;
  font-size: 1.2rem;
}
.notification-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.notification-item {
  display: grid;
  gap: 7px;
  text-align: left;
  width: 100%;
  padding: 12px;
  border-color: var(--line);
  font-weight: 400;
}
.notification-item.unread {
  background: #fff1f2;
  border-color: #f0bec4;
}
.notification-item > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.notification-item small {
  font-size: 0.72rem;
}
.notification-read-all {
  margin-top: 8px;
  padding: 5px 0;
  color: #31598d;
}
.notification-hint {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
}
.sos-notification-toast {
  position: fixed;
  top: 86px;
  right: 20px;
  z-index: 65;
  width: min(380px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid #e8a5ad;
  border-left: 5px solid #bf303b;
  border-radius: 13px;
  background: #fff8f8;
  box-shadow: 0 10px 35px #2d172327;
}
.sos-notification-toast strong {
  color: #a6222e;
}
.sos-notification-toast p {
  font-size: 0.88rem;
  margin: 9px 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.sos-notification-toast .actions {
  justify-content: space-between;
}
@media (max-width: 700px) {
  .notification-panel {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .notification-bell {
    width: 39px;
    height: 39px;
  }
  .sos-notification-toast {
    right: 14px;
    top: 82px;
  }
  .driver .page-head > .actions {
    width: 100%;
  }
  .driver .page-head .sos-button {
    flex: 1;
  }
  .sos-question {
    padding: 12px;
  }
  .sos-question .choices {
    flex-wrap: wrap;
  }
  .sos-details > div {
    font-size: 0.85rem;
  }
  .sos-record {
    align-items: stretch;
  }
  .sos-record .record-actions {
    align-items: flex-start;
  }
}
