:root {
  --nav-bg: #14213D;
  --nav-fg: #FFFFFF;
  --primary: #FCA311;
  --theme-navbar-bg: var(--nav-bg);
  --theme-primary: var(--primary);
  --theme-primary-contrast: #14213D;
  --theme-primary-soft: rgba(252, 163, 17, 0.16);
  --theme-primary-dark: #CF860E;
  --utility-bar-text: #FDCB73;
  --utility-bar-text-strong: #FFE1A7;
  --utility-bar-link: #FDB43C;
  --dashboard-chart-bar-start: var(--theme-primary);
  --dashboard-chart-bar-end: var(--theme-primary-dark);
  --dashboard-throughput-bar-start: var(--theme-primary);
  --dashboard-throughput-bar-end: var(--theme-primary-dark);
  --theme-nav-logo-height: 34px;
  --section-gap: 1rem;
  --site-header-height: 76px;
  --flash-toast-top: 88px;
  --shell-gap: 1rem;
  --shell-sidebar-width: 250px;
  --shell-nav-radius: 10px;
  --shell-header-underlap: 2px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: #f6f8fb;
  color: #1f2a44;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 320;
  padding: 0.45rem var(--shell-gap);
  background-color: var(--nav-bg);
  color: var(--primary);
  border-bottom: 2px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.site-header__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  min-height: 34px;
}

.site-header__brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.site-header__utility {
  display: flex;
  flex: 1 1 28rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.site-utility-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 0.65rem;
  width: 100%;
  min-height: 24px;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--utility-bar-text);
}

.site-utility-bar__item,
.site-utility-bar__action {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  min-width: 0;
  max-width: 100%;
}

.site-shell-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--theme-primary-soft);
  border-radius: var(--shell-nav-radius);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.site-shell-toggle:hover,
.site-shell-toggle:focus-visible {
  background: var(--theme-primary-soft);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.site-shell-toggle:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.site-shell-toggle__line {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.brand:visited,
.brand:hover,
.brand:focus-visible,
.brand:active {
  color: var(--primary);
  text-decoration: none;
}

.brand__logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
  border-radius: 0 !important;
  line-height: 0;
}

.brand__logo {
  display: block;
  height: var(--theme-nav-logo-height);
  width: auto;
  max-height: 80px;
  object-fit: contain;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
  border-radius: 0 !important;
}

.brand__text {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  min-height: 40px;
  padding: 0.56rem 0.9rem 0.56rem 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--shell-nav-radius);
  opacity: 0.95;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: none;
  background: var(--theme-primary-soft);
  opacity: 1;
}

.site-nav a:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.site-nav a.is-active {
  background: var(--theme-primary-soft);
  border: 1px solid var(--primary);
  border-radius: var(--shell-nav-radius);
  box-shadow: inset 3px 0 0 var(--primary);
  color: var(--primary);
  text-decoration: none;
  opacity: 1;
  font-weight: 700;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1px;
}

.site-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--theme-primary-contrast);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.site-sidebar-meta {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--theme-primary-soft);
  flex: 0 0 auto;
}

.site-sidebar-meta__utility {
  display: flex;
  align-items: stretch;
}

.site-sidebar-help,
.site-sidebar-feedback {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 0.5rem 0.9rem 0.5rem 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--shell-nav-radius);
  color: var(--primary);
  text-decoration: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.95;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.site-sidebar-help:hover,
.site-sidebar-help:focus-visible,
.site-sidebar-feedback:hover,
.site-sidebar-feedback:focus-visible {
  background: var(--theme-primary-soft);
  text-decoration: none;
  opacity: 1;
}

.site-sidebar-help:focus-visible,
.site-sidebar-feedback:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.site-sidebar-help.is-active {
  background: var(--theme-primary-soft);
  border: 1px solid var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
  color: var(--primary);
  opacity: 1;
}

.site-sidebar-build {
  padding: 0 0.95rem;
  color: var(--utility-bar-text);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  opacity: 0.9;
}

.site-utility-bar__item--tenant {
  color: var(--utility-bar-text-strong);
  font-weight: 600;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-utility-bar__item--platform {
  color: var(--utility-bar-text-strong);
  font-weight: 700;
  margin-right: auto;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-utility-bar__item--user {
  color: var(--utility-bar-text);
  font-weight: 500;
  opacity: 0.84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-auth__logout {
  margin: 0;
}

.site-account-menu {
  position: relative;
}

.site-account-menu__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  padding: 0.16rem 0.24rem 0.16rem 0.18rem;
  border: 1px solid var(--theme-primary-soft);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  color: var(--utility-bar-text-strong);
  user-select: none;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.site-account-menu__summary::-webkit-details-marker {
  display: none;
}

.site-account-menu__summary:hover,
.site-account-menu__summary:focus-visible,
.site-account-menu[open] .site-account-menu__summary {
  background: var(--theme-primary-soft);
  border-color: var(--theme-primary);
  box-shadow: inset 0 0 0 1px var(--theme-primary-soft);
}

.site-account-menu__summary:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.site-account-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.site-account-menu__summary-text {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.site-account-menu__summary-label {
  font-size: 0.64rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--utility-bar-text);
}

.site-account-menu__summary-name {
  font-size: 0.8rem;
  line-height: 1.1;
  font-weight: 600;
  color: var(--utility-bar-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.site-account-menu__chevron {
  display: inline-flex;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.1rem;
  color: var(--utility-bar-text);
  transition: transform 120ms ease, margin-top 120ms ease;
}

.site-account-menu[open] .site-account-menu__chevron {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.site-account-menu__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 420;
  min-width: 248px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--theme-primary-soft);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  color: #111827;
}

.site-account-menu__panel li {
  margin: 0;
}

.site-account-menu__meta {
  display: grid;
  gap: 0.16rem;
  padding: 0.55rem 0.65rem 0.7rem;
  border-bottom: 1px solid var(--theme-primary-soft);
  margin-bottom: 0.3rem;
}

.site-account-menu__meta strong {
  font-size: 0.86rem;
  line-height: 1.25;
  color: #111827;
}

.site-account-menu__meta span {
  font-size: 0.78rem;
  line-height: 1.25;
  color: #6b7280;
}

.site-account-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.site-account-menu__link:hover,
.site-account-menu__link:focus-visible {
  background: var(--theme-primary-soft);
  color: #111827;
  text-decoration: none;
}

.site-account-menu__link:focus-visible {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 1px;
}

.site-account-menu__link.is-active {
  background: var(--theme-primary-soft);
  box-shadow: inset 3px 0 0 var(--theme-primary);
  color: #111827;
  text-decoration: none;
}

.site-account-menu__form {
  margin: 0;
}

.site-account-menu__link--button {
  appearance: none;
}

.site-account-menu__divider {
  height: 1px;
  margin: 0.3rem 0;
  background: var(--theme-primary-soft);
}

.site-auth__link {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--utility-bar-link);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.95;
  white-space: nowrap;
}

.site-auth__link:hover,
.site-auth__link:focus-visible {
  color: var(--utility-bar-text-strong);
  opacity: 0.82;
}

.dev-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--theme-primary-soft);
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-shell {
  position: relative;
  min-width: 0;
  padding: 0 var(--shell-gap);
}

.app-shell__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-shell__backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15, 23, 42, 0.42);
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 260;
  width: min(82vw, 280px);
  box-sizing: border-box;
  padding: 1rem 0.8rem 1.25rem;
  background: var(--nav-bg);
  border-right: 1px solid var(--theme-primary-soft);
  box-shadow: none;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 160ms ease;
}

.app-sidebar__inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

.app-sidebar__nav-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.12rem;
  scrollbar-gutter: stable;
}

body.is-shell-nav-open {
  overflow: hidden;
}

body.is-shell-nav-open .app-sidebar {
  transform: translateX(0);
}

.container {
  width: 100%;
  box-sizing: border-box;
  margin: 0.85rem auto 0;
  padding: 1rem 16px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(31, 42, 68, 0.08);
}

@media (min-width: 768px) {
  .site-header {
    padding: 0.42rem 1rem;
  }

  .container {
    padding: 1.5rem 20px;
  }
}

@media (min-width: 1100px) {
  .site-header__main {
    flex-wrap: nowrap;
  }

  .site-utility-bar {
    flex-wrap: nowrap;
  }

  .app-shell--with-sidebar {
    display: block;
    padding-left: calc(var(--shell-sidebar-width) + var(--shell-gap));
  }

  .app-shell--with-sidebar.app-shell--sidebar-hidden,
  .shell-sidebar-hidden .app-shell--with-sidebar {
    padding-left: var(--shell-gap);
  }

  .app-sidebar {
    position: fixed;
    top: calc(var(--site-header-height) - var(--shell-header-underlap));
    left: 0;
    bottom: 0;
    width: var(--shell-sidebar-width);
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    transform: none;
  }

  .app-sidebar__inner {
    position: static;
    height: calc(100svh - var(--site-header-height) + var(--shell-header-underlap));
    min-height: calc(100svh - var(--site-header-height) + var(--shell-header-underlap));
    max-height: calc(100svh - var(--site-header-height) + var(--shell-header-underlap));
    padding: 1rem 0.8rem 1.25rem;
    overflow: hidden;
  }

  .app-shell__content {
    min-height: calc(100svh - var(--site-header-height));
  }

  .app-shell--sidebar-hidden .app-sidebar,
  .shell-sidebar-hidden .app-shell--with-sidebar .app-sidebar {
    display: none;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1180px;
    padding: 1.75rem 24px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
    padding: 2rem 24px;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.ticket-edit-header {
  align-items: flex-start;
}

.page-header .actions {
  margin-left: auto;
  justify-content: flex-end;
}

.page-header form {
  margin: 0;
}

.page-header__content {
  flex: 1 1 22rem;
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 1.1vw + 1.15rem, 1.95rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.page-header__aside {
  flex: 0 1 auto;
  min-width: 0;
}

.page-header__aside--documents {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  max-width: min(100%, 42rem);
}

.document-action-stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

.document-action-stack {
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  max-width: min(100%, 42rem);
}

.tickets-list-header {
  margin-bottom: 0;
}

.tickets-list-filters {
  row-gap: 0.85rem;
}

.tickets-list-toggle-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: end;
  gap: 0.35rem 0.9rem;
}

.tickets-list-toggle-group .field.checkbox {
  margin: 0;
  flex-wrap: nowrap;
  gap: 0.45rem;
  min-height: auto;
  padding: 0;
}

.tickets-list-toggle-group .field.checkbox label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: auto;
  margin: 0;
  white-space: nowrap;
}

.muted {
  color: #6b7280;
  margin: 0.3rem 0 0;
  opacity: 0.7;
}

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

.error-detail-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
}

.error-detail-card--message {
  grid-column: 1 / -1;
}

.error-detail-card__label {
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-detail-card__value {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.error-detail-card__value code {
  font-size: 0.92rem;
}

.error-detail-card--message .error-detail-card__value {
  font-weight: 500;
  color: #374151;
}

.error-page-actions {
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  height: 36px;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  line-height: 1.2;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 550;
  cursor: pointer;
  font: inherit;
  appearance: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--theme-primary-contrast);
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--theme-primary-dark);
  border-color: var(--theme-primary-dark);
  color: var(--theme-primary-contrast);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1099px) {
  .site-header {
    padding: 0.45rem var(--shell-gap);
  }

  .site-header__utility,
  .site-utility-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .site-header__utility {
    flex-basis: 100%;
  }

  .app-sidebar {
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  }

  .site-nav {
    gap: 0.08rem;
  }

  .site-nav a {
    min-height: 40px;
    padding-top: 0.52rem;
    padding-bottom: 0.52rem;
  }
}

@media (max-width: 768px) {
  .app-shell {
    padding: 0 0.75rem 1rem;
  }

  .site-header {
    padding: 0.38rem 0.75rem;
  }

  .site-header__main {
    flex-wrap: nowrap;
    gap: 0.3rem 0.55rem;
    min-height: 32px;
  }

  .site-header__brand-row,
  .site-header__utility,
  .site-utility-bar {
    min-width: 0;
  }

  .site-header__brand-row {
    flex: 1 1 auto;
    gap: 0.45rem;
  }

  .site-header__utility {
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-end;
    overflow: hidden;
  }

  .site-utility-bar {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.15rem 0.45rem;
    font-size: 0.74rem;
    overflow: hidden;
  }

  .site-utility-bar > .site-utility-bar__item:not(.site-utility-bar__item--tenant):not(.site-utility-bar__item--platform):not(.site-utility-bar__item--user) {
    display: none;
  }

  .site-utility-bar__item,
  .site-utility-bar__action,
  .site-auth__logout {
    min-width: 0;
    flex: 0 1 auto;
  }

  .site-utility-bar__item--tenant,
  .site-utility-bar__item--platform,
  .site-utility-bar__item--user {
    margin-right: 0;
    max-width: 9.5rem;
  }

  .site-account-menu__summary {
    min-height: 32px;
    padding-right: 0.18rem;
  }

  .site-account-menu__summary-text {
    display: none;
  }

  .site-account-menu__panel {
    min-width: min(18rem, calc(100vw - 1.5rem));
    right: -0.1rem;
  }

  .brand,
  .brand__text,
  .site-utility-bar__item--tenant,
  .site-utility-bar__item--platform,
  .site-utility-bar__item--user {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-auth__link {
    font-size: 0.74rem;
  }

  .app-sidebar {
    width: min(86vw, 320px);
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  .app-sidebar__inner {
    gap: 0.7rem;
    height: 100%;
    padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 0.75rem 1rem;
  }

  .site-nav {
    gap: 0.08rem;
  }

  .site-nav a {
    min-height: 40px;
    padding: 0.52rem 0.9rem 0.52rem 1rem;
  }

  .container {
    margin-top: 0.65rem;
    padding: 0.9rem 12px;
    border-radius: 12px;
  }

  .site-feedback-dialog {
    width: calc(100vw - 1rem);
  }

  .site-feedback-dialog__form {
    padding: 1rem;
  }

  .site-feedback-dialog__header {
    flex-direction: column;
  }

  .site-feedback-dialog__header .btn {
    align-self: flex-end;
  }

  .site-feedback-dialog__kind {
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    padding: 0.85rem;
  }

  .card h2,
  .card-header {
    margin: -0.85rem -0.85rem 0.85rem -0.85rem;
    padding: 0.55rem 0.85rem;
  }

  .page-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .page-header__content,
  .page-header__aside {
    flex-basis: 100%;
    width: 100%;
  }

  .page-header__aside--documents {
    margin-left: 0;
    max-width: none;
  }

  .page-header .actions,
  .filters .actions,
  .lookup-list-filters .actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .filters {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .filters.filters-inline {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .filters.filters-inline .field,
  .lookup-list-filters .field:first-child {
    min-width: 0;
    max-width: none;
  }

  .form-grid {
    gap: 0.85rem;
  }

  .field label {
    line-height: 1.35;
  }

  .field input,
  .field select,
  .field textarea,
  .readonly {
    font-size: 16px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .actions,
  .btn-group,
  .inline-form {
    flex-wrap: wrap;
  }

  .inline-form input {
    width: 100%;
  }

  .btn {
    min-height: 40px;
    height: auto;
  }

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

  .list-table {
    min-width: 640px;
  }

  .data-table {
    font-size: 0.92rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.68rem 0.62rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.35rem 0.65rem;
  }

  .site-header__main {
    gap: 0.25rem 0.45rem;
  }

  .site-shell-toggle {
    width: 34px;
    height: 34px;
  }

  .brand {
    gap: 0.42rem;
  }

  .brand__text {
    max-width: 8rem;
    font-size: 0.88rem;
  }

  .site-utility-bar {
    gap: 0.1rem 0.4rem;
    font-size: 0.72rem;
  }

  .site-utility-bar__item--tenant,
  .site-utility-bar__item--platform,
  .site-account-menu__summary-name {
    display: none;
  }

  .site-utility-bar__item--user {
    max-width: 8.25rem;
  }

  .site-account-menu__panel {
    right: 0;
    min-width: min(16rem, calc(100vw - 1.25rem));
  }

  .container {
    padding: 0.82rem 10px;
  }

  .card {
    padding: 0.8rem;
  }

  .card h2,
  .card-header {
    margin: -0.8rem -0.8rem 0.8rem -0.8rem;
    padding: 0.52rem 0.8rem;
  }

  .list-table {
    min-width: 100%;
  }

  .list-table th,
  .list-table td,
  .data-table th.actions-col,
  .data-table td.actions-col {
    white-space: normal;
  }

  .data-table th.actions-col,
  .data-table td.actions-col,
  .lookup-list-table th.actions-col,
  .lookup-list-table td.actions-col {
    width: auto;
    min-width: 0;
  }

  .data-table .actions-col .btn-group,
  .data-table .actions-col .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }
}

.btn--secondary {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}

.btn--danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: #374151;
}

.btn--outline {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn--outline:hover,
.btn--outline:focus {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.btn--sm {
  height: 30px;
  padding: 0.25rem 0.6rem;
  font-size: 0.84rem;
}

.btn:disabled,
.btn[disabled],
a.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}


.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filters.filters-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filters.filters-inline .field {
  min-width: 180px;
}

.lookup-list-filters {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.lookup-list-filters .field:first-child {
  max-width: 520px;
}

.lookup-list-filters .field.checkbox {
  grid-column: 1;
}

.lookup-list-filters .actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
}

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: #4b5563;
}

.help-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.3rem;
  vertical-align: text-top;
  z-index: 1;
}

.page-header h1 .help-inline,
.frame-header .help-inline,
.dashboard-stat-card__label .help-inline,
.summary-label .help-inline,
.data-table th .help-inline {
  vertical-align: middle;
}

.help-icon {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  font: inherit;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #4b5563;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
  cursor: help;
}

.help-icon:focus-visible {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}

.help-tooltip {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  max-width: 260px;
  width: max-content;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.help-inline:hover,
.help-inline:focus-within {
  z-index: 1401;
}

.help-inline:hover .help-tooltip,
.help-icon:focus-visible + .help-tooltip {
  opacity: 1;
  visibility: visible;
}

body.js-help-tooltips .help-tooltip {
  display: none;
}

.help-tooltip-layer {
  position: fixed;
  left: 0;
  top: 0;
  max-width: min(320px, calc(100vw - 16px));
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  z-index: 12000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0);
  transition: opacity 120ms ease;
}

.help-tooltip-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.field input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}

.field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 18px;
}

.field input.account-code {
  text-transform: uppercase;
}

.input-prefix {
  position: relative;
}

.input-prefix__symbol {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  font-size: 0.95rem;
}

.field input.input-with-prefix {
  padding-left: 1.7rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form .actions {
  margin-top: 0.35rem;
}

.filters .actions {
  align-self: end;
  align-items: flex-end;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.print-actions {
  display: grid;
  gap: 0.35rem;
  width: max-content;
  max-width: 100%;
}

.print-actions__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.print-actions__form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  position: relative;
  flex-wrap: wrap;
}

.print-actions__status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.print-actions__note {
  margin: 0.35rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.print-actions__status.is-error {
  color: #b91c1c;
}

.print-actions__status.is-success {
  color: #166534;
}

.documents-panel {
  margin: 0 0 1rem;
  padding: 0.7rem 0.95rem 0.75rem 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dee7;
  border-radius: 14px;
  background: #f8fafc;
}

.documents-strip {
  margin-bottom: 1rem;
}

.documents-panel--header {
  width: auto;
  max-width: 100%;
  margin: 0 0 0 auto;
}

.documents-panel--header .documents-panel__groups {
  gap: 0.35rem;
  justify-items: stretch;
}

.documents-panel--header .documents-group {
  grid-template-columns: minmax(8.5rem, 10.5rem) max-content;
  gap: 0.4rem 0.95rem;
  justify-content: start;
  justify-items: start;
}

.documents-panel--header .documents-group__actions {
  justify-self: start;
}

.documents-panel--header .documents-group__label {
  justify-self: start;
  text-align: left;
  padding-right: 0.2rem;
}

.documents-panel--header .documents-group .print-actions {
  width: auto;
}

.documents-panel--header .documents-group .print-actions__form,
.documents-panel--header .documents-group .print-actions__row {
  justify-content: flex-start;
}

.documents-panel__groups {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.documents-group {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.1rem 0;
}

.documents-group__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.documents-group__actions {
  min-width: 0;
}

.documents-group .print-actions {
  width: 100%;
  min-width: 0;
}

.documents-group .print-actions__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.documents-group .print-actions__row {
  justify-content: flex-start;
}

.documents-group__hint {
  grid-column: 2;
  margin: 0;
  font-size: 0.82rem;
}

.ticket-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.ticket-header-actions__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: max-content;
  max-width: 100%;
}

.ticket-header-actions__primary > * {
  flex: 0 0 auto;
}

.ticket-print-status-inline {
  width: min(640px, 100%);
  padding: 0.35rem 0.5rem;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 0.85rem;
}

.ticket-print-status-inline code {
  font-size: 0.82rem;
  background: rgba(15, 23, 42, 0.08);
  padding: 0 0.2rem;
  border-radius: 4px;
}

.ticket-print-availability-hint {
  margin: 0;
  width: 100%;
  text-align: right;
}

.ticket-print-receipt-link {
  width: min(640px, 100%);
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.wtn-signature-tools {
  margin: 0 0 var(--section-gap);
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.wtn-signature-tools__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 1rem;
}

.wtn-signature-tools__header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.wtn-signature-tools__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.14rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 600;
}

.wtn-signature-tools__status.is-signed {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.wtn-signature-tools__status.is-partial {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.wtn-signature-tools__status.is-pending {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.wtn-signature-tools__body {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.wtn-signature-tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.wtn-signature-role {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.wtn-signature-role__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.wtn-signature-role__header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.wtn-signature-tools__preview-wrap {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.35rem;
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtn-signature-tools__preview {
  display: block;
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  margin: 0 auto;
}

.wtn-signature-tools__placeholder {
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.wtn-signature-tools__meta {
  margin: 0;
  font-size: 0.84rem;
}

.wtn-signature-tools__meta-stack {
  display: grid;
  gap: 0.18rem;
  min-height: 2.45rem;
  align-content: start;
}

.wtn-signature-tools__meta.is-placeholder {
  color: #9ca3af;
}

.wtn-signature-dialog {
  width: min(44rem, calc(100% - 2rem));
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0;
}

.wtn-signature-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.wtn-signature-dialog form {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
}

.wtn-signature-dialog h3 {
  margin: 0;
  font-size: 1rem;
}

.wtn-signature-dialog__canvas {
  width: 100%;
  height: 220px;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.wtn-signature-dialog__error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  .print-actions {
    width: 100%;
  }

  .print-actions__row {
    width: 100%;
  }

  .print-actions__form {
    width: 100%;
    flex-wrap: wrap;
  }

  .print-actions__form > .btn {
    flex: 1 1 auto;
  }

  .documents-group {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .documents-group__hint {
    grid-column: auto;
  }

  .documents-panel {
    padding-inline: 0.75rem;
  }

  .page-header__content,
  .page-header__aside {
    flex-basis: 100%;
    width: 100%;
  }

  .page-header__aside--documents {
    margin-left: 0;
    max-width: none;
  }

  .document-action-stack {
    width: 100%;
    max-width: none;
    align-items: stretch;
  }

  .document-email-summary .muted {
    text-align: left;
    white-space: normal;
  }

  .documents-panel--header {
    width: 100%;
    margin-left: 0;
  }

  .documents-panel--header .documents-group {
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
  }

  .documents-panel--header .documents-group .print-actions,
  .documents-panel--header .documents-group .print-actions__form,
  .documents-panel--header .documents-group .print-actions__row {
    width: 100%;
    justify-content: flex-start;
  }

  .ticket-header-actions {
    width: 100%;
    align-items: stretch;
  }

  .ticket-header-actions__primary {
    width: 100%;
    justify-content: flex-start;
  }

  .ticket-print-availability-hint {
    text-align: left;
  }

  .ticket-print-receipt-link {
    width: 100%;
    justify-content: flex-start;
  }

}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.tabs .btn {
  height: 34px;
  padding: 0.4rem 0.75rem;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.tabs .btn.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  font-weight: 600;
}

.template-vars-disclosure {
  border-color: #d6dde7;
  background: #f8fafc;
}

.template-vars-disclosure .frame-header {
  background: #edf2f7;
  border-bottom-color: #d6dde7;
  color: #1f2937;
}

.template-vars-disclosure .frame-body {
  display: grid;
  gap: 0.9rem;
  background: #f8fafc;
}

.template-vars-section {
  display: grid;
  gap: 0.3rem;
}

.template-vars-section h2 {
  margin: 0;
  font-size: 0.92rem;
}

.template-vars-section p {
  margin: 0;
}

.template-vars-list {
  margin: 0;
  padding-left: 1rem;
}

.template-vars-list li {
  margin: 0.2rem 0;
}

.template-vars-name-list {
  columns: 3 16rem;
  column-gap: 1.25rem;
}

.template-vars-name-list li {
  break-inside: avoid;
}

.template-vars-code {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
}


.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.table-wrap.list-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.76rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  vertical-align: middle;
  transition: background-color 120ms ease;
}

.data-table .status-col {
  min-width: 120px;
}

.data-table td.type-col {
  min-width: 90px;
  color: #1f2a44;
  font-size: 0.9rem;
}

.data-table td.type-col.type-col--system {
  color: #6b7280;
}

.data-table .weights-col {
  min-width: 140px;
}

.list-table {
  table-layout: auto;
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.list-table th,
.list-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.lookup-list-table .lookup-col-type {
  width: 140px;
}

.lookup-list-table .lookup-col-status {
  width: 130px;
}

.lookup-list-table .lookup-col-actions {
  width: 220px;
}

.lookup-list-table .lookup-col-name {
  width: 280px;
}

.lookup-list-table {
  table-layout: fixed;
}

.lookup-list-table th.status-col,
.lookup-list-table td.status-col {
  width: 130px;
  min-width: 130px;
}

.lookup-list-table th.actions-col,
.lookup-list-table td.actions-col {
  width: 220px;
  min-width: 220px;
}

.lookup-list-table tr.lookup-row--system-default td {
  background: #f3f4f6;
  color: #374151;
}

.printing-templates-table tr.lookup-row--system-default td {
  background: #f3f4f6;
  color: #374151;
}

.table-wrap.list-table-wrap.customers-table-wrap {
  overflow: visible;
}

.customers-table {
  table-layout: auto;
  width: 100%;
  min-width: 0;
}

.customers-table th.customer-account-col,
.customers-table td.customer-account-col {
  width: 160px;
}

.customers-table th.customer-name-col,
.customers-table td.customer-name-col {
  width: 240px;
}

.customers-table th.terms-col,
.customers-table td.terms-col {
  width: 96px;
}

.customers-table th.pricing-col,
.customers-table td.pricing-col {
  width: 72px;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.customers-table th.flags-col,
.customers-table td.flags-col {
  width: auto;
  padding-left: 0.65rem;
}

.customers-table td.flags-col {
  white-space: normal;
}

.customers-table .customer-terms {
  display: inline-block;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 500;
}

.customers-table .customer-terms--empty {
  font-size: 0.95rem;
  font-weight: 600;
}

.customers-table .pricing-indicator {
  color: inherit;
  font-size: 0.95rem;
  font-weight: 400;
}

.customers-table td.flags-col .status-stack {
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tickets-table th,
.tickets-table td {
  white-space: nowrap;
}

.tickets-table .status-col,
.tickets-table .weights-col {
  min-width: 0;
}

.tickets-table th.status-col,
.tickets-table td.status-col {
  width: 112px;
  min-width: 112px;
}

.tickets-table td.status-col {
  overflow: visible;
}

.tickets-table th.type-col,
.tickets-table td.type-col {
  width: 90px;
  min-width: 90px;
}

.tickets-table th.wtn-col,
.tickets-table td.wtn-col {
  width: 102px;
  min-width: 102px;
}

.products-table {
  table-layout: fixed;
  width: 100%;
}

.products-table th,
.products-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-table .products-col-code {
  width: 180px;
}

.products-table .products-col-description {
  width: 270px;
}

.products-table .products-col-product-type {
  width: 120px;
}

.products-table .products-col-basis {
  width: 90px;
}

.products-table .products-col-unit {
  width: 120px;
}

.products-table .products-col-unit-price {
  width: 130px;
}

.products-table .products-col-tax-rate {
  width: 110px;
}

.products-table .products-col-actions {
  width: 210px;
}

.products-table td.description-col,
.products-table td.unit-col {
  max-width: 0;
}

.product-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.product-flag--sale {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.product-flag--waste {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.product-flag--weight {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.product-flag--count {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.product-flag--empty {
  border-color: transparent;
  background: transparent;
  color: #64748b;
  padding-inline: 0;
}

.products-table .tax-rate-col {
  min-width: 110px;
  text-align: right;
}

.products-table .unit-price-col {
  min-width: 130px;
  text-align: right;
}

.products-groups-table .products-groups-col-name {
  width: 280px;
}

.products-groups-table {
  table-layout: fixed;
}

.products-groups-table .products-groups-col-nominal {
  width: 140px;
}

.products-groups-table .products-groups-col-count {
  width: 110px;
}

.products-groups-table .products-groups-col-status {
  width: 130px;
}

.products-groups-table .products-groups-col-actions {
  width: 300px;
}

.products-groups-table th.status-col,
.products-groups-table td.status-col {
  width: 130px;
  min-width: 130px;
}

.products-groups-table th.actions-col,
.products-groups-table td.actions-col {
  width: 300px;
  min-width: 300px;
}

.data-row-link {
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: var(--theme-primary-soft);
}

.data-row-link:focus-visible td {
  background: var(--theme-primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.numeric-col {
  text-align: right !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}

.num {
  text-align: right !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}

.data-table .actions-col {
  width: 1%;
  white-space: nowrap;
}

.data-table th.actions-col {
  text-align: right;
}

.data-table .actions-col .btn-group {
  justify-content: flex-end;
  gap: 0.35rem;
}

.data-table .actions-col .actions {
  white-space: nowrap;
  flex-wrap: nowrap;
}

.data-table .actions-col .btn {
  height: 30px;
  padding: 0.25rem 0.6rem;
  font-size: 0.84rem;
  flex: 0 0 auto;
}

.printing-destinations-table-wrap {
  overflow-x: visible;
}

.printing-templates-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.printing-templates-table th,
.printing-templates-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.printing-templates-table .templates-col-code {
  width: 24%;
}

.printing-templates-table .templates-col-description {
  width: 28%;
}

.printing-templates-table .templates-col-document-type {
  width: 12%;
}

.printing-templates-table .templates-col-format {
  width: 10%;
}

.printing-templates-table .templates-col-status {
  width: 130px;
}

.printing-templates-table .templates-col-actions {
  width: 220px;
}

.printing-template-code-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.printing-template-code-cell .table-cell-truncate {
  flex: 1 1 auto;
  min-width: 0;
}

.printing-destinations-table-wrap,
.printing-destinations-table-wrap.table-wrap,
.printing-destinations-table-wrap.table-wrap.list-table-wrap {
  overflow: visible;
}

.printing-destinations-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.printing-destinations-table th,
.printing-destinations-table td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.65rem;
}

.printing-destinations-table th {
  overflow: visible;
}

.printing-destinations-table th .help-tooltip {
  top: calc(100% + 0.35rem);
  bottom: auto;
}

.printing-destinations-table .destinations-col-default .help-tooltip {
  left: auto;
  right: calc(100% + 0.35rem);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.printing-destinations-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.printing-destinations-table .destinations-col-name {
  width: 16%;
}

.printing-destinations-table .destinations-col-document-type {
  width: 12%;
}

.printing-destinations-table .destinations-col-default {
  width: 8%;
}

.printing-destinations-table .destinations-col-template {
  width: 20%;
}

.printing-destinations-table .destinations-col-delivery {
  width: 14%;
}

.printing-destinations-table .destinations-col-status {
  width: 8%;
  min-width: 0;
}

.printing-destinations-table .destinations-col-actions {
  width: 22%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}

.printing-destination-name,
.printing-destination-document-type,
.printing-destination-delivery-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.printing-destination-name {
  display: inline-block;
  max-width: 100%;
  font-weight: 500;
  line-height: 1.2;
}

.printing-destination-document-type {
  display: inline-block;
  max-width: 100%;
}

.printing-destination-delivery-type {
  display: inline-block;
  max-width: 100%;
  font-size: 0.9rem;
  color: #4b5563;
}

.printing-destination-actions-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  width: 100%;
}

.printing-destination-form .frame-body {
  display: grid;
  gap: 0.75rem;
}

.printing-destination-form .frame-body .hint {
  margin-top: 0.22rem;
  font-size: 0.8rem;
}

.printing-jobs-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.printing-jobs-table th,
.printing-jobs-table td {
  padding: 0.3rem 0.5rem;
  vertical-align: middle;
  line-height: 1.25;
}

.printing-jobs-table .jobs-col-id {
  width: 5%;
}

.printing-jobs-table .jobs-col-ticket {
  width: 11%;
}

.printing-jobs-table .jobs-col-doc-type {
  width: 12%;
}

.printing-jobs-table .jobs-col-template {
  width: 9%;
}

.printing-jobs-table .jobs-col-target {
  width: 15%;
}

.printing-jobs-table .jobs-col-status {
  width: 8%;
}

.printing-jobs-table .jobs-col-when {
  width: 10%;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.printing-jobs-table .jobs-col-error {
  width: 17%;
}

.printing-job-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.88rem;
  color: #6b7280;
}

.printing-jobs-table .jobs-col-doc-type .table-cell-truncate {
  max-width: 10rem;
}

.printing-jobs-table .jobs-col-template,
.printing-jobs-table .jobs-col-target {
  white-space: nowrap;
}

.printing-jobs-table .jobs-col-template .table-cell-truncate {
  max-width: 8rem;
}

.printing-jobs-table .jobs-col-target .table-cell-truncate {
  max-width: 12rem;
}

.printing-jobs-table td.jobs-col-ticket {
  font-weight: 600;
  color: #111827;
}

.printing-jobs-table .status-pill {
  padding: 2px 6px;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 0;
}

.printing-jobs-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.printing-jobs-table tbody tr:hover {
  background: #f3f4f6;
}

.printing-jobs-table tbody tr.printing-job-row--failed {
  background: #fff6f6;
}

.printing-jobs-table tbody tr.printing-job-row--failed:hover {
  background: #fee2e2;
}

.printing-job-error {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  color: #8b1c1c;
}

.printing-job-error-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #fca5a5;
  color: #7f1d1d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}

.status-pill.status-open {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.status-pill.status-active {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.status-pill.status-complete {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-pill.status-paid {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-pill.status-draft {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.status-pill.status-stop {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.status-pill.status-void {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.status-pill.status-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-stack {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
}

.ticket-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.06rem 0.36rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ticket-kind-badge--sale {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.ticket-kind-badge--waste {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.ticket-kind-badge--goods {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.data-table th {
  background: #f6f8fb;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.truncate {
  display: inline-block;
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.truncate--sm {
  max-width: 8rem;
}

.truncate--md {
  max-width: 14rem;
}

.truncate--lg {
  max-width: 24rem;
}

.table-cell-truncate {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-col {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
}

.badge--muted {
  background: #eee;
  color: #666;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 0.35rem;
  line-height: 1.2;
}

.status-void {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.status-text {
  font-weight: 600;
}

.status-text.status-open {
  color: #92400e;
}

.status-text.status-complete {
  color: #166534;
}

.status-text.status-paid {
  color: #166534;
}

.status-text.status-draft {
  color: #92400e;
}

.status-text.status-void {
  color: #6b7280;
}

.empty {
  text-align: left;
  white-space: normal;
  color: #6b7280;
  padding: 1.25rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.pager-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pager-links a {
  margin-left: 0;
}

.pager-links a:hover,
.pager-links a:focus {
  text-decoration: none;
}

.pagination-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pagination-form__label {
  font-size: 0.95rem;
  color: #374151;
}

.pagination-form input[type="number"] {
  width: 5.5rem;
}

.pagination-form__meta {
  white-space: nowrap;
}

.link-muted {
  color: #9ca3af;
}

.link-muted:hover,
.link-muted:focus {
  color: #6b7280;
}

.alert {
  background: #fff3cd;
  border: 1px solid #f5c2c7;
  color: #664d03;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Warning banner (non-blocking) */
.alert.alert--warning {
  border-color: #f0c36d;
  background: #fff6d6;
  color: #3b2f00;
}

.alert.alert--danger {
  border-color: #f5c2c7;
  background: #fde8e8;
  color: #7f1d1d;
}

.alert.alert--success {
  border-color: #86efac;
  background: #dcfce7;
  color: #14532d;
}

.alert ul {
  margin: 0;
  padding-left: 1.25rem;
}

.flash-toasts {
  position: fixed;
  top: var(--flash-toast-top);
  right: 16px;
  z-index: 9999;
  width: calc(100vw - 32px);
  max-width: 520px;
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}

.flash-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 250ms ease, transform 250ms ease;
}

.flash-toast--success {
  border-color: #bbf7d0;
}

.flash-toast--error {
  border-color: #f5c2c7;
}

.flash-toast.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

.flash-toast__content ul {
  margin: 0;
  padding-left: 1.15rem;
}

.flash-toast__close {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flash-toast__close:hover {
  background: #f3f4f6;
}

.flash-toast__close:focus-visible {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}

.overwrite-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin-top: 0.5rem;
}

.overwrite-actions {
  display: flex;
  gap: 0.5rem;
}

.overwrite-alert .btn {
  white-space: nowrap;
}

.ticket-form {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.card {
  padding: 1rem 1.05rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  overflow: visible;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.page-header + .card {
  margin-top: var(--section-gap);
}

.card + .card {
  margin-top: var(--section-gap);
}

.card + .frame,
.frame + .card {
  margin-top: var(--section-gap);
}

.page-header + .ticket-form {
  margin-top: var(--section-gap);
}

.ticket-form .card + .card {
  margin-top: 0;
}

.ticket-form .frame + .frame {
  margin-top: 0;
}

.ticket-form .card,
.ticket-form .frame {
  overflow: visible;
}

.card h2 {
  margin: -1rem -1rem 1rem -1rem;
  padding: 0.6rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: #f6f8fb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 12px 12px 0 0;
}

.card-header {
  margin: -1rem -1rem 1rem -1rem;
  padding: 0.6rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: #f6f8fb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 12px 12px 0 0;
}

.card-body {
  display: block;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.ticket-meta a {
  color: inherit;
  text-decoration: underline;
}

.ticket-credit-banner {
  margin-bottom: 1rem;
}

.ticket-credit-banner__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.ticket-credit-banner__values > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-credit-banner__label {
  font-weight: 600;
}

.frame {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  overflow: visible;
}

.stacked-frames {
  display: grid;
  gap: 1rem;
}

.platform-admin-stack {
  display: grid;
  gap: 1.25rem;
}

.help-template-frames > .frame + .frame {
  margin-top: 0.15rem;
}

.frame-header {
  background: #f3f4f6;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  border-radius: 10px 10px 0 0;
}

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

.ticket-form fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.frame-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

details.frame:not([open]) .frame-header {
  border-bottom: none;
  border-radius: 10px;
}

.frame-body {
  padding: 1rem;
}

.platform-maintenance-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.platform-maintenance-card .actions {
  margin-top: 0;
}

.platform-confirmation-dialog {
  width: min(calc(100vw - 2rem), 34rem);
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.platform-confirmation-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.platform-confirmation-dialog__header {
  padding: 1rem 1rem 0;
}

.platform-confirmation-dialog__header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.platform-confirmation-copy {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem;
  color: #374151;
}

.platform-confirmation-copy p {
  margin: 0;
}

.platform-confirmation-field {
  padding: 0 1rem;
}

.platform-confirmation-field input {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.platform-confirmation-dialog .actions {
  justify-content: flex-end;
  padding: 0 1rem 1rem;
}

.template-vars-table {
  table-layout: fixed;
  width: 100%;
  min-width: 980px;
}

.template-vars-table th,
.template-vars-table td {
  white-space: normal;
  vertical-align: top;
}

.template-vars-table th {
  text-align: left;
}

.template-vars-table .template-vars-col-variable {
  width: 28%;
}

.template-vars-table .template-vars-col-description {
  width: 38%;
}

.template-vars-table .template-vars-col-example {
  width: 34%;
}

.template-vars-table code {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.frame.compact .frame-header {
  padding: 0.45rem 1rem;
}

.frame.compact .frame-body {
  padding: 0.75rem 1rem;
}

.ticket-void-frame {
  margin-top: var(--section-gap);
  border-color: #f5c2c7;
  background: #fff8f8;
}

.po-inline-field {
  scroll-margin-top: 1rem;
}

.po-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.po-inline-row .readonly {
  flex: 1 1 240px;
}

.po-inline-details {
  margin: 0;
}

.po-inline-details > summary {
  list-style: none;
}

.po-inline-details > summary::-webkit-details-marker {
  display: none;
}

.po-inline-editor {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.5rem;
}

.ticket-void-frame .frame-header {
  background: #fde8e8;
  border-bottom-color: #f5c2c7;
  color: #7f1d1d;
}

.ticket-void-frame .frame-body {
  background: #fff8f8;
}

.ticket-void-actions {
  margin-top: 0.75rem;
}

.ticket-detail-back-actions {
  margin-top: 0.75rem;
}

.compliance-frame {
  position: relative;
  overflow: visible;
  z-index: 12;
}

.compliance-frame .frame-body {
  overflow: visible;
}

.product-main-card {
  position: relative;
  overflow: visible;
  z-index: 8;
}

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

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

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

.ticket-material-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  align-items: start;
}

.ticket-material-grid__flags-column {
  min-width: 0;
}

.ticket-operation-flags {
  display: grid;
  gap: 0.35rem;
}

.ticket-operation-flags__title {
  margin: 0 0 0.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

.ticket-operation-flags .field.checkbox {
  margin: 0;
}

.ticket-operation-flags .field.checkbox + .field.checkbox {
  margin-top: 0.1rem;
}

.ticket-operation-flags .field.checkbox label {
  margin-bottom: 0;
}

.field--span-2 {
  grid-column: span 2;
}

.field select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  box-sizing: border-box;
}

.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.35;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.6rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 0.25rem 0;
}

.checkbox label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: 1 1 calc(100% - 24px);
  cursor: pointer;
}

.checkbox .help-inline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 0;
}

.help {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.readonly {
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
}

.field-secondary label,
.label-muted {
  color: #6b7280;
}

.readonly-secondary,
.field input.input-secondary {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #4b5563;
}

.readonly-muted,
.field input.input-muted {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #6b7280;
}

.estimate-value {
  font-size: 0.9rem;
  color: #6b7280;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 0.8rem;
}

.ewc-search-field {
  position: relative;
  z-index: 40;
}

.ewc-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 1200;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(31, 42, 68, 0.12);
}

.ewc-search-results[hidden] {
  display: none;
}

.ewc-search-results__item {
  display: block;
  width: 100%;
  border: 0;
  background: #ffffff;
  text-align: left;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: #1f2a44;
  font: inherit;
}

.ewc-search-results__item:hover,
.ewc-search-results__item:focus {
  background: #f3f4f6;
  outline: none;
}

.ewc-search-results__empty {
  padding: 0.55rem 0.7rem;
  color: #6b7280;
  font-size: 0.85rem;
}

.audit {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

.actions form {
  display: inline;
}

.lookup-actions form {
  display: inline-flex;
  margin: 0;
}


.notice {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.wip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #fde68a;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.hint {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.25rem;
}

.unsaved-changes-indicator {
  margin-top: 0.35rem;
  color: #92400e;
}

.participants .field {
  margin-bottom: 0.4rem;
}

.participants #walk-in-sale-field {
  /* Keep walk-in toggle in a stable column when sibling fields are hidden. */
  grid-column: -2 / -1;
}

.plate-input {
  text-transform: uppercase;
}

.frame-weights .field input {
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
}

.frame summary.frame-header {
  cursor: pointer;
}

details > summary:focus-visible {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}

.vehicle-suggestion {
  margin-top: 0.75rem;
}

.suggestion-note {
  border: 1px solid #e5e7eb;
  background: transparent;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.suggestion-actions {
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.suggestion-status {
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.suggestion-status ul {
  margin: 0;
  padding-left: 1.25rem;
}

.suggestion-status.is-error {
  background: #fee2e2;
  color: #991b1b;
}

.suggestion-status.is-warning {
  background: #f9fafb;
  color: #6b7280;
}


.weights-actions {
  margin-top: 1rem;
}


.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-form input {
  width: 140px;
}

.vehicle-tares-add-form + .table-wrap {
  margin-top: var(--section-gap);
}

.invoice-generate-actions {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.invoice-frequency-status {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.88rem;
}

.quick-ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.quick-ranges__label {
  font-size: 0.82rem;
  color: #4b5563;
  margin-right: 0.2rem;
}

.quick-range-btn {
  height: 30px;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 999px;
}

.invoice-action-form {
  gap: 0.75rem;
}

.invoice-action-form .btn {
  justify-self: start;
}

.invoice-edit-header {
  margin-bottom: 1.5rem;
}

.invoice-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.88rem;
}

.invoice-meta-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4b5563;
}

.invoice-meta-strip__label {
  color: #6b7280;
}

.invoice-meta-strip__value {
  color: #1f2937;
  font-weight: 500;
}

.invoice-back-link {
  margin-top: 1rem;
  margin-bottom: 0;
}

.invoice-detail .card {
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(20, 33, 61, 0.08);
}

.invoice-detail .card + .card {
  margin-top: 0;
}

.invoice-detail > .card:last-child {
  margin-bottom: 0;
}

.invoice-list-section {
  margin-top: var(--section-gap);
}

.invoice-summary-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.invoice-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 2rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.85rem;
  color: #4b5563;
}

.summary-value {
  color: #111827;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.summary-detail-list {
  display: grid;
  gap: 0.1rem;
  font-size: 0.92rem;
  color: #4b5563;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
  gap: 1rem;
  margin-bottom: var(--section-gap);
}

.dashboard-clock {
  min-width: 240px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  text-align: right;
}

.dashboard-clock__time {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #14213d;
  font-variant-numeric: tabular-nums;
}

.dashboard-clock__date {
  font-size: 0.92rem;
  color: #1f2937;
}

.dashboard-clock__zone {
  font-size: 0.78rem;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.dashboard-summary-grid > .card,
.dashboard-summary-grid > .card + .card {
  margin-top: 0;
}

.dashboard-stat-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.dashboard-stat-card__main {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.dashboard-stat-card__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.01em;
}

.dashboard-stat-card__value {
  font-size: 1.9rem;
  font-weight: 700;
  color: #14213d;
  line-height: 1.1;
}

.dashboard-stat-card__hint {
  margin-top: auto;
  font-size: 0.82rem;
  color: #6b7280;
}

.dashboard-overview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-top: 0.2rem;
  margin-bottom: 0.15rem;
}

.dashboard-overview-toolbar__title h2 {
  margin: 0;
  font-size: 1.02rem;
  color: #14213d;
}

.dashboard-overview-toolbar__controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.85rem;
}

.dashboard-overview-toolbar__status {
  font-size: 0.8rem;
  white-space: nowrap;
}

.dashboard-period-filter {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.dashboard-period-filter__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.dashboard-period-filter__option:hover,
.dashboard-period-filter__option:focus {
  border-color: #94a3b8;
  background: #f8fafc;
}

.dashboard-period-filter__option.is-active {
  background: #14213d;
  border-color: #14213d;
  color: #ffffff;
}

.dashboard-setup-alert .actions,
.dashboard-empty-state .actions {
  margin-top: 0.85rem;
}

.dashboard-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  margin-top: var(--section-gap);
}

.dashboard-empty-state h2 {
  margin: 0;
  font-size: 1.08rem;
}

.dashboard-empty-state p {
  margin: 0.75rem 0 0;
}

.dashboard-section-copy {
  margin-top: 0;
  margin-bottom: 1rem;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-gap);
  margin-top: var(--section-gap);
  min-width: 0;
}

.dashboard-chart-grid > .frame,
.dashboard-chart-grid > .frame .frame-body {
  min-width: 0;
  width: 100%;
}

.dashboard-svg-chart {
  width: 100%;
  min-width: 0;
}

.dashboard-svg-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.dashboard-svg-chart__grid {
  stroke: #dbe3ee;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dashboard-svg-chart__bar {
  fill: var(--dashboard-chart-bar-end);
}

.dashboard-svg-chart--throughput .dashboard-svg-chart__bar {
  fill: var(--dashboard-throughput-bar-end);
}

.dashboard-svg-chart__area {
  fill: var(--dashboard-chart-bar-end);
  opacity: 0.16;
}

.dashboard-svg-chart--throughput .dashboard-svg-chart__area {
  fill: var(--dashboard-throughput-bar-end);
}

.dashboard-svg-chart__line {
  fill: none;
  stroke: var(--dashboard-chart-bar-end);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
  vector-effect: non-scaling-stroke;
}

.dashboard-svg-chart--throughput .dashboard-svg-chart__line {
  stroke: var(--dashboard-throughput-bar-end);
}

.dashboard-svg-chart__marker {
  fill: var(--dashboard-chart-bar-end);
  stroke: #ffffff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.dashboard-svg-chart--throughput .dashboard-svg-chart__marker {
  fill: var(--dashboard-throughput-bar-end);
}

.dashboard-svg-chart__axis-label {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #526076;
  font-size: 7.6px;
  font-weight: 500;
}

.dashboard-svg-chart__axis-label--dense {
  font-size: 6.9px;
}

.dashboard-svg-chart__axis-label--area {
  font-size: 7.2px;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-gap);
  margin-top: var(--section-gap);
}

.dashboard-traffic-panel {
  margin-top: var(--section-gap);
}

.dashboard-ai-insights {
  margin-top: var(--section-gap);
}

.dashboard-ai-insights .frame-body {
  padding-top: 1rem;
}

.dashboard-ai-insights + .dashboard-overview-toolbar {
  margin-top: calc(var(--section-gap) * 0.8);
}

.dashboard-ai-insights__list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: #1f2937;
}

.dashboard-ai-insights__list li {
  line-height: 1.45;
}

.dashboard-panel[data-dashboard-panel="invoice-activity"] {
  grid-column: 1 / -1;
}

.dashboard-panel .frame-body {
  display: grid;
  gap: 1rem;
  padding-top: 1rem;
}

@media (max-width: 768px) {
  .dashboard-svg-chart__axis-label {
    font-size: 8.5px;
  }

  .dashboard-svg-chart__axis-label--dense {
    font-size: 7.8px;
  }

  .dashboard-svg-chart__axis-label--area {
    font-size: 7.9px;
  }

  .dashboard-svg-chart__line {
    stroke-width: 2.1;
  }

  .dashboard-svg-chart__marker {
    stroke-width: 1.8;
  }
}

@media (max-width: 480px) {
  .dashboard-svg-chart__axis-label {
    font-size: 9.4px;
  }

  .dashboard-svg-chart__axis-label--dense {
    font-size: 8.6px;
  }

  .dashboard-svg-chart__axis-label--area {
    font-size: 8.7px;
  }

  .dashboard-svg-chart__line {
    stroke-width: 2.15;
  }

  .dashboard-svg-chart__marker {
    stroke-width: 1.9;
  }
}

.dashboard-inline-empty {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 1rem;
  color: #6b7280;
  background: #f9fafb;
}

.dashboard-table a {
  font-weight: 600;
}

.dashboard-table--compact {
  min-width: 640px;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dashboard-status-pill--open {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.dashboard-status-pill--complete {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.dashboard-status-pill--issued,
.dashboard-status-pill--sent {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.dashboard-status-pill--paid {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.dashboard-status-pill--draft {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.dashboard-status-pill--void {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.dashboard-mini-stat {
  padding: 0.85rem 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.dashboard-mini-stat__label {
  display: block;
  font-size: 0.82rem;
  color: #4b5563;
}

.dashboard-mini-stat__value {
  display: block;
  margin-top: 0.28rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #14213d;
}

.dashboard-subsection {
  display: grid;
  gap: 0.65rem;
}

.dashboard-subsection h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #14213d;
}

.platform-tenants-actions {
  flex-wrap: wrap;
}

.platform-tenants-summary-card {
  margin-bottom: 1.5rem;
}

.platform-tenants-summary-card .invoice-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.platform-tenants-feedback-card {
  margin-bottom: 1.5rem;
}

.platform-tenants-feedback-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.platform-tenants-feedback-card__count {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}

.platform-tenants-table .actions-col {
  min-width: 360px;
}

.platform-tenant-detail-section-copy {
  margin-bottom: 1rem;
}

.platform-tenant-delete-note {
  margin-top: 0;
}

.platform-tenant-detail-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1080px) {
  .platform-tenant-detail-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.platform-tenant-detail-admin-grid.company-document-email-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

@media (min-width: 1080px) {
  .platform-tenant-detail-admin-grid.company-document-email-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.platform-tenant-detail-admin-card {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  box-sizing: border-box;
  align-content: start;
}

.platform-tenant-detail-admin-card h3,
.platform-tenant-maintenance-block h3,
.platform-tenant-role-guide__title {
  margin: 0;
  font-size: 1rem;
}

.platform-tenant-detail-admin-card.ticket-form {
  gap: 0.85rem;
}

.platform-tenant-detail-admin-card > .muted {
  margin: 0;
}

.platform-tenant-detail-admin-card .actions {
  margin-top: auto;
}

.platform-tenant-detail-admin-summary {
  display: grid;
  gap: 0.85rem;
}

.platform-tenant-role-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.platform-tenant-role-guide__item {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.75rem 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.platform-tenant-role-guide__title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #14213d;
  font-weight: 600;
}

.platform-tenant-role-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.platform-tenant-inline-row td {
  padding: 0;
  white-space: normal;
  background: #fbfdff;
}

.workspace-users-table {
  table-layout: fixed;
  min-width: 780px;
}

.workspace-users-table th,
.workspace-users-table td {
  white-space: normal;
  vertical-align: top;
}

.workspace-users-table .actions-col {
  width: 280px;
}

.workspace-users-name {
  display: grid;
  gap: 0.2rem;
}

.workspace-users-email {
  color: #374151;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workspace-users-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.workspace-users-actions form {
  margin: 0;
}

.workspace-users-inline-card {
  margin: 0.85rem;
}

.platform-tenant-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}

.platform-tenant-maintenance-block {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.platform-tenant-maintenance-block--danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.platform-maintenance-card {
  align-items: start;
}

.platform-maintenance-card > * {
  min-width: 0;
}

.platform-maintenance-card .ticket-form {
  gap: 0.85rem;
}

.platform-tenant-maintenance-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #14213d;
  font-size: 0.94rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .platform-tenant-detail-admin-grid,
  .platform-tenant-role-guide,
  .platform-tenant-maintenance-grid {
    grid-template-columns: 1fr;
  }

  .workspace-users-table {
    min-width: 640px;
  }

  .workspace-users-table .actions-col {
    width: 230px;
  }
}

@media (max-width: 900px) {
  .form-grid.form-grid--2,
  .form-grid.form-grid--3 {
    grid-template-columns: 1fr;
  }
}

.tenant-form__error {
  margin: 0.35rem 0 0;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 500;
}

.customer-credit-summary__grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.customer-credit-summary {
  border-color: #cfdbe8;
  background: linear-gradient(180deg, #f9fcff 0%, #f4f9ff 100%);
  box-shadow: inset 0 1px 0 #ffffff;
}

.customer-credit-summary > h2 {
  background: transparent;
  border-bottom: 1px dashed #d4deea;
  color: #1f3b57;
}

.customer-credit-summary + .ticket-form {
  margin-top: var(--section-gap);
}

.customer-credit-summary .summary-label {
  color: #526277;
}

.customer-credit-summary .summary-value {
  font-size: 1.02rem;
}

.customer-credit-summary__value--low {
  color: #92400e;
}

.customer-credit-summary__value--over {
  color: #7f1d1d;
}

.customer-credit-summary__links {
  margin: 0.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.account-adjustments-card {
  padding: 0.85rem;
  border-top: 2px solid #dbe3ee;
}

.account-adjustments-card > h2 {
  margin: -0.85rem -0.85rem 0.65rem -0.85rem;
  padding: 0.55rem 0.85rem;
}

.account-adjustments-help {
  margin: 0 0 0.65rem;
}

.account-adjustments-ledger .data-table th,
.account-adjustments-ledger .data-table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.account-adjustments-disclosure {
  margin-top: 0.75rem;
}

.account-adjustments-disclosure > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
}

.account-adjustments-disclosure > summary::marker {
  content: "";
}

.account-adjustments-disclosure > summary::-webkit-details-marker {
  display: none;
}

.filters.filters-inline.account-adjustments-form {
  margin-top: 0.75rem;
  margin-bottom: 0;
  align-items: flex-start;
}

.account-adjustments-form .actions {
  align-self: flex-start;
  margin-top: 1.45rem;
}

.filters.filters-inline.account-adjustments-form .field {
  min-width: 225px;
}

.audit-log-filters .field {
  min-width: 170px;
}

.audit-log-filters .field.audit-field-entity-id {
  min-width: 220px;
  flex: 1 1 260px;
}

.audit-log-table {
  table-layout: auto;
  min-width: 920px;
  font-size: 0.88rem;
}

.audit-log-table th,
.audit-log-table td {
  padding: 0.52rem 0.6rem;
  line-height: 1.3;
}

.audit-log-table .audit-col-time {
  width: 165px;
}

.audit-log-table .audit-col-user {
  width: 210px;
}

.audit-log-table .audit-col-action {
  width: 120px;
}

.audit-log-table .audit-col-entity {
  width: 250px;
}

.audit-log-table .audit-col-summary {
  width: 220px;
}

.audit-log-table .audit-col-view {
  width: 56px;
}

.audit-log-table th.audit-col-summary,
.audit-log-table td.audit-col-summary {
  white-space: normal;
}

.audit-log-table th.audit-col-entity,
.audit-log-table td.audit-col-entity {
  white-space: normal;
}

.audit-log-table td.audit-col-summary {
  overflow-wrap: anywhere;
}

.audit-log-table td.audit-col-entity {
  overflow-wrap: anywhere;
}

.audit-log-table td {
  vertical-align: top;
}

.align-right {
  text-align: right;
}

.invoice-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.invoice-status-badge--draft {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.invoice-status-badge--paid {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.invoice-status-badge--void {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.invoice-mark-paid-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
  align-items: start;
}

.invoice-mark-paid-action {
  align-self: end;
}

.invoice-mark-paid-action .btn {
  width: 100%;
}

.invoice-void-card {
  border-color: #f5c2c7;
  background: #fff8f8;
}

.invoice-void-card .card-header {
  background: #fde8e8;
  border-bottom-color: #f5c2c7;
  color: #7f1d1d;
}

.invoice-void-card .card-body {
  background: #fff8f8;
}

.invoice-warning-text {
  margin-bottom: 0.85rem;
  color: #7f1d1d;
  opacity: 0.85;
}

.invoice-void-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem 1.5rem;
}

.invoice-void-actions {
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.invoice-detail .data-table tbody tr:hover {
  background: #f9fafb;
}

.invoice-lines-table,
.invoice-linked-table {
  table-layout: auto;
}

@media (min-width: 901px) {
  .invoice-linked-col-ticket {
    width: 96px;
  }

  .invoice-linked-col-date {
    width: 112px;
  }

  .invoice-linked-col-product {
    width: auto;
  }

  .invoice-linked-col-compliance {
    width: 240px;
  }

  .invoice-linked-col-netqty {
    width: 132px;
  }

  .invoice-linked-col-total {
    width: 112px;
  }

  .invoice-linked-product {
    min-width: 220px;
  }

  .invoice-linked-compliance {
    min-width: 200px;
    max-width: 280px;
  }
}

.invoice-lines-table th,
.invoice-lines-table td,
.invoice-linked-table th,
.invoice-linked-table td {
  vertical-align: top;
  padding: 0.65rem 0.75rem;
}

.invoice-lines-table td,
.invoice-linked-table td {
  white-space: normal;
}

.invoice-lines-table td.align-right,
.invoice-linked-table td.align-right {
  white-space: nowrap;
}

.invoice-lines-table .line-description {
  font-weight: 600;
  word-break: break-word;
}

.invoice-linked-product {
  word-break: break-word;
}

.invoice-linked-compliance {
  word-break: break-word;
  font-size: 0.92em;
  line-height: 1.2;
}

.invoice-linked-compliance__line + .invoice-linked-compliance__line {
  margin-top: 0.2rem;
}

.invoice-linked-compliance__label {
  opacity: 0.75;
}

.invoice-lines-table tfoot td {
  background: #f9fafb;
  border-bottom: none;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.invoice-total-label {
  text-align: right;
  font-weight: 600;
}

.invoice-total-value {
  font-weight: 700;
}

.invoice-void-disclosure > summary,
.ticket-void-disclosure > summary {
  list-style: none;
}

.invoice-void-disclosure:not([open]) {
  padding-bottom: 0;
}

.invoice-void-disclosure:not([open]) > .card-header {
  margin-bottom: 0;
  border-bottom: none;
  border-radius: 10px;
}

.invoice-void-disclosure > summary::-webkit-details-marker,
.ticket-void-disclosure > summary::-webkit-details-marker {
  display: none;
}

.invoice-void-disclosure > summary,
.ticket-void-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invoice-void-disclosure > summary::after,
.ticket-void-disclosure > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
  flex-shrink: 0;
}

.invoice-void-disclosure[open] > summary::after,
.ticket-void-disclosure[open] > summary::after {
  transform: rotate(45deg);
}

.document-email-card {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.document-email-card__body {
  display: grid;
  gap: 0.85rem;
  padding: 0.8rem 1rem 1rem;
}

.document-email-summary {
  margin: 0;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.document-email-summary__title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.document-email-card:not([open]) .document-email-summary {
  border-bottom: none;
  border-radius: 10px;
}

.document-email-summary .muted {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-email-form__actions {
  justify-content: flex-end;
}

.ticket-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #14213d;
  text-decoration: none;
  font-weight: 500;
}

.tickets-table .ticket-link-badge {
  padding: 0.05rem 0.4rem;
  font-size: 0.78rem;
  line-height: 1;
}

@media (max-width: 900px) {
  :root {
    --flash-toast-top: 112px;
  }

  .field--span-2 {
    grid-column: auto;
  }

  .invoice-summary-contact,
  .invoice-summary-grid,
  .invoice-mark-paid-grid,
  .invoice-void-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .invoice-mark-paid-action .btn {
    width: auto;
  }

  .invoice-detail .table-wrap {
    overflow-x: visible;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .invoice-lines-table thead,
  .invoice-linked-table thead {
    display: none;
  }

  .invoice-lines-table tbody,
  .invoice-linked-table tbody {
    display: block;
  }

  .invoice-lines-table tbody tr,
  .invoice-linked-table tbody tr {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .invoice-lines-table tbody td,
  .invoice-linked-table tbody td {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.45rem 0;
    text-align: left;
    white-space: normal;
  }

  .invoice-lines-table tbody td::before,
  .invoice-linked-table tbody td::before {
    content: attr(data-label);
    font-size: 0.82rem;
    color: #4b5563;
    font-weight: 600;
  }

  .invoice-lines-table tbody td:last-child,
  .invoice-linked-table tbody td:last-child {
    border-bottom: none;
  }

  .invoice-lines-table tbody td.empty,
  .invoice-linked-table tbody td.empty {
    display: block;
    border-bottom: none;
    text-align: center;
    padding: 0.8rem 0;
  }

  .invoice-lines-table tbody td.empty::before,
  .invoice-linked-table tbody td.empty::before {
    content: none;
  }

  .invoice-lines-table tfoot {
    display: block;
    margin-top: 0.25rem;
  }

  .invoice-lines-table tfoot tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .invoice-lines-table tfoot tr:last-child {
    border-bottom: none;
  }

  .invoice-lines-table tfoot td {
    display: block;
    border-bottom: none;
    padding: 0;
    background: transparent;
  }

  .invoice-lines-table tfoot td:first-child {
    display: none;
  }

  .invoice-total-label {
    text-align: left;
  }

.invoice-total-value {
  text-align: right;
}
}

.admin-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.admin-hub-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-hub-section-heading p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.35;
}

.admin-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.8rem 0.85rem;
  background: #ffffff;
}

.admin-hub-card h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #1f2a44;
}

.admin-hub-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.4;
}

.admin-hub-card .actions {
  margin-top: auto;
}

.admin-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: auto;
}

.admin-hub-links a:not(.btn) {
  color: #1f2a44;
  text-decoration: underline;
}

.admin-hub-links .btn {
  text-decoration: none;
}

.feedback-list {
  display: grid;
  gap: 0.9rem;
}

.feedback-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.feedback-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.feedback-card__heading {
  min-width: 0;
  flex: 1 1 24rem;
}

.feedback-card__heading h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #1f2a44;
  line-height: 1.2;
}

.feedback-card__heading .muted {
  margin-top: 0.2rem;
}

.feedback-card__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.feedback-kind-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.14rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.feedback-kind-pill--bug {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.feedback-kind-pill--wish {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.feedback-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.14rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.feedback-state-pill--new {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.feedback-state-pill--read {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

.feedback-card__message {
  padding: 0.85rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #111827;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 0.9rem;
}

.feedback-card__page-link {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.feedback-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.feedback-card__actions form {
  margin: 0;
}

@media (min-width: 720px) {
  .admin-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .admin-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  gap: 0.9rem;
}

.health-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.health-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.95rem;
}

.health-card .card-header h2 {
  margin: 0;
  font-size: 1rem;
}

.health-card .card-body {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  flex: 1;
  padding: 0.82rem 0.95rem;
}

.health-card .card-body p {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.health-table th,
.health-table td {
  border: 1px solid #d1d5db;
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.health-table th {
  background: #f9fafb;
  text-align: left;
}

.health-table .health-col-doc-type {
  width: 25%;
}

.health-table .health-col-status {
  width: 15%;
  white-space: nowrap;
}

.health-table .health-col-default {
  width: 45%;
}

.health-table .health-col-warnings {
  width: 15%;
}

.health-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.health-list li {
  margin: 0.2rem 0;
  font-size: 0.82rem;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 0.22rem 0.5rem;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.health-badge--ok {
  background: #ecfdf3;
  border-color: #86efac;
  color: #166534;
}

.health-badge--warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.health-badge--error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.health-path,
.health-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 0.84rem;
}

.health-path {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.health-truncate {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.health-copy {
  background: transparent;
  border: none;
  color: #4b5563;
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: 0.35rem;
  padding: 0;
  text-decoration: underline;
}

.health-copy:hover,
.health-copy:focus-visible {
  color: #1f2937;
}

.health-copy.is-copied {
  color: #166534;
  text-decoration: none;
}

.site-footer {
  margin-top: auto;
  padding: 1rem 0 1.25rem;
}

.site-footer__domain {
  color: #6b7280;
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  width: 100%;
  text-align: center;
}

.site-feedback-dialog {
  width: min(32rem, calc(100vw - 1.5rem));
  max-width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
}

.site-feedback-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.site-feedback-dialog__form {
  display: grid;
  gap: 0.95rem;
  padding: 1.15rem 1.2rem 1.2rem;
}

.site-feedback-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.site-feedback-dialog__header h3 {
  margin: 0;
}

.site-feedback-dialog__header .muted {
  margin-top: 0.28rem;
  max-width: 28rem;
}

.site-feedback-dialog__kind {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.site-feedback-dialog__kind legend {
  width: 100%;
  margin-bottom: 0.05rem;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.site-feedback-dialog__kind label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.35rem 0.78rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
}

.site-feedback-dialog__kind label:has(input:checked) {
  border-color: var(--primary);
  background: var(--theme-primary-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.site-feedback-dialog__kind input {
  margin: 0;
  accent-color: var(--primary);
}

.site-feedback-dialog textarea {
  width: 100%;
  min-height: 152px;
  box-sizing: border-box;
}

body.assistant-panel-open {
  overflow: hidden;
}

.assistant-trigger {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.assistant-trigger:hover,
.assistant-trigger:focus-visible {
  background: #0f172a;
}

.assistant-trigger__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--theme-primary-contrast);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.assistant-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.assistant-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 180ms ease;
}

.assistant-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
  width: min(420px, 100vw);
  height: 100%;
  padding: 1rem 1rem 1.15rem;
  background: #ffffff;
  border-left: 1px solid #dbe1ea;
  box-shadow: -18px 0 36px rgba(15, 23, 42, 0.12);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.assistant-panel.is-open .assistant-panel__backdrop {
  opacity: 1;
}

.assistant-panel.is-open .assistant-panel__drawer {
  transform: translateX(0);
}

.assistant-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.assistant-panel__header h2,
.assistant-panel__response h3 {
  margin: 0;
}

.assistant-panel__copy {
  margin: 0.3rem 0 0;
  color: #6b7280;
  font-size: 0.88rem;
}

.assistant-panel__examples {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.assistant-panel__examples-title {
  margin: 0;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
}

.assistant-panel__examples-list {
  margin: 0;
  padding-left: 1rem;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.45;
}

.assistant-panel__examples-list li + li {
  margin-top: 0.15rem;
}

.assistant-panel__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.assistant-panel__prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
}

.assistant-panel__prompt:hover,
.assistant-panel__prompt:focus-visible {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.assistant-panel__form {
  display: grid;
  gap: 0.8rem;
}

.assistant-panel__textarea {
  width: 100%;
  min-height: 118px;
  padding: 0.75rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.assistant-panel__actions {
  justify-content: flex-end;
}

.assistant-panel__status {
  color: #6b7280;
  font-size: 0.84rem;
  line-height: 1.4;
}

.assistant-panel__response {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  flex: 1 1 auto;
}

.assistant-panel__response-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 160px;
  padding: 0.9rem 0.95rem;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  background: #f8fafc;
  color: #111827;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
}

.assistant-panel__response-placeholder,
.assistant-panel__response-text {
  margin: 0;
  max-width: 100%;
  text-align: left;
}

.assistant-panel__response-placeholder {
  color: #6b7280;
}

.assistant-panel__response-text {
  color: #111827;
}

.assistant-panel__result-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.assistant-panel__result-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #ffffff;
}

.assistant-panel__result-link {
  width: fit-content;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.assistant-panel__result-link:hover,
.assistant-panel__result-link:focus-visible {
  color: #0f4c81;
  text-decoration: underline;
}

.assistant-panel__result-meta {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  white-space: normal;
}

.assistant-panel__result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.assistant-panel__result-related {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.12rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f4c81;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.assistant-panel__result-related:hover,
.assistant-panel__result-related:focus-visible {
  border-color: #9db2d8;
  background: #eef4ff;
  color: #0b3a63;
}

.company-logo-preview-container {
  width: 100%;
  max-width: 360px;
  height: 90px;
  padding: 0.55rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-logo-preview-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.company-logo-preview-meta {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.2rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.company-logo-preview-meta a {
  width: fit-content;
}

.company-color-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.company-color-row .company-color-picker {
  width: 44px;
  min-width: 44px;
  height: 28px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.company-color-row .company-color-hex {
  width: 120px;
  min-width: 120px;
}

.company-color-error.is-visible {
  color: #b91c1c;
}

.company-logo-preview-meta code {
  overflow-wrap: anywhere;
}

.company-settings-form .frame-body {
  display: grid;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-clock {
    justify-items: start;
    text-align: left;
  }

  .dashboard-overview-toolbar__controls {
    justify-content: space-between;
  }

  .dashboard-period-filter {
    justify-content: flex-start;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .error-detail-grid {
    grid-template-columns: 1fr;
  }

  .assistant-trigger {
    right: 12px;
    left: 12px;
    bottom: 14px;
    justify-content: center;
  }

  .assistant-panel__drawer {
    width: 100vw;
    padding: 0.95rem 0.9rem 1rem;
  }

  .assistant-panel__header {
    align-items: center;
  }

  .assistant-panel__response-body {
    min-height: 120px;
  }

  .lookup-list-filters {
    grid-template-columns: 1fr;
  }

  .lookup-list-filters .field:first-child {
    max-width: none;
  }

  .lookup-list-filters .actions {
    grid-column: auto;
    grid-row: auto;
  }

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

  .dashboard-clock {
    min-width: 0;
    width: 100%;
  }

  .dashboard-period-filter__option {
    min-height: 28px;
    padding: 0.24rem 0.65rem;
  }

  .dashboard-overview-toolbar__controls {
    gap: 0.45rem 0.65rem;
  }

  .dashboard-overview-toolbar__status {
    width: 100%;
  }
}

/* Theme cascade guard: keep tenant branding authoritative. */
.site-header {
  background-color: var(--nav-bg) !important;
}

.btn--primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--theme-primary-dark) !important;
  border-color: var(--theme-primary-dark) !important;
}
