:root {
  --app-font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --app-font-weight-normal: 400;
  --app-font-weight-semibold: 600;
  --app-font-weight-bold: 700;
  --app-body-size: 15px;
  --app-body-weight: var(--app-font-weight-normal);
  --app-body-line-height: 1.5;
  --app-body-color: #0b0f13;
  --app-heading-color: #0f172a;
  --app-muted-color: #64748b;
  --app-section-title-size: 21px;
  --app-section-title-weight: var(--app-font-weight-semibold);
  --app-section-title-line-height: 1.3;
  --app-section-title-bottom-gap: 12px;
  --app-component-title-size: 18px;
  --app-component-title-weight: var(--app-font-weight-semibold);
  --app-component-title-line-height: 1.35;
  --app-content-label-size: 14px;
  --app-content-label-weight: var(--app-font-weight-semibold);
  --app-copy-size: 15px;
  --app-copy-weight: var(--app-font-weight-normal);
  --app-copy-color: #4b5563;
  --app-copy-line-height: 1.5;
  --app-meta-size: 13px;
  --app-meta-weight: var(--app-font-weight-normal);
  --app-meta-line-height: 1.4;
  --app-form-label-size: 14px;
  --app-form-control-size: 14px;
  --app-form-control-min-height: 38px;
  --app-form-help-size: 13px;
  --app-form-panel-padding: 18px;
  --app-form-panel-background: #f8fbff;
  --app-form-border-color: #bfdbfe;
  --app-form-panel-radius: 14px;
  --app-form-actions-gap: 20px;
  --app-form-control-radius: 10px;
  --app-totals-panel-max-width: 340px;
  font-family: var(--app-font-family);
  --app-page-frame-inset: 20px;
  --app-page-title-size: 24px;
  --app-page-title-weight: 700;
  --app-page-title-line-height: 1.25;
  --app-page-title-bottom-gap: 14px;
  --app-page-title-inline-gap: 12px;
  --app-page-title-row-gap: 10px;
  --app-page-content-gap: 18px;
  --app-section-content-gap: 16px;
  --app-page-title-row-height: 39px;
  --app-primary-button-padding: 8px 13px;
  --app-primary-button-color: #ffffff;
  --app-primary-button-background: #1d4ed8;
  --app-primary-button-border: #1742b5;
  --app-primary-button-hover-background: #1742b5;
  --app-primary-button-hover-border: #153a9d;
  --page-title-subtext-gap: 15px;

  /* Shared surface, elevation and focus tokens. Every biz/portal component below
     reads its frame, depth and focus ring from here so the surfaces stay one
     visual system instead of repeating hand-picked borders and shadows. */
  --app-surface: #ffffff;
  --app-surface-subtle: #f8fbff;
  --app-surface-muted: #f1f6fd;
  --app-border-soft: #e3ebf6;
  --app-border-medium: #cfdeef;
  --app-card-radius: 18px;
  --app-control-radius: var(--app-form-control-radius);
  --app-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px -4px rgba(15, 23, 42, 0.12);
  --app-shadow-md: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 26px -16px rgba(15, 23, 42, 0.32);
  --app-shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.06), 0 28px 60px -28px rgba(15, 23, 42, 0.45);
  --app-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.26);
  --app-accent: #1d4ed8;
  --app-accent-soft: #eff6ff;

  /* Outer shell frame. The main content card and the desktop menu share one
     blue outline so the two panels of the layout read as a pair. */
  --app-shell-frame-width: 2px;
  --app-shell-frame-color: #60a5fa;

  /* Desktop window layout. The menu and the content card are two floating
     windows on the page background; one gutter value keeps the space around
     them and between them identical. */
  --app-shell-gutter: 18px;
  --app-sidebar-width: 286px;
  --app-content-max: 1320px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 16px;
  display: flex;
  justify-content: center;
  /* Calm blue-grey canvas. It stays quiet on purpose: the white windows and the
     blue shell frame are what should carry the colour. dev.arseta.com replaces
     this with the dark development background in framework/css/development.css. */
  background:
    radial-gradient(1200px 700px at 0% -12%, rgba(59, 130, 246, 0.11) 0, rgba(59, 130, 246, 0) 55%),
    radial-gradient(1000px 620px at 100% -4%, rgba(14, 165, 233, 0.09) 0, rgba(14, 165, 233, 0) 50%),
    radial-gradient(900px 620px at 50% 112%, rgba(99, 102, 241, 0.07) 0, rgba(99, 102, 241, 0) 58%),
    linear-gradient(180deg, #f1f5fb 0%, #e9eff8 52%, #e4ebf5 100%);
  background-attachment: fixed;
  color: var(--app-body-color);
  font-family: var(--app-font-family);
  font-size: var(--app-body-size);
  font-style: normal;
  font-weight: var(--app-body-weight);
  letter-spacing: normal;
  line-height: var(--app-body-line-height);
}

::selection {
  background: #dbeafe;
  color: #0f172a;
}

/* Shared inline link treatment. Component classes (menu, tabs, export actions)
   keep their own colours because they set them explicitly. */
a {
  color: var(--app-accent);
  text-decoration-color: rgba(29, 78, 216, 0.35);
  text-underline-offset: 2px;
}

a:hover {
  color: #12327c;
  text-decoration-color: currentColor;
}

.wrap,
.page-shell {
  width: 100%;
  max-width: var(--app-content-max);
}

.page-shell {
  padding: 10px 8px 32px;
}

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

.arseta-impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
}

.arseta-impersonation-banner p,
.arseta-impersonation-banner form {
  margin: 0;
}

.arseta-impersonation-banner .btn {
  width: auto;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .arseta-impersonation-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

.rightbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.logo img {
  width: 180px;
  display: block;
}

.logo img.arseta-company-logo {
  height: 49.4px;
  object-fit: contain;
  object-position: left center;
}

.arseta-brand-text {
  display: flex;
  align-items: center;
  min-height: 49.4px;
  color: #0f2a5b;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.card {
  width: 100%;
  padding: var(--app-page-frame-inset);
  border: var(--app-shell-frame-width) solid var(--app-shell-frame-color);
  border-radius: var(--app-card-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow-md);
}

h1,
.card-title {
  color: var(--app-heading-color);
  font-family: inherit;
  font-size: var(--app-page-title-size);
  font-style: normal;
  font-weight: var(--app-page-title-weight);
  line-height: var(--app-page-title-line-height);
}

h1 {
  margin: 0 0 var(--app-page-title-bottom-gap);
}

.card-title {
  margin: 0;
}

.card-title + p,
.card-title + .page-description,
.card-title + .route-option-note,
.card-title + .page-subtext,
h1 + p,
h1 + .page-subtext {
  margin-top: var(--page-title-subtext-gap);
}

.page-description,
.page-subtext {
  margin-bottom: 0;
  color: var(--app-copy-color);
  font-family: var(--app-font-family);
  font-size: var(--app-copy-size);
  font-style: normal;
  font-weight: var(--app-copy-weight);
  letter-spacing: normal;
  line-height: var(--app-copy-line-height);
}

.page-title-header > .page-description {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 0;
}

.section-title {
  margin: 0 0 var(--app-section-title-bottom-gap);
  color: var(--app-heading-color);
  font-family: inherit;
  font-size: var(--app-section-title-size);
  font-style: normal;
  font-weight: var(--app-section-title-weight);
  letter-spacing: normal;
  line-height: var(--app-section-title-line-height);
}

.page-section {
  margin-top: var(--app-page-content-gap);
}

.component-title {
  margin: 0;
  color: var(--app-heading-color);
  font-family: inherit;
  font-size: var(--app-component-title-size);
  font-style: normal;
  font-weight: var(--app-component-title-weight);
  letter-spacing: normal;
  line-height: var(--app-component-title-line-height);
}

.content-label {
  margin: 0;
  color: #334155;
  font-family: inherit;
  font-size: var(--app-content-label-size);
  font-style: normal;
  font-weight: var(--app-content-label-weight);
  letter-spacing: normal;
  line-height: 1.35;
}

.page-copy {
  margin: 0;
  color: var(--app-copy-color);
  font-family: inherit;
  font-size: var(--app-copy-size);
  font-style: normal;
  font-weight: var(--app-copy-weight);
  letter-spacing: normal;
  line-height: var(--app-copy-line-height);
}

.meta-text {
  color: var(--app-muted-color);
  font-family: inherit;
  font-size: var(--app-meta-size);
  font-style: normal;
  font-weight: var(--app-meta-weight);
  letter-spacing: normal;
  line-height: var(--app-meta-line-height);
}

.section-description {
  margin: 0 0 var(--app-section-content-gap);
  color: var(--app-copy-color);
  font-family: var(--app-font-family);
  font-size: var(--app-copy-size);
  font-style: normal;
  font-weight: var(--app-copy-weight);
  letter-spacing: normal;
  line-height: var(--app-copy-line-height);
}

.access-denied-message {
  margin-top: 24px;
}

.page-title-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  column-gap: var(--app-page-title-inline-gap);
  row-gap: var(--app-page-title-row-gap);
  margin-bottom: var(--app-page-content-gap);
  flex-wrap: wrap;
}

.summary-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

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

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

.summary-card-grid--columns-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card {
  position: relative;
  min-width: 0;
  padding: 16px 18px 16px 21px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border: 1px solid var(--app-border-soft);
  border-radius: 16px;
  box-shadow: var(--app-shadow-sm);
}

/* A single accent edge keeps KPI boxes readable on the white page card without
   giving every summary value its own coloured background. */
.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.summary-card-label {
  display: block;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
}

.summary-card-value {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  padding: 30px 24px;
  color: var(--app-copy-color);
  text-align: center;
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.empty-state[hidden] {
  display: none;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #2563eb;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 0 0 6px rgba(219, 234, 254, 0.55);
  font-size: 20px;
  line-height: 1;
}

.empty-state-title {
  margin: 0;
  color: var(--app-heading-color);
  font-size: var(--app-component-title-size);
  font-weight: var(--app-component-title-weight);
  line-height: var(--app-component-title-line-height);
}

.empty-state-description {
  max-width: 560px;
  margin: 0;
  color: var(--app-copy-color);
  font-size: var(--app-copy-size);
  line-height: var(--app-copy-line-height);
}

.empty-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* The compact variant is a secondary in-context note shown while the user still
   has other content and controls, so it stays on the flat elevation tier. */
.empty-state--compact {
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.empty-state--compact .empty-state-icon {
  display: none;
}

.empty-state--compact .empty-state-title {
  font-size: var(--app-copy-size);
  font-weight: 500;
}

.empty-state--title-regular .empty-state-title {
  font-weight: 400;
}

.empty-state--compact .empty-state-description {
  max-width: none;
  font-size: var(--app-meta-size);
}

.empty-state--compact .empty-state-actions {
  justify-content: flex-start;
}

.form-panel > .form-grid + .empty-state {
  margin-top: 18px;
}

/* A raised surface never carries a second raised surface inside it: nested
   components drop to the flat tier so the elevation stays readable. */
.form-panel .empty-state,
.form-panel .app-progress-state,
.form-panel .ai-insight-panel,
.filter-bar .empty-state {
  box-shadow: none;
}

.list-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding: 11px 14px;
  color: #334155;
  background: var(--app-surface-subtle);
  border: 1px solid var(--app-border-soft);
  border-radius: 12px;
}

.list-summary-primary,
.list-summary-meta {
  color: #334155;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.list-summary-primary {
  flex: 0 0 auto;
}

.list-summary-meta {
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.totals-panel {
  width: 100%;
  max-width: var(--app-totals-panel-max-width);
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--app-form-border-color);
  border-radius: 14px;
  box-shadow: var(--app-shadow-sm);
}

.totals-panel-title {
  margin: 0;
  padding: 11px 14px;
  color: #0f172a;
  background: var(--app-form-panel-background);
  font-size: var(--app-content-label-size);
  font-weight: var(--app-content-label-weight);
  line-height: 1.35;
}

.totals-panel-list {
  margin: 0;
}

.totals-panel-title + .totals-panel-list {
  border-top: 1px solid #dbeafe;
}

.totals-panel-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 16px;
}

.totals-panel-wrap .totals-panel {
  flex: 0 1 var(--app-totals-panel-max-width);
}

.totals-panel-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, var(--app-totals-panel-max-width)));
  gap: 16px;
  align-items: start;
}

.totals-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  color: #334155;
}

.totals-row + .totals-row {
  border-top: 1px solid #dbeafe;
}

.totals-row dt,
.totals-row dd {
  margin: 0;
}

.totals-row dd {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.totals-row--emphasis {
  color: #0f172a;
  background: #ffffff;
  font-weight: 700;
}

.totals-row--emphasis dd {
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .totals-panel-wrap {
    justify-content: stretch;
  }

  .totals-panel-wrap .totals-panel {
    max-width: none;
    flex-basis: 100%;
  }

  .totals-panel-pair {
    grid-template-columns: 1fr;
  }

}

.app-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border-soft);
  border-radius: 14px;
}

.app-tab {
  min-height: var(--app-form-control-min-height);
  padding: 8px 14px;
  color: #1d4ed8;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.app-tab:hover {
  background: #e4eefc;
}

.app-tab[aria-selected="true"],
.app-tab[aria-current="page"] {
  color: #ffffff;
  background: linear-gradient(180deg, #2f6ef0 0%, #1d4ed8 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 16px -10px rgba(29, 78, 216, 0.9);
}

.app-tab:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.file-picker {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-form-border-color);
  border-radius: 14px;
}

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

.file-picker-button {
  margin: 0;
}

.file-picker-selection {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.file-picker-selection--multiple {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.file-picker-selection-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 4px 3px 9px;
  color: #1e3a5f;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
}

.file-picker-selection-name {
  min-width: 0;
  max-width: min(320px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker-selection-remove {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #64748b;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.file-picker-selection-remove:hover {
  color: #b91c1c;
  background: #fee2e2;
}

.file-picker-selection-remove:focus-visible {
  color: #b91c1c;
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.file-picker-limit-message {
  color: #b91c1c;
  font-weight: var(--app-font-weight-semibold);
}

.file-picker--compact {
  display: inline-grid;
  padding: 0;
  background: transparent;
  border: 0;
}

.file-picker--compact .file-picker-actions {
  flex-wrap: nowrap;
}

.file-picker--image {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
}

.file-picker-image-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  width: 168px;
  min-height: 168px;
  margin: 0;
  padding: 18px 14px;
  overflow: hidden;
  color: #0369a1;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.file-picker-image-button:hover,
.file-picker-input:focus-visible + .file-picker-actions .file-picker-image-button {
  border-color: #60a5fa;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.file-picker-image-button .file-picker-image-icon {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  color: #0284c7;
}

.file-picker-image-button .file-picker-image-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.file-picker-image-button .file-picker-image-title {
  position: relative;
  z-index: 1;
  color: #0369a1;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.file-picker-image-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.file-picker-image-button.has-image .file-picker-image-title,
.file-picker-image-icon.is-hidden,
.file-picker-image-preview.is-hidden {
  display: none;
}

.app-loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 11px 14px;
  color: #334155;
  background: var(--app-surface-subtle);
  border: 1px solid var(--app-border-soft);
  border-radius: 12px;
  font-size: 14px;
}

.app-loading-message {
  min-width: 0;
}

.app-progress-state {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  color: #334155;
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.app-progress-state[hidden] {
  display: none;
}

.app-progress-state:not([hidden]) + * {
  margin-top: var(--app-page-content-gap);
}

.app-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-progress-title {
  color: var(--app-heading-color);
  font-size: var(--app-content-label-size);
  font-weight: var(--app-content-label-weight);
  line-height: 1.35;
}

.app-progress-value {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-size: var(--app-copy-size);
  font-weight: var(--app-font-weight-semibold);
  line-height: 1.35;
}

.app-progress-message {
  margin-top: 8px;
  color: #1d4ed8;
  font-size: var(--app-form-control-size);
  line-height: var(--app-copy-line-height);
  overflow-wrap: anywhere;
}

.app-progress-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  background: #dbeafe;
  border-radius: 999px;
}

.app-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.app-progress-details {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.app-progress-details:empty {
  display: none;
}

.app-progress-detail {
  padding: 8px 10px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  font-size: var(--app-meta-size);
  line-height: var(--app-meta-line-height);
  overflow-wrap: anywhere;
}

.app-spinner {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: app-spinner-rotate 0.75s linear infinite;
}

@keyframes app-spinner-rotate {
  to { transform: rotate(360deg); }
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
}

.app-loading-overlay.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.app-loading-overlay > .app-loading-state {
  min-width: min(280px, calc(100vw - 40px));
  max-width: min(440px, calc(100vw - 40px));
  transform: translateY(-8vh);
  padding: 18px 22px;
  color: #0f172a;
  background: #ffffff;
  border-color: #bfdbfe;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  font-weight: 500;
}

body.app-loading-open {
  cursor: wait;
}

.app-disclosure {
  background: #ffffff;
  border: 1px solid var(--app-border-soft);
  border-radius: 14px;
  box-shadow: var(--app-shadow-xs);
}

.app-disclosure > .app-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #0f172a;
  background: #f8fbff;
  border-radius: inherit;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.app-disclosure > .app-disclosure-summary::-webkit-details-marker,
.app-action-menu > .app-action-menu-trigger::-webkit-details-marker {
  display: none;
}

.app-disclosure > .app-disclosure-summary::after {
  content: '';
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.app-disclosure > .app-disclosure-summary.app-disclosure-summary--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 18px;
}

.app-disclosure > .app-disclosure-summary:hover {
  background: #eff6ff;
}

.app-disclosure > .app-disclosure-summary:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -3px;
}

.app-disclosure[open] > .app-disclosure-summary::after {
  transform: rotate(225deg);
}

.app-disclosure-body {
  padding: 14px;
  color: var(--app-copy-color);
  border-top: 1px solid #dbeafe;
  font-size: var(--app-copy-size);
  line-height: var(--app-copy-line-height);
}

.app-action-menu {
  position: relative;
  display: inline-block;
}

.app-action-menu > .app-action-menu-trigger {
  display: inline-flex;
  align-items: center;
  min-height: var(--app-form-control-min-height);
  padding: 7px 11px;
  color: #1d4ed8;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

.app-action-menu > .app-action-menu-trigger:hover,
.app-action-menu > .app-action-menu-trigger:focus-visible {
  background: #eff6ff;
  border-color: #93c5fd;
  outline: none;
}

.app-action-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 170px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--app-border-soft);
  border-radius: 14px;
  box-shadow: var(--app-shadow-lg);
}

.app-action-menu:not([open]) > .app-action-menu-panel {
  display: none;
}

.app-action-menu-item {
  width: 100%;
  padding: 8px 10px;
  color: #334155;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.app-action-menu-item:hover,
.app-action-menu-item:focus-visible {
  background: #eff6ff;
  outline: none;
}

.app-action-menu-item.danger {
  color: #dc2626;
}

@media (max-width: 560px) {
  .app-tabs {
    display: flex;
    width: 100%;
  }

  .app-tab {
    flex: 1 1 0;
    padding-inline: 8px;
  }

  .app-disclosure > .app-disclosure-summary.app-disclosure-summary--split {
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .app-disclosure > .app-disclosure-summary.app-disclosure-summary--split::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .file-picker--image {
    align-items: flex-start;
    flex-wrap: nowrap;
  }

  .app-action-menu-panel {
    width: min(190px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-spinner,
  .app-progress-bar {
    animation: none;
    transition: none;
  }
}

.page-title-main {
  min-width: 0;
  flex: 1 1 0;
}

.page-title-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.page-title-actions > .btn {
  width: auto;
  min-width: 0;
}

.page-title-actions > form {
  flex: 0 0 auto;
  margin: 0;
}

.page-title-actions > form > .btn {
  width: auto;
  min-width: 0;
}

.app-message-stack {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.app-message-stack.page-feedback {
  margin: 0 0 var(--app-page-content-gap);
}

.app-message-stack > .app-message {
  margin: 0;
}

.app-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 12px;
  box-shadow: var(--app-shadow-xs);
  font-family: var(--app-font-family);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.app-message[hidden] {
  display: none;
}

.app-message::before {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

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

.app-message-list {
  margin: 0;
  padding-left: 18px;
}

.app-message-list li + li {
  margin-top: 3px;
}

.app-message-details-label {
  margin-top: 7px;
  font-weight: 600;
}

.app-message-details {
  margin-top: 3px;
}

.app-message--info {
  color: #1e4f7a;
  background: #eff7ff;
  border-color: #93c5fd;
}

.app-message--info::before {
  content: "i";
  color: #ffffff;
  background: #2563eb;
}

.app-message--success {
  color: #166534;
  background: #f0fdf4;
  border-color: #86efac;
}

.app-message--success::before {
  content: "\2713";
  color: #ffffff;
  background: #16a34a;
}

.app-message--warning {
  color: #713f12;
  background: #fffbeb;
  border-color: #fcd34d;
}

.app-message--warning::before {
  content: "!";
  color: #713f12;
  background: #fbbf24;
}

.app-message--error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}

.app-message--error::before {
  content: "!";
  color: #ffffff;
  background: #dc2626;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-size: var(--app-form-label-size);
  font-weight: 400;
  line-height: 1.35;
}

.readonly {
  margin-bottom: 14px;
  padding: 11px 13px;
  color: #111827;
  background: var(--app-surface-subtle);
  border: 1px solid var(--app-border-soft);
  border-radius: 12px;
}

.readonly b {
  font-weight: 600;
}

.ai-markdown {
  color: inherit;
}

.ai-markdown > *:first-child {
  margin-top: 0;
}

.ai-markdown > *:last-child {
  margin-bottom: 0;
}

.ai-markdown h1,
.ai-markdown h2,
.ai-markdown h3,
.ai-markdown h4,
.ai-markdown h5,
.ai-markdown h6 {
  margin: 0 0 10px;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.35;
}

.ai-markdown h1 {
  font-size: 1.5rem;
}

.ai-markdown h2 {
  font-size: 1.3rem;
}

.ai-markdown h3 {
  font-size: 1.15rem;
}

.ai-markdown h4,
.ai-markdown h5,
.ai-markdown h6 {
  font-size: 1rem;
}

.ai-markdown p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.ai-markdown ul,
.ai-markdown ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.ai-markdown li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.ai-markdown code {
  padding: 1px 6px;
  background: #e2e8f0;
  border-radius: 6px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.95em;
}

.ai-insight-panel {
  margin-top: 18px;
  padding: 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.ai-insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-insight-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
}

.ai-insight-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ai-insight-actions > form {
  margin: 0;
}

.ai-insight-body {
  min-width: 0;
}

.ai-insight-form {
  margin: 0;
}

.ai-insight-panel .readonly {
  margin: 0;
}

.ai-insight-text {
  color: #111827;
  white-space: normal;
  line-height: 1.6;
}

.ai-insight-text .ai-markdown h1 {
  font-size: 1.3rem;
}

.ai-insight-text .ai-markdown h2 {
  font-size: 1.15rem;
}

.ai-insight-text .ai-markdown h3 {
  font-size: 1.04rem;
}

.ai-insight-text .ai-markdown h4,
.ai-insight-text .ai-markdown h5,
.ai-insight-text .ai-markdown h6 {
  font-size: 0.98rem;
}

@media (max-width: 900px) {
  .ai-insight-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-insight-form {
    width: 100%;
  }

  .ai-insight-actions {
    width: 100%;
    justify-content: flex-start;
  }

}

input[type="email"],
input[type="password"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: var(--app-form-control-min-height);
  margin-bottom: 14px;
  padding: 7px 10px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid var(--app-form-border-color);
  border-radius: var(--app-form-control-radius);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font: inherit;
  font-size: var(--app-form-control-size);
  font-weight: 400;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="text"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
  border-color: #93c5fd;
}

/* Shared form controls: use these classes for the standard application form UI. */
.form-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  font-family: inherit;
  font-size: var(--app-form-label-size);
  font-weight: 400;
}

.form-field[hidden] {
  display: none;
}

/* Lets a standard labelled form field participate in an inline filter grid. */
.form-field-inline {
  display: contents;
}

.form-field > label,
.form-field-label,
.form-fieldset > legend {
  margin: 0;
  color: #334155;
  font-size: var(--app-form-label-size);
  font-weight: 400;
  line-height: 1.35;
}

.form-field-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    align-items: center;
}

.form-field-actions > .form-control {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.form-field-actions > .btn {
    width: auto;
    white-space: nowrap;
}

.form-field-stack {
  display: grid;
  gap: var(--app-section-content-gap);
}

.form-field-stack[hidden] {
  display: none;
}

/* Input and filter panels carry the same soft, shadowed frame as .table-wrap so
   a page reads as one stack of surfaces. The panel tint, padding and radius
   still come from the shared --app-form-panel-* tokens. */
.form-panel {
  padding: var(--app-form-panel-padding);
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.form-panel .form-grid {
  gap: 14px;
}

.form-panel > .actions,
.form-panel > .form-actions {
  margin-top: var(--app-form-actions-gap);
  margin-bottom: 0;
}

.form-field > .form-control {
  width: 100%;
  min-height: var(--app-form-control-min-height);
  margin: 0;
  padding: 7px 10px;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid var(--app-form-border-color);
  border-radius: var(--app-form-control-radius);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font: inherit;
  font-size: var(--app-form-control-size);
  font-weight: 400;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-field > .form-control::placeholder {
  color: #64748b;
  opacity: 1;
}

.form-field > .form-control:hover {
  border-color: #93c5fd;
}

.form-field > .form-control:focus,
.form-field > .form-control:focus-visible {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-field > .form-control:disabled {
  color: #64748b;
  background-color: #f8fafc;
  cursor: not-allowed;
  opacity: 1;
}

.form-field > select.form-control {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.form-help {
  margin: 0;
  color: #64748b;
  font-size: var(--app-form-help-size);
  font-weight: 400;
  line-height: 1.35;
}

.app-info-tooltip {
  position: relative;
  display: inline-flex;
  margin-inline-start: 4px;
  white-space: nowrap;
  vertical-align: middle;
}

.app-info-tooltip-trigger {
  display: inline-grid;
  box-sizing: border-box;
  width: 17px;
  height: 17px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #60a5fa;
  border-radius: 50%;
  cursor: help;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.app-info-tooltip-trigger:hover {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #2563eb;
}

.app-info-tooltip-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.app-info-tooltip-content {
  position: absolute;
  z-index: 40;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: #ffffff;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  visibility: hidden;
}

.app-info-tooltip-content--portaled {
  position: fixed;
  top: 0;
  bottom: auto;
  left: 0;
}

.app-info-tooltip:hover .app-info-tooltip-content,
.app-info-tooltip:focus-within .app-info-tooltip-content,
.app-info-tooltip-content.is-visible {
  opacity: 1;
  visibility: visible;
}

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

.form-fieldset.form-panel {
  padding: var(--app-form-panel-padding);
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.form-fieldset > legend {
  margin-bottom: 7px;
  padding: 0;
}

.form-choice-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.form-choice,
.form-multiselect-option {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--app-form-border-color);
  cursor: pointer;
  font-size: var(--app-form-control-size);
  line-height: 1.35;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-choice {
  min-height: var(--app-form-control-min-height);
  margin: 0;
  padding: 7px 10px;
  border-radius: var(--app-form-control-radius);
}

.form-choice:hover,
.form-multiselect-option:hover {
  background: var(--app-form-panel-background);
  border-color: #93c5fd;
}

.form-multiselect-option:has(input:checked) {
  color: #1e3a8a;
  background: #ffffff;
  border-color: transparent;
}

.form-multiselect-option:has(input:checked):hover {
  background: var(--app-form-panel-background);
  border-color: #93c5fd;
}

.form-choice:focus-within,
.form-multiselect-option:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-choice input,
.form-multiselect-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #2563eb;
}

.form-multiselect {
  position: relative;
}

.form-multiselect > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--app-form-control-min-height);
  padding: 7px 38px 7px 10px;
  color: #0f172a;
  background-color: #ffffff;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1px solid var(--app-form-border-color);
  border-radius: var(--app-form-control-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  list-style: none;
  font-size: var(--app-form-control-size);
  font-weight: 400;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-multiselect > summary::-webkit-details-marker {
  display: none;
}

.form-multiselect > summary::after {
  display: none;
}

.form-multiselect[open] > summary {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-multiselect-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  max-height: 260px;
  padding: 8px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--app-form-border-color);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

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

.form-multiselect-option {
  margin: 0;
  min-height: 34px;
  padding: 6px 8px;
  border-color: transparent;
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

.row {
  display: flex;
  gap: 10px;
}

.row > div {
  flex: 1;
  min-width: 0;
}

.customer-form {
  margin-top: 18px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) repeat(3, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: var(--app-form-panel-padding);
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.filter-bar label {
  margin-bottom: 6px;
  font-size: var(--app-form-label-size);
}

.filter-bar > .form-choice {
  align-self: end;
  margin-bottom: 0;
  white-space: nowrap;
}

.filter-bar input,
.filter-bar select {
  margin-bottom: 0;
}

.filter-bar.form-panel {
  padding: var(--app-form-panel-padding);
  background: var(--app-form-panel-background);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-form-panel-radius);
  box-shadow: var(--app-shadow-sm);
}

.filter-bar.form-panel .form-field > label,
.filter-bar.form-panel .form-field-label,
.filter-bar.form-panel .form-fieldset > legend {
  margin: 0;
  font-size: var(--app-form-label-size);
}

.filter-bar.filter-bar-inline {
  width: fit-content;
  max-width: 100%;
  grid-template-columns: max-content minmax(160px, 260px);
  gap: 8px;
  align-items: center;
  padding: var(--app-form-panel-padding);
}

.filter-bar.filter-bar-inline.filter-bar--full-width {
  width: 100%;
}

.filter-bar.filter-bar-inline .form-field-label {
  white-space: nowrap;
}

.filter-bar.filter-bar-inline .form-field-inline > label {
  margin-bottom: 0;
  white-space: nowrap;
}

.filter-bar.filter-bar-inline select {
  min-width: 0;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.report-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-export-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  gap: 8px;
  min-height: var(--app-form-control-min-height);
  padding: 0 13px;
  border: 1px solid #86efac;
  border-radius: var(--app-control-radius);
  background: #f0fdf4;
  color: #15803d;
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.report-export-link span {
  font-size: 0.95rem;
  line-height: 1;
}

.report-export-link:hover {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
  transform: translateY(-1px);
}

.report-export-link:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}

.report-export-link-pdf {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.report-export-link-pdf:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.report-export-link-pdf:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.22);
}

.report-export-link-print {
  background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  color: #0369a1;
}

.report-export-link-print:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
  color: #075985;
}

.report-export-link-print:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.report-export-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.checkbox-row span {
  color: #374151;
}

.span-2 {
  grid-column: 1 / -1;
}

button {
  width: 100%;
  padding: var(--app-primary-button-padding);
  color: var(--app-primary-button-color);
  background: linear-gradient(180deg, #2f6ef0 0%, var(--app-primary-button-background) 100%);
  border: 1px solid var(--app-primary-button-border);
  border-radius: var(--app-control-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

button[type="submit"]:not(.secondary):not(.arseta-menu-item):hover,
form button:not([type]):not(.secondary):not(.arseta-menu-item):hover {
  color: var(--app-primary-button-color);
  background: linear-gradient(180deg, #2563eb 0%, var(--app-primary-button-hover-background) 100%);
  border-color: var(--app-primary-button-hover-border);
}

button.secondary {
  color: #1f2937;
  background: #ffffff;
  border-color: #d1d5db;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: var(--app-form-control-min-height);
  padding: 8px 15px;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid var(--app-border-medium);
  border-radius: var(--app-control-radius);
  box-shadow: var(--app-shadow-xs);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  color: #1d4ed8;
  background: var(--app-accent-soft);
  border-color: #93c5fd;
  box-shadow: var(--app-shadow-sm);
}

.btn:active {
  box-shadow: var(--app-shadow-xs);
  transform: translateY(1px);
}

.btn.primary {
  padding: 8px 15px;
  color: var(--app-primary-button-color);
  background: linear-gradient(180deg, #2f6ef0 0%, var(--app-primary-button-background) 100%);
  border-color: var(--app-primary-button-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 8px 18px -10px rgba(29, 78, 216, 0.85);
}

.btn.primary:hover {
  color: var(--app-primary-button-color);
  background: linear-gradient(180deg, #2563eb 0%, var(--app-primary-button-hover-background) 100%);
  border-color: var(--app-primary-button-hover-border);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12), 0 12px 24px -12px rgba(29, 78, 216, 0.9);
}

/* Destructive and activation buttons keep the gradient treatment of the primary
   button but in a pastel tone, so a row full of them never overpowers the page.
   The label stays a deep tone of the same hue: white text cannot reach the AA
   contrast ratio on a pastel fill, the dark label does. */
.btn.danger {
  color: #991b1b;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
}

.btn.danger:hover {
  color: #991b1b;
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  border-color: #f87171;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 18px -12px rgba(185, 28, 28, 0.55);
}

.btn.active {
  color: #166534;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}

.btn.active:hover {
  color: #166534;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #4ade80;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 18px -12px rgba(21, 128, 61, 0.55);
}

.btn.small {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 13px;
}

.btn.filter {
  min-height: 32px;
  padding: 5px 13px;
  color: #1e40af;
  background: var(--app-accent-soft);
  border-color: #bfdbfe;
  border-radius: 999px;
  box-shadow: none;
}

.btn.filter:hover,
.btn.filter:focus-visible {
  color: #ffffff;
  background: #2563eb;
  border-color: #1d4ed8;
}

.btn.filter.primary {
  color: var(--app-primary-button-color);
  background: linear-gradient(180deg, #2f6ef0 0%, var(--app-primary-button-background) 100%);
  border-color: var(--app-primary-button-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 8px 18px -10px rgba(29, 78, 216, 0.85);
}

.btn:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  box-shadow: var(--app-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:active {
    transition: none;
    transform: none;
  }
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.btn[hidden] {
  display: none;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* ARSETA_TABLE_STYLES_START */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--app-surface);
  border: 1px solid var(--app-border-soft);
  border-radius: 14px;
  box-shadow: var(--app-shadow-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbdcf2 transparent;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #cbdcf2;
  border: 3px solid #ffffff;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #a9c8ec;
}

.table-wrap.table-wrap-embedded {
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: #111827;
  font-family: var(--app-font-family);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #eaf1fa;
}

.data-table.table-align-top th,
.data-table.table-align-top td {
  vertical-align: top;
}

.data-table th {
  color: #1e3a8a;
  background: linear-gradient(180deg, #f6faff 0%, #eef5ff 100%);
  font-weight: 700;
  border-bottom-color: #d7e6f8;
}

.data-table td {
  color: #111827;
  background: #ffffff;
}

/* Zebra rows keep long record lists scannable; the hover tint stays stronger so
   the pointed-at row still reads as the active one. */
.data-table tbody tr:nth-child(even):not(.table-detail-row):not(.selected-row) td {
  background: #fbfdff;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tfoot th,
.data-table tfoot td {
  color: #1e3a8a;
  background: linear-gradient(180deg, #f6faff 0%, #eef5ff 100%);
  font-weight: 700;
  border-top: 1px solid #d7e6f8;
  border-bottom: 0;
}

.data-table.table-hover-rows tbody tr td {
  transition: background-color 0.16s ease;
}

.data-table.table-hover-rows tbody tr:hover td,
.data-table.table-hover-rows tbody tr:focus-within td,
.data-table.table-hover-rows tbody tr:nth-child(even):hover td,
.data-table.table-hover-rows tbody tr:nth-child(even):focus-within td {
  background: #eef6ff;
}

.data-table-compact th,
.data-table-compact td {
  padding: 8px 9px;
  font-size: 13px;
}

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

/* Keep wide tables readable on narrow viewports. The enclosing .table-wrap
   provides the horizontal scrolling instead of compressing table columns. */
.table-min-sm { min-width: 640px; }
.table-min-md { min-width: 760px; }
.table-min-lg { min-width: 860px; }
.table-min-xl { min-width: 940px; }
.table-min-2xl { min-width: 1320px; }

.table-cell-left { text-align: left !important; }
.table-cell-center { text-align: center !important; }
.data-table th.table-cell-center { text-align: center !important; }
.table-cell-number {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.table-cell-nowrap { white-space: nowrap; }
.table-cell-wrap { white-space: normal; }
.table-heading-with-info {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.table-cell-actions {
  width: 1%;
  text-align: right !important;
  vertical-align: middle !important;
  white-space: nowrap;
}
.table-cell-actions.table-cell-center { text-align: center !important; }
.data-table.table-align-top td.table-cell-actions {
  vertical-align: top !important;
}
.table-cell-xs { min-width: 30px; }
.table-cell-sm { min-width: 88px; }
.table-cell-md { min-width: 120px; }
.table-cell-lg { min-width: 180px; }
.table-cell-wide { min-width: 220px; }
.table-cell-xwide { min-width: 280px; }

.table-empty-cell {
  padding: 18px 12px !important;
  color: #64748b !important;
  text-align: center !important;
  background: #ffffff !important;
}

@media (max-width: 720px) {
  .table-empty-cell {
    text-align: left !important;
  }
}

.table-detail-row td {
  padding: 0;
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.data-table input:not([type="checkbox"]):not([type="radio"]),
.data-table select,
.data-table textarea {
  width: 100%;
  min-height: var(--app-form-control-min-height);
  min-width: 0;
  margin: 0;
  padding: 7px 10px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid var(--app-form-border-color);
  border-radius: var(--app-form-control-radius);
  box-shadow: none;
  font: inherit;
  font-size: var(--app-form-control-size);
  font-weight: 400;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.data-table select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Use for short, numeric values inside data tables without letting the
   default full-width form control consume the whole column. */
.data-table input.form-control.form-control-compact {
  width: min(100%, 3rem);
}

.data-table input.form-control.form-control-compact-wide {
  width: min(100%, 4.5rem);
}

.data-table input:not([type="checkbox"]):not([type="radio"]):hover,
.data-table select:hover,
.data-table textarea:hover {
  border-color: #93c5fd;
}

.data-table input[type="checkbox"],
.data-table input[type="radio"] {
  width: 16px;
  height: 16px;
}

.data-table .table-cell-number input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table input[readonly] {
  background: #f8fafc;
}

.data-table .checkmark {
  display: inline;
  width: auto;
}

.data-table input:not([type="checkbox"]):not([type="radio"]):focus,
.data-table select:focus,
.data-table textarea:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .data-table.table-hover-rows tbody tr td {
    transition: none;
  }
}
/* ARSETA_TABLE_STYLES_END */

.note-cell {
  min-width: 220px;
  white-space: normal;
}

.table-actions {
  text-align: right;
  white-space: nowrap;
}

.table-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.inline-form {
  display: inline-flex;
}

.inline-form .btn {
  width: auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: var(--app-meta-size);
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}

.status-neutral {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.status-info {
  color: #1d4ed8;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
}

.status-success {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.status-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.status-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.checkmark,
.sync-fail {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.checkmark {
  color: #00a651;
}

.sync-fail {
  color: #dc2626;
}

.success-cell {
  width: 110px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.muted {
  color: #6b7280;
}

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

.app-modal,
.modal-backdrop,
.route-test-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.app-modal-dialog,
.confirm-modal,
.route-test-window {
  width: 100%;
  max-height: calc(100vh - 36px);
  padding: 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border: 1px solid var(--app-border-soft);
  border-radius: 18px;
  box-shadow: var(--app-shadow-lg);
  animation: app-modal-appear 0.18s ease-out;
}

@keyframes app-modal-appear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-modal-dialog,
  .confirm-modal,
  .route-test-window {
    animation: none;
  }
}

.confirm-modal,
.route-test-window {
  max-width: 520px;
}

.app-modal-dialog--sm {
  max-width: 420px;
}

.app-modal-dialog--md {
  max-width: 520px;
}

.app-modal-dialog--lg {
  max-width: 720px;
}

.app-modal-dialog--xl {
  max-width: 960px;
}

.app-modal-title,
.confirm-modal h2,
.route-test-title {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.app-modal-body p,
.confirm-modal p,
.route-test-window p {
  margin: 0 0 12px;
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
}

.app-modal-actions,
.modal-actions,
.route-test-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.app-modal-grid,
.route-test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.app-modal-open {
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior-y: none;
}

body.app-modal-open.app-modal-preserve-scrollbar {
  overflow-y: scroll;
}

@media (max-width: 560px) {
  .app-modal {
    align-items: flex-start;
    padding: 12px;
  }

  .app-modal-dialog {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .app-modal-grid {
    grid-template-columns: 1fr;
  }

  .app-modal-actions > .btn {
    flex: 1 1 auto;
  }
}

.arseta-date-picker {
  position: relative;
  display: inline-block;
  min-width: 150px;
}

.arseta-date-picker .arseta-date-display {
  width: 100%;
  min-width: 150px;
  margin-bottom: 0;
  cursor: pointer;
  background: #ffffff;
}

.arseta-date-calendar {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  width: 280px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.arseta-date-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #0f172a;
}

.arseta-date-calendar-header button,
.arseta-date-calendar-grid button {
  color: #0f172a;
  background: #ffffff;
  border: 1px solid transparent;
  cursor: pointer;
}

.arseta-date-calendar-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.arseta-date-calendar-header button:hover,
.arseta-date-calendar-grid button:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.arseta-date-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.arseta-date-calendar-day-name {
  padding: 5px 0;
  color: #475569;
  font-size: var(--app-meta-size);
  font-weight: 700;
  text-align: center;
}

.arseta-date-calendar-grid button {
  min-width: 0;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  font-size: 13px;
}

.arseta-date-calendar-grid button.is-selected {
  color: #ffffff;
  background: #1f6feb;
  border-color: #1f6feb;
}

.arseta-date-calendar-grid button:disabled {
  color: #cbd5e1;
  background: #f8fafc;
  cursor: not-allowed;
}

.ai-chat-input-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px 10px 18px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ai-chat-input-shell textarea {
  flex: 1 1 auto;
  min-height: 24px;
  max-height: 220px;
  margin: 0;
  padding: 7px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  line-height: 1.45;
  resize: none;
  overflow-y: hidden;
}

.ai-chat-input-shell textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.arseta-voice-control-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-bottom: 1px;
}

.arseta-voice-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 112px;
  min-width: 112px;
  height: 38px;
  padding: 0 14px;
  color: #1f2937;
  background: #ffffff;
  border-color: #d1d5db;
  border-radius: 999px;
  box-shadow: none;
  font-size: 14px;
  white-space: nowrap;
  flex-wrap: nowrap;
  position: relative;
}

.arseta-voice-control-button:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.arseta-voice-control-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.arseta-voice-control-button.is-listening,
.arseta-voice-control-button.is-listening:hover {
  color: #ffffff;
  background: #1f6feb;
  border-color: #1d4ed8;
}

.arseta-voice-control-button.is-loading,
.arseta-voice-control-button.is-loading:hover {
  color: #1d4ed8;
  background: #ffffff;
  border-color: #93c5fd;
  width: 144px;
  min-width: 144px;
}

.arseta-voice-control-button.is-loading svg {
  display: none;
}

.arseta-voice-control-button.is-loading::after {
  content: '';
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid #bfdbfe;
  border-top-color: #1d4ed8;
  border-radius: 999px;
  animation: arseta-voice-control-spin 0.75s linear infinite;
}

.arseta-voice-control-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.arseta-voice-control-button span {
  white-space: nowrap;
  line-height: 1;
}

body.arseta-voice-waiting,
body.arseta-voice-waiting * {
  cursor: wait !important;
}

@keyframes arseta-voice-control-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arseta-voice-control-button.is-loading::after {
    animation: none;
  }
}

.hamburger-wrap {
  position: relative;
  display: inline-block;
  z-index: 50;
}

.rightbar .hamburger-wrap {
  transform: translateY(4px);
}

.arseta-hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #1d4ed8;
  background: #ffffff;
  border: 1px solid var(--app-border-medium);
  border-radius: 9999px;
  box-shadow: var(--app-shadow-sm);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.12s;
}

.arseta-hamburger-btn:hover {
  background: var(--app-accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--app-shadow-md);
}

.arseta-hamburger-btn:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  box-shadow: var(--app-focus-ring);
}

.arseta-hamburger-btn svg {
  display: block;
}

.arseta-hamburger-btn svg path {
  stroke-width: 3.6;
}

.arseta-menu-panel {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 2000;
  display: none;
  min-width: 250px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--app-border-soft);
  border-radius: 16px;
  box-shadow: var(--app-shadow-lg);
}

.arseta-menu-panel.open {
  display: block;
}

.arseta-desktop-sidebar {
  display: none;
}

.arseta-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  color: #1f4fa3;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.arseta-menu-form {
  margin: 0;
}

.arseta-menu-form .arseta-menu-item {
  width: 100%;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.arseta-menu-item:not(.arseta-menu-item-submenu) {
  margin: 0.35rem 0;
  border-radius: 14px;
}

/* The active destination reads as a filled pill with a left accent instead of a
   bold white row, so the current page is recognisable at a glance. */
.arseta-menu-item.is-current {
  color: #12327c;
  background: linear-gradient(180deg, #eef5ff 0%, #e2edfe 100%);
  border-color: transparent;
  font-weight: 600;
}

.arseta-menu-item.is-current::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: #1d4ed8;
  border-radius: 999px;
}

.arseta-menu-heading {
  padding: 0.75rem 0.75rem 0.25rem;
  color: #64748b;
  font-size: var(--app-meta-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.arseta-menu-item:hover {
  color: #12327c;
  background: #f1f6fd;
  border-color: transparent;
  box-shadow: none;
}

.arseta-menu-item.is-current:hover {
  background: linear-gradient(180deg, #e7f0ff 0%, #d9e8fd 100%);
}

.arseta-menu-item:focus-visible,
.arseta-menu-group-toggle:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: -2px;
}

.arseta-menu-group {
  margin: 0.35rem 0;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0;
}

.arseta-menu-group:hover {
  border-color: transparent;
  box-shadow: none;
}

.arseta-menu-group.is-open {
  background: #f8fbff;
  border-color: #dbe8f8;
  box-shadow: none;
  padding: 0.25rem;
}

.arseta-menu-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.75rem;
  color: #1f4fa3;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  border-radius: 14px;
}

.arseta-menu-group > .arseta-menu-group-toggle {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.arseta-menu-group:hover > .arseta-menu-group-toggle {
  color: #12327c;
  background: #f1f6fd;
}

.arseta-menu-group.is-open > .arseta-menu-group-toggle {
  color: #12327c;
  background: #e8f1fe;
}

.arseta-menu-group.is-open > .arseta-menu-group-toggle {
  box-shadow: none;
}

.arseta-menu-group-caret {
  margin-left: auto;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.arseta-menu-group-caret svg {
  display: block;
  width: 100%;
  height: 100%;
}

.arseta-menu-group.is-open > .arseta-menu-group-toggle .arseta-menu-group-caret {
  transform: rotate(90deg);
}

.arseta-menu-submenu {
  display: none;
  margin: 0;
  padding: 0.28rem 0.2rem 0.2rem;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
}

.arseta-menu-group.is-open > .arseta-menu-submenu {
  display: block;
  margin: 0 -0.25rem -0.25rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  padding-bottom: 0.45rem;
}

.arseta-menu-item-submenu {
  padding: 0.62rem 0.7rem;
  color: #1f4fa3;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: none;
}

.arseta-menu-item-submenu:hover {
  background: #f1f6fd;
  border-color: transparent;
  box-shadow: none;
}

.arseta-menu-heading-submenu {
  padding: 0.55rem 0.7rem 0.2rem;
  color: #1f4fa3;
  font-size: var(--app-meta-size);
}

.arseta-menu-sep-submenu {
  display: block;
  margin: 0.4rem 0.7rem;
  background: #bfdbfe;
}

.arseta-menu-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #1d4ed8;
}

.arseta-menu-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.arseta-menu-item-ask-ai .arseta-menu-icon-wrap { color: #2563eb; }
.arseta-menu-item-unanswered-questions .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-item-knowledge-base .arseta-menu-icon-wrap { color: #ca8a04; }
.arseta-menu-item-customers .arseta-menu-icon-wrap { color: #0f766e; }
.arseta-menu-item-product-services .arseta-menu-icon-wrap { color: #b45309; }
.arseta-menu-item-make-sale .arseta-menu-icon-wrap { color: #16a34a; }
.arseta-menu-item-customer-payments .arseta-menu-icon-wrap { color: #0f766e; }
.arseta-menu-item-returns .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-item-customer-statement .arseta-menu-icon-wrap { color: #f59e0b; }
.arseta-menu-item-customer-portfolio .arseta-menu-icon-wrap { color: #db2777; }
.arseta-menu-item-sales-reports .arseta-menu-icon-wrap,
.arseta-menu-item-sales-details .arseta-menu-icon-wrap,
.arseta-menu-item-sales-pivot .arseta-menu-icon-wrap,
.arseta-menu-item-price-list .arseta-menu-icon-wrap,
.arseta-menu-item-customer-balances .arseta-menu-icon-wrap,
.arseta-menu-item-overdue-receivables .arseta-menu-icon-wrap { color: #2563eb; }
.arseta-menu-item-sales-ai .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-item-route-plan .arseta-menu-icon-wrap { color: #059669; }
.arseta-menu-item-visit-calendar .arseta-menu-icon-wrap { color: #ea580c; }
.arseta-menu-item-visit-notes .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-item-customer-authorization .arseta-menu-icon-wrap { color: #16a34a; }
.arseta-menu-item-company-logo .arseta-menu-icon-wrap { color: #db2777; }
.arseta-menu-item-application-selection .arseta-menu-icon-wrap { color: #4f46e5; }
.arseta-menu-item-membership .arseta-menu-icon-wrap { color: #d97706; }
.arseta-menu-item-software-support .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-item-user-management .arseta-menu-icon-wrap { color: #4f46e5; }
.arseta-menu-item-company-info .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-item-profile .arseta-menu-icon-wrap { color: #0284c7; }
.arseta-menu-item-change-password .arseta-menu-icon-wrap,
.arseta-menu-item-signout .arseta-menu-icon-wrap { color: #dc2626; }
.arseta-menu-group-ai-customer-support .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-group-crm .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #0f766e; }
.arseta-menu-group-field-sales .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #ea580c; }
.arseta-menu-group-customer-portal .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-group-managerial .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #4f46e5; }
.arseta-menu-group-settings .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #475569; }

/* Each operational menu destination keeps its own visual cue. Report entries
   deliberately share the chart treatment so reports remain a recognisable set. */
.arseta-menu-item-ask-ai .arseta-menu-icon-wrap { color: #2563eb; }
.arseta-menu-item-unanswered-questions .arseta-menu-icon-wrap { color: #9333ea; }
.arseta-menu-item-knowledge-base .arseta-menu-icon-wrap { color: #a16207; }
.arseta-menu-item-ads-overview .arseta-menu-icon-wrap { color: #c2410c; }
.arseta-menu-item-ads-accounts .arseta-menu-icon-wrap { color: #be123c; }
.arseta-menu-item-ads-recommendations .arseta-menu-icon-wrap { color: #ca8a04; }
.arseta-menu-item-ads-settings .arseta-menu-icon-wrap { color: #475569; }
.arseta-menu-item-customers .arseta-menu-icon-wrap { color: #0f766e; }
.arseta-menu-item-make-sale .arseta-menu-icon-wrap { color: #15803d; }
.arseta-menu-item-offers .arseta-menu-icon-wrap { color: #db2777; }
.arseta-menu-item-customer-payments .arseta-menu-icon-wrap { color: #0e7490; }
.arseta-menu-item-returns .arseta-menu-icon-wrap { color: #7e22ce; }
.arseta-menu-item-customer-statement .arseta-menu-icon-wrap { color: #b45309; }
.arseta-menu-item-customer-portfolio .arseta-menu-icon-wrap { color: #c026d3; }
.arseta-menu-item-product-services .arseta-menu-icon-wrap { color: #9a3412; }
.arseta-menu-item-suppliers .arseta-menu-icon-wrap { color: #0369a1; }
.arseta-menu-item-purchasing .arseta-menu-icon-wrap { color: #6d28d9; }
.arseta-menu-item-stock-warehouse .arseta-menu-icon-wrap { color: #b91c1c; }
.arseta-menu-item-stock-movements .arseta-menu-icon-wrap { color: #115e59; }
.arseta-menu-item-sales-ai .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-item-route-plan .arseta-menu-icon-wrap { color: #047857; }
.arseta-menu-item-visit-calendar .arseta-menu-icon-wrap { color: #ea580c; }
.arseta-menu-item-visit-notes .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-item-customer-authorization .arseta-menu-icon-wrap { color: #16a34a; }
.arseta-menu-item-commerce-catalog .arseta-menu-icon-wrap { color: #d97706; }
.arseta-menu-item-commerce-orders .arseta-menu-icon-wrap { color: #4f46e5; }
.arseta-menu-item-company-logo .arseta-menu-icon-wrap { color: #e11d48; }
.arseta-menu-item-application-selection .arseta-menu-icon-wrap { color: #4338ca; }
.arseta-menu-item-membership .arseta-menu-icon-wrap { color: #92400e; }
.arseta-menu-item-software-support .arseta-menu-icon-wrap { color: #0284c7; }
.arseta-menu-item-user-management .arseta-menu-icon-wrap { color: #3730a3; }
.arseta-menu-item-company-info .arseta-menu-icon-wrap { color: #1d4ed8; }
.arseta-menu-item-profile .arseta-menu-icon-wrap { color: #0c4a6e; }
.arseta-menu-item-change-password .arseta-menu-icon-wrap { color: #dc2626; }
.arseta-menu-item-tasks .arseta-menu-icon-wrap { color: #65a30d; }
.arseta-menu-item-signout .arseta-menu-icon-wrap { color: #991b1b; }
.arseta-menu-item-portal-catalog .arseta-menu-icon-wrap { color: #8b5cf6; }
.arseta-menu-item-portal-cart .arseta-menu-icon-wrap { color: #155e75; }
.arseta-menu-item-portal-orders .arseta-menu-icon-wrap { color: #9f1239; }
.arseta-menu-group-ai-customer-support .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #7c3aed; }
.arseta-menu-group-ads-management .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #be123c; }
.arseta-menu-group-crm .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #0f766e; }
.arseta-menu-group-erp .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #6d28d9; }
.arseta-menu-group-field-sales .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #ea580c; }
.arseta-menu-group-customer-portal .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #0891b2; }
.arseta-menu-group-managerial .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #4f46e5; }
.arseta-menu-group-settings .arseta-menu-group-toggle .arseta-menu-icon-wrap { color: #475569; }
.arseta-menu-item-sales-reports .arseta-menu-icon-wrap,
.arseta-menu-item-sales-details .arseta-menu-icon-wrap,
.arseta-menu-item-sales-pivot .arseta-menu-icon-wrap,
.arseta-menu-item-price-list .arseta-menu-icon-wrap,
.arseta-menu-item-customer-balances .arseta-menu-icon-wrap,
.arseta-menu-item-overdue-receivables .arseta-menu-icon-wrap,
.arseta-menu-item-purchasing-stock-report .arseta-menu-icon-wrap,
.arseta-menu-item-supply-chain-analysis .arseta-menu-icon-wrap,
.arseta-menu-item-purchasing-stock-acceptance .arseta-menu-icon-wrap { color: #2563eb; }

.arseta-menu-sep {
  height: 1px;
  margin: 0.25rem 0;
  background: #e5e7eb;
}

.arseta-language-debug {
  display: flex;
  gap: 8px;
  padding: 0.45rem 0.75rem 0.25rem;
}

.arseta-language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  color: #1d4ed8;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.arseta-language-link:hover {
  background: #eff6ff;
  border-color: #60a5fa;
}

.arseta-language-link.active {
  color: #ffffff;
  background: #1f6feb;
  border-color: #1f6feb;
}

@media (min-width: 1180px) {
  /* One gutter around and between the two windows: the space left of the menu,
     between the menu and the content card, and right of the card are equal. */
  body {
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 0;
    padding-right: var(--app-shell-gutter);
    padding-bottom: var(--app-shell-gutter);
    padding-left: calc(var(--app-shell-gutter) * 2 + var(--app-sidebar-width));
    overflow-y: auto;
  }

  .page-shell {
    margin-left: 0;
    margin-right: auto;
    padding-top: var(--app-shell-gutter);
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
  }

  body:has(.page-shell--menu-less) {
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-shell--menu-less {
    margin-left: auto;
    margin-right: auto;
    padding-top: 12px;
  }

  .topbar--menu-less {
    height: auto;
    justify-content: center;
    margin-bottom: 0;
    overflow: visible;
    padding: 20px 0 12px;
    min-height: 72px;
  }

  .topbar.topbar--menu-less > .logo {
    display: block;
  }

  .page-shell > .card,
  .wrap > .card {
    min-height: calc(100vh - var(--app-shell-gutter) * 2);
    overflow: visible;
  }

  .topbar {
    height: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  .topbar > .logo {
    display: none;
  }

  .topbar .rightbar {
    height: 0;
    overflow: visible;
  }

  .hamburger-wrap {
    position: static;
  }

  .arseta-hamburger-btn,
  .arseta-menu-panel {
    display: none !important;
  }

  .arseta-desktop-sidebar {
    position: fixed;
    top: var(--app-shell-gutter);
    left: var(--app-shell-gutter);
    bottom: var(--app-shell-gutter);
    z-index: 1900;
    display: block;
    width: var(--app-sidebar-width);
    padding: 0 10px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--app-surface);
    border: var(--app-shell-frame-width) solid var(--app-shell-frame-color);
    border-radius: var(--app-card-radius);
    box-shadow: var(--app-shadow-md);
    scrollbar-width: none;
  }

  .arseta-desktop-sidebar:hover,
  .arseta-desktop-sidebar:focus-within {
    scrollbar-width: none;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .arseta-desktop-sidebar:hover::-webkit-scrollbar,
  .arseta-desktop-sidebar:focus-within::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-track {
    -webkit-appearance: none;
    background: #eff6ff;
    border-radius: 999px;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-track-piece {
    background: #eff6ff;
    border-radius: 999px;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-thumb {
    -webkit-appearance: none;
    background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
    border: 2px solid #eff6ff;
    border-radius: 999px;
  }

  .arseta-desktop-sidebar:hover::-webkit-scrollbar-thumb,
  .arseta-desktop-sidebar:focus-within::-webkit-scrollbar-thumb,
  .arseta-desktop-sidebar::-webkit-scrollbar-thumb:hover,
  .arseta-desktop-sidebar::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
    border: 2px solid #eff6ff;
    border-radius: 999px;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-thumb:window-inactive {
    background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
    border: 2px solid #eff6ff;
    border-radius: 999px;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-track:hover,
  .arseta-desktop-sidebar::-webkit-scrollbar-track:active,
  .arseta-desktop-sidebar::-webkit-scrollbar-track:window-inactive {
    background: #eff6ff;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }

  .arseta-desktop-sidebar::-webkit-scrollbar-corner,
  .arseta-desktop-sidebar::-webkit-resizer {
    background: #eff6ff;
  }

  @supports selector(::-webkit-scrollbar) {
    .arseta-desktop-sidebar::-webkit-scrollbar-thumb,
    .arseta-desktop-sidebar::-webkit-scrollbar-thumb:window-inactive {
      background-color: #93c5fd !important;
      background-image: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%) !important;
      border: 2px solid #eff6ff !important;
      border-radius: 999px !important;
      box-shadow: none !important;
    }

    .arseta-desktop-sidebar:hover::-webkit-scrollbar-thumb,
    .arseta-desktop-sidebar:focus-within::-webkit-scrollbar-thumb,
    .arseta-desktop-sidebar::-webkit-scrollbar-thumb:hover,
    .arseta-desktop-sidebar::-webkit-scrollbar-thumb:active {
      background-color: #93c5fd !important;
      background-image: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%) !important;
      border: 2px solid #eff6ff !important;
      border-radius: 999px !important;
      box-shadow: none !important;
    }

    .arseta-desktop-sidebar::-webkit-scrollbar-thumb:hover,
    .arseta-desktop-sidebar::-webkit-scrollbar-thumb:active {
      background-color: #dbeafe !important;
      background-image: linear-gradient(180deg, #e0f2fe 0%, #bfdbfe 100%) !important;
      border: 2px solid #eff6ff !important;
      border-radius: 999px !important;
      box-shadow: none !important;
    }

    .arseta-desktop-sidebar::-webkit-scrollbar-track,
    .arseta-desktop-sidebar::-webkit-scrollbar-track:hover,
    .arseta-desktop-sidebar::-webkit-scrollbar-track:active,
    .arseta-desktop-sidebar::-webkit-scrollbar-track-piece,
    .arseta-desktop-sidebar::-webkit-scrollbar-track-piece:hover,
    .arseta-desktop-sidebar::-webkit-scrollbar-track-piece:active {
      background-color: #eff6ff !important;
      background-image: none !important;
      box-shadow: none !important;
    }
  }

  .arseta-sidebar-scrollbar {
    position: fixed;
    z-index: 1905;
    width: 8px;
    background: #eff6ff;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .arseta-sidebar-scrollbar.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .arseta-sidebar-scrollbar-thumb {
    position: absolute;
    left: 0;
    width: 8px;
    min-height: 28px;
    background: linear-gradient(180deg, #cfe5ff 0%, #a9d0ff 100%);
    border: 1px solid #eff6ff;
    border-radius: 999px;
    cursor: default;
    transition: background 0.12s ease;
  }

  .arseta-sidebar-scrollbar-thumb.is-hover,
  .arseta-sidebar-scrollbar-thumb:hover,
  .arseta-sidebar-scrollbar-thumb.is-dragging {
    background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
  }

  /* The brand stays pinned while a long menu scrolls underneath it. The optical
     centring offset moved onto the logo itself so the sticky header can cover
     the full menu width. */
  .arseta-sidebar-logo {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 16px 8px 14px;
    background: var(--app-surface);
    text-decoration: none;
  }

  .arseta-sidebar-logo > img,
  .arseta-sidebar-logo > .arseta-brand-text {
    transform: translateX(-9px);
  }

  .arseta-sidebar-logo--company > img,
  .arseta-sidebar-logo--company > .arseta-brand-text {
    transform: none;
  }

  .arseta-sidebar-logo img {
    width: 180px;
    height: 49.4px;
    display: block;
    object-fit: contain;
  }

  .arseta-sidebar-logo .arseta-brand-text {
    width: 180px;
    justify-content: center;
    text-align: center;
  }

  .arseta-sidebar-logo--company {
    width: fit-content;
    max-width: calc(100% - 16px);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
    transform: none;
  }

.arseta-sidebar-logo--company img.arseta-company-logo {
    width: auto;
    height: 50px;
    max-width: 220px;
    max-height: 50px;
    object-fit: contain;
}

  .arseta-sidebar-logo--company .arseta-brand-text {
    width: auto;
    max-width: 250px;
  }

  .arseta-desktop-sidebar .arseta-menu-item {
    padding: 0.68rem 0.75rem;
  }

  .arseta-desktop-sidebar .arseta-menu-group {
    margin: 0.45rem 0;
  }

  .arseta-desktop-sidebar .arseta-menu-sep {
    margin: 0.4rem 0;
    background: #bfdbfe;
  }

  .arseta-desktop-sidebar .arseta-menu-heading {
    padding: 0.8rem 0.75rem 0.35rem;
  }

  .arseta-desktop-sidebar .arseta-language-debug {
    padding: 0.55rem 0.75rem 0.15rem;
  }
}

@media (max-width: 1179px) {
  body {
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .page-shell {
    padding-top: 10px;
  }

  .topbar {
    height: auto;
    margin-bottom: 12px;
    overflow: visible;
  }

  .topbar > .logo {
    display: block;
  }

  .topbar .rightbar {
    height: auto;
    overflow: visible;
  }

  .hamburger-wrap {
    position: relative;
    transform: none;
  }

  .rightbar .hamburger-wrap {
    transform: none;
  }

  .arseta-desktop-sidebar,
  .arseta-sidebar-scrollbar {
    display: none !important;
  }
}

@media (max-width: 560px) {
  :root {
    --app-page-frame-inset: 16px;
    --app-page-title-size: 22px;
  }

  body {
    padding: 0;
    justify-content: stretch;
  }

  .wrap,
  .page-shell {
    width: 100%;
    max-width: none;
  }

  .page-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .page-shell > .card {
    flex: 1 0 auto;
    border: 0;
  }

  .card {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .app-progress-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .summary-card {
    padding: 14px 16px;
  }

  .summary-card-value {
    font-size: 18px;
  }

  .form-panel {
    padding: 14px;
  }

  label {
    font-size: var(--app-form-label-size);
  }

  .row {
    flex-direction: column;
    gap: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--app-border-soft);
    box-shadow: 0 1px 12px -6px rgba(15, 23, 42, 0.35);
  }

  .rightbar {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .arseta-menu-panel {
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
  }

  .arseta-menu-panel::-webkit-scrollbar {
    display: none;
  }

  .page-title-actions:has(> :not([hidden]) ~ :not([hidden])),
  .page-title-actions:has(.report-export-actions) {
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .form-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-wrap: wrap;
  }

  button {
    padding: var(--app-primary-button-padding);
  }
}

@media (max-width: 1179px) {
  html.arseta-native-app body:has(.page-shell--biz),
  html.arseta-native-app body:has(.page-shell--portal) {
    background: #ffffff;
  }

  html.arseta-native-app .page-shell--biz,
  html.arseta-native-app .page-shell--portal {
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
  }

  html.arseta-native-app .topbar {
    position: relative;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    /* A backdrop filter would turn the top bar into the containing block of the
       fixed native menu panel, so the WebView shell keeps it switched off. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html.arseta-native-app .topbar > .logo,
  html.arseta-native-app .topbar .arseta-hamburger-btn {
    display: none;
  }

  html.arseta-native-app .topbar .rightbar {
    height: 0;
    overflow: visible;
  }

  html.arseta-native-app .topbar .hamburger-wrap {
    position: static;
  }

  html.arseta-native-app .page-shell--biz > .card,
  html.arseta-native-app .page-shell--portal > .card {
    flex: 1 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
    /* The native shell never shows the browser's blue outer card frame. */
    border: 0;
    box-shadow: none;
  }

  html.arseta-native-app .arseta-menu-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    max-height: calc(100dvh - 24px);
  }
}

@media print {
  .report-export-actions {
    display: none !important;
  }

  /* Printing a normal screen page keeps the record content only: navigation
     chrome, the ambient background and the page frame are not put on paper. */
  .arseta-desktop-sidebar,
  .arseta-sidebar-scrollbar,
  .arseta-menu-panel,
  .arseta-hamburger-btn,
  .hamburger-wrap,
  .topbar .rightbar,
  .app-loading-overlay,
  .arseta-impersonation-banner {
    display: none !important;
  }

  /* The brand header stays on paper; only the interactive chrome is removed. */
  .topbar {
    position: static;
    margin-bottom: 16px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  body {
    padding: 0 !important;
    background: #ffffff !important;
  }

  .wrap,
  .page-shell {
    max-width: none !important;
    padding: 0 !important;
  }

  .page-shell > .card,
  .card {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .table-wrap {
    overflow: visible !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
  }

  .data-table th {
    background: #f1f5f9 !important;
  }
}
