:root {
  color-scheme: light;
  font-family: "Segoe UI Variable Text","Segoe UI",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
  color: var(--ink);
  background: var(--canvas);
  --ink: #17263b;
  --muted: #495d76;
  --line: #dbe4f0;
  --field: #b1c3dc;
  --brand: #214fc7;
  --brand-hover: #173e9e;
  --brand-soft: #eaf0ff;
  --focus: #3469cc;
  --canvas: #f1f5fb;
  --subtle: #f2f6fc;
  --paper: #fff;
  --surface: #fff;
  --frost: #f8fbff;
  --glass-edge: #dfe7f2;
  --highlight: inset 0 1px 0 #fffffff0;
  --soft-shadow: 0 8px 24px #2c487918;
  --radius: 19px;
  --control-radius: 11px;
  --table-end-inset: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
  background:
    radial-gradient(ellipse at 0 0,#dfebff 0,transparent 44rem),
    radial-gradient(ellipse at 98% 0,#edf0ff 0,transparent 43rem),
    var(--canvas);
}

a {
  color: var(--brand);
  text-decoration: none;
}

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

button,.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 9px 14px;
  min-height: 37px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
}

button:where(:not(:disabled)):hover,.button:hover {
  background: var(--subtle);
  color: var(--brand);
  border-color: var(--field);
}

button:disabled {
  opacity: .52;
  cursor: default;
}

button.primary,.button.primary {
  background: linear-gradient(170deg,#2b62c5,var(--brand));
  border-color: var(--brand);
  color: #fff;
}

button.primary:not(:disabled):hover,.button.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

button.danger,button.danger:not(:disabled):hover {
  color: #a32e38;
}

button.danger:not(:disabled):hover {
  background: #fff0f1;
  border-color: #e4b5ba;
}

button.small,.button.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

button.link {
  color: var(--brand);
  padding: 0;
  min-height: auto;
  background: none;
  border: none;
  text-align: left;
  white-space: normal;
}

button.link:not(:disabled):hover {
  text-decoration: underline;
  background: transparent;
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

h1 {
  font-size: clamp(26px,2.3vw,33px);
  letter-spacing: -.028em;
  font-weight: 700;
  line-height: 1.32;
}

h2 {
  font-size: 18px;
  font-weight: 680;
  line-height: 1.45;
}

h3 {
  font-size: 15px;
  font-weight: 620;
  line-height: 1.5;
}

.muted,.help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 650;
}

.brand img {
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 24%;
  object-fit: contain;
}

.logo-preview {
  display: inline-flex;
  padding: 14px 18px;
  border-radius: 15px;
  background: var(--frost);
  color: var(--ink);
  border: 1px solid var(--line);
}

.brand-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 202px minmax(0,1fr);
  gap: clamp(15px,1.6vw,26px);
  padding: 14px;
}

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  background: var(--frost);
  border: 1px solid #ffffffd9;
  border-radius: 23px;
  padding: 20px 10px 15px;
  box-shadow: var(--highlight), var(--soft-shadow);
  overflow-y: auto;
}

.sidebar .brand {
  gap: 8px;
  padding: 0 2px;
}

.sidebar .brand img {
  width: 30px;
  height: 30px;
}

.sidebar .brand-text {
  font-size: 13px;
}

.mobile-menu,.mobile-table-hint,.mobile-review-label {
  display: none;
}

.sidebar nav {
  display: grid;
  gap: 4px;
  margin: 25px 0 18px;
}

.sidebar nav button {
  justify-content: flex-start;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  border-radius: 13px;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
}

.sidebar nav button svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-indicators {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: none;
}

.nav-count {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf0f5;
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.nav-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #bc2a46;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #fff;
}

.nav-bubble[hidden],
.nav-indicators:has(.nav-bubble:not([hidden])) .nav-count {
  display: none;
}

.sidebar nav button:not(:disabled):hover {
  background: #ffffff94;
  border-color: #ffffffd9;
}

.sidebar nav button.active,.sidebar nav button.active:not(:disabled):hover {
  background: linear-gradient(130deg,#e9f3ff,#e1eaff);
  border-color: #c9daf6;
  color: var(--brand);
  box-shadow: var(--highlight);
}

.sidebar nav button.active .nav-count {
  background: #dbe8ff;
  color: var(--brand);
}

.account {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 4px 0;
  margin-top: auto;
}

.account-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--muted);
}

.account-text strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 4px;
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-links .desktop-button[data-desktop-state="running"] {
  background: #e4f5ea;
  border-color: #addebd;
  color: #176344;
}

.account-links .desktop-button[data-desktop-state="offline"],
.account-links .desktop-button[data-desktop-state="needs-update"] {
  background: #fff3de;
  border-color: #eacb91;
  color: #805113;
}

main {
  padding: 14px clamp(4px,1.5vw,24px) 34px 0;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.topline .muted {
  margin-top: 5px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--highlight), var(--soft-shadow);
  min-width: 0;
}

.panel-body,.panel-head {
  padding: 16px 20px;
}

.panel-head {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-head h2 + .muted {
  margin-top: 4px;
}

.list-pagination {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding: 12px 16px;
}

.panel+.panel,.section-gap {
  margin-top: 18px;
}

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

.metrics .metric {
  --metric-tint: #eaf2ff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-height: 123px;
  margin: 0;
  padding: 16px 18px;
  background: linear-gradient(145deg,#ffffffee 20%,var(--metric-tint));
  text-align: left;
  white-space: normal;
}

.metrics .metric:not(:disabled):hover {
  background: linear-gradient(145deg,#fff,var(--metric-tint) 70%);
  border-color: #a8bfe2;
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-size: 14px;
  line-height: 1.4;
}

.metric-heading svg {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 6px;
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-soft);
}

.metric-body {
  display: grid;
  grid-template-columns: minmax(34px,max-content) minmax(0,1fr);
  align-items: start;
  gap: 12px;
}

.metric-main {
  display: grid;
}

.metric-positions {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,66px),1fr));
  gap: 3px 9px;
  padding-top: 6px;
}

.metric-position {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.metric-position-name {
  overflow-wrap: anywhere;
}

.metric-position strong {
  margin-left: auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric-value {
  margin: 4px 0;
  color: var(--ink);
  font-size: clamp(27px,3.2vw,36px);
  font-weight: 640;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric.ledger .metric-heading svg {
  color: #1c6b50;
  background: #e6f4ed;
}

.metrics .metric.ledger {
  --metric-tint: #edf7f2;
}

.metrics .metric.waiting {
  --metric-tint: #fff7e6;
}

.metrics .metric.review {
  --metric-tint: #f3eeff;
}

.metric.waiting .metric-heading svg {
  color: #815100;
  background: #fff3d8;
}

.metric.review .metric-heading svg {
  color: #6443a3;
  background: #f0eaff;
}

.metric-note {
  display: block;
  font-weight: 500;
}

.history-head {
  flex-wrap: wrap;
}

.history-date {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-date input {
  width: 150px;
}

.chart-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.chart-key::before {
  content: "";
  width: 19px;
  border-top: 2px solid var(--brand);
}

.chart-key.submitted::before {
  width: 12px;
  height: 10px;
  border: 0;
  border-radius: 2px;
  background: #b9cef7;
}

.chart-key.completed::before {
  border-top-color: #157451;
}

.chart-key.incomplete::before {
  border-top: 2px dashed #a65e08;
}

.chart {
  display: block;
  width: 100%;
  height: clamp(230px,37vh,340px);
}

.chart:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.chart-date {
  min-height: 23px;
  margin: 2px 0 9px;
  font-variant-numeric: tabular-nums;
}

.chart-explanation {
  margin: 0 0 9px;
}

.history-details summary {
  width: fit-content;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
}

.history-details .table-scroll {
  margin-top: 10px;
  max-height: 330px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 17px;
}

.filters label {
  width: min(160px,100%);
}

.filters label:first-child {
  width: min(255px,100%);
}

.filters input,.filters select {
  min-height: 37px;
  padding: 7px 9px;
}

.form {
  display: grid;
  gap: 15px;
}

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

.price-calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
  align-items: start;
  gap: 18px;
}

.price-inputs,.price-tiers {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.price-fields,.price-store-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.price-fields {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.price-store-row {
  grid-template-columns: minmax(0,1fr) max-content;
}

.price-store-panel .panel-head,.price-store-panel .panel-body {
  padding-block: 12px;
}

.price-store-actions {
  gap: 6px;
}

.price-store-actions button {
  min-height: 36px;
}

.price-store-panel .price-feedback:not(:empty) {
  margin-top: 8px;
}

.price-store-panel select:disabled {
  color: var(--muted);
  background: var(--subtle);
}

.price-modes,.price-tier {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.price-modes legend,.price-tier legend {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 650;
}

.price-modes > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-modes label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
  cursor: pointer;
}

.price-modes label:has(:checked) {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--field);
}

.price-modes input {
  width: auto;
  margin: 0;
  accent-color: var(--brand);
}

.price-tier {
  padding: 6px 10px 11px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.price-tier .price-fields {
  grid-template-columns: repeat(3,minmax(0,1fr)) auto;
  gap: 8px;
}

.price-tier-panel :is(.panel-head,.panel-body) {
  padding-block: 10px;
}

.price-tier-panel .price-tiers {
  gap: 6px;
}

.price-tier-panel .price-tiers[hidden] {
  display: none;
}

.price-tier-panel .price-tier {
  padding: 7px 9px;
}

.price-tier-panel .price-tier legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.price-tier-panel .price-tier label {
  gap: 3px;
}

.price-tier-panel .panel-head button {
  min-height: 36px;
  font-weight: 650;
}

.price-tier-panel .price-tier-toggle {
  color: var(--brand);
  background: var(--brand-soft);
}

.price-calculator #price-form {
  container-type: inline-size;
}

.price-discount-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}

.price-discount-grid .panel + .panel {
  margin-top: 0;
}

@container (min-width: 690px) {
  .price-discount-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .price-tier-panel :is(.panel-head,.panel-body) {
    padding-inline: 12px;
  }

  .price-tier-panel .panel-head button {
    padding-inline: 8px;
  }

  .price-tier-panel .price-tier .price-fields {
    gap: 5px;
  }
}

.price-tiers > p,.price-pending,.price-feedback {
  margin: 0;
}

.price-results {
  position: sticky;
  top: 14px;
  max-height: calc(100dvh - 28px);
  overflow: auto;
}

.price-feedback {
  color: var(--muted);
  font-size: 13px;
}

.price-feedback:empty {
  display: none;
}

.price-metrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin: 0;
}

.price-metrics > div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--subtle);
}

.price-metrics > .price-key-metric {
  background: var(--brand-soft);
  border-color: var(--field);
}

.price-metrics dt,.price-details dd {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.price-metrics dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(16px,2vw,24px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.price-key-metric dd {
  color: var(--brand);
}

.price-details {
  margin-top: 14px;
}

.price-details summary {
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

.price-details dl {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
}

.price-details dt {
  font-weight: 600;
}

.price-details dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .price-calculator {
    grid-template-columns: minmax(0,1fr);
  }

  .price-results {
    position: static;
    max-height: none;
  }
}

@media (max-width: 560px) {
  .price-fields,.price-store-row,.price-tier .price-fields {
    grid-template-columns: minmax(0,1fr);
  }
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  min-width: 0;
}

input,textarea,select {
  min-width: 0;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--field);
  border-radius: var(--control-radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

select:enabled {
  cursor: pointer;
}

select:enabled:hover {
  border-color: var(--focus);
}

@supports (appearance: base-select) and selector(select::picker(select)) {
  select:where(:not([multiple], [size])),
  select:where(:not([multiple], [size]))::picker(select) {
    appearance: base-select;
  }

  select:where(:not([multiple], [size])) {
    align-items: center;
    gap: 8px;
  }

  select::picker-icon {
    flex-shrink: 0;
    margin-inline-start: auto;
    color: var(--muted);
  }

  select:open::picker-icon {
    rotate: 180deg;
  }

  select::picker(select) {
    margin-block: 5px;
    min-inline-size: anchor-size(width);
    max-inline-size: min(28rem, calc(100vw - 24px));
    max-block-size: min(20rem, 45vh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
    color: var(--ink);
    box-shadow: 0 12px 30px #233b6429;
    font: inherit;
  }

  select:where(:not([multiple], [size])) option {
    min-block-size: 38px;
    padding: 8px 11px;
    border-radius: 9px;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.45;
  }

  select option:checked {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 650;
  }

  select option:enabled:is(:hover, :focus-visible) {
    background: var(--subtle);
    outline: 1px solid var(--field);
    outline-offset: -1px;
  }

  select option::checkmark {
    order: 1;
    margin-inline-start: auto;
    color: var(--brand);
  }

  select option:disabled {
    cursor: default;
  }
}

input[type=checkbox] {
  width: auto;
  accent-color: var(--brand);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.table-scroll {
  overflow: auto;
}

.panel > .table-scroll:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}

th,td {
  padding: 11px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #dae5f1d6;
  line-height: 1.55;
}

tr > :is(th,td):last-child {
  padding-inline-end: calc(var(--table-cell-inline-padding, 14px) + var(--table-end-inset));
}

th {
  background: #ecf2fa;
  color: #304764;
  white-space: nowrap;
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #edf4fc;
}

td.key {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ticket-key-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticket-unread-count {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 19px;
  min-height: 19px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #bc2a46;
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.review-check {
  width: 1%;
  text-align: center;
}

.review-check input {
  margin: 0;
  vertical-align: middle;
}

.review-check label {
  justify-items: center;
}

.ticket-table {
  --table-cell-inline-padding: 10px;
  table-layout: fixed;
  min-width: 1058px;
}

.ticket-table :is(th,td) {
  padding-inline: var(--table-cell-inline-padding);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-table :is(th,td):last-child {
  --ticket-column-end: var(--table-end-inset);
}

.ticket-table td {
  height: 48px;
  padding-block: 0;
  line-height: 1.45;
}

.ticket-table .review-check { width: 36px; }
.ticket-col-key { width: 195px; }
.ticket-col-priority { width: 74px; }
.ticket-col-position { width: 108px; }
.ticket-col-creator { width: 110px; }
.ticket-col-mode { width: 73px; }
.ticket-col-handler { width: 107px; }
.ticket-col-status { width: 136px; }
.ticket-col-time { width: calc(142px + var(--ticket-column-end, 0px)); }
.ticket-col-action { width: calc(61px + var(--ticket-column-end, 0px)); }
.ticket-col-action.submitted-actions { width: calc(110px + var(--ticket-column-end, 0px)); }
.ticket-row-actions button + button { margin-left: 4px; }

.ticket-table .key .link {
  flex: none;
  font-size: 13px;
  font-weight: 590;
}

.ticket-context {
  color: var(--muted);
}

.ticket-description-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  container-type: inline-size;
}

.ticket-description-line .ticket-description-link {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 480;
}

.ticket-description-link span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ticket-description-line .ticket-description-link:hover {
  color: var(--brand);
}

.ticket-table .status-cell {
  gap: 4px;
}

.ticket-table .status-cell .badge {
  padding-inline: 6px;
  gap: 4px;
}

.ticket-table .reply-indicator::before {
  display: none;
}

.ticket-table button:focus-visible {
  outline-offset: -2px;
}

.issue-media {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.issue-media-small {
  display: none;
  flex-wrap: nowrap;
  flex: none;
  gap: 6px;
  margin: 0;
}

@container (min-width:112px) {
  .issue-media-small {
    display: flex;
  }
}

@container (max-width:149px) {
  .issue-media-small .issue-media-tile:nth-child(2) {
    display: none;
  }
}

@supports not (container-type: inline-size) {
  .issue-media-small {
    display: flex;
  }

  .issue-media-small .issue-media-tile:nth-child(2) {
    display: none;
  }
}

.issue-media figure {
  margin: 0;
  width: min(220px,100%);
}

.issue-media figcaption {
  padding: 3px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.issue-media-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  background: #e5eef9;
}

.issue-media-small .issue-media-tile {
  flex: none;
  width: 32px;
  height: 32px;
  min-height: 0;
  border-radius: 7px;
}

.issue-media-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.issue-media-small .issue-media-tile img {
  object-fit: cover;
}

.issue-file-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #345675;
  background: #eaf0f7;
  font-size: 9px;
  font-weight: 650;
}

.issue-file-icon svg {
  width: 16px;
  height: 16px;
}

.issue-file-icon.sheet { color: #17613e; background: #e2f3ea; }
.issue-file-icon.word { color: #23569b; background: #e6efff; }
.issue-file-icon.pdf { color: #a03843; background: #fbe9ed; }
.issue-file-icon.slides { color: #8a4816; background: #fff0df; }
.issue-file-icon.archive { color: #5b468d; background: #eee8fa; }

.issue-video-icon {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 50%;
  color: white;
  background: #193859c9;
}

.issue-media-tile img:not([hidden]) + .issue-video-icon {
  display: none;
}

.issue-video-icon svg {
  width: 17px;
  height: 17px;
}

.issue-media-small .issue-video-icon svg {
  width: 13px;
  height: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: #edf1f7;
  color: #475870;
  font-size: 12px;
  font-weight: 650;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.waiting,.badge.pending,.badge.urgent {
  color: #915600;
  background: #fff2d5;
}

.badge.working {
  color: #1a50c0;
  background: #e7efff;
}

.badge.assist-pending,.badge.assist-waiting {
  color: #8a4b04;
  background: #fff1d6;
}

.badge.assist-working {
  color: #234c8f;
  background: #e4edfc;
}

.badge.assist-pending::before,.badge.assist-waiting::before,.badge.assist-working::before {
  content: none;
}

.assistance-entry + .assistance-entry {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.assistance-entry > p {
  margin: 5px 0;
}

.assistance-entry .actions {
  margin-top: 8px;
}

.badge.assist {
  color: #2255a7;
  background: var(--brand-soft);
  padding-inline: 6px;
}

.badge.assist::before,.badge.assist-pending::before {
  display: none;
}

.badge.assist-pending {
  color: #915600;
  background: #fff2d5;
}

.badge.review {
  color: #6443a3;
  background: #f0eaff;
}

.badge.closed,.badge.sent {
  color: #157451;
  background: #e4f5ec;
}

.badge.failed,.badge.critical {
  color: #a42c37;
  background: #ffecef;
}

.status-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.badge.reply-indicator {
  color: #a42c37;
  background: #ffe2e6;
}

.reply-indicator[hidden] {
  display: none;
}

tbody tr.awaiting-reply,
tbody tr.awaiting-reply:hover {
  background: #fff3f4;
}

.awaiting-reply td:first-child {
  box-shadow: inset 3px 0 #c6414d;
}

.awaiting-reply td .link {
  color: #a42c37;
}

.feedback-pending {
  color: #a42c37;
  font-weight: 570;
}

#message[hidden] {
  display: none;
}

.empty {
  padding: 49px 21px;
  text-align: center;
  color: #51627e;
}

.empty strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty p {
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(248px,320px);
  gap: 18px;
}

.detail-layout .main-col,.detail-layout .side-col {
  min-width: 0;
}

.detail-layout .side-col>.panel {
  margin-top: 0;
  margin-bottom: 18px;
}

@media(min-width:1001px) {
  .ticket-actions-panel {
    position: sticky;
    top: 16px;
    z-index: 1;
  }
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.detail-meta dt {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 7px;
}

.detail-meta dd {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.prose {
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}

#ticket-summary h3 {
  margin-bottom: 5px;
}

.subsection {
  margin-top: 17px;
}

.post {
  padding: 13px 0;
  border-bottom: 1px solid #e7edf5;
}

.post:first-child {
  padding-top: 0;
}

.post:last-child {
  border-bottom: 0;
}

.post-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 7px;
  font-size: 13px;
}

.post-type {
  font-size: 12px;
  color: var(--brand);
  font-weight: 650;
}

.chat-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  padding-block: 9px;
}

.chat-entry.own {
  align-items: flex-end;
}

.chat-bubble {
  max-width: min(100%,740px);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px 16px 16px 16px;
  background: linear-gradient(155deg,#f8fbff,#edf3fa);
  box-shadow: var(--highlight);
  line-height: 1.65;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.chat-entry.own .chat-bubble {
  border-color: #d7e4fa;
  border-radius: 16px 6px 16px 16px;
  background: linear-gradient(155deg,#f0f6ff,#e5efff);
}

.chat-text {
  white-space: pre-wrap;
}

.chat-bubble .attachment-image {
  display: inline-flex;
  flex-direction: column;
  vertical-align: bottom;
  margin: 3px;
  max-width: min(240px,100%);
}

.creator-notes .chat-bubble .issue-media {
  display: inline-flex;
  vertical-align: bottom;
  margin: 3px;
}

.chat-bubble .attachment {
  max-height: 215px;
}

.attachment {
  max-width: 100%;
  max-height: 275px;
  display: block;
  border-radius: 8px;
  margin: 9px 0;
  object-fit: contain;
  background: #f1f4fa;
}

.attachment-image {
  margin: 9px 0 0;
}

.attachment-zoom,.attachment-zoom:hover {
  display: inline-block;
  max-width: min(100%,640px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.attachment-zoom .attachment {
  margin: 0;
}

.attachment-image figcaption {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.attachment-image figcaption a {
  text-decoration: underline;
}

.attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 310px;
  max-width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: #f6f9ff;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  white-space: normal;
  text-decoration: none;
}

button.attachment-card:hover {
  border-color: #9bb8ef;
  background: #edf4ff;
}

.attachment-card-text {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.attachment-card-name {
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-weight: 600;
}

.attachment-card-size {
  color: var(--muted);
  font-size: 12px;
}

.attachment-symbol {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e2ecff;
  color: #2154a6;
  font-size: 10px;
  font-weight: 750;
}

.attachment-symbol svg {
  width: 21px;
  height: 21px;
}

.attachment-symbol.sheet { background: #dcf4e7; color: #146c45; }
.attachment-symbol.pdf { background: #fbe8ea; color: #9d343c; }
.attachment-symbol.slides { background: #ffedd9; color: #974800; }
.attachment-symbol.video,.attachment-symbol.archive { background: #eee8ff; color: #5840a4; }

.message-box {
  border: 1px solid var(--field);
  border-radius: 15px;
  background: var(--paper);
}

.message-box:focus-within {
  border-color: var(--brand);
  outline: 2px solid #b7ceff;
}

.message-box textarea {
  display: block;
  border: 0;
  border-radius: 15px 15px 0 0;
}

.message-box textarea:focus-visible {
  outline: none;
}

.message-label {
  font-size: 13px;
  font-weight: 650;
}

.chat-editor {
  min-height: 108px;
  max-height: min(45vh,420px);
  overflow-y: auto;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.chat-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  background: #f1f6fd;
}

.chat-toolbar button[type="submit"] {
  margin-left: auto;
}

.chat-toolbar .file-picker-button svg {
  width: 15px;
  height: 15px;
}

.chat-draft-file {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: bottom;
  max-width: 100%;
  padding: 3px 6px;
  margin: 2px 4px;
  border-radius: 5px;
  background: var(--subtle);
}

.chat-draft-file img {
  display: none;
  max-width: min(200px,100%);
  max-height: 192px;
  object-fit: contain;
  border-radius: 5px;
}

.chat-draft-file img.ready {
  display: block;
}

.chat-draft-file:has(img.ready) .chat-remove-file {
  position: absolute;
  top: 5px;
  right: 8px;
}

.chat-remove-file {
  min-height: 24px;
  width: 24px;
  padding: 0;
  border-radius: 50%;
}

.description-field {
  display: grid;
  gap: 6px;
}

.draft-thumbnail {
  flex: none;
  width: 72px;
  height: 54px;
  border-radius: 7px;
  background: var(--paper);
  object-fit: contain;
}

.message-box .attachment-label {
  display: none;
}

.message-box .paste-target {
  border: 0;
  border-top: 1px solid #e3ebf7;
  border-radius: 0 0 14px 14px;
}

.message-box .paste-target:focus-within {
  outline: none;
}

.attachment-picker {
  display: grid;
  gap: 7px;
}

.attachment-label {
  color: #344563;
  font-size: 13px;
  font-weight: 650;
}

.attachment-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.attachment-limit {
  margin-left: auto;
}

.paste-target {
  padding: 9px 11px;
  border: 1px dashed #9dafcc;
  border-radius: 7px;
  color: #465c7b;
  background: #f7faff;
  font-size: 13px;
}

.paste-target:focus-within {
  border-color: var(--brand);
  outline: 2px solid #b7ceff;
  outline-offset: 1px;
}

.pasted-files {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.pasted-files li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.paste-status:empty {
  display: none;
}

.log {
  padding: 10px 0;
  border-bottom: 1px solid #e7edf5;
}

.log:last-child {
  border-bottom: 0;
}

.log strong {
  display: block;
  font-size: 13px;
}

.log .prose {
  font-size: 12px;
  color: #4d5e79;
  margin-top: 4px;
}

.member {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
}

.member span:first-child {
  overflow-wrap: anywhere;
  min-width: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: #edf2f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 5px;
  padding: 6px;
  background: var(--frost);
  border: 1px solid var(--line);
  border-radius: 15px;
  width: fit-content;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.tabs button {
  background: transparent;
  border-color: transparent;
}

.tabs button.active {
  background: #fff;
  color: var(--brand);
  border-color: var(--line);
  box-shadow: 0 2px 6px #2c487914;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 40%,#dfebff,transparent 32rem);
}

.auth {
  width: min(425px,100%);
  padding: 31px;
  border-radius: 24px;
  box-shadow: var(--highlight), 0 12px 36px #2c48791a;
}

.auth h1 {
  margin: 24px 0 8px;
}

.auth .form {
  margin-top: 23px;
}

.auth button.primary {
  width: 100%;
}

.boot {
  margin: 25px;
  color: var(--muted);
}

.version-save-notice:not([hidden]) {
  position: fixed;
  z-index: 4;
  top: 16px;
  right: 16px;
  width: min(430px,calc(100% - 32px));
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 15px;
  box-shadow: var(--highlight), var(--soft-shadow);
  font-weight: 600;
}

dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #fffffff0;
  border-radius: 24px;
  width: min(580px,calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 0;
  box-shadow: var(--highlight), 0 16px 54px #24395b40;
}

dialog::backdrop {
  background: #22365376;
}

dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
  background: #ffffff70;
}

dialog form,dialog .dialog-content {
  padding: 20px;
}

dialog .actions {
  justify-content: flex-end;
  margin-top: 5px;
}

.ticket-intake-dialog {
  --intake-gutter: 26px;
  width: min(1080px,calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  scroll-padding-bottom: 72px;
}

.ticket-intake-dialog > header {
  padding: 17px var(--intake-gutter);
}

.ticket-intake-dialog > header h2 {
  font-size: 20px;
}

.intake-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(300px,340px);
  grid-template-areas: 'ticket calculator';
  align-items: start;
}

.intake-layout > .form {
  grid-area: ticket;
  min-width: 0;
  padding: 20px var(--intake-gutter) 0;
  gap: 18px;
}

.intake-layout > .form > .actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--intake-gutter));
  padding: 12px var(--intake-gutter);
  border-top: 1px solid var(--line);
  background: #f7faff;
}

.intake-calculator {
  grid-area: calculator;
  min-width: 0;
  padding: 20px;
  border-left: 1px solid var(--line);
  background: var(--subtle);
}

.intake-calculator > summary,.intake-price-tiers > summary {
  cursor: pointer;
  font-weight: 650;
}

#intake-calculator {
  margin-top: 14px;
}

.intake-layout .intake-price-form {
  padding: 0;
}

.intake-price-modes > div {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--control-radius);
  background: #e8eef7;
}

.intake-price-modes label,
.intake-price-modes label:has(:checked) {
  position: relative;
  justify-content: center;
  min-height: 38px;
  padding: 5px;
  border: 0;
}

.intake-price-modes label {
  background: transparent;
}

.intake-price-modes label:has(:checked) {
  background: var(--paper);
  box-shadow: 0 1px 4px #253f6229;
}

.intake-price-modes input {
  position: absolute;
  opacity: 0;
}

.intake-price-modes label:has(:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.intake-price-form > .price-fields {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.intake-price-form > .price-fields > [data-price-known] {
  grid-column: 1 / -1;
}

.intake-price-tiers {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
}

.intake-tier-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.intake-tier-head h3 {
  font-size: 13px;
}

.intake-price-form .price-tier .price-fields {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.intake-price-form .price-metrics > div {
  padding: 8px;
}

.intake-price-form .price-metrics dd {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.form-grid.intake-fields {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px 16px;
}

.intake-fields .assignment-overview,
.intake-fields #multi-assignment {
  grid-column: 1 / -1;
}

.intake-fields:has(#single-assignment[hidden]) > .intake-task-type {
  grid-column: 1 / -1;
}

.ticket-intake-dialog .description-field textarea {
  min-height: clamp(150px,24vh,208px);
  padding: 13px 15px;
  line-height: 1.6;
}

.ticket-intake-dialog .paste-target {
  padding: 9px 12px;
}

.ticket-intake-dialog .paste-status:not(:empty) {
  margin-top: 6px;
}

#attachment-preview {
  width: min(1120px,calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
}

#attachment-preview header {
  flex-wrap: wrap;
  gap: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
}

#attachment-preview h2 {
  overflow-wrap: anywhere;
}

#attachment-preview .actions {
  margin-top: 0;
}

.attachment-preview-content {
  padding: 14px;
  overflow: auto;
  max-height: 79dvh;
  background: #f7f9fd;
}

.attachment-preview-content > :is(img,video) {
  display: block;
  max-width: 100%;
  max-height: 72dvh;
  margin: auto;
  object-fit: contain;
}

.attachment-preview-content.media-zoomed > :is(img,video) {
  max-width: none;
  max-height: none;
  height: auto;
  margin: 0;
}

.attachment-preview-ocr {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.attachment-preview-ocr .actions {
  justify-content: space-between;
}

.attachment-preview-ocr textarea {
  width: 100%;
  margin-top: 8px;
}

.attachment-preview-ocr [hidden] {
  display: none;
}

.attachment-preview-content > iframe {
  display: block;
  width: 100%;
  height: 74dvh;
  border: 0;
}

.attachment-preview-content pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  line-height: 1.65;
}

.office-preview-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.office-preview-picker select {
  width: auto;
  max-width: 75%;
}

.office-preview-page,.office-preview-word {
  padding: 12px;
  background: #fff;
  overflow: auto;
}

.office-preview-word {
  margin-top: 10px;
  line-height: 1.65;
}

.office-preview-word p {
  min-height: 1em;
  margin-bottom: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.office-preview-sheet td,.office-preview-word td {
  --table-cell-inline-padding: 10px;
  padding: 6px var(--table-cell-inline-padding);
  min-width: 80px;
  max-width: 340px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
}

.errors {
  color: #a5313c;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.errors:empty {
  display: none;
}

.check-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 9px;
  padding: 10px 12px;
}

.assignment-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.assignment-fieldset legend {
  padding: 0;
  color: #344563;
  font-size: 13px;
  font-weight: 650;
}

.assignment-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding: 8px 12px;
  border-radius: var(--control-radius);
  background: var(--subtle);
}

.assignment-overview h3 {
  font-size: 13px;
}

.assignment-overview p {
  flex: 1 1 190px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.intake-fields #multi-assignment .check-list {
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin-top: 6px;
}

#notices {
  position: fixed;
  z-index: 5;
  bottom: 20px;
  right: 20px;
  display: grid;
  gap: 7px;
  width: min(385px,calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid #bdceed;
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: 0 8px 20px #1c37622e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.toast.error {
  border-left-color: #a5313c;
}

.ticket-message-toast {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.ticket-message-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.ticket-message-icon svg {
  width: 20px;
  height: 20px;
}

.ticket-message-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ticket-message-toast p {
  margin: 6px 0;
}

.ticket-message-toast :is(.ticket-message-open,.ticket-message-close) {
  min-height: 25px;
  border: 0;
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--brand);
  font-size: 12px;
}

.ticket-message-toast .ticket-message-close {
  min-width: 25px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.back {
  margin-bottom: 14px;
}

.break {
  overflow-wrap: anywhere;
  min-width: 0;
}

.right {
  margin-left: auto;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  dialog {
    background: #f7faffed;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  @media (min-width:691px) {
    .sidebar,.ticket-actions-panel,.version-save-notice:not([hidden]) {
      background: linear-gradient(155deg,#ffffffe8,#f2f7ffc7);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    .sidebar,.ticket-actions-panel,.version-save-notice:not([hidden]),dialog {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }

    .sidebar {
      background: var(--frost);
    }

    dialog {
      background: var(--surface);
    }
  }
}

@media(max-width:1250px) {
  .metrics {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media(max-width:1000px) {
  .metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .sidebar nav button {
    gap: 6px;
    padding-inline: 8px;
  }

  .layout {
    grid-template-columns: 184px minmax(0,1fr);
  }
  .detail-layout {
    grid-template-columns: minmax(0,1fr);
  }
  .detail-layout .side-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .ticket-actions-panel {
    grid-column: 1 / -1;
  }
}

@media(max-width:820px) {
  .ticket-intake-dialog {
    width: min(740px,calc(100vw - 28px));
  }

  .intake-layout {
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: 'calculator' 'ticket';
  }

  .intake-calculator {
    padding: 12px var(--intake-gutter);
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media(max-width:520px) {
  .ticket-intake-dialog {
    --intake-gutter: 16px;
  }

  .form-grid.intake-fields,
  .intake-fields #multi-assignment .check-list {
    grid-template-columns: 1fr;
  }

  .intake-layout > .form {
    padding-top: 16px;
    gap: 14px;
  }

  .attachment-limit {
    margin-left: 0;
  }
}

@media(max-width:430px) {
  .metrics .metric {
    min-height: 112px;
    padding: 11px;
  }

  .metric-body {
    grid-template-columns: minmax(0,1fr);
    gap: 0;
  }

  .metric-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
  }

  .metric-heading svg {
    display: none;
  }
}

.procurement-toolbar {
  flex-wrap: wrap;
}

.procurement-toolbar form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.procurement-toolbar input {
  width: min(320px,65vw);
}

.procurement-toolbar .purchase-search {
  gap: 12px;
}

.purchase-search label {
  min-width: 128px;
}

.purchase-search .procurement-keyword input {
  width: min(260px,77vw);
}

.purchase-date-field {
  position: relative;
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
}

.purchase-date-actions,.purchase-date-periods {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.purchase-date-periods {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--subtle);
}

.purchase-date-periods button {
  padding: 3px 9px;
  min-height: 30px;
  border-color: transparent;
  background: transparent;
}

.purchase-date-periods button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand);
}

[data-date-trigger] {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

.purchase-date-picker {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  left: 0;
  max-width: calc(100vw - 28px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  white-space: normal;
}

.purchase-date-picker p {
  color: var(--muted);
  margin: 6px 0 0;
}

.purchase-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.purchase-calendar-nav button {
  min-width: 34px;
  min-height: 30px;
  padding: 2px;
  font-size: 18px;
}

.purchase-calendar-panels {
  display: flex;
  gap: 12px;
}

.purchase-calendar-month {
  width: clamp(235px,30vw,274px);
}

.purchase-calendar-caption {
  padding-block: 4px 8px;
  text-align: center;
}

.purchase-calendar-grid,.purchase-calendar-year {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  text-align: center;
  gap: 2px;
}

.purchase-calendar-grid span {
  color: var(--muted);
  font-weight: 500;
}

.purchase-calendar-year {
  width: 254px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
  margin-top: 8px;
}

.purchase-calendar-grid button,.purchase-calendar-year button {
  min-height: 30px;
  padding: 3px;
  border-color: transparent;
}

.purchase-calendar-grid .date-outside {
  color: var(--muted);
}

.purchase-calendar-grid .date-in-range {
  background: var(--brand-soft);
}

.purchase-date-picker [aria-pressed="true"] {
  color: #fff;
  background: var(--brand);
}

.purchase-date-picker [aria-current="date"]:not([aria-pressed="true"]) {
  color: var(--brand);
  border-color: var(--field);
}

@media(max-width: 580px) {
  .purchase-calendar-panels {
    flex-direction: column;
  }
}

.purchase-record-table {
  --table-cell-inline-padding: 8px;
  --table-end-inset: 0px;
  min-width: 1240px;
  font-size: 13px;
  background: var(--paper);
}

.purchase-record-table :is(th,td) {
  padding: 10px var(--table-cell-inline-padding);
  line-height: 1.5;
  border-color: #e8edf4;
}

.purchase-record-table th {
  color: #41536b;
  background: #f6f8fb;
  font-weight: 550;
}

.purchase-record-table .procurement-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.purchase-record-table .procurement-item-names {
  width: 24%;
  min-width: 240px;
}

.procurement-record-code,.procurement-store,.procurement-secondary {
  display: block;
}

.procurement-record-code {
  color: var(--brand-hover);
  font-size: 12px;
  font-weight: 500;
}

.procurement-store {
  margin-bottom: 4px;
  font-weight: 500;
}

.procurement-secondary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.procurement-spend {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.procurement-receipt-stack {
  display: grid;
  gap: 5px;
}

.procurement-item-name,.procurement-item-spec {
  display: block;
  overflow-wrap: anywhere;
}

.procurement-item-name { font-weight: 500; }
.procurement-item-spec { margin-top: 3px; color: var(--muted); }

.purchase-record-table .procurement-item-row td,.purchase-record-table .procurement-shared {
  vertical-align: top;
}

.purchase-record-table .purchase-record + .purchase-record tr:first-child td {
  border-top: 1px solid #e8edf4;
}

.purchase-record-table .procurement-record-total td {
  font-weight: 550;
  background: #f7f9fc;
}
.procurement-table .procurement-row-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

.procurement-row-actions .small {
  min-height: 27px;
  padding: 4px 7px;
}

.procurement-cell-value {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.procurement-table:not(.purchase-record-table) tbody tr:nth-child(even) {
  background: #f6f8fc;
}

.purchase-record-table .purchase-record:has(tr:hover) {
  background: #f7faff;
}

.purchase-record-table tbody tr:hover {
  background: transparent;
}

.procurement-table th,.procurement-table .actions {
  white-space: nowrap;
}

.procurement-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.procurement-plan,.procurement-note {
  min-width: 92px;
  max-width: 165px;
  overflow-wrap: anywhere;
}

.procurement-note {
  white-space: pre-wrap;
}

.test-products-header {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.test-products-header > .muted {
  margin-inline-start: auto;
}

.test-month-add {
  flex-shrink: 0;
}

.test-product-months {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  padding: 3px;
}

.test-product-months button[aria-current="true"] {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #becff7;
}

.test-products-table {
  min-width: 1480px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper);
}

.test-products-table :is(th,td) {
  padding: 6px 8px;
  border-inline-end: 1px solid #dfe7f2;
  border-bottom: 1px solid #dfe7f2;
  line-height: 1.45;
}

.test-products-table tbody td {
  height: 64px;
}

.test-products-table tr > :is(th[rowspan],td):last-child {
  border-inline-end: 0;
}

.test-products-table th {
  background: #eef3f9;
  font-weight: 600;
}

.test-products-table th[scope="colgroup"],.test-products-table thead tr:nth-child(2) th {
  text-align: center;
}

.test-products-table thead tr:nth-child(2) th {
  background: #f4f7fc;
  font-size: 12px;
}

.test-product-name {
  min-width: 220px;
  max-width: 340px;
  font-weight: 500;
}

.test-product-spec {
  min-width: 110px;
  max-width: 180px;
}

.test-product-preview {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.test-product-code {
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.test-product-metric {
  width: 63px;
  color: var(--ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.test-product-metric input {
  min-width: 44px;
  min-height: 28px;
  padding: 4px;
  text-align: center;
}

.test-product-note {
  min-width: 145px;
  max-width: 230px;
  overflow-wrap: anywhere;
}

.test-product-note textarea {
  display: block;
  height: 38px;
  min-height: 38px;
  padding: 4px 5px;
  resize: none;
}

.test-products-table :is(input[data-test-metric],textarea[data-test-note]) {
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  font-size: 13px;
}

.test-products-table :is(input[data-test-metric],textarea[data-test-note]):hover {
  background: #f6f9fe;
}

.test-products-table :is(input[data-test-metric],textarea[data-test-note]):focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 0;
  background: var(--paper);
}

.test-product-status {
  display: inline-block;
  color: #665222;
  font-size: 12px;
  white-space: nowrap;
}

.test-product-status.confirmed {
  color: #0e624d;
}

.test-product-status-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

.test-product-status-line .test-product-retry {
  font-size: inherit;
}

.test-product-actions {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.test-product-actions button.small {
  min-height: 25px;
  padding: 2px 5px;
  border-radius: 4px;
}

.test-product-actions button:disabled[data-action] {
  display: none;
}

@media(min-width:820px) {
  .test-products-table tr > :is(th[rowspan],td):last-child {
    position: sticky;
    inset-inline-end: 0;
    border-inline-start: 1px solid #dfe7f2;
  }

  .test-products-table td:last-child {
    background: var(--paper);
  }

  .test-products-table tbody tr:hover td:last-child {
    background: #edf4fc;
  }
}

.test-product-dialog {
  width: min(920px,calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
}

.test-product-dialog .procurement-product-menu {
  position: static;
  margin-top: 7px;
  box-shadow: none;
}

.test-product-dialog .procurement-product-menu ul {
  max-height: clamp(120px,calc(100dvh - 315px),580px);
  overscroll-behavior: contain;
}

#desktop-repair [data-desktop-repair-error]:empty {
  display: none;
}

.purchase-record-dialog {
  --purchase-gutter: 26px;
  width: min(1060px,calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  scroll-padding-bottom: 75px;
}

.purchase-record-dialog > header {
  padding-inline: var(--purchase-gutter);
}

.purchase-record-dialog > header h2 {
  font-size: 20px;
}

.purchase-record-dialog > .form {
  padding: 20px var(--purchase-gutter) 0;
}

.purchase-record-dialog > .form > .errors:empty {
  display: none;
}

.purchase-record-dialog > .form > .actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--purchase-gutter));
  padding: 12px var(--purchase-gutter);
  border-top: 1px solid var(--line);
  background: #f7faff;
}

.procurement-form-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px 16px;
  align-items: start;
}

.procurement-form-grid .required-mark {
  color: #a3243c;
  font-weight: 700;
}

.procurement-form-grid input[readonly] {
  background: var(--subtle);
  color: var(--muted);
}

.purchase-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.purchase-detail-row {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--subtle);
}

.purchase-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.purchase-detail-header :is(h3,h4) {
  margin: 0;
}

.purchase-detail-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: start;
  gap: 12px 14px;
  min-width: 0;
}

.purchase-total {
  grid-column: 1 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.procurement-product-picker {
  position: relative;
  grid-column: span 2;
  min-width: 0;
}

.procurement-product-picker > .help {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procurement-product-menu {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 5px) 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--paper);
  box-shadow: 0 12px 24px #20385f25;
  overflow: hidden;
}

.procurement-product-menu ul {
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  list-style: none;
}

.procurement-product-menu li {
  display: grid;
  gap: 4px;
  padding: 9px 12px;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.procurement-product-menu li + li {
  border-top: 1px solid var(--line);
}

.procurement-product-menu li:hover,
.procurement-product-menu li[aria-selected=true] {
  background: var(--brand-soft);
}

.procurement-product-menu li span {
  color: var(--muted);
  font-size: 12px;
}

.procurement-product-menu [role=status]:not(:empty) {
  padding: 9px 12px;
}

.procurement-product-picker > .help:empty,
.procurement-receipt-field .help:empty,
.procurement-receipt-field .errors:empty {
  display: none;
}

.procurement-invoice {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 570;
}

.procurement-invoice .check {
  min-height: 37px;
}

.procurement-note-field,.procurement-reimbursement {
  grid-column: 1 / -1;
}

.procurement-note-field textarea {
  min-height: 64px;
}

.procurement-reimbursement {
  display: grid;
  grid-template-columns: minmax(140px,1fr) minmax(0,2fr);
  align-items: start;
  gap: 12px 16px;
  margin: 0;
  min-width: 0;
  padding: 10px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--subtle);
}

.procurement-reimbursement legend {
  padding-inline: 5px;
  font-size: 13px;
  font-weight: 650;
}

.procurement-reimbursement[hidden],
.procurement-receipt-drop [hidden] {
  display: none;
}

.procurement-receipt-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.procurement-receipt-drop {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  padding: 8px;
  border: 1px dashed var(--field);
  border-radius: 11px;
  background: var(--paper);
}

.procurement-receipt-drop > div,
.procurement-receipt-drop > .help {
  flex: 1 1 150px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.procurement-receipt-drop:focus-within {
  border-color: var(--focus);
}

.procurement-receipt-drop > :is(button,label) {
  flex: none;
}

.procurement-receipt-drop .help {
  display: block;
}

.procurement-receipt-drop img {
  width: 86px;
  height: 56px;
  object-fit: contain;
  border-radius: 7px;
  background: var(--subtle);
}

.procurement-receipt-thumbnail {
  display: inline-block;
  width: 88px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  background: var(--subtle);
  vertical-align: middle;
}

.procurement-receipt-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.procurement-table-receipts {
  display: grid;
  grid-template-columns: repeat(2,38px);
  gap: 4px;
  width: max-content;
}

.procurement-table-receipts .procurement-receipt-thumbnail {
  width: 38px;
  height: 26px;
  min-height: 0;
  border-radius: 5px;
}

.procurement-receipt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(86px,1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.procurement-receipt-gallery:empty {
  display: none;
}

.procurement-receipt-gallery > :is(li,figure,div) {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.procurement-receipt-gallery img {
  display: block;
  width: 100%;
  height: 56px;
  border-radius: 6px;
  background: var(--subtle);
  object-fit: contain;
}

.procurement-receipt-gallery .small {
  min-height: 25px;
  padding: 3px 6px;
}

.procurement-event {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.procurement-event ul {
  margin: 0;
  padding-left: 1.25em;
  overflow-wrap: anywhere;
}

@media(max-width:760px) {
  .procurement-form-grid,.purchase-detail-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px) {
  .purchase-record-dialog {
    --purchase-gutter: 16px;
  }

  .procurement-form-grid,.purchase-detail-grid,.procurement-reimbursement {
    grid-template-columns: minmax(0,1fr);
  }

  .procurement-product-picker {
    grid-column: auto;
  }
}

@media (max-width: 720px), (max-width: 960px) and (pointer: coarse) {
  .layout {
    display: block;
    padding: 8px max(10px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .sidebar {
    top: max(6px, env(safe-area-inset-top));
    z-index: 3;
    height: auto;
    max-height: calc(100dvh - 20px);
    display: block;
    padding: 7px 10px;
    border-radius: 15px;
    overscroll-behavior: contain;
  }

  .sidebar-heading,.sidebar.menu-open .account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .sidebar .brand img {
    width: 34px;
    height: 34px;
  }

  .mobile-menu {
    position: relative;
    display: inline-flex;
    flex: none;
    min-height: 44px;
    padding-inline: 9px;
  }

  .mobile-menu svg {
    width: 18px;
    height: 18px;
  }

  .mobile-menu[data-unread]::after {
    content: '';
    position: absolute;
    inset: 6px 5px auto auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bc2a46;
  }

  .sidebar nav,.sidebar .account {
    display: none;
  }

  .sidebar.menu-open nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    margin: 8px 0;
  }

  .sidebar.menu-open .account {
    flex-wrap: wrap;
    margin: 0;
    padding: 8px 2px 0;
  }

  .account-text strong {
    display: inline;
    margin-right: 6px;
  }

  main {
    min-width: 0;
    padding: 17px 0 0;
  }

  .topline,.panel-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .topline {
    gap: 8px;
    margin-bottom: 12px;
  }

  .topline > .actions:empty {
    display: none;
  }

  .panel-head,.panel-body,.filters {
    padding: 12px;
  }

  .metrics {
    gap: 8px;
  }

  .detail-layout .side-col,.form-grid,.intake-fields.form-grid,.intake-fields .check-list {
    grid-template-columns: minmax(0,1fr);
  }

  .detail-meta {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }

  button:not(.link),.button, input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select {
    min-height: 44px;
  }

  input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select,textarea,.chat-editor {
    font-size: 16px;
  }

  .filters,.procurement-toolbar form {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }

  .filters label:first-child,.filter-actions,.procurement-keyword,.purchase-date-field,.procurement-toolbar form > .actions {
    grid-column: 1 / -1;
  }

  .filters label:first-child,.procurement-toolbar input,.purchase-search .procurement-keyword input {
    width: 100%;
  }

  .purchase-search label {
    min-width: 0;
  }

  .purchase-date-picker {
    width: min(100%,560px);
    max-height: min(70dvh,560px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .purchase-calendar-month,.purchase-calendar-year {
    width: 100%;
    min-width: 0;
  }

  .purchase-calendar-grid button,.purchase-calendar-year button,.purchase-calendar-nav button {
    min-height: 36px;
  }

  .table-scroll {
    max-width: 100%;
    overscroll-behavior-x: contain;
  }

  .procurement-table:not(.purchase-record-table) {
    min-width: 760px;
  }

  .mobile-table-hint {
    display: block;
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
  }

  .ticket-list-scroll {
    padding: 8px;
    overflow: visible;
    background: var(--subtle);
  }

  .ticket-table,.ticket-table :is(thead,tbody) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .ticket-table thead th:not(.review-check) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .ticket-table thead:has(.review-check) {
    margin-bottom: 8px;
  }

  .ticket-table thead .review-check {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .ticket-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start;
    gap: 5px 12px;
    padding: 8px 12px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
  }

  .ticket-table tbody tr + tr {
    margin-top: 8px;
  }

  .ticket-table tbody tr.awaiting-reply {
    border-inline-start: 3px solid #c6414d;
    background: #fff3f4;
  }

  .ticket-table .awaiting-reply td:first-child {
    box-shadow: none;
  }

  .ticket-table td {
    display: block;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ticket-table :is(.ticket-card-key,.ticket-card-description,.ticket-row-actions,tbody .review-check) {
    grid-column: 1 / -1;
  }

  .ticket-card-key {
    order: -4;
  }

  .ticket-card-priority,.ticket-card-status {
    order: -3;
  }

  .ticket-card-description {
    order: -2;
  }

  .ticket-table tbody .review-check {
    order: 1;
  }

  .ticket-table .ticket-row-actions {
    order: 2;
  }

  .ticket-table .ticket-card-key button,.ticket-description-line .ticket-description-link {
    min-height: 40px;
  }

  .ticket-table td[data-mobile-label]::before {
    content: attr(data-mobile-label);
    display: block;
    color: var(--muted);
    font-size: 11px;
  }

  .ticket-description-line {
    flex-wrap: wrap;
    gap: 3px 8px;
  }

  .ticket-description-line .ticket-description-link {
    width: 100%;
    padding-block: 5px;
    font-size: 15px;
  }

  .ticket-description-link span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ticket-table :is(td,th).review-check label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 5px;
  }

  .mobile-review-label {
    display: inline;
  }

  .ticket-table .status-cell {
    flex-wrap: wrap;
  }

  .ticket-list-scroll .issue-media-small .issue-media-tile {
    width: 44px;
    height: 44px;
  }

  .test-product-months {
    max-width: 100%;
  }

  .test-products-table :is(input[data-test-metric],textarea[data-test-note]) {
    font-size: 16px;
  }

  .test-products-table tbody td {
    height: 74px;
  }

  .test-products-table .test-product-actions button.small {
    min-height: 40px;
  }

  dialog:is(#dialog,#attachment-preview,#desktop-repair,#version-update) {
    width: min(680px,calc(100vw - 16px));
    max-height: calc(100dvh - 18px);
    border-radius: 16px;
  }

  dialog > header {
    position: sticky;
    z-index: 2;
    top: 0;
    gap: 8px;
    padding: 10px 13px;
    background: var(--paper);
  }

  dialog > header h2 {
    overflow-wrap: anywhere;
  }

  #notices {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(385px,calc(100vw - 20px));
  }
}
