.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(196,160,74,.18), transparent 55%),
    #f7f7f5;
  padding: 1.5rem;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem 1.4rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}
.auth-card img {
  width: auto;
  height: var(--header-logo-h, 24px);
  max-width: min(170px, 100%);
  object-fit: contain;
  display: block;
}
.password-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.password-field input {
  width: 100%;
  padding-right: 2.75rem !important;
  box-sizing: border-box;
}
.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
}
.password-toggle:hover {
  color: var(--gold-deep);
  background: rgba(196, 160, 74, 0.1);
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}
.password-toggle .pw-ico-hide { display: none; }
.password-toggle[aria-pressed="true"] .pw-ico-show { display: none; }
.password-toggle[aria-pressed="true"] .pw-ico-hide { display: block; }
.password-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}
.auth-card h1 {
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-size: 1.8rem;
}
.auth-sub, .auth-help { margin: 0; color: var(--muted); font-size: 0.9rem; }
.status-card { text-align: left; gap: 0.85rem; }
.status-code {
  margin: 0.35rem 0 0;
  font-family: var(--display, "Fraunces", Georgia, serif);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(168, 132, 47, 0.55);
  font-weight: 600;
}
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.status-actions .btn { text-decoration: none; }

/* Mail provider segmented control (SMTP | Brevo) */
.lunsa-seg {
  display: inline-flex;
  padding: 0.25rem;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f7f5;
}
.lunsa-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--dash-fs-ui, 0.88rem);
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}
.lunsa-seg-btn.is-active {
  background: var(--gold);
  color: #111;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.mail-provider-pane[hidden] { display: none !important; }
.captcha-fields[hidden] { display: none !important; }
.captcha-type-badges {
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
}

.sec-form { display: grid; gap: 0.85rem; overflow: visible; }
.sec-panel {
  border: 1px solid rgba(17, 24, 20, 0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  padding: 0;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.sec-panel:focus-within,
.sec-panel:has(.lunsa-select.is-open) {
  z-index: 20;
}
.sec-panel > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: var(--dash-fs-title);
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: rgba(201, 162, 39, 0.08);
  border-radius: 12px 12px 0 0;
}
.sec-panel > summary .label-ico,
.sec-panel > summary .panel-ico {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--gold-deep, #8a6a22);
  opacity: 0.9;
}
.sec-panel:not([open]) > summary {
  border-radius: 12px;
}
.sec-panel > summary::-webkit-details-marker { display: none; }
.sec-panel > summary::after {
  content: "▾";
  margin-left: auto;
  opacity: 0.7;
  float: none;
}
.sec-panel[open] > summary::after { content: "▴"; }
.sec-panel-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 1rem 1rem;
  overflow: visible;
}
.sec-row-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.sec-row-inline > label {
  flex: 1 1 180px;
  margin: 0;
  min-width: 0;
}
.sec-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.sec-inline-actions .btn {
  margin: 0;
}
.sec-ip-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted, #5c675f);
}
.lunsa-captcha { margin: 0.5rem 0 0.25rem; }

.complaints-status-tabs .elog-count {
  font-weight: 500;
  opacity: 0.8;
}
.elog-result-banner {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(201,162,39,0.12);
  font-size: var(--dash-fs-meta, 0.9rem);
}
.elog-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}
.elog-toolbar-left { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.elog-pager a { font-weight: 700; color: var(--gold-deep); }
.elog-table .elog-check { width: 2.2rem; }
.elog-subject-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--gold-deep);
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.elog-preview {
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f4f4f2;
  min-height: 220px;
}
.elog-preview iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}
.elog-preview pre {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  font-size: var(--dash-fs-ui);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lunsa-dialog,
.elog-dialog {
  border: 0;
  padding: 0;
  border-radius: 16px;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.lunsa-dialog::backdrop,
.elog-dialog::backdrop { background: rgba(17, 24, 20, 0.45); }
.lunsa-dialog-inner,
.elog-dialog-inner { display: grid; grid-template-rows: auto auto 1fr; max-height: calc(100vh - 2rem); }
.lunsa-dialog-head,
.elog-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(17,24,20,0.1);
  background: rgba(201,162,39,0.08);
}
.lunsa-dialog-head h3,
.elog-dialog-head h3 { margin: 0; font-size: 1.05rem; }
.lunsa-dialog-close,
.elog-dialog-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 0.1rem 0.35rem;
}
.elog-dialog-meta {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(17,24,20,0.08);
  background: #fafaf8;
}
.elog-dialog-meta div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}
.elog-dialog-meta strong { color: var(--muted, #5c675f); font-weight: 600; }
.elog-dialog-body {
  padding: 0;
  overflow: auto;
  min-height: 220px;
  background: #f4f4f2;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.elog-dialog-body iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}
.elog-dialog-body pre {
  margin: 0;
  padding: 1rem 1.1rem;
  white-space: pre-wrap;
  font-size: 0.88rem;
}

.tpl-block {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.tpl-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.tpl-block-head strong {
  font-size: var(--dash-fs-ui);
  font-weight: 700;
  color: var(--ink);
}
.tpl-preview {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-deep);
  text-decoration: none;
  white-space: nowrap;
}
.tpl-preview:hover { text-decoration: underline; }
.tpl-field { display: grid; gap: 0; margin: 0; }
.auth-error,
.form-error {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #fdeeee;
  color: #8a1f1f;
  font-size: 0.9rem;
}
.dash-alert { margin-bottom: 1rem; }
.stack-mt-sm { margin-top: 0.6rem; }
.stack-mt { margin-top: 1rem; }
.stack-mt-lg { margin-top: 1.2rem; }
.stack-mb { margin-bottom: 1rem; }
.pre-wrap { white-space: pre-wrap; }
.form-narrow { max-width: 640px; }
.form-wide { max-width: 720px; }
.auth-notice {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #f4f1e8;
  border: 1px solid rgba(168, 132, 47, 0.35);
  color: #3b3426;
  font-size: 0.9rem;
  display: grid;
  gap: 0.35rem;
}
.auth-notice p { margin: 0; line-height: 1.4; }
.auth-notice strong { color: #1f1a12; }
.auth-notice-help {
  font-size: 0.86rem;
  color: var(--muted, #5c675f);
}
.auth-notice-help a {
  color: var(--gold-deep, #8a6a1f);
  font-weight: 600;
}
.auth-form { display: grid; gap: 0.8rem; margin-top: 0.4rem; }
.apply-form label, .auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}
/* Caption row keeps icon + title on one line; controls full-width below */
.apply-form .label-row,
.auth-form .label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
}
.apply-form .label-row > .label-ico,
.auth-form .label-row > .label-ico {
  margin-right: 0;
  flex: 0 0 auto;
}
/* Legacy: icon as direct child of label (keep working, avoid broken grids) */
.apply-form label:has(> .label-ico):not(:has(> .label-row)),
.auth-form label:has(> .label-ico):not(:has(> .label-row)) {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.35rem;
  align-items: center;
}
.apply-form label:has(> .label-ico):not(:has(> .label-row)) > .label-ico,
.auth-form label:has(> .label-ico):not(:has(> .label-row)) > .label-ico {
  grid-column: 1;
  grid-row: 1;
  margin-right: 0;
  justify-self: start;
}
.apply-form label:has(> .label-ico):not(:has(> .label-row)) > :is(input, select, textarea, .lunsa-select, .date-field-wrap, .password-field),
.auth-form label:has(> .label-ico):not(:has(> .label-row)) > :is(input, select, textarea, .lunsa-select, .password-field) {
  grid-column: 1 / -1;
}
.apply-form label:has(> .label-ico):not(:has(> .label-row)) > .password-hint,
.auth-form label:has(> .label-ico):not(:has(> .label-row)) > .password-hint {
  grid-column: 1 / -1;
}
.apply-form label:has(> .label-row) > :is(input, select, textarea, .lunsa-select, .date-field-wrap, .password-field, .password-hint, .field-locked),
.auth-form label:has(> .label-row) > :is(input, select, textarea, .lunsa-select, .password-field, .password-hint, .field-locked) {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}
.apply-form label.switch:has(> .label-ico),
.auth-form label.switch:has(> .label-ico) {
  grid-template-columns: none;
}
.field-locked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 45px;
}
.field-block {
  display: grid;
  gap: 0.35rem;
}
.field-label {
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.auth-form select,
.auth-form textarea,
.apply-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.apply-form select,
.apply-form textarea,
.dash-table select,
.queue-search input[type="search"] {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.85rem;
  background: #fff;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.auth-form select,
.apply-form select,
.dash-table select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
  cursor: pointer;
}
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):hover,
.auth-form select:hover,
.auth-form textarea:hover,
.apply-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):hover,
.apply-form select:hover,
.apply-form textarea:hover,
.dash-table select:hover,
.queue-search input[type="search"]:hover {
  border-color: rgba(20, 20, 20, 0.22);
}
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
.auth-form select:focus,
.auth-form textarea:focus,
.apply-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
.apply-form select:focus,
.apply-form textarea:focus,
.dash-table select:focus,
.queue-search input[type="search"]:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.22);
  outline: none;
}
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus-visible,
.auth-form select:focus-visible,
.auth-form textarea:focus-visible,
.apply-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus-visible,
.apply-form select:focus-visible,
.apply-form textarea:focus-visible,
.dash-table select:focus-visible,
.queue-search input[type="search"]:focus-visible {
  outline: none;
}
.auth-form input[readonly],
.apply-form input[readonly] {
  background: #f3f3f1;
  color: #555;
}
.apply-form textarea,
.auth-form textarea {
  min-height: 110px;
  resize: vertical;
  scrollbar-gutter: stable;
}
.apply-form .term-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.apply-form .term {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  outline: none;
}
.apply-form .term:hover {
  border-color: rgba(168, 132, 47, 0.55);
}
.apply-form .term:focus-visible {
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.22);
}
.apply-form .term.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
}
.apply-calc-card {
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--line);
  max-width: none;
}
.apply-loan-calc .calc-card h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
}
.apply-card:has(.apply-loan-calc) .wizard-steps {
  margin-bottom: 1.1rem;
}
/* Square checkboxes: multi-select / consent only — not on/off settings */
.apply-form input[type="checkbox"],
.auth-form input[type="checkbox"],
.dash-body input[type="checkbox"],
.elog-table input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(20, 20, 20, 0.32);
  border-radius: 5px;
  background-color: #fff;
  background-image: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.72rem 0.72rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
  color-scheme: light;
  accent-color: #c4a04a;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.apply-form input[type="checkbox"]::before,
.auth-form input[type="checkbox"]::before,
.dash-body input[type="checkbox"]::before,
.elog-table input[type="checkbox"]::before {
  content: none !important;
  display: none !important;
}
.apply-form input[type="checkbox"]:hover,
.auth-form input[type="checkbox"]:hover,
.dash-body input[type="checkbox"]:hover,
.elog-table input[type="checkbox"]:hover {
  border-color: rgba(168, 132, 47, 0.85);
}
.apply-form input[type="checkbox"]:checked,
.auth-form input[type="checkbox"]:checked,
.dash-body input[type="checkbox"]:checked,
.elog-table input[type="checkbox"]:checked {
  background-color: #c4a04a;
  border-color: #a8842f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.2l3.1 3.2 6.5-6.6' stroke='%23111111' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.apply-form input[type="checkbox"]:focus-visible,
.auth-form input[type="checkbox"]:focus-visible,
.dash-body input[type="checkbox"]:focus-visible,
.elog-table input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.28);
}
.apply-form input[type="checkbox"]:disabled,
.auth-form input[type="checkbox"]:disabled,
.dash-body input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* On/off toggles (settings Enable / reminders / alerts / etc.) */
.dash-body .switch,
.dash-body .check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500 !important;
  cursor: pointer;
  user-select: none;
}
.dash-body .switch input[type="checkbox"],
.dash-body .check input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  position: relative;
  width: 2.55rem !important;
  height: 1.4rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid rgba(20, 20, 20, 0.22) !important;
  border-radius: 999px !important;
  background-color: #d8d5cf !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  cursor: pointer;
  flex: 0 0 auto;
  vertical-align: middle;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.dash-body .switch input[type="checkbox"]::before,
.dash-body .check input[type="checkbox"]::before {
  content: none !important;
  display: none !important;
}
.dash-body .switch input[type="checkbox"]::after,
.dash-body .check input[type="checkbox"]::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 50%;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translateY(-50%);
  transition: left 0.18s ease;
}
.dash-body .switch input[type="checkbox"]:hover,
.dash-body .check input[type="checkbox"]:hover {
  border-color: rgba(168, 132, 47, 0.7) !important;
}
.dash-body .switch input[type="checkbox"]:checked,
.dash-body .check input[type="checkbox"]:checked {
  background-color: #c4a04a !important;
  border-color: #a8842f !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
.dash-body .switch input[type="checkbox"]:checked::after,
.dash-body .check input[type="checkbox"]:checked::after {
  left: calc(100% - 1.05rem - 2px);
}
.dash-body .switch input[type="checkbox"]:focus-visible,
.dash-body .check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.32) !important;
}
.dash-body .switch input[type="checkbox"]:disabled,
.dash-body .check input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Kill native number spinners / search chrome (all dash + auth surfaces) */
.dash-body input[type="number"]::-webkit-outer-spin-button,
.dash-body input[type="number"]::-webkit-inner-spin-button,
.auth-body input[type="number"]::-webkit-outer-spin-button,
.auth-body input[type="number"]::-webkit-inner-spin-button,
.apply-form input[type="number"]::-webkit-outer-spin-button,
.apply-form input[type="number"]::-webkit-inner-spin-button,
.auth-form input[type="number"]::-webkit-outer-spin-button,
.auth-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dash-body input[type="number"],
.auth-body input[type="number"],
.apply-form input[type="number"],
.auth-form input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.dash-body input[type="search"]::-webkit-search-decoration,
.dash-body input[type="search"]::-webkit-search-cancel-button,
.dash-body input[type="search"]::-webkit-search-results-button,
.dash-body input[type="search"]::-webkit-search-results-decoration,
.auth-body input[type="search"]::-webkit-search-decoration,
.auth-body input[type="search"]::-webkit-search-cancel-button,
.queue-search input[type="search"]::-webkit-search-decoration,
.queue-search input[type="search"]::-webkit-search-cancel-button,
.date-field-search input[type="search"]::-webkit-search-decoration,
.date-field-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Custom select — kills native OS blue menus */
.lunsa-select {
  position: relative;
  width: 100%;
}
.lunsa-select-native {
  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;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.lunsa-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.85rem;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.lunsa-select-trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  margin-top: -0.2rem;
  flex: 0 0 auto;
}
.lunsa-select.is-open .lunsa-select-trigger,
.lunsa-select-trigger:focus-visible {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.22);
}
.lunsa-select-menu {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20, 20, 20, 0.12);
  max-height: 240px;
  overflow: auto;
}
.lunsa-select-menu [role="option"] {
  padding: 0.85rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: var(--dash-fs-ui);
  color: var(--ink);
  margin: 0.2rem 0;
}
.lunsa-select-menu [role="option"]:hover {
  background: rgba(196, 160, 74, 0.12);
}
.lunsa-select-menu [role="option"].is-active {
  background: var(--gold);
  color: #111;
  font-weight: 600;
}
.lunsa-select-menu [role="option"].is-disabled {
  opacity: 0.45;
  cursor: default;
}
.lunsa-select-menu [role="option"].is-disabled:hover {
  background: transparent;
}

.dash-body {
  --dash-top-h: 68px;
  /* Dashboard type scale — keep it short: ui / meta / title */
  --dash-fs-ui: 0.84rem;
  --dash-fs-meta: 0.76rem;
  --dash-fs-compact: 0.72rem;
  --dash-fs-title: 1.05rem;
  --dash-fs-display: 1.12rem;
  --dash-pad-panel: 1rem 1.05rem;
  --dash-gap-tight: 0.45rem;
  --dash-control-h: 40px;
  background: #f4f4f2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
  font-size: var(--dash-fs-ui);
}
.dash-body .btn {
  font-size: var(--dash-fs-ui);
}
.dash-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  /* Above sticky/collapsed sidebar (z-index 40) so the rail never covers logo/pill */
  z-index: 100;
  flex: 0 0 auto;
}
.dash-top-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem;
  box-sizing: border-box;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dash-top-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.apply-nav-back[hidden] {
  display: none !important;
}
.apply-nav-back {
  flex: 0 0 auto;
}
.dash-logo img {
  height: var(--header-logo-h, 24px);
  width: auto;
  display: block;
}
.dash-sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  place-items: center;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
  flex: 0 0 auto;
}
.dash-toggle-ico {
  width: 20px;
  height: 20px;
  display: block;
}
.dash-toggle-ico--close { display: none; }
body.sidebar-open .dash-toggle-ico--menu { display: none; }
body.sidebar-open .dash-toggle-ico--close { display: block; }
.dash-top-inner .user-pill {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  height: 40px;
  padding: 0 0.85rem 0 0.35rem;
  gap: 0.45rem;
  border-radius: 999px;
  box-sizing: border-box;
}
.dash-top-inner .user-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
}
.dash-top-inner .user-pill-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
}
.dash-top-inner .user-pill-name {
  line-height: 1;
  font-size: 0.88rem;
}
.dash-top-inner .user-pill-role {
  display: none !important;
}
@media (max-width: 900px) {
  .dash-top-inner .user-pill {
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    justify-content: center;
    border-radius: 50% !important;
    gap: 0;
  }
  .dash-top-inner .user-pill-avatar {
    width: 40px;
    height: 40px;
  }
  .dash-top-inner .user-pill-ico {
    width: 18px;
    height: 18px;
  }
}
.dash-top-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 auto;
  min-width: 0;
}
.dash-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.dash-bell:hover,
.dash-bell[aria-expanded="true"] {
  border-color: rgba(196, 160, 74, 0.65);
  background: rgba(196, 160, 74, 0.1);
}
.dash-bell-ico {
  width: 18px;
  height: 18px;
  display: block;
}
.dash-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.dash-notif-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 220;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.2s ease, visibility 0.2s ease;
  will-change: transform;
}
body.notif-open .dash-notif-drawer {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .dash-notif-drawer {
    transition: none;
  }
}
.dash-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.dash-notif-head strong {
  font-size: var(--dash-fs-title);
}
.dash-notif-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dash-notif-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
}
.dash-notif-close:hover {
  background: rgba(196, 160, 74, 0.12);
}
.dash-notif-close-ico {
  width: 18px;
  height: 18px;
}
.dash-notif-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem;
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.dash-notif-empty {
  margin: 1.25rem 1rem;
  text-align: center;
}
.dash-notif-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  background: rgba(196, 160, 74, 0.08);
}
.dash-notif-item.is-read {
  background: transparent;
}
.dash-notif-item:hover {
  border-color: var(--line);
  background: rgba(196, 160, 74, 0.12);
}
.dash-notif-item-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(196, 160, 74, 0.16);
  color: var(--gold-deep, #8a6a22);
  flex: 0 0 auto;
}
.dash-notif-item.is-read .dash-notif-item-ico {
  background: rgba(20, 20, 20, 0.05);
  color: var(--muted);
}
.dash-notif-ico {
  width: 16px;
  height: 16px;
}
.dash-notif-item-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.dash-notif-item-title {
  font-weight: 700;
  font-size: var(--dash-fs-ui);
}
.dash-notif-item-body {
  font-size: var(--dash-fs-meta);
  color: var(--muted);
}
.dash-notif-item-time {
  font-size: var(--dash-fs-compact);
}
.user-email-prefs {
  display: grid;
  gap: 0.55rem;
  margin: 0.35rem 0 0.85rem;
}
.user-email-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.user-email-pref-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.user-email-pref-row .label-ico {
  flex: 0 0 auto;
}
.user-ops-prefs {
  display: grid;
  gap: 0.55rem;
  margin: 0.35rem 0 0.85rem;
}
.user-ops-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: var(--dash-fs-ui);
}
.user-ops-pref-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.user-ops-pref-row .label-ico {
  flex: 0 0 auto;
}
.user-ops-pref-row .switch,
.user-email-pref-row .switch {
  margin: 0;
  flex: 0 0 auto;
}
.user-reset-form {
  margin-top: 0;
  max-width: 420px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaf8;
  display: grid;
  gap: 0.65rem;
}
.user-reset-form > label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}
.user-reset-form > label input {
  width: 100%;
  box-sizing: border-box;
}
.user-reset-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}
.user-reset-actions .switch {
  margin: 0;
}
.user-reset-submit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
}
.user-reset-wrap {
  margin-top: 1.25rem;
}
.super-legal-links {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}
.super-legal-links a {
  font-weight: 600;
  color: var(--ink);
}
.apply-top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}
.apply-reset-btn {
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}
.dash-user {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dash-user-name { color: var(--ink); font-weight: 600; }
.dash-user-role::before { content: "· "; }
.dash-user a { color: var(--ink); font-weight: 600; text-decoration: none; }
.dash-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.25rem 1.25rem 2.5rem;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  transition: grid-template-columns 0.2s ease;
  flex: 1 0 auto;
  min-width: 0;
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.avatar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar-mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}
.avatar-mark--header {
  width: 32px;
  height: 32px;
}
.avatar-mark--sm {
  width: 22px;
  height: 22px;
}
.btn-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.dash-table .avatar-mark {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.cell-person {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 22rem;
  min-width: 0;
}
.cell-person-copy {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.cell-person-name {
  font-weight: 600;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12ch;
}
.cell-person-email {
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-sidebar {
  position: sticky;
  top: calc(var(--dash-top-h, 68px) + 1rem);
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.75rem 1rem;
  transition: padding 0.2s ease;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--dash-top-h, 68px) - 2rem);
  max-height: calc(100dvh - var(--dash-top-h, 68px) - 2rem);
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.dash-side-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  padding: 0 0.35rem;
  flex: 0 0 auto;
}
.dash-side-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.dash-side-collapse {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink);
}
.dash-side-collapse:hover,
.dash-side-collapse:focus-visible {
  background: rgba(196, 160, 74, 0.12);
  border: 0;
  box-shadow: none;
  outline: none;
}
.dash-side-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.dash-side-nav > a,
.dash-side-nav > .dash-nav-group {
  flex: 0 0 auto;
  width: 100%;
}
.dash-nav-website {
  margin-top: 0.35rem;
  flex: 0 0 auto;
}
.dash-side-nav a,
.dash-nav-group-btn,
.dash-side-foot .dash-nav-account,
.dash-side-foot .dash-nav-website,
.dash-logout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  text-decoration: none;
  color: #333;
  font-family: var(--font, "DM Sans", system-ui, sans-serif);
  font-weight: 600;
  font-size: var(--dash-fs-ui);
  font-style: normal;
  letter-spacing: normal;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  min-height: 44px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}
.dash-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: block;
  margin: 0;
}
.dash-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font: inherit;
}
.dash-side-nav a:hover { background: rgba(196, 160, 74, 0.1); }
.dash-side-nav a.is-active,
.dash-side-foot .dash-nav-account.is-active {
  background: var(--gold);
  color: #111;
}
.dash-side-foot .dash-nav-account:hover,
.dash-side-foot .dash-nav-website:hover {
  background: rgba(196, 160, 74, 0.1);
}
.dash-nav-group {
  position: relative;
  display: grid;
  gap: 0.15rem;
  width: 100%;
}
.dash-nav-group-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.dash-nav-group-btn:hover { background: rgba(196, 160, 74, 0.1); }
.dash-nav-group-btn.is-active {
  background: rgba(196, 160, 74, 0.18);
  color: #111;
}
.dash-nav-chevron {
  margin-left: auto;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.7;
  transform-origin: 50% 50%;
  transition: transform 0.15s ease;
  /* Keep glyph metrics stable when rotated open/closed */
  font-style: normal;
  font-weight: 400;
}
.dash-nav-group.is-open .dash-nav-chevron {
  transform: rotate(180deg);
  font-size: 0.7rem;
  width: 16px;
  height: 16px;
}
.dash-nav-sub {
  display: grid;
  gap: 0.05rem;
  padding: 0.1rem 0 0.3rem 0.22rem;
  margin: 0 0 0.15rem 0.9rem;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  border-left: 2px solid rgba(196, 160, 74, 0.55);
}
.dash-nav-sub[hidden] { display: none !important; }
/* Submenus (accordion + flyout): smaller than top-level nav globally */
.dash-nav-sub a {
  font-size: var(--dash-fs-meta);
  font-weight: 600;
  padding: 0.4rem 0.55rem 0.4rem 0.45rem;
  min-height: 36px;
  gap: 0.45rem;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}
.dash-nav-sub .dash-ico {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: var(--dash-fs-title, 1.05rem);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  min-width: 0;
}
.panel-head .panel-title {
  margin: 0;
  min-width: 0;
}
.panel-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.panel-title.is-stack {
  margin-top: 1.5rem;
}
.panel > .panel-title:first-child {
  margin-top: 0;
}
.panel .table-scroll + .panel-title.is-stack,
.panel .pre-wrap + .panel-title.is-stack {
  margin-top: 1.65rem;
}
.detail-th {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
}
.detail-th-text {
  min-width: 0;
}
.dash-table-compact th .label-ico {
  width: 14px;
  height: 14px;
  margin-right: 0;
  flex: 0 0 auto;
  color: var(--gold-deep, #8a6a22);
  opacity: 0.88;
}
.panel-ico,
.label-ico,
.btn-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  vertical-align: -0.2em;
}
.label-ico {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 0.22rem;
  vertical-align: -0.22em;
  color: var(--gold-deep, #8a6a22);
  opacity: 0.88;
}
.btn.btn-gold,
.btn.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  line-height: 1.15;
}
.btn .btn-ico {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: unset;
}
.btn.btn-gold[hidden],
.btn.btn-ghost[hidden],
.dash-body .btn[hidden] {
  display: none !important;
}
.btn.btn-gold:hover,
.btn.btn-gold:focus-visible {
  background: var(--gold);
  color: #111;
}
.panel .btn.btn-gold:hover,
.apply-form .btn.btn-gold:hover,
.queue-search .btn.btn-gold:hover {
  box-shadow: 0 10px 22px rgba(168, 132, 47, 0.28);
}
.super-legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dash-side-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  background: #fff;
  display: grid;
  gap: 0.15rem;
  position: relative;
  z-index: 20;
  isolation: isolate;
}
.dash-side-foot .dash-nav-website {
  margin-top: 0;
  color: #333;
}
.dash-side-foot .dash-nav-website:hover {
  background: rgba(196, 160, 74, 0.1);
}
.dash-logout {
  color: #8a2f2f;
}
.dash-logout:hover {
  background: rgba(138, 47, 47, 0.08);
}
body.sidebar-collapsed .dash-side-foot {
  padding-top: 0.5rem;
}
/* Icon-only rail: one vertical column, icons centered */
body.sidebar-collapsed .dash-logout,
body.sidebar-collapsed .dash-side-nav a,
body.sidebar-collapsed .dash-nav-group-btn,
body.sidebar-collapsed .dash-side-foot .dash-nav-account,
body.sidebar-collapsed .dash-side-foot .dash-nav-website {
  justify-content: center;
  align-items: center;
  padding: 0;
  gap: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}
body.sidebar-collapsed .dash-nav-chevron {
  display: none;
}
/* Collapsed rail only: cascade flyouts (expanded = in-flow accordion, no side pop) */
body.sidebar-collapsed .dash-sidebar,
body.sidebar-collapsed .dash-side-nav {
  overflow: visible;
  z-index: 40;
}
body.sidebar-collapsed .dash-side-nav {
  overflow-y: visible;
}
/* Keep Account/Logout above any spill from the scrollable nav */
body.sidebar-collapsed .dash-side-foot {
  z-index: 50;
  background: #fff;
}
/* Collapsed rail: caret hints a cascade exists */
body.sidebar-collapsed .dash-nav-group-btn {
  position: relative;
}
body.sidebar-collapsed .dash-nav-group-btn::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 5px solid var(--muted);
  opacity: 0.75;
  pointer-events: none;
}
body.sidebar-collapsed .dash-nav-group-btn.is-active::after,
body.sidebar-collapsed .dash-nav-group.is-flyout .dash-nav-group-btn::after {
  border-left-color: var(--gold-deep);
  opacity: 1;
}
/* Cascade panel attached to collapsed rail */
body.sidebar-collapsed .dash-nav-sub {
  position: absolute;
  left: 100%;
  top: 0;
  width: max-content;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 100px));
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(196, 160, 74, 0.65);
  border-radius: 0 10px 10px 0;
  background: #fff;
  box-shadow: 6px 8px 22px rgba(0, 0, 0, 0.12);
  z-index: 60;
  display: none !important;
  overflow: visible;
  gap: 0.05rem;
}
body.sidebar-collapsed .dash-nav-group:hover .dash-nav-sub,
body.sidebar-collapsed .dash-nav-group.is-flyout .dash-nav-sub {
  display: grid !important;
}
body.sidebar-collapsed .dash-nav-group.is-flyout .dash-nav-sub[hidden],
body.sidebar-collapsed .dash-nav-group:hover .dash-nav-sub[hidden] {
  display: grid !important;
}
body.sidebar-collapsed .dash-nav-sub a {
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 36px;
  margin: 0;
  padding: 0.4rem 0.65rem;
  gap: 0.45rem;
  font-size: var(--dash-fs-meta);
  font-weight: 600;
  overflow: visible;
  white-space: nowrap;
  text-align: left;
  align-self: stretch;
  border-radius: 6px;
}
body.sidebar-collapsed .dash-nav-sub .dash-ico {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}
body.sidebar-collapsed .dash-nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
body.sidebar-collapsed .dash-nav-sub .dash-nav-label {
  position: static;
  width: auto;
  height: auto;
  max-width: none;
  overflow: visible;
  clip: auto;
  text-overflow: clip;
  flex: 0 1 auto;
  text-align: left;
  margin: 0;
}
body.sidebar-collapsed .dash-side-role {
  font-size: inherit;
}
.dash-sidebar-backdrop { display: none; }
.dash-main {
  width: auto;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
/* Global vertical rhythm between top-level dash panels */
.dash-main > .panel {
  margin-bottom: 1.25rem;
}
.dash-main > .panel:last-child {
  margin-bottom: 0;
}

.dash-footer {
  border-top: 1px solid var(--line);
  background: #ecece8;
  padding: 0.85rem 1.25rem 1.1rem;
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}
.dash-footer-inner {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.dash-footer-inner > p,
.dash-footer-copy {
  margin: 0;
  line-height: 1.4;
}
.dash-footer-copy {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: center;
  align-items: center;
  font-size: calc(0.8rem - 2px);
}
.dash-footer-copy span {
  display: inline;
}
.dash-tz-note {
  font-size: inherit;
}
.dash-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.95rem;
}
.dash-footer nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.dash-footer nav a:hover {
  color: var(--gold-deep);
  text-decoration: underline;
}
@media (max-width: 640px) {
  .dash-footer {
    padding: 0.75rem 0.75rem 1rem;
  }
  .dash-footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
  }
}

/* Desktop collapsed rail — icons in one vertical center line */
body.sidebar-collapsed .dash-shell {
  grid-template-columns: 76px minmax(0, 1fr);
}
body.sidebar-collapsed .dash-sidebar {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  align-items: center;
}
body.sidebar-collapsed .dash-side-label {
  display: none;
}
body.sidebar-collapsed .dash-side-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 28px;
  height: 28px;
}
body.sidebar-collapsed .dash-side-head {
  justify-content: center;
  width: 100%;
  margin-bottom: 0.25rem;
  padding: 0;
}
body.sidebar-collapsed .dash-side-nav {
  align-items: center;
  width: 100%;
}
body.sidebar-collapsed .dash-nav-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.sidebar-collapsed .dash-side-nav a,
body.sidebar-collapsed .dash-logout,
body.sidebar-collapsed .dash-nav-group-btn,
body.sidebar-collapsed .dash-side-foot .dash-nav-account,
body.sidebar-collapsed .dash-side-foot .dash-nav-website {
  font-size: var(--dash-fs-ui);
  text-align: center;
}
body.sidebar-collapsed .dash-nav-sub a {
  justify-content: flex-start;
  text-align: left;
}
body.sidebar-collapsed .dash-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  display: block;
}
body.sidebar-collapsed .dash-nav-website {
  width: auto;
  box-sizing: border-box;
  margin-top: auto;
}
body.sidebar-collapsed .dash-side-foot {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

@media (max-width: 900px) {
  .dash-body {
    padding-top: var(--dash-top-h);
  }
  .dash-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
  }
  .dash-shell {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }
  .dash-user-role { display: none; }
  .dash-sidebar {
    position: fixed;
    top: var(--dash-top-h, 68px);
    left: 0;
    right: auto;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 40;
    border-radius: 0;
    border-left: 0;
    border-top: 0;
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    padding-top: 1.25rem;
    /* Stretch via top+bottom — explicit 100dvh height leaves a gap on mobile chrome */
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }
  body.sidebar-open .dash-sidebar {
    transform: translateX(0);
  }
  /* Drawer submenu: smaller than main nav items on phone/tablet */
  .dash-nav-sub {
    gap: 0.05rem;
    margin: 0 0 0.15rem 1.05rem;
    padding: 0.05rem 0 0.25rem 0.22rem;
  }
  .dash-nav-sub a {
    font-size: var(--dash-fs-meta);
    font-weight: 600;
    padding: 0.4rem 0.55rem 0.4rem 0.45rem;
    min-height: 36px;
    gap: 0.45rem;
  }
  .dash-nav-sub .dash-ico {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
  }
  body.sidebar-collapsed .dash-shell {
    grid-template-columns: 1fr;
  }
  body.sidebar-collapsed .dash-side-label {
    display: block;
  }
  body.sidebar-collapsed .dash-side-collapse {
    display: none;
  }
  body.sidebar-collapsed .dash-side-nav a,
  body.sidebar-collapsed .dash-nav-group-btn,
  body.sidebar-collapsed .dash-side-foot .dash-nav-account,
  body.sidebar-collapsed .dash-side-foot .dash-nav-website,
  body.sidebar-collapsed .dash-logout {
    font-size: var(--dash-fs-ui);
    text-align: left;
    justify-content: flex-start;
    align-items: center;
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
    width: 100%;
    height: auto;
    min-height: 44px;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
  }
  body.sidebar-collapsed .dash-nav-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  body.sidebar-collapsed .dash-nav-sub {
    position: static;
    left: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin: 0 0 0.2rem 1.05rem;
    padding: 0.1rem 0 0.35rem 0.55rem;
    display: none !important;
  }
  body.sidebar-collapsed .dash-nav-sub a {
    width: 100%;
    height: auto;
    min-height: 36px;
    justify-content: flex-start;
    padding: 0.4rem 0.65rem;
    gap: 0.45rem;
    font-size: var(--dash-fs-meta);
    font-weight: 600;
    white-space: nowrap;
    overflow: visible;
  }
  body.sidebar-collapsed .dash-nav-sub .dash-ico {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
  }
  body.sidebar-collapsed .dash-nav-group.is-open .dash-nav-sub {
    display: grid !important;
  }
  body.sidebar-collapsed .dash-nav-chevron { display: inline; }
  .dash-side-collapse { display: none; }
  .dash-sidebar-toggle { display: grid; }
  .dash-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 35;
  }
  .dash-sidebar-backdrop[hidden] { display: none; }
  .doc-viewer-stage { display: block; }
  .doc-nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
  }
  .doc-nav-prev { left: 0.5rem; }
  .doc-nav-next { right: 0.5rem; }
  .doc-frame img,
  .doc-frame iframe { height: 280px; }
  .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .queue-toolbar { align-items: stretch; }
  .queue-search { width: 100%; }
  .queue-search input[type="search"] { min-width: 0; flex: 1; }
  .super-user-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: #fff;
  }
  .super-user-card .super-inline-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.65rem;
  }
  .super-user-card .super-inline-form select,
  .super-user-card .super-inline-form button { width: 100%; }
  .apply-steps,
  .wizard-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 560px) {
  .dash-body {
    --dash-top-h: 56px;
  }
  .dash-top-inner {
    padding: 0 0.65rem;
    gap: 0.4rem;
    min-height: 56px;
  }
  .dash-shell {
    padding: 1rem 0.75rem 2rem;
    gap: 0.85rem;
  }
  .dash-logo img { height: var(--header-logo-h, 24px); }
  .dash-top-left { gap: 0.45rem; min-width: 0; }
  .dash-top-inner .user-pill-role { display: none; }
  .apply-top-nav { gap: 0.35rem; }
  .apply-reset-btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.72rem;
    min-height: 32px;
  }
  .apply-reset-btn .btn-ico { width: 14px; height: 14px; }
  .dash-view-site { font-size: 0.8rem; margin-right: 0.4rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-ops { grid-template-columns: 1fr; }
  .doc-viewer-actions { width: 100%; }
}

.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.super-jump {
  display: none;
}
.super-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.super-inline-form select,
.super-inline-form .lunsa-select {
  min-width: 7.5rem;
}
.lunsa-confirm {
  width: min(420px, calc(100vw - 2rem));
}
.lunsa-confirm .lunsa-dialog-body {
  padding: 1rem 1.1rem 0.25rem;
  font-size: 0.95rem;
  color: var(--ink);
  overflow: visible;
  min-height: 0;
  background: #fff;
}
.lunsa-confirm .lunsa-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  padding: 0.85rem 1.1rem 1.1rem;
}
.lunsa-confirm.is-danger .lunsa-dialog-head {
  background: rgba(180, 50, 50, 0.08);
}

.brand-slot {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid var(--line, rgba(20,20,20,0.1));
  border-radius: 12px;
  background: #fafaf8;
  min-width: 0;
  overflow: hidden;
}
.brand-slot-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0.75rem;
  background: #fff;
  border-radius: 10px;
  border: 1px dashed rgba(20,20,20,0.12);
  overflow: hidden;
}
.brand-slot-preview img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.brand-slot-preview.is-favicon img {
  max-height: 40px;
}
.brand-slot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.brand-ready-chip {
  display: none;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(196, 160, 74, 0.2);
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 0.78rem;
}
.brand-slot.is-ready .brand-ready-chip { display: inline-flex; }
.brand-slot.is-ready .brand-slot-preview {
  border-color: rgba(168, 132, 47, 0.55);
}
.brand-file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}
.brand-file-btn {
  margin: 0;
  cursor: pointer;
  width: auto;
}
.brand-file-name {
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.brand-grid {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0;
}
@media (max-width: 900px) {
  .brand-grid { grid-template-columns: 1fr; }
}
.brand-form {
  width: 100%;
  max-width: none !important;
  margin-top: 1rem;
}
.brand-copy {
  display: grid;
  gap: 0.85rem;
  max-width: 640px;
}
#branding .brand-grid,
#branding .brand-slot {
  width: 100%;
  max-width: none;
}
.brand-slot-preview {
  min-height: 96px;
}
.brand-form [data-brand-save],
[data-dirty-form] [data-dirty-save] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.brand-form.is-dirty [data-brand-save],
[data-dirty-form].is-dirty [data-dirty-save] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.brand-form.is-saving [data-brand-save],
[data-dirty-form].is-saving [data-dirty-save] {
  opacity: 0.7;
  pointer-events: none;
}

.tpl-help {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  font-weight: 400;
}
.tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.tpl-chip {
  appearance: none;
  border: 1px solid rgba(168, 132, 47, 0.35);
  background: rgba(196, 160, 74, 0.12);
  color: var(--gold-deep);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.tpl-chip:hover {
  background: rgba(196, 160, 74, 0.22);
}
.dirty-save-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  padding: 0.65rem 0 0.15rem;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 28%);
}
.dirty-save-bar .btn {
  width: 100%;
}
[data-dirty-form]:not(.is-dirty) .dirty-save-bar {
  display: none;
}

.maint-panel.is-on .panel-title {
  color: var(--gold-deep);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.users-create-wrap {
  margin: 1rem 0 0.25rem;
  max-width: none;
}
.users-create-wrap > summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
  width: fit-content;
}
.users-create-wrap > summary::-webkit-details-marker { display: none; }
.users-create-wrap[open] > summary { margin-bottom: 0.75rem; }
.users-create {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafaf8;
  max-width: none;
}
.user-edit-panel {
  width: 100%;
}
.user-avatar-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.4rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #f7f6f2 100%);
  max-width: 560px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.user-avatar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.4rem;
  width: 100%;
  margin: 0;
}
.user-avatar-stage {
  position: relative;
  flex: 0 0 auto;
}
.user-avatar-hit {
  position: relative;
  display: block;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(168, 132, 47, 0.45);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.user-avatar-hit:hover,
.user-avatar-hit:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(168, 132, 47, 0.65);
  outline: none;
}
.user-avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(196, 160, 74, 0.14);
  display: grid;
  place-items: center;
}
.user-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-fallback-ico {
  width: 40px;
  height: 40px;
  color: var(--gold-deep, #8a6a22);
  opacity: 0.85;
}
.user-avatar-shade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: rgba(20, 20, 20, 0.48);
  color: #fff;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}
.user-avatar-hit:hover .user-avatar-shade,
.user-avatar-hit:focus-visible .user-avatar-shade,
.user-avatar-card.is-uploading .user-avatar-shade {
  opacity: 1;
}
.user-avatar-card.is-uploading .user-avatar-shade {
  opacity: 0;
}
.user-avatar-cam {
  width: 22px;
  height: 22px;
}
.user-avatar-shade-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.user-avatar-progress {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
}
.user-avatar-progress[hidden] {
  display: none !important;
}
.user-avatar-ring {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}
.user-avatar-ring-bg {
  stroke: rgba(0, 0, 0, 0.08);
}
.user-avatar-ring-fg {
  stroke: var(--gold, #c4a04a);
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 80ms linear;
}
.user-avatar-pct {
  position: absolute;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.user-avatar-meta {
  flex: 1 1 180px;
  min-width: 0;
}
.user-avatar-meta strong {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.user-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.user-avatar-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.user-avatar-actions .btn .btn-ico {
  flex: 0 0 auto;
}
.user-avatar-status {
  margin: 0.55rem 0 0;
  font-size: var(--dash-fs-meta);
  color: var(--muted);
}
.user-avatar-status.is-error {
  color: #9b1c1c;
}
.user-avatar-status.is-ok {
  color: #166534;
}
.btn-compact,
.dash-body .btn.btn-compact {
  padding: 0.4rem 0.75rem;
  font-size: var(--dash-fs-ui);
}
.btn-back,
.dash-body .btn.btn-back,
.dash-hero > a.btn-ghost,
.dash-hero-actions > a.btn-ghost {
  padding: 0.38rem 0.7rem;
  font-size: var(--dash-fs-ui);
  min-height: 0;
}
.dash-main > .btn-back {
  margin: 0 0 0.75rem;
  display: inline-flex;
}
/* Unified compact dash buttons — table action buttons stay on their own scale */
.dash-body .btn,
.dash-body a.btn,
.dash-body summary.btn {
  padding: 0.38rem 0.7rem;
  font-size: var(--dash-fs-ui);
  min-height: 0;
  line-height: 1.25;
}
.dash-body .dash-table .btn {
  padding: 0.28rem 0.65rem;
  font-size: inherit;
  line-height: 1.2;
}
.user-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}
.user-meta-ico {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  opacity: 0.9;
}
.user-meta-pill--login {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(191, 219, 254, 0.45);
  color: #1e3a8a;
}
.user-meta-pill--login strong {
  color: #1e3a8a;
}
.user-meta-pill--joined {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(187, 247, 208, 0.45);
  color: #14532d;
}
.user-meta-pill--joined strong {
  color: #14532d;
}
.user-edit-form {
  width: 100%;
  max-width: none;
}
.user-edit-fields {
  display: grid;
  gap: 0.85rem;
  max-width: 640px;
}
.priv-details {
  margin: 0.35rem 0 0.5rem;
}
.priv-details > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.priv-grid-neat {
  margin-top: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.85rem;
}
@media (max-width: 640px) {
  .priv-grid-neat {
    grid-template-columns: 1fr 1fr;
  }
}
.users-table {
  min-width: 720px;
}
.users-table td {
  vertical-align: middle;
}
.users-col-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 12rem;
}
.user-cell-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(196, 160, 74, 0.12);
  color: var(--gold-deep);
  flex: 0 0 auto;
  overflow: hidden;
}
.user-cell-avatar.has-photo {
  background: transparent;
}
.user-cell-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-cell-avatar-ico {
  width: 16px;
  height: 16px;
}
.user-cell-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.user-cell strong {
  font-size: inherit;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.user-cell-email {
  font-size: 0.86em;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.25;
}
.users-joined {
  white-space: nowrap;
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
}
.priv-fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem 1rem;
  margin: 0.35rem 0 0.65rem;
  background: linear-gradient(180deg, #fff 0%, #fafaf8 100%);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.priv-fieldset legend {
  padding: 0 0.4rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.priv-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.55rem;
}
.priv-chip {
  display: block;
  margin: 0;
  cursor: pointer;
  position: relative;
}
.priv-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.priv-chip-face {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* Compact symbol chips (SEO title separator) — not privilege menu chips */
.sep-fieldset {
  padding: 0.65rem 0.75rem 0.75rem;
}
.sep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sep-chip {
  display: block;
  margin: 0;
  cursor: pointer;
  position: relative;
}
.sep-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sep-chip-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.sep-chip input:checked + .sep-chip-face {
  border-color: var(--gold, #c4a574);
  background: color-mix(in srgb, var(--gold, #c4a574) 18%, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #c4a574) 35%, transparent);
}
.sep-chip input:focus-visible + .sep-chip-face {
  outline: 2px solid var(--gold, #c4a574);
  outline-offset: 2px;
}
.priv-chip-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.75;
}
.priv-chip input:checked + .priv-chip-face {
  border-color: var(--gold-deep);
  background: rgba(196, 160, 74, 0.14);
  box-shadow: 0 0 0 1px rgba(196, 160, 74, 0.2);
}
.priv-chip input:focus-visible + .priv-chip-face {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.priv-admin-extras {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.priv-subhead {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.priv-admin-extras .priv-subhead:not(:first-child) {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.user-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}
.user-meta-pill strong {
  font-weight: 600;
}
.user-meta-pill.is-on {
  border-color: rgba(22, 101, 52, 0.35);
  background: rgba(134, 239, 172, 0.28);
  color: #14532d;
}
.user-meta-pill.is-on strong { color: #14532d; }
.user-meta-pill.is-off {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
}
.user-meta-pill.is-off strong { color: #1e293b; }
.google-conn-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.google-conn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.google-conn-row strong {
  min-width: 7.5rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.google-conn-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--gold-deep, #8a6a1f);
}
.google-conn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}
.google-conn-actions .btn {
  font-size: calc(0.88rem - 2px);
  padding: 0.3rem 0.7rem;
}
@media (max-width: 640px) {
  .priv-chips {
    grid-template-columns: 1fr 1fr;
  }
}
.priv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.35rem 0.75rem;
}
.badge.status-super_admin {
  background: #1f2937;
  color: #f8fafc;
}
.badge.status-admin {
  background: #fde68a;
  color: #78350f;
}
.badge.status-staff {
  background: #bfdbfe;
  color: #1e3a8a;
}
.badge.status-customer {
  background: #e2e8f0;
  color: #334155;
}
.dash-hero h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 0;
  font-family: inherit;
  font-size: var(--dash-fs-display);
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}
.dash-hero .hero-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.9;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.stat-card, .panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--dash-pad-panel, 1rem 1.05rem);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.stat-card span { color: var(--muted); font-size: var(--dash-fs-meta); }
.stat-card .stat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--muted);
  font-size: var(--dash-fs-meta);
}
.stat-card .stat-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.85;
}
.stat-card strong { display: block; margin-top: 0.35rem; font-size: 1.35rem; }
.stat-card strong.is-meta {
  font-size: 1.05rem;
  font-weight: 600;
}
.stat-card strong.is-meta .badge {
  margin-top: 0.15rem;
}
.mon-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.mon-table .label-ico {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}
.panel h2:not(.panel-title) { margin: 0 0 0.85rem; font-size: var(--dash-fs-title, 1.05rem); }
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  margin: 0;
  padding: 0 0 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.table-scroll.is-scrollable {
  cursor: grab;
}
.table-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.table-scroll.is-dragging * {
  pointer-events: none;
}
.dash-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: var(--dash-fs-ui);
  table-layout: auto;
}
.dash-table.dash-table-compact {
  width: 100%;
  min-width: 0;
}
.dash-table tbody tr:nth-child(even) > *,
.dash-table.dash-table-compact > tr:nth-child(even) > *,
.dash-table.dash-table-compact tbody tr:nth-child(even) > * {
  background: #f7f7f7;
}
.dash-table tbody tr:nth-child(odd) > *,
.dash-table.dash-table-compact > tr:nth-child(odd) > *,
.dash-table.dash-table-compact tbody tr:nth-child(odd) > * {
  background: #fff;
}
.dash-table tbody tr:hover > *,
.dash-table.dash-table-compact > tr:hover > *,
.dash-table.dash-table-compact tbody tr:hover > * {
  background: rgba(196, 160, 74, 0.12);
}
.dash-table tbody tr.is-selected > *,
.dash-table tr.is-selected > * {
  background: rgba(196, 160, 74, 0.18);
}
.dash-view-site {
  color: var(--gold-ink, #8a6a22);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  margin-right: 0.65rem;
  white-space: nowrap;
}
.dash-view-site:hover { text-decoration: underline; }
body.sidebar-open { overflow: hidden; }
.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.complaints-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.complaints-status-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: var(--dash-fs-ui);
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
}
.complaints-status-tabs .status-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.9;
  margin: 0;
}
.complaints-status-tabs a.tab-all.is-active {
  color: #111;
  background: rgba(196, 160, 74, 0.22);
  border-color: rgba(168, 132, 47, 0.55);
}
.complaints-status-tabs a.tab-open {
  background: #bfdbfe;
  border-color: #60a5fa;
  color: #1e3a8a;
}
.complaints-status-tabs a.tab-open.is-active {
  background: #93c5fd;
  border-color: #2563eb;
  color: #1e3a8a;
}
.complaints-status-tabs a.tab-in_progress,
.complaints-status-tabs a.tab-pending,
.complaints-status-tabs a.tab-in_review {
  background: #fde68a;
  border-color: #f59e0b;
  color: #78350f;
}
.complaints-status-tabs a.tab-in_progress.is-active,
.complaints-status-tabs a.tab-pending.is-active,
.complaints-status-tabs a.tab-in_review.is-active {
  background: #fbbf24;
  border-color: #d97706;
  color: #78350f;
}
.complaints-status-tabs a.tab-resolved,
.complaints-status-tabs a.tab-active,
.complaints-status-tabs a.tab-approved {
  background: #86efac;
  border-color: #22c55e;
  color: #14532d;
}
.complaints-status-tabs a.tab-resolved.is-active,
.complaints-status-tabs a.tab-active.is-active,
.complaints-status-tabs a.tab-approved.is-active {
  background: #4ade80;
  border-color: #16a34a;
  color: #14532d;
}
.complaints-status-tabs a.tab-settled {
  background: #99f6e4;
  border-color: #2dd4bf;
  color: #115e59;
}
.complaints-status-tabs a.tab-settled.is-active {
  background: #2dd4bf;
  border-color: #0d9488;
  color: #134e4a;
}
.complaints-status-tabs a.tab-closed,
.complaints-status-tabs a.tab-cancelled {
  background: #cbd5e1;
  border-color: #94a3b8;
  color: #0f172a;
}
.complaints-status-tabs a.tab-closed.is-active,
.complaints-status-tabs a.tab-cancelled.is-active {
  background: #94a3b8;
  border-color: #64748b;
  color: #0f172a;
}
.complaints-status-tabs a.tab-in_arrears,
.complaints-status-tabs a.tab-declined {
  background: #fecaca;
  border-color: #f87171;
  color: #991b1b;
}
.complaints-status-tabs a.tab-in_arrears.is-active,
.complaints-status-tabs a.tab-declined.is-active {
  background: #f87171;
  border-color: #dc2626;
  color: #7f1d1d;
}
.complaints-status-tabs a.tab-submitted {
  background: #bfdbfe;
  border-color: #60a5fa;
  color: #1e3a8a;
}
.complaints-status-tabs a.tab-submitted.is-active {
  background: #93c5fd;
  border-color: #2563eb;
  color: #1e3a8a;
}
.complaints-status-tabs a.tab-delivered {
  background: #86efac;
  border-color: #22c55e;
  color: #14532d;
}
.complaints-status-tabs a.tab-delivered.is-active {
  background: #4ade80;
  border-color: #16a34a;
  color: #14532d;
}
.complaints-status-tabs a.tab-failed {
  background: #fecaca;
  border-color: #f87171;
  color: #991b1b;
}
.complaints-status-tabs a.tab-failed.is-active {
  background: #f87171;
  border-color: #dc2626;
  color: #7f1d1d;
}
.complaints-status-tabs a.tab-preview {
  background: #fde68a;
  border-color: #f59e0b;
  color: #78350f;
}
.complaints-status-tabs a.tab-preview.is-active {
  background: #fbbf24;
  border-color: #d97706;
  color: #78350f;
}
.complaints-status-tabs a.tab-all {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #334155;
}
.dash-table th, .dash-table td {
  text-align: left;
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.dash-table th {
  color: var(--ink);
  font-weight: 600;
  font-size: var(--dash-fs-meta);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-th-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 0.12rem 0.2rem 0.12rem 0;
  margin: -0.12rem 0;
  max-width: 100%;
}
.dash-th-sort-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-th-sort-ico {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  width: 0.7rem;
  height: 0.95rem;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.dash-th-sort-chev {
  display: block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.dash-th-sort-chev--up {
  border-bottom: 4px solid currentColor;
}
.dash-th-sort-chev--down {
  border-top: 4px solid currentColor;
}
.dash-th-sort-link:hover,
.dash-th-sort-link:focus-visible {
  color: var(--gold-deep, #8a6a1f);
  outline: none;
}
.dash-th-sort-link:hover .dash-th-sort-ico,
.dash-th-sort-link:focus-visible .dash-th-sort-ico {
  opacity: 0.95;
}
.dash-th-sort-link:hover .dash-th-sort-chev,
.dash-th-sort-link:focus-visible .dash-th-sort-chev {
  opacity: 0.9;
}
.dash-th-sort.is-sorted .dash-th-sort-link {
  color: var(--ink);
}
.dash-th-sort.is-sorted .dash-th-sort-ico {
  opacity: 1;
}
.dash-th-sort.is-sorted-asc .dash-th-sort-chev--up {
  border-bottom-color: var(--gold-deep, #8a6a1f);
  opacity: 1;
}
.dash-th-sort.is-sorted-asc .dash-th-sort-chev--down {
  opacity: 0.28;
}
.dash-th-sort.is-sorted-desc .dash-th-sort-chev--down {
  border-top-color: var(--gold-deep, #8a6a1f);
  opacity: 1;
}
.dash-th-sort.is-sorted-desc .dash-th-sort-chev--up {
  opacity: 0.28;
}
.dash-th-sort.is-sorted .dash-th-sort-link:hover {
  color: var(--gold-deep, #8a6a1f);
}
.dash-table td a {
  white-space: nowrap;
}
/* Status / role pills stay at original size (do not inherit table -2px) */
.dash-table .badge {
  font-size: 0.72rem;
}
.dash-table .btn {
  font-size: inherit;
  padding: 0.28rem 0.65rem;
  line-height: 1.2;
  gap: 0.35rem;
}
.dash-table .btn .btn-ico {
  width: 14px;
  height: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  max-width: none;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: #eee;
  color: #444;
}
.badge .badge-ico {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  opacity: 0.95;
}
.badge .badge-text {
  line-height: 1.1;
}
.stat-card > span:not(.stat-label) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dash-table td:has(> .badge) {
  white-space: nowrap;
  width: 1%;
}
@media (max-width: 720px) {
  .dash-table {
    font-size: var(--dash-fs-ui);
  }
  .dash-table th {
    font-size: var(--dash-fs-meta);
  }
  .dash-table th,
  .dash-table td {
    padding: 0.42rem 0.4rem;
  }
  .dash-table td small,
  .dash-table .user-cell-email {
    font-size: var(--dash-fs-meta);
  }
}
.badge.draft { background: #e2e8f0; color: #334155; }
.badge.submitted { background: #bfdbfe; color: #1e3a8a; }
.badge.in_review { background: #fde68a; color: #92400e; }
.badge.approved { background: #86efac; color: #14532d; }
.badge.declined { background: #fecaca; color: #991b1b; }
.badge.cancelled { background: #cbd5e1; color: #1e293b; }
.badge.pending { background: #fcd34d; color: #78350f; }
.badge.active { background: #6ee7b7; color: #065f46; }
.badge.in_arrears { background: #fdba74; color: #9a3412; }
.badge.defaulted { background: #f87171; color: #7f1d1d; }
.badge.open { background: #93c5fd; color: #1e40af; }
.badge.in_progress { background: #fbbf24; color: #78350f; }
.badge.resolved { background: #4ade80; color: #14532d; }
.badge.closed { background: #94a3b8; color: #0f172a; }
.badge.settled { background: #2dd4bf; color: #115e59; }
.badge.pass { background: #86efac; color: #14532d; }
.badge.fail { background: #fecaca; color: #991b1b; }
.badge.delivered { background: #86efac; color: #14532d; }
.badge.failed { background: #fecaca; color: #991b1b; }
.badge.preview { background: #fcd34d; color: #78350f; }

/* Status select: same pill scale / type as .badge */
.lunsa-select.is-status-select {
  position: relative;
  width: fit-content;
  max-width: 100%;
}
.lunsa-select.is-status-select .lunsa-select-trigger {
  position: relative;
  width: auto;
  min-width: 0;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 1.55rem 0.28rem 0.7rem;
  border-radius: 999px;
  border-width: 1px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.lunsa-select.is-status-select .lunsa-select-trigger::after {
  position: absolute;
  right: 0.55rem;
  width: 0.32rem;
  height: 0.32rem;
  margin-top: -0.12rem;
  border-right-color: currentColor;
  border-bottom-color: currentColor;
  opacity: 0.75;
}
.lunsa-select.is-status-select.is-open .lunsa-select-trigger,
.lunsa-select.is-status-select .lunsa-select-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(196, 160, 74, 0.28);
}
.lunsa-select.is-status-select .lunsa-select-menu {
  min-width: max(9.5rem, 100%);
  width: max-content;
  padding: 0.4rem;
  border-radius: 14px;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"] {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin: 0.12rem 0;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-active,
.lunsa-select.is-status-select .lunsa-select-trigger.status-approved,
.lunsa-select.is-status-select .lunsa-select-trigger.status-resolved {
  background: #86efac;
  border-color: #22c55e;
  color: #14532d;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-disabled,
.lunsa-select.is-status-select .lunsa-select-trigger.status-declined,
.lunsa-select.is-status-select .lunsa-select-trigger.status-defaulted {
  background: #fecaca;
  border-color: #f87171;
  color: #991b1b;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-open,
.lunsa-select.is-status-select .lunsa-select-trigger.status-submitted {
  background: #93c5fd;
  border-color: #3b82f6;
  color: #1e3a8a;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-in_progress,
.lunsa-select.is-status-select .lunsa-select-trigger.status-in_review,
.lunsa-select.is-status-select .lunsa-select-trigger.status-pending {
  background: #fbbf24;
  border-color: #d97706;
  color: #78350f;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-closed,
.lunsa-select.is-status-select .lunsa-select-trigger.status-cancelled,
.lunsa-select.is-status-select .lunsa-select-trigger.status-draft {
  background: #94a3b8;
  border-color: #64748b;
  color: #0f172a;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-in_arrears {
  background: #fdba74;
  border-color: #ea580c;
  color: #9a3412;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-settled {
  background: #5eead4;
  border-color: #14b8a6;
  color: #115e59;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-customer {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #334155;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-admin {
  background: #fde68a;
  border-color: #d4a017;
  color: #78350f;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-super_admin {
  background: #1f2937;
  border-color: #111827;
  color: #f8fafc;
}
.lunsa-select.is-status-select .lunsa-select-trigger.status-staff {
  background: #bfdbfe;
  border-color: #3b82f6;
  color: #1e3a8a;
}

.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="submitted"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="open"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="staff"] {
  background: #dbeafe;
  color: #1e3a8a;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_review"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_progress"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="pending"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="admin"] {
  background: #fef3c7;
  color: #78350f;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="approved"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="resolved"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="active"] {
  background: #d1fae5;
  color: #14532d;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="settled"] {
  background: #ccfbf1;
  color: #115e59;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="declined"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="disabled"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="defaulted"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_arrears"] {
  background: #fee2e2;
  color: #991b1b;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="cancelled"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="draft"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="closed"],
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="customer"] {
  background: #e2e8f0;
  color: #334155;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="super_admin"] {
  background: #1f2937;
  color: #f8fafc;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"]:hover {
  filter: brightness(0.96);
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="submitted"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="submitted"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="open"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="open"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="staff"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="staff"]:hover {
  background: #93c5fd !important;
  color: #1e3a8a !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_review"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_review"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_progress"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_progress"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="pending"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="pending"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="admin"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="admin"]:hover {
  background: #fbbf24 !important;
  color: #78350f !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="approved"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="approved"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="resolved"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="resolved"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="active"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="active"]:hover {
  background: #4ade80 !important;
  color: #14532d !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="settled"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="settled"]:hover {
  background: #2dd4bf !important;
  color: #115e59 !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="declined"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="declined"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="disabled"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="disabled"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="defaulted"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="defaulted"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_arrears"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="in_arrears"]:hover {
  background: #f87171 !important;
  color: #7f1d1d !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="cancelled"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="draft"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="closed"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="customer"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="cancelled"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="draft"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="closed"]:hover,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="customer"]:hover {
  background: #94a3b8 !important;
  color: #0f172a !important;
}
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="super_admin"].is-active,
.lunsa-select.is-status-select .lunsa-select-menu [role="option"][data-value="super_admin"]:hover {
  background: #111827 !important;
  color: #f8fafc !important;
}

.doc-viewer { display: grid; gap: 0.75rem; position: relative; }
.doc-viewer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: start;
}
.doc-viewer-toolbar .muted { margin: 0.2rem 0 0; }
.doc-viewer-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}
.doc-counter {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.25rem;
}
.doc-viewer-stage {
  position: relative;
  display: block;
}
.doc-frame-wrap {
  position: relative;
  min-width: 0;
}
.doc-nav {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.doc-nav-prev { left: 0.65rem; }
.doc-nav-next { right: 0.65rem; }
.doc-nav:disabled { opacity: 0.4; cursor: default; }
.doc-frame {
  background: #f4f4f2;
  border-radius: 14px;
  min-height: 360px;
  overflow: hidden;
  border: 0;
}
.doc-frame img,
.doc-frame iframe {
  width: auto;
  max-width: min(100%, 794px);
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  border: 0;
  display: block;
  background: #fff;
  object-fit: contain;
}
.doc-pdf-pages {
  max-height: 720px;
  overflow: auto;
  background: #e8e8e4;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.doc-pdf-page {
  width: auto;
  max-width: min(100%, 794px);
  height: auto;
  display: block;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.doc-pdf-more {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem;
}
.doc-preview-empty {
  min-height: 360px;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
}
.doc-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.doc-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(20,20,20,0.18);
  padding: 0;
  cursor: pointer;
}
.doc-dot.is-active { background: var(--gold-deep); }
.doc-fs-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}
body.doc-fs-open { overflow: hidden; }
body.doc-fs-open .dash-top,
body.doc-fs-open .dash-sidebar,
body.doc-fs-open .dash-sidebar-backdrop,
body.doc-fs-open .dash-footer {
  display: none !important;
}
body.doc-fs-open .dash-shell,
body.doc-fs-open .dash-main {
  padding: 0 !important;
  margin: 0 !important;
}
.doc-viewer.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0;
  padding: 1rem 1rem 1.25rem;
  background: #0c0c0c;
  color: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  border-radius: 0;
}
.doc-viewer.is-fullscreen .doc-viewer-toolbar .muted,
.doc-viewer.is-fullscreen .doc-counter {
  color: rgba(255, 255, 255, 0.65);
}
.doc-viewer.is-fullscreen .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}
.doc-viewer.is-fullscreen .btn-ghost:hover,
.doc-viewer.is-fullscreen .btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(232, 213, 163, 0.55);
  color: #fff;
}
.doc-viewer.is-fullscreen .btn-gold {
  color: #111;
}
.doc-viewer.is-fullscreen .doc-viewer-stage {
  min-height: 0;
  height: 100%;
}
.doc-viewer.is-fullscreen .doc-frame-wrap,
.doc-viewer.is-fullscreen .doc-frame {
  height: 100%;
  min-height: 0;
}
.doc-viewer.is-fullscreen .doc-frame {
  border-radius: 12px;
  max-height: none;
}
.doc-viewer.is-fullscreen .doc-frame img,
.doc-viewer.is-fullscreen .doc-frame iframe {
  width: auto;
  max-width: min(100%, 794px);
  height: auto;
  max-height: calc(100vh - 160px);
  margin: 0 auto;
}
.doc-viewer.is-fullscreen .doc-pdf-pages {
  max-height: calc(100vh - 160px);
  background: #1a1a1a;
}
.doc-viewer.is-fullscreen .doc-nav {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border-color: rgba(255, 255, 255, 0.4);
}
.doc-viewer.is-fullscreen .doc-dot { background: rgba(255,255,255,0.28); }
.doc-viewer.is-fullscreen .doc-dot.is-active { background: var(--gold); }
.panel-docs-full {
  margin-top: 1.15rem;
  width: 100%;
}
@media (max-width: 720px) {
  .doc-viewer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .doc-viewer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }
  .doc-viewer-actions .doc-counter {
    grid-column: 1 / -1;
    margin: 0;
  }
  .doc-viewer-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.7rem;
    font-size: 0.84rem;
    min-width: 0;
  }
  .doc-viewer-actions .btn-gold {
    grid-column: 1 / -1;
  }
  .doc-viewer.is-fullscreen { padding: 0.65rem; }
  .doc-nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .doc-nav-prev { left: 0.35rem; }
  .doc-nav-next { right: 0.35rem; }
  .doc-frame {
    min-height: 240px;
  }
  .doc-frame img,
  .doc-frame iframe {
    max-height: min(62vh, 520px);
  }
}
.apply-wrap {
  width: min(720px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
}
.apply-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem;
}
.apply-form { display: grid; gap: 0.85rem; }
.apply-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.apply-success {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #e8f7ee;
  color: #156b3a;
}
.wizard-steps {
  list-style: none;
  margin: 1rem 0 1.4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  border-radius: 999px;
  background: #f3f3f1;
}
.wizard-steps li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ddd;
  color: #333;
  font-size: 0.75rem;
}
.wizard-steps li.is-active {
  background: rgba(196,160,74,.2);
  color: #111;
}
.wizard-steps li.is-active span,
.wizard-steps li.is-done span {
  background: var(--gold);
}
.wizard-steps li.is-done { color: #111; }
.muted { color: var(--muted); font-size: var(--dash-fs-meta, 0.92rem); }
.filter-summary {
  margin-top: 0.65rem;
  font-size: var(--dash-fs-meta);
}
.date-filters + p.muted {
  font-size: var(--dash-fs-meta);
}
.elog-pager {
  font-size: var(--dash-fs-meta);
}
.dash-th-sort {
  white-space: nowrap;
}
.dash-th-sort-mark {
  display: none; /* legacy — dual-chevron .dash-th-sort-ico replaces text marks */
}
.dash-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
  font-size: var(--dash-fs-meta);
}
.dash-pager-meta {
  color: var(--muted);
}
.dash-pager-per {
  display: flex;
  align-items: center;
}
.dash-pager-per-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: var(--dash-fs-meta);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex-wrap: nowrap;
}
.dash-pager-per-select {
  min-width: 4.25rem;
  padding: 0.25rem 0.4rem;
  font-size: var(--dash-fs-meta);
}
/* Custom select enhancement must stay compact inside the pager */
.dash-pager-per .lunsa-select {
  width: auto;
  min-width: 4.5rem;
  flex: 0 0 auto;
}
.dash-pager-per .lunsa-select-trigger {
  width: auto;
  min-width: 4.5rem;
  padding: 0.28rem 0.55rem;
  font-size: var(--dash-fs-meta);
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  gap: 0.4rem;
}
.dash-pager-per .lunsa-select-trigger::after {
  width: 0.35rem;
  height: 0.35rem;
  margin-top: -0.15rem;
}
.dash-pager-per .lunsa-select-menu {
  left: 0;
  right: auto;
  width: max(100%, 4.75rem);
  min-width: 4.75rem;
  padding: 0.25rem;
  border-radius: 10px;
  max-height: 200px;
}
.dash-pager-per .lunsa-select-menu [role="option"] {
  padding: 0.35rem 0.55rem;
  font-size: var(--dash-fs-meta);
  font-weight: 600;
  margin: 0.05rem 0;
  border-radius: 7px;
}
.dash-pager-nav {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}
/* .switch / .check layout lives with toggle styles above */
.queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.queue-toolbar h2 { margin: 0; }
.queue-search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.queue-search input[type="search"] {
  min-width: min(280px, 70vw);
  border-radius: 999px;
}
a.stat-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
a.stat-card:hover {
  border-color: rgba(168, 132, 47, 0.45);
}

/* Date range filters — admin / super lists */
.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;
}
.date-filters {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fafaf8 100%);
}
.date-filters-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
}
.date-filters-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
  align-self: center;
  margin-right: 0.25rem;
}
.date-filters-main > .date-field {
  flex: 0 1 auto;
}
.date-filters-main > .date-field-search {
  flex: 1 1 180px;
}
.date-filters-main > .date-filters-actions {
  margin-left: auto;
}
.date-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: var(--dash-fs-ui);
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}
.date-field > span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  line-height: 1.2;
  white-space: nowrap;
  font-size: var(--dash-fs-compact, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.date-field > span .label-ico {
  width: 13px;
  height: 13px;
  margin-right: 0;
  flex: 0 0 auto;
  opacity: 0.85;
  color: var(--gold-deep, #8a6a22);
}
.date-field input.lunsa-date-input,
.apply-form input.lunsa-date-input,
.date-field-search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: var(--dash-control-h, 42px);
  min-width: 9.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--dash-fs-ui);
  font-weight: 500;
  color-scheme: light;
}
.date-field input.lunsa-date-input:hover,
.apply-form input.lunsa-date-input:hover,
.date-field-search input[type="search"]:hover {
  border-color: rgba(168, 132, 47, 0.45);
}
.date-field input.lunsa-date-input:focus,
.apply-form input.lunsa-date-input:focus,
.date-field-search input[type="search"]:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(196, 160, 74, 0.18);
}

/* Custom date field + calendar popover */
.lunsa-date {
  position: relative;
  display: block;
  min-width: 9.5rem;
}
.lunsa-date .lunsa-date-input {
  width: 100%;
  padding-right: 2.4rem !important;
  box-sizing: border-box;
}
.lunsa-date-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.lunsa-date-toggle:hover,
.lunsa-date.is-open .lunsa-date-toggle {
  color: var(--gold-deep);
  background: rgba(196, 160, 74, 0.12);
}
.lunsa-date-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.4rem);
  left: 0;
  width: min(288px, 92vw);
  padding: 0.75rem;
  background: #fff;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20, 20, 20, 0.14);
}
.lunsa-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.lunsa-date-head strong {
  font-size: var(--dash-fs-ui);
  font-weight: 700;
  color: var(--ink);
}
.lunsa-date-nav {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.lunsa-date-nav:hover {
  border-color: rgba(168, 132, 47, 0.55);
  color: var(--gold-deep);
}
.lunsa-date-dow,
.lunsa-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}
.lunsa-date-dow {
  margin-bottom: 0.25rem;
}
.lunsa-date-dow span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0;
}
.lunsa-date-empty {
  min-height: 2rem;
}
.lunsa-date-day {
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.lunsa-date-day:hover:not(:disabled) {
  background: rgba(196, 160, 74, 0.14);
  color: var(--gold-deep);
}
.lunsa-date-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px rgba(168, 132, 47, 0.55);
}
.lunsa-date-day.is-selected {
  background: var(--gold);
  color: #111;
}
.lunsa-date-day.is-disabled,
.lunsa-date-day:disabled {
  opacity: 0.35;
  cursor: default;
}
.lunsa-date-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}
.lunsa-date-clear,
.lunsa-date-today {
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
}
.lunsa-date-clear:hover,
.lunsa-date-today:hover {
  background: rgba(196, 160, 74, 0.12);
}
.date-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
/* JS auto-applies dates / search icon — hide the popping Apply/Clear pair */
.date-filters[data-date-filters-wired="1"] .date-filters-actions {
  display: none !important;
}
.date-field-search {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  min-width: 0;
}
.date-field-search-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.date-field-search input[type="search"] {
  min-width: 0;
  width: 100%;
  border-radius: 999px;
  padding-right: 2.6rem;
}
.date-search-go {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(196, 160, 74, 0.16);
  color: var(--gold-deep);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.date-search-go:hover {
  background: rgba(196, 160, 74, 0.28);
}
.date-search-ico {
  width: 15px;
  height: 15px;
  display: block;
}
.date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.date-preset {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--dash-fs-ui);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.date-preset:hover {
  border-color: rgba(168, 132, 47, 0.5);
  color: var(--gold-deep);
}
.date-preset.is-active {
  background: rgba(196, 160, 74, 0.14);
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}

@media (max-width: 720px) {
  .date-filters {
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    margin: 0 0 0.65rem;
  }
  .date-filters-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: stretch;
  }
  .date-filters-label {
    grid-column: 1 / -1;
    width: 100%;
    margin-right: 0;
  }
  .date-filters-main > .date-field-search {
    grid-column: 1 / -1;
    order: -1;
  }
  .date-filters-main > .date-filters-actions {
    grid-column: 1 / -1;
    margin-left: 0;
  }
  .date-field:not(.date-field-search) {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
  }
  .date-field:not(.date-field-search) > span {
    font-size: var(--dash-fs-compact, 0.72rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    flex: 0 0 3.25rem;
  }
  .date-field:not(.date-field-search) > span .label-ico {
    width: 12px;
    height: 12px;
  }
  .date-field:not(.date-field-search) .lunsa-date,
  .date-field input.lunsa-date-input,
  .date-field-search input[type="search"] {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 36px;
    padding: 0.28rem 0.5rem;
    font-size: var(--dash-fs-ui);
  }
  .date-field-search input[type="search"] {
    padding-right: 2.35rem;
  }
  .date-search-go {
    width: 1.7rem;
    height: 1.7rem;
    min-width: 1.7rem;
    min-height: 1.7rem;
    right: 0.22rem;
  }
  .date-search-ico {
    width: 13px;
    height: 13px;
  }
  .lunsa-date {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }
  .lunsa-date .lunsa-date-input {
    padding-right: 1.85rem !important;
  }
  .lunsa-date-toggle {
    width: 1.45rem;
    height: 1.45rem;
    min-width: 1.45rem;
    min-height: 1.45rem;
    right: 0.22rem;
    border-radius: 6px;
  }
  .lunsa-date-toggle svg {
    width: 14px;
    height: 14px;
  }
  .date-filters-actions {
    width: 100%;
  }
  .date-filters-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .date-presets {
    width: 100%;
    gap: 0.35rem;
  }
  .date-preset {
    flex: 1 1 calc(33.333% - 0.35rem);
    min-height: 30px;
    padding: 0.2rem 0.45rem;
    font-size: var(--dash-fs-ui);
    justify-content: center;
  }
  .filter-summary,
  .date-filters + p.muted {
    margin-top: 0.4rem !important;
  }
}

.doc-list, .note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.doc-list li, .note-list li {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  background: #fff;
}
.note-item-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.note-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(196, 160, 74, 0.14);
  color: var(--gold-deep, #8a6a22);
}
.note-avatar.has-photo {
  background: transparent;
}
.note-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.note-avatar-ico {
  width: 14px;
  height: 14px;
}
.note-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}
.note-item-meta strong {
  font-size: var(--dash-fs-ui);
}
.note-role {
  font-size: var(--dash-fs-compact);
  text-transform: capitalize;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.04);
  color: var(--muted);
  font-size: var(--dash-fs-compact);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.consent-list .consent-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.consent-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(196, 160, 74, 0.14);
  color: var(--gold-deep, #8a6a22);
  flex: 0 0 auto;
}
.consent-ico-svg {
  width: 16px;
  height: 16px;
}
.consent-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}
.consent-copy strong {
  font-size: var(--dash-fs-ui);
}
.note-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.note-delete-form {
  margin: 0;
  display: inline;
}
.note-item-body {
  margin: 0.4rem 0 0;
  padding-left: calc(28px + 0.55rem);
}
.note-edit-form {
  margin-top: 0.45rem;
  padding-left: calc(28px + 0.55rem);
}
.note-list span { color: var(--muted); font-size: 0.8rem; }
.note-list p { margin: 0.35rem 0 0; }
.dash-notif-item-avatar {
  padding: 0;
  overflow: hidden;
}
.dash-notif-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.dash-notif-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--dash-fs-compact);
  margin-top: 0.1rem;
}
.dash-notif-actor {
  font-weight: 600;
  color: var(--ink);
}
.dash-nav-badge {
  margin-left: auto;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  flex: 0 0 auto;
}
body.sidebar-collapsed .dash-nav-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}
/* Detail pages (application + loan): first panel full width, ops two-up below */
.detail-grid.detail-grid-stack {
  grid-template-columns: 1fr;
}
.detail-main {
  min-width: 0;
  max-width: 100%;
}
.detail-ops {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}
.stat-card .stat-delta {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--dash-fs-compact);
  font-weight: 600;
}
.visit-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 176px;
  margin-top: 0.55rem;
  padding: 0.85rem 0.65rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(196, 160, 74, 0.05), transparent 38%),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(20, 20, 20, 0.05) calc(25% - 1px),
      rgba(20, 20, 20, 0.05) 25%
    );
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.visit-bar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 0.3rem;
  min-height: 140px;
  height: 100%;
  flex: 1 0 1.85rem;
  min-width: 1.85rem;
  max-width: 3.25rem;
  scroll-snap-align: start;
}
.visit-bar-val {
  font-size: var(--dash-fs-compact);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.visit-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100px;
  align-self: stretch;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}
.visit-bar i,
.visit-bar-track i {
  display: block;
  width: 100%;
  max-width: 14px;
  height: var(--h, 0%);
  min-height: 0;
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #d4b05c 0%, var(--gold) 55%, var(--gold-deep) 100%);
  box-shadow: none;
  transition: height 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: height;
}
.visit-bar-track i[data-bar-h]:not([data-bar-h="0"]) {
  min-height: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .visit-bar-track i {
    transition: none;
  }
}
.visit-bar em {
  font-style: normal;
  font-size: var(--dash-fs-compact);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}
.visit-bar-dow {
  display: inline;
}
.visit-split {
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .visit-bars {
    gap: 0.28rem;
    padding: 0.7rem 0.4rem 0.35rem;
  }
  .visit-bar {
    flex: 0 0 2rem;
    min-width: 2rem;
    max-width: 2rem;
  }
  .visit-bar-val {
    font-size: 0.62rem;
  }
  .visit-bar-track {
    min-height: 88px;
  }
  .visit-bar-track i {
    max-width: 10px;
  }
  .visit-bar-dow {
    display: none;
  }
  .panel-head {
    flex-wrap: wrap;
  }
}
.brand-color-grid label {
  display: grid;
  gap: 0.4rem;
}
.brand-color-input,
.apply-form input[type="color"].brand-color-input {
  -webkit-appearance: none;
  appearance: none;
  width: 3.25rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.brand-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.brand-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}
.brand-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}
.email-sig-preview {
  margin: 0.65rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  overflow: auto;
  max-width: 560px;
}
.email-sig-preview table {
  width: 100%;
}
.queue-search .date-field-search {
  flex: 1 1 220px;
  min-width: min(280px, 70vw);
}
.queue-search .date-field-search input[type="search"] {
  min-width: 0;
  width: 100%;
  border-radius: 999px;
}
.detail-grid.is-list-only {
  grid-template-columns: 1fr;
}
.detail-grid.is-list-only > .panel:last-child {
  display: none;
}
/* Full-page detail like Applications — no list beside an open record */
.detail-grid.is-open {
  grid-template-columns: 1fr;
}
.detail-grid.is-open > .panel:first-child {
  display: none;
}

/* Apply document uploads */
.upload-grid {
  display: grid;
  gap: 0.85rem;
}
.upload-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border: 1.5px dashed rgba(20, 20, 20, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fafaf8 100%);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.upload-card.is-drag,
.upload-card:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.06);
}
.upload-card.is-done {
  border-style: solid;
  border-color: rgba(168, 132, 47, 0.45);
  background: #fff;
}
.upload-card.is-uploading {
  border-style: solid;
  border-color: var(--gold);
}
.upload-card.is-busy { opacity: 0.65; pointer-events: none; }
.upload-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  background: rgba(196, 160, 74, 0.12);
}
.upload-card-icon.is-done {
  color: #1f6b3a;
  background: rgba(46, 140, 80, 0.12);
}
.upload-card-icon svg { width: 24px; height: 24px; }
.upload-card-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.upload-card-body strong {
  font-size: 0.98rem;
}
.upload-card-body span,
.upload-card-body small {
  color: var(--muted);
  font-size: 0.86rem;
}
.upload-file-name {
  color: var(--ink) !important;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}
.upload-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.upload-btn:hover { border-color: rgba(20,20,20,0.28); }
.upload-btn-primary {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
}
.upload-btn-primary:hover { background: #000; color: #fff; }
.upload-btn-danger {
  color: #8a2f2f;
  border-color: rgba(138, 47, 47, 0.25);
}
.upload-btn-danger:hover {
  background: rgba(138, 47, 47, 0.06);
}
.upload-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.08);
  overflow: hidden;
  margin-top: 0.35rem;
}
.upload-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: inherit;
  transition: width 0.12s ease;
}
.upload-status {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.upload-status.is-error { color: #8a2f2f; }
button.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .detail-grid.is-open {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dash-body {
    --dash-fs-ui: 0.8rem;
    --dash-fs-meta: 0.72rem;
    --dash-fs-compact: 0.7rem;
    --dash-fs-title: 1rem;
    --dash-fs-display: 1.06rem;
    --dash-pad-panel: 0.85rem 0.8rem;
    --dash-control-h: 38px;
    --dash-gap-tight: 0.35rem;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .dash-top {
    padding-top: env(safe-area-inset-top, 0);
  }
  .dash-shell {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  .dash-body .btn {
    font-size: var(--dash-fs-ui);
  }
  .stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.85rem;
  }
  .stat-grid > .stat-card {
    padding: 0.4rem 0.3rem;
    border-radius: 10px;
    text-align: center;
  }
  .stat-grid > .stat-card span,
  .stat-grid > .stat-card .stat-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    font-size: var(--dash-fs-compact);
    line-height: 1.15;
    gap: 0.2rem;
  }
  .stat-grid > .stat-card .stat-ico {
    display: inline-block;
    width: 11px;
    height: 11px;
    opacity: 0.9;
  }
  .stat-grid > .stat-card strong {
    margin-top: 0.15rem;
    font-size: var(--dash-fs-display);
  }
  .complaints-status-tabs {
    flex-wrap: nowrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
  .complaints-status-tabs a {
    flex: 0 0 auto;
    min-width: 0;
    justify-content: center;
    text-align: center;
    gap: 0.15rem;
    padding: 0.32rem 0.48rem;
    font-size: var(--dash-fs-compact);
    line-height: 1.15;
    white-space: nowrap;
  }
  .complaints-status-tabs .status-ico {
    width: 12px;
    height: 12px;
  }
  .dash-pager {
    gap: 0.5rem;
  }
  .dash-pager-nav {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .filter-summary {
    font-size: var(--dash-fs-compact);
    line-height: 1.35;
    word-break: break-word;
  }
  .badge .badge-ico {
    width: 11px;
    height: 11px;
  }
  .dash-main {
    min-width: 0;
    overflow-x: clip;
  }
  .panel {
    overflow-x: clip;
  }
  .apply-grid-2 { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; align-items: start; }
  .wizard-steps { grid-template-columns: 1fr 1fr; }
  .detail-grid,
  .detail-grid.is-open { grid-template-columns: 1fr; }
  .detail-ops { grid-template-columns: 1fr; }
  .detail-grid.is-list-only > .panel:last-child { display: none; }
  .upload-card {
    grid-template-columns: auto 1fr;
  }
  .upload-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 520px) {
  .stat-grid > .stat-card .status-label-text {
    /* Keep icon + short label readable; allow wrap only if needed */
    max-width: 100%;
  }
  .complaints-status-tabs .status-label-text {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-pager-per-label {
    flex-wrap: wrap;
  }
}

/* Apply page — after base .apply-wrap so these win on phones */
@media (max-width: 640px) {
  .apply-wrap {
    width: calc(100% - 0.6rem);
    margin: 0.55rem auto 1.25rem;
  }
  .apply-card {
    padding: 0.8rem 0.65rem 0.95rem;
    border-radius: 14px;
  }
  .wizard-steps {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin: 0.65rem 0 0.9rem;
  }
  .wizard-steps li {
    padding: 0.4rem 0.45rem;
    font-size: var(--dash-fs-meta);
    gap: 0.3rem;
  }
  .wizard-steps li span {
    width: 18px;
    height: 18px;
    font-size: var(--dash-fs-compact);
  }
}

/* ===== Unified dash type kit =====
   Tokens only: ui / meta / compact / title (+ display for big numbers).
   Cascade-final so one-off rem sizes cannot fragment phone dashboards.
*/
.dash-body .btn,
.dash-body a.btn,
.dash-body button.btn,
.dash-body summary.btn,
.dash-body .date-preset,
.dash-body .lunsa-seg-btn,
.dash-body .lunsa-select-trigger,
.dash-body .lunsa-select-menu [role="option"],
.dash-body .complaints-status-tabs a,
.dash-body .dash-table,
.dash-body .dash-table td,
.dash-body .dash-table button:not(.btn),
.dash-body .elog-subject-btn,
.dash-body label,
.dash-body .apply-form label,
.dash-body .sec-form label,
.dash-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.dash-body select,
.dash-body textarea,
.dash-body .queue-search input,
.dash-body .dash-pager,
.dash-body .tpl-block-head strong,
.dash-body .lunsa-date-head strong {
  font-size: var(--dash-fs-ui);
}
.dash-body .panel-title,
.dash-body .panel > h2,
.dash-body h2.panel-title,
.dash-body .panel-title.is-stack,
.dash-body .sec-panel > summary {
  font-size: var(--dash-fs-title);
}
.dash-body .muted,
.dash-body .filter-summary,
.dash-body .dash-table th,
.dash-body .elog-result-banner,
.dash-body .upload-status,
.dash-body .note-list span,
.dash-body .auth-help,
.dash-body .auth-sub {
  font-size: var(--dash-fs-meta);
}
.dash-body .date-field > span,
.dash-body .date-filters-label,
.dash-body .badge,
.dash-body .status-badge,
.dash-body .stat-card span,
.dash-body .stat-card .stat-label,
.dash-body .doc-counter,
.dash-body .complaints-status-tabs .elog-count {
  font-size: var(--dash-fs-compact);
}
.dash-side-nav a,
.dash-nav-group-btn,
.dash-side-foot .dash-nav-account,
.dash-side-foot .dash-nav-website,
.dash-logout {
  font-size: var(--dash-fs-ui);
}
@media (max-width: 900px) {
  .dash-nav-sub a,
  body.sidebar-collapsed .dash-nav-sub a {
    font-size: var(--dash-fs-meta);
  }
  .dash-body .dash-table .btn {
    font-size: var(--dash-fs-ui);
  }
}

/* Cascade-final: thin branded scrollbars (standard props only) */
.dash-body,
.dash-body *,
.dash-sidebar,
.dash-side-nav,
.dash-main,
.table-scroll,
.complaints-status-tabs,
.doc-pdf-pages,
.doc-frame,
.lunsa-dialog,
.elog-dialog-body {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
