@charset "UTF-8";
:root {
  font-family: Inter,"Segoe UI",system-ui,-apple-system,sans-serif;
  color: #172c40;
  background: #f4f6f9;
  font-synthesis: none;
  --blue: #1664a5;
  --blue-dark: #123c64;
  --gold: #c59842;
  --muted: #66778a;
  --line: #dce3eb;
  --danger: #a92537;
  --radius: 16px;
  --ease: cubic-bezier(.23,1,.32,1);
}
.business-selection {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.business-selection .input {
  flex: 1;
  min-width: 180px;
  max-width: 520px;
}
.business-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
}
.business-status > div {
  flex: 1;
  min-width: 200px;
}
.business-status .field-hint,
.business-table .field-hint {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.business-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}
.business-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  text-align: left;
}
.business-table th,
.business-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.business-table thead th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}
.business-table tbody th {
  font-weight: 600;
  min-width: 160px;
}
.business-table tbody tr:last-child > * {
  border-bottom: 0;
}
.business-table td {
  font-variant-numeric: tabular-nums;
}
.business-available {
  font-weight: 700;
  color: var(--blue-dark);
}
.business-form,
.business-pending {
  padding: 24px;
  margin-bottom: 24px;
}
.business-form {
  display: grid;
  gap: 20px;
}
.business-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 16px;
}
.business-config-fields,
.business-config-editor {
  display: grid;
  gap: 20px;
}
.initial-readjustment,
.initial-readjustment-details {
  display: grid;
  min-width: 0;
  gap: 16px;
}
.initial-readjustment h3,
.initial-readjustment .field-hint {
  margin: 0;
}
.initial-readjustment-balances,
.initial-readjustment-preview dl {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 16px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.initial-readjustment dt {
  color: var(--muted);
  font-size: .8rem;
}
.initial-readjustment dd {
  margin: 4px 0 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.initial-readjustment-preview dl {
  background: #eef6fc;
}
.initial-readjustment-preview .field-hint {
  margin-top: 10px;
}
.initial-readjustment .field-error {
  margin: 0;
  color: var(--danger);
}
.business-json {
  max-height: 280px;
  padding: 16px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: .8rem;
}
.business-patch {
  font-family: Consolas,"Courier New",monospace;
  resize: vertical;
}
.business-sale-lines {
  padding-left: 20px;
  white-space: nowrap;
}
.business-table summary {
  cursor: pointer;
  color: var(--blue);
  min-width: 90px;
}
@media(max-width:640px) {
  .business-selection {
    flex-wrap: wrap;
  }
  .business-selection .field-label {
    width: 100%;
  }
  .business-selection .input {
    min-width: 160px;
  }
  .business-form {
    padding: 18px;
  }
  .business-table th,
  .business-table td {
    padding: 14px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,input,select,textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: .58;
}
button,input,select,textarea,a {
  -webkit-tap-highlight-color: transparent;
}
button,a,input,select,textarea,summary {
  touch-action: manipulation;
}
button {
  transition: background-color 150ms ease,border-color 150ms ease,transform 120ms var(--ease);
}
button:active:not(:disabled) {
  transform: scale(.98);
}
:focus-visible {
  outline: 3px solid #2b82c6;
  outline-offset: 3px;
}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline-offset: 2px;
}
a {
  color: var(--blue);
}
h1,h2,h3,p {
  margin: 0;
}
h1 {
  font-size: clamp(1.55rem,2.2vw,2rem);
  letter-spacing: -.045em;
  line-height: 1.2;
}
h2 {
  font-size: 1.12rem;
  letter-spacing: -.025em;
}
h3 {
  font-size: 1rem;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
p {
  line-height: 1.55;
}
small {
  font-size: .78rem;
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
button svg {
  pointer-events: none;
}
[hidden] {
  display: none!important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 12px;
  z-index: 100;
  padding: 12px;
  background: white;
  border-radius: 8px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link:focus {
  top: 12px;
  width: auto;
  height: auto;
  clip-path: none;
}
.initial-loading {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
}
.topbar {
  height: 68px;
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  color: white;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  font-size: 24px;
  font-style: italic;
  font-weight: 800;
  color: #e7bd6f;
  flex: none;
}
.brand-name {
  font-size: .98rem;
  letter-spacing: .035em;
  font-weight: 750;
}
.brand-subtitle {
  display: block;
  font-size: .7rem;
  color: #b9cce0;
  letter-spacing: .035em;
  margin-top: 2px;
}
.session-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.session-name {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .8rem;
  color: #d2e0ed;
}
.topbar .button {
  background: #ffffff0c;
  border-color: #ffffff35;
  color: white;
  min-height: 44px;
  padding: 0 13px;
}
.layout {
  display: grid;
  grid-template-columns: 212px minmax(0,1fr);
  min-height: calc(100dvh - 68px);
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 0 13px;
  color: #52657a;
  text-align: left;
  font-size: .89rem;
  font-weight: 600;
  width: 100%;
}
.nav-button[aria-current=page] {
  background: #eaf2fb;
  border-color: #d9e8f7;
  color: var(--blue);
}
.sidebar-footer {
  margin-top: auto;
  padding: 25px 13px 0;
  font-size: .72rem;
  color: #8491a0;
  line-height: 1.5;
}
.main {
  min-width: 0;
  padding: 30px clamp(20px,3.5vw,56px) 42px;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
}
.heading-copy {
  display: grid;
  gap: 7px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .65rem;
  font-weight: 750;
  color: #7c8898;
}
.subtle {
  color: var(--muted);
  font-size: .87rem;
}
.heading-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 15px;
  background: #fff;
  color: #344d65;
  font-size: .82rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}
.button-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.button-danger {
  background: #fff4f5;
  border-color: #efccd2;
  color: var(--danger);
}
.button-quiet {
  background: transparent;
  border-color: transparent;
}
.button-small {
  padding: 0 11px;
}
.icon-button {
  width: 44px;
  padding: 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 12px #18345104;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.branch-filter {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.branch-filter .field {
  flex: 1 1 220px;
  max-width: 340px;
}
.branch-filter > .field-hint {
  flex: 1 1 240px;
  margin: 0;
  padding-bottom: 3px;
}
.wizard-body .branch-filter {
  box-shadow: none;
  background: #f8fafc;
}
.branch-grid > .empty-state {
  grid-column: 1 / -1;
}
.branch-classification {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.branch-classification:empty {
  display: none;
}
.event-copy .branch-classification {
  margin: 7px 0 0;
}
.branch-card-archived {
  background: #f9fafc;
  border-style: dashed;
}
.branch-archive-note {
  margin-bottom: 14px;
}
.card-actions.branch-management {
  border-top: 1px solid #edf1f5;
  margin-top: 18px;
}
.stat {
  padding: 20px 23px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #edf3fa;
  color: #3474ae;
}
.stat-value {
  font-size: 1.75rem;
  letter-spacing: -.045em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-label {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 4px;
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 24px 0 15px;
}
.section-count {
  font-size: .77rem;
  color: var(--muted);
}
.branch-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}
.branch-card {
  padding: 22px;
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}
.branch-name {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.branch-symbol {
  width: 40px;
  height: 40px;
  background: #f1f4f8;
  border: 1px solid #e4eaf0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #63809b;
  flex: none;
}
.branch-id {
  color: #8190a0;
  font-size: .72rem;
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  font-size: .68rem;
  font-weight: 650;
  padding: 5px 9px;
  white-space: nowrap;
  line-height: 1.2;
}
.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge-good {
  color: #23755a;
  background: #eaf7f0;
}
.badge-warning {
  color: #956c1b;
  background: #fcf5e5;
}
.badge-danger {
  color: #a92b41;
  background: #fcecf0;
}
.badge-neutral {
  color: #6b7b8b;
  background: #f0f3f6;
}
.badge-test {
  color: #70439b;
  background: #f2eafa;
}
.badge-archived {
  color: #4b5e71;
  background: #e8edf2;
}
.card-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #edf1f5;
  font-size: .78rem;
}
.detail-label {
  color: var(--muted);
}
.detail-value {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.card-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  padding: 16px 0 4px;
  border-top: 1px solid #edf1f5;
}
.metric-number {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric-label {
  display: block;
  font-size: .66rem;
  color: var(--muted);
  margin-top: 5px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 17px;
  margin-top: 4px;
}
.empty-state {
  text-align: center;
  padding: 42px 24px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #eef3f8;
  color: #6b88a6;
}
.empty-state p {
  max-width: 420px;
  font-size: .86rem;
  color: var(--muted);
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #edc9d0;
  background: #fff4f5;
  color: #8c293a;
  border-radius: 10px;
  font-size: .82rem;
  margin-bottom: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.alert svg {
  margin-top: 1px;
}
.alert-info {
  background: #edf5ff;
  border-color: #d7e7f9;
  color: #335d83;
}
.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #6c7e90;
  font-size: .74rem;
  margin-top: 15px;
}
.notice svg {
  width: 15px;
  height: 15px;
}
.success-note {
  color: #216c52;
  background: #eef8f2;
  border-color: #cde8d8;
}
.loading-block {
  padding: 44px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.search-field {
  position: relative;
  max-width: 340px;
  width: 100%;
}
.search-field svg {
  position: absolute;
  top: 13px;
  left: 13px;
  color: #8394a5;
}
.search-field input {
  padding-left: 42px;
}
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.field-label {
  font-size: .78rem;
  font-weight: 650;
  color: #334f68;
}
.input {
  border: 1px solid #cfd9e4;
  background: #fff;
  border-radius: 9px;
  min-height: 45px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  font-size: .86rem;
  color: #263e55;
}
.input::placeholder {
  color: #91a0b0;
}
.input:focus {
  border-color: #4284bc;
}
.field-hint {
  font-size: .71rem;
  color: var(--muted);
  line-height: 1.45;
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
}
.auth-layout {
  min-height: calc(100dvh - 68px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.auth-panel {
  max-width: 450px;
  width: 100%;
  padding: 34px;
}
.auth-heading {
  margin-bottom: 27px;
  display: grid;
  gap: 9px;
}
.auth-heading h1 {
  font-size: 1.75rem;
}
.auth-heading p {
  font-size: .84rem;
  color: var(--muted);
}
.auth-form {
  display: grid;
  gap: 19px;
}
.auth-form .button-primary {
  width: 100%;
  margin-top: 6px;
}
.auth-footer {
  border-top: 1px solid #edf1f5;
  margin-top: 25px;
  padding-top: 17px;
  color: #8090a0;
  font-size: .71rem;
  display: flex;
  gap: 8px;
  align-items: center;
}
.auth-error {
  margin-bottom: 0;
}
.wizard {
  max-width: 780px;
  margin: 0 auto;
}
.wizard-header {
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--line);
}
.wizard-header h2 {
  margin-bottom: 21px;
}
.steps {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  font-size: .73rem;
  color: #8190a0;
}
.step-number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: #f0f3f7;
  border: 1px solid #e0e6ed;
  border-radius: 50%;
  font-weight: 700;
  flex: none;
}
.step-current {
  color: var(--blue);
  font-weight: 700;
}
.step-current .step-number {
  background: #e8f1fc;
  border-color: #b9d2ee;
}
.step-done .step-number {
  background: #edf7f0;
  border-color: #d1e9da;
  color: #23755a;
}
.wizard-body {
  padding: 28px;
}
.wizard-body h3 {
  margin-bottom: 23px;
  font-size: 1.05rem;
}
.wizard-footer {
  border-top: 1px solid var(--line);
  padding: 17px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fbfcfe;
  border-radius: 0 0 var(--radius) var(--radius);
}
.review-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 17px;
  border-bottom: 1px solid #edf1f5;
  font-size: .81rem;
}
.review-row:last-child {
  border: 0;
}
.review-row dt {
  color: var(--muted);
}
.review-row dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}
.review-list dl {
  margin: 0;
}
.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f7fb;
  border: 1px solid #d7e2ee;
  padding: 13px 15px;
  border-radius: 11px;
  margin: 18px 0;
}
.activation-code {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size: .89rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  user-select: all;
  min-width: 0;
  flex: 1;
  color: #1b527f;
}
.result-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #eaf7f0;
  color: #217153;
  border-radius: 50%;
  margin-bottom: 16px;
}
.result-title {
  font-size: 1.4rem;
  letter-spacing: -.03em;
}
.result-caption {
  margin-top: 9px;
  font-size: .84rem;
  color: var(--muted);
}
.instruction-list {
  list-style: none;
  margin: 23px 0 0;
  padding: 0;
  display: grid;
  gap: 15px;
  counter-reset: instruction;
}
.instruction-list li {
  counter-increment: instruction;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: .82rem;
  line-height: 1.55;
  color: #3b5268;
}
.instruction-list li:before {
  content: counter(instruction);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  background: #f0f4f8;
  border-radius: 7px;
  color: #6b8399;
  font-size: .72rem;
  font-weight: 700;
}
.result-facts {
  margin-top: 23px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px;
}
.result-facts dt {
  color: var(--muted);
  font-size: .7rem;
  margin-bottom: 5px;
}
.result-facts dd {
  margin: 0;
  font-size: .81rem;
  font-weight: 650;
}
.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 21px;
  margin-top: 22px;
  border-top: 1px solid #edf1f5;
  font-size: .81rem;
  line-height: 1.5;
}
.checkbox-line input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  flex: none;
  margin: 2px 0 0;
}
.event-list {
  overflow: hidden;
}
.event-row {
  padding: 20px 23px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border-bottom: 1px solid #edf1f5;
}
.event-row:last-child {
  border: 0;
}
.event-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #edf4fc;
  color: #3c75a6;
  border-radius: 10px;
  flex: none;
}
.event-copy {
  min-width: 0;
  flex: 1;
}
.event-title {
  font-size: .85rem;
  font-weight: 650;
  line-height: 1.4;
}
.event-route {
  margin-top: 6px;
  font-size: .76rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.event-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.event-date {
  font-size: .7rem;
  color: #8190a0;
  white-space: nowrap;
}
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 18px;
}
.guide-card {
  padding: 25px;
}
.guide-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 19px;
}
.guide-card h2 svg {
  color: var(--blue);
}
.guide-card p {
  font-size: .82rem;
  color: #5d7185;
  margin-top: 13px;
}
.guide-card ol {
  padding-left: 20px;
  margin: 0;
  display: grid;
  gap: 12px;
  font-size: .82rem;
  line-height: 1.6;
  color: #475f75;
}
.guide-card li::marker {
  color: #7890a7;
  font-weight: 650;
}
.guide-card code {
  font-size: .72rem;
  background: #f1f4f8;
  border: 1px solid #e2e8ef;
  border-radius: 5px;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}
.guide-card-wide {
  grid-column: 1/-1;
}
.guide-link {
  margin-top: 20px;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  width: calc(100% - 32px);
  max-width: 460px;
  color: #263e55;
  box-shadow: 0 25px 100px #0b2c4930;
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.dialog::backdrop {
  background: #102b49aa;
}
.dialog-content {
  padding: 28px;
}
.dialog-content h2 {
  font-size: 1.23rem;
  line-height: 1.3;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.dialog-content p {
  font-size: .85rem;
  color: #617589;
  margin-bottom: 23px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 22px;
  background: #f7f9fc;
  border-top: 1px solid var(--line);
}
.dialog .alert {
  margin: 16px 0 0;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  padding: 12px 17px;
  background: #183b5b;
  color: white;
  border-radius: 11px;
  box-shadow: 0 6px 25px #1a344326;
  font-size: .8rem;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}
.utility-label {
  font-size: .74rem;
  color: var(--muted);
}
.invitation-list {
  overflow: hidden;
}
.connection-form {
  display: grid;
  gap: 19px;
}
.invitation-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 23px;
  border-bottom: 1px solid #edf1f5;
}
.invitation-row:last-child {
  border-bottom: 0;
}
.invitation-copy {
  flex: 1;
  min-width: 0;
}
.invitation-expiry {
  margin-top: 7px;
  font-size: .75rem;
  color: var(--muted);
}
.connection-code {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 126px;
  max-height: 240px;
  margin-top: 18px;
  padding: 13px 15px;
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size: .74rem;
  line-height: 1.6;
  background: #f4f7fb;
  color: #1b527f;
  overflow-wrap: anywhere;
}
.connection-code-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
@media(hover:hover) and (pointer:fine) {
  .button:not(:disabled):hover {
    background: #edf3fa;
    border-color: #b6c9da;
  }
  .button-primary:not(:disabled):hover {
    background: #135990;
    border-color: #135990;
  }
  .button-danger:not(:disabled):hover {
    background: #fce8ec;
    border-color: #daaab5;
  }
  .nav-button:hover {
    background: #f4f7fb;
  }
  .topbar .button:hover {
    background: #ffffff20;
    border-color: #ffffff60;
  }
}
@media(min-width:1600px) {
  .main {
    padding-top: 38px;
  }
  .branch-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
@media(max-width:1000px) {
  .layout {
    grid-template-columns: minmax(0,1fr);
  }
  .sidebar {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 9px 22px;
    overflow-x: auto;
    gap: 7px;
  }
  .nav-button {
    width: auto;
    flex: none;
    min-height: 44px;
    padding: 0 15px;
    font-size: .82rem;
  }
  .nav-button svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-footer {
    display: none;
  }
  .main {
    padding: 26px 24px 36px;
  }
  .topbar {
    padding: 0 24px;
  }
}
@media(max-width:640px) {
  .input {
    font-size: 1rem;
  }
  .topbar {
    height: 63px;
    padding: 0 17px;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
    font-size: 22px;
  }
  .brand-name {
    font-size: .83rem;
  }
  .brand-subtitle {
    font-size: .65rem;
  }
  .session-name {
    display: none;
  }
  .session-actions {
    gap: 0;
  }
  .topbar .button {
    font-size: .73rem;
    padding: 0 10px;
  }
  .topbar .button svg {
    width: 17px;
    height: 17px;
  }
  .layout {
    min-height: calc(100dvh - 63px);
  }
  .sidebar {
    padding: 8px 13px;
    gap: 4px;
  }
  .nav-button {
    padding: 0 11px;
    font-size: .76rem;
    gap: 7px;
  }
  .nav-button svg {
    width: 17px;
    height: 17px;
  }
  .main {
    padding: 23px 17px 32px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .heading-copy {
    gap: 6px;
  }
  .heading-actions {
    margin-left: auto;
  }
  .heading-actions .button {
    font-size: .76rem;
    padding: 0 12px;
  }
  .eyebrow {
    font-size: .59rem;
  }
  .subtle {
    font-size: .79rem;
  }
  .stats-grid {
    gap: 9px;
    margin-bottom: 19px;
  }
  .stat {
    padding: 15px 12px;
    display: block;
  }
  .stat-icon {
    display: none;
  }
  .stat-value {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: .64rem;
    line-height: 1.4;
  }
  .branch-grid,.guide-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .branch-card {
    padding: 19px;
  }
  .section-heading {
    margin-top: 20px;
  }
  .section-count {
    font-size: .7rem;
  }
  .card-heading {
    gap: 9px;
  }
  .badge {
    font-size: .65rem;
    padding: 5px 8px;
  }
  .branch-name {
    gap: 9px;
  }
  .branch-symbol {
    width: 34px;
    height: 34px;
  }
  .branch-name h3 {
    font-size: .91rem;
  }
  .branch-id {
    font-size: .65rem;
  }
  .card-detail {
    font-size: .74rem;
  }
  .card-actions .button {
    flex: 1;
    font-size: .76rem;
  }
  .auth-layout {
    padding: 24px 17px;
    min-height: calc(100dvh - 63px);
    align-items: start;
  }
  .auth-panel {
    padding: 27px 23px;
    margin-top: 12px;
  }
  .auth-heading h1 {
    font-size: 1.55rem;
  }
  .wizard-header {
    padding: 23px 20px 19px;
  }
  .wizard-body {
    padding: 23px 20px;
  }
  .wizard-footer {
    padding: 16px 20px;
  }
  .step {
    display: grid;
    gap: 6px;
    justify-items: start;
    font-size: .65rem;
  }
  .steps {
    gap: 7px;
  }
  .step-number {
    width: 25px;
    height: 25px;
  }
  .fields-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .review-row {
    font-size: .74rem;
    padding: 13px;
    gap: 12px;
  }
  .code-box {
    padding: 12px;
    align-items: flex-start;
  }
  .activation-code {
    font-size: .78rem;
  }
  .result-facts {
    grid-template-columns: 1fr;
  }
  .event-row {
    padding: 18px 16px;
    gap: 11px;
    flex-wrap: wrap;
  }
  .event-icon {
    width: 33px;
    height: 33px;
  }
  .event-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-left: 44px;
    min-width: 0;
    gap: 8px 12px;
  }
  .event-date {
    max-width: 100%;
    white-space: normal;
  }
  .event-title {
    font-size: .8rem;
  }
  .event-route {
    font-size: .7rem;
  }
  .guide-card {
    padding: 22px;
  }
  .guide-card-wide {
    grid-column: auto;
  }
  .toast {
    right: 17px;
    bottom: 18px;
  }
  .dialog-content {
    padding: 24px;
  }
  .dialog-actions {
    padding: 16px;
    flex-wrap: wrap;
  }
  .dialog-actions .button {
    flex: 1;
  }
  .search-field {
    max-width: none;
  }
  .notice {
    align-items: flex-start;
    line-height: 1.5;
  }
  .invitation-row {
    padding: 18px 19px;
    gap: 11px;
    flex-wrap: wrap;
  }
  .invitation-copy {
    flex-basis: calc(100% - 142px);
  }
  .invitation-row .button {
    margin-left: auto;
  }
  .connection-code-actions .button {
    width: 100%;
  }
}
@media(max-width:360px) {
  .topbar {
    padding: 0 13px;
  }
  .brand {
    gap: 8px;
  }
  .brand-name {
    font-size: .78rem;
  }
  .main {
    padding-left: 13px;
    padding-right: 13px;
  }
  .stats-grid {
    gap: 7px;
  }
  .stat {
    padding: 13px 10px;
  }
  .stat-label {
    font-size: .61rem;
  }
  .card-metrics {
    gap: 7px;
  }
  .metric-label {
    font-size: .61rem;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button-primary {
    flex: 1;
  }
  .auth-panel {
    padding: 24px 20px;
  }
  .wizard-header,.wizard-body {
    padding-left: 17px;
    padding-right: 17px;
  }
  .wizard-footer {
    padding-left: 17px;
    padding-right: 17px;
  }
  .wizard-footer .button {
    font-size: .76rem;
    padding: 0 12px;
  }
  .sidebar {
    padding-left: 9px;
    padding-right: 9px;
  }
  .nav-button {
    padding: 0 9px;
  }
}
@media(prefers-reduced-motion:reduce) {
  button {
    transition: background-color 120ms ease,border-color 120ms ease;
  }
  button:active:not(:disabled) {
    transform: none;
  }
}

/* Inventory: recognizable products first, operational detail on demand. */
.inventory-page { --inventory-muted: #526277; --inventory-ink: #152b42; --inventory-accent: #185e99; }
.inventory-page .page-heading { align-items: flex-end; margin-bottom: 24px; }
.inventory-page .page-heading h1 { font-size: clamp(1.7rem,2.5vw,2.2rem); letter-spacing: -.045em; color: var(--inventory-ink); }
.inventory-page .heading-copy .eyebrow { display: none; }
.inventory-page .heading-copy .subtle { font-size: .875rem; }
.inventory-page .heading-actions .button { min-height: 46px; border-radius: 10px; font-size: .8125rem; }
.inventory-page .heading-actions .button-primary { background: #173b60; border-color: #173b60; box-shadow: 0 2px 3px #132d4920; }
.inventory-page .field-hint { color: var(--inventory-muted); line-height: 1.5; }
.inventory-branch-controls { display: grid; grid-template-columns: minmax(280px,1.6fr) minmax(220px,1fr); gap: 24px; margin-bottom: 14px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.inventory-branch-controls .panel { margin: 0; padding: 0; box-shadow: none; border: 0; background: transparent; border-radius: 0; }
.inventory-branch-controls .branch-filter { display: block; order: 2; }
.inventory-branch-controls .branch-filter .field { min-width: 0; max-width: none; }
.inventory-branch-controls .branch-filter > .field-hint { display: none; }
.inventory-branch-controls .business-selection { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; align-content: start; align-items: end; }
.inventory-branch-controls .business-selection .field-label { grid-column: 1 / -1; }
.inventory-branch-controls .business-selection .input { min-width: 0; max-width: none; width: 100%; }
.inventory-sync { gap: 6px 20px; padding: 0; margin: 0 0 20px; }
.inventory-sync .detail-label { font-size: .75rem; color: var(--inventory-muted); }
.inventory-sync > div { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; min-width: 0; }
.inventory-sync strong { font-size: .8rem; font-weight: 600; }
.inventory-sync .subtle { flex-basis: 100%; margin: 0; font-size: .75rem; }
.inventory-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; margin: 0 0 24px; }
.inventory-metric { display: grid; gap: 6px; padding: 20px 24px; border-radius: 14px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.inventory-metric-label { font-size: .79rem; font-weight: 600; color: var(--inventory-muted); }
.inventory-metric > strong { font-size: clamp(1.4rem,2.2vw,1.9rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inventory-metric .field-hint { margin: 0; font-size: .75rem; }
.inventory-metric-featured { background: #153956; border-color: #153956; }
.inventory-metric-featured > strong { color: #fff; }
.inventory-page .inventory-metric-featured .field-hint, .inventory-metric-featured .inventory-metric-label { color: #d1e1ed; }
.inventory-collection { padding: 0; margin-bottom: 20px; overflow: hidden; box-shadow: 0 3px 14px #183a5706; }
.inventory-collection-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; padding: 20px 24px 16px; }
.inventory-collection-header h2 { margin: 0; font-size: 1.12rem; }
.inventory-collection-header .field-hint { margin: 0; font-size: .76rem; }
.inventory-categories { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.inventory-category.button { min-height: 44px; padding: 0 15px; border-radius: 24px; box-shadow: none; font-size: .83rem; background: #fff; color: #455e75; border: 1px solid var(--line); }
.inventory-category.button[aria-pressed=true] { background: #163f67; color: #fff; border-color: #163f67; }
.inventory-category-count { padding: 2px 6px; min-width: 22px; border-radius: 9px; font-size: .7rem; background: #163f670c; text-align: center; }
.inventory-category[aria-pressed=true] .inventory-category-count { background: #ffffff20; color: #fff; }
.inventory-search-bar { display: flex; align-items: flex-end; gap: 12px; padding: 0 24px 12px; }
.inventory-search-bar > .field { flex: 1; min-width: 0; }
.inventory-search-bar .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.inventory-search-bar input { width: 100%; min-height: 48px; background: #f7f9fc; border-color: #dce4ee; font-size: .875rem; }
.inventory-filter-toggle.button { min-height: 48px; white-space: nowrap; color: #364d65; border-radius: 9px; font-size: .8125rem; }
.inventory-filter-toggle[aria-expanded=true] { background: #eaf1f8; border-color: #b9cfe1; color: #163f67; }
.inventory-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 4px 24px 18px; }
.inventory-filters .field { min-width: 0; }
.inventory-filters .field-label { font-size: .75rem; color: var(--inventory-muted); }
.inventory-filters .input { min-width: 0; width: 100%; min-height: 46px; padding: 10px 12px; font-size: .83rem; background: #fcfdff; }
.inventory-results-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 44px; padding: 0 24px 10px; }
.inventory-result-count { font-size: .78rem; color: var(--inventory-muted); margin: 0; }
.inventory-results-heading .button { min-height: 44px; padding: 0 10px; font-size: .78rem; border-color: transparent; background: transparent; color: #165b97; }
.inventory-group-choices { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 0 24px 22px; }
.inventory-group-all.button { border-radius: 12px; white-space: normal; max-width: 112px; color: #344e65; font-size: .8rem; line-height: 1.45; padding: 12px; }
.inventory-group-choice { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; min-width: 175px; max-width: 100%; border-radius: 12px; border: 1px solid #dce4ed; background: #fff; cursor: pointer; text-align: left; font: inherit; color: #213f59; }
.inventory-group-choice-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.inventory-group-choice-copy > span { color: var(--inventory-muted); font-size: .7rem; }
.inventory-group-choice-copy > strong { font-size: .82rem; font-weight: 650; }
.inventory-group-choice .inventory-photo { width: 56px; height: 64px; border-radius: 8px; flex: 0 0 56px; }
.inventory-group-choice .inventory-image-fallback { padding: 0; }
.inventory-group-choice .inventory-image-fallback > span { display: none; }
.inventory-group-choice[aria-pressed=true], .inventory-group-all.button[aria-pressed=true] { background: #edf4fa; border-color: #397aaf; box-shadow: inset 0 0 0 1px #397aaf; }
.inventory-group-section { padding: 22px 24px 26px; border-top: 1px solid var(--line); background: #f8fafc; }
.inventory-group-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.inventory-group-heading > div > span { color: #6c542c; font-size: .74rem; font-weight: 650; }
.inventory-group-heading h3 { margin: 5px 0 0; color: #1a334b; font-size: 1.13rem; letter-spacing: -.015em; overflow-wrap: anywhere; }
.inventory-group-heading > span { font-size: .73rem; color: var(--inventory-muted); text-align: right; }
.inventory-product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 18px; align-items: start; }
.inventory-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #dce4ed; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 2px 4px #13385705; color: #1a334b; }
.inventory-photo { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #edf1f5; position: relative; }
.inventory-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.inventory-image-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; font-size: .73rem; color: #526277; text-align: center; }
.inventory-image-fallback svg { width: 28px; height: 28px; }
.inventory-card-copy { display: grid; gap: 7px; padding: 16px; min-width: 0; }
.inventory-product-name { display: block; color: #1a334b; font-size: .98rem; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.inventory-reference { display: block; color: var(--inventory-muted); font-size: .73rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.inventory-card-stock { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; margin-top: 9px; padding-top: 12px; border-top: 1px solid #edf1f5; }
.inventory-card-stock > span { font-size: .74rem; color: var(--inventory-muted); }
.inventory-card-stock > strong { font-size: 1rem; font-variant-numeric: tabular-nums; color: #124b7c; overflow-wrap: anywhere; }
.inventory-card-loaned { font-size: .73rem; color: var(--inventory-muted); text-align: right; }
.inventory-catalog-note { display: block; font-size: .75rem; font-weight: 400; color: #75602e; margin-top: 5px; }
.inventory-card-detail { border-top: 1px solid #edf1f5; }
.inventory-card-detail > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; min-height: 44px; color: #165b97; cursor: pointer; font-size: .76rem; list-style: none; }
.inventory-card-detail > summary::-webkit-details-marker { display: none; }
.inventory-card-detail > summary svg { width: 16px; height: 16px; transform: rotate(90deg); }
.inventory-card-detail[open] > summary svg { transform: rotate(-90deg); }
.inventory-stock-detail { padding: 0 16px 12px; background: #f6f9fc; }
.inventory-stock-detail dl { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding-top: 14px; font-size: .76rem; }
.inventory-stock-detail dl > div { display: flex; flex-wrap: wrap; gap: 3px 12px; justify-content: space-between; }
.inventory-stock-detail dd { margin: 0; font-weight: 600; }
.inventory-stock-detail .field-hint { font-size: .75rem; margin: 8px 0; }
.inventory-technical { font-size: .75rem; color: var(--inventory-muted); }
.inventory-technical > summary { min-width: 0; min-height: 44px; display: flex; align-items: center; color: #53677b; }
.inventory-technical p { overflow-wrap: anywhere; line-height: 1.5; }
.inventory-pagination { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inventory-pagination > span { font-size: .78rem; color: var(--inventory-muted); text-align: center; }
.inventory-pagination .button { min-height: 44px; font-size: .8rem; }
.inventory-movement { margin-bottom: 24px; }
.inventory-movement > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 24px; min-height: 64px; cursor: pointer; color: #164c7a; font-size: .88rem; font-weight: 650; }
.inventory-movement > summary .field-hint { margin-left: auto; font-size: .75rem; font-weight: 400; }
.inventory-movement > summary svg { width: 20px; height: 20px; flex: 0 0 20px; }
.inventory-movement .business-form { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; box-shadow: none; margin: 0; }
.inventory-movement .inventory-collection { box-shadow: none; margin-bottom: 24px; }
.inventory-pick-card { padding: 0; font: inherit; text-align: left; cursor: pointer; }
.inventory-pick-card .inventory-card-copy { width: 100%; box-sizing: border-box; }
.inventory-pick-action { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: .78rem; color: #165b97; border-top: 1px solid #edf1f5; }
.inventory-pick-action svg { width: 16px; height: 16px; }
.inventory-chosen-product { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px; margin-bottom: 24px; border: 1px solid #bcd3e5; border-radius: 12px; background: #f4f8fc; }
.inventory-chosen-product > .inventory-photo { width: 88px; height: 88px; border-radius: 10px; flex: 0 0 88px; }
.inventory-chosen-copy { display: grid; gap: 5px; flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.inventory-chosen-copy > span { font-size: .8rem; color: var(--inventory-muted); }
.inventory-group-choice:focus-visible, .inventory-pick-card:focus-visible, .inventory-card summary:focus-visible { outline: 3px solid #367cb4; outline-offset: 3px; }
.inventory-export-hint { margin: 20px 0 0; max-width: 760px; font-size: .76rem; }
.inventory-page [hidden] { display: none !important; }
@media(hover:hover) and (pointer:fine) {
  .inventory-pick-card:hover, .inventory-group-choice:hover { border-color: #397aaf; box-shadow: 0 3px 10px #183a5712; }
  .inventory-category.button:not([aria-pressed=true]):hover { background: #f0f5fa; border-color: #adc5dd; }
}
@media(max-width:850px) {
  .inventory-branch-controls { grid-template-columns: 1fr; gap: 12px; }
}
@media(max-width:540px) {
  .inventory-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
  .inventory-metrics:has(> :nth-child(3)) > :first-child { grid-column: 1 / -1; }
  .inventory-metric { padding: 16px; gap: 6px; }
  .inventory-metric > strong { font-size: 1.3rem; }
  .inventory-collection-header { padding: 20px 18px 16px; }
  .inventory-categories { padding: 0 18px 18px; }
  .inventory-filters { padding: 0 18px 14px; grid-template-columns: 1fr; }
  .inventory-filters .input { font-size: 1rem; }
  .inventory-search-bar { padding: 0 18px 12px; gap: 8px; }
  .inventory-search-bar input { font-size: 1rem; padding-left: 12px; }
  .inventory-filter-toggle.button { padding: 0 12px; }
  .inventory-results-heading { padding-left: 18px; padding-right: 18px; }
  .inventory-group-choices { padding: 0 18px 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inventory-group-all.button { max-width: none; min-height: 44px; grid-column: 1 / -1; }
  .inventory-group-choice { width: 100%; min-width: 0; flex-direction: column; align-items: stretch; padding: 8px; gap: 8px; }
  .inventory-group-choice .inventory-photo { width: 100%; height: 64px; flex-basis: auto; }
  .inventory-group-choice-copy { flex: 1; }
  .inventory-group-section { padding: 18px; }
  .inventory-group-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .inventory-product-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .inventory-photo { aspect-ratio: 16 / 9; }
  .inventory-movement .business-form { padding: 14px; }
  .inventory-movement .inventory-collection-header, .inventory-movement .inventory-group-section { padding-left: 12px; padding-right: 12px; }
  .inventory-movement .inventory-search-bar, .inventory-movement .inventory-categories, .inventory-movement .inventory-group-choices, .inventory-movement .inventory-results-heading, .inventory-movement .inventory-filters { padding-left: 12px; padding-right: 12px; }
  .inventory-pagination { padding: 14px; gap: 6px; }
  .inventory-pagination .button { padding: 0 10px; }
  .inventory-movement > summary { padding: 18px; gap: 8px; }
  .inventory-movement > summary .field-hint { flex-basis: 100%; margin-left: 28px; }
  .inventory-branch-controls .business-selection { grid-template-columns: 1fr; }
  .inventory-branch-controls .business-selection .button { justify-self: start; margin-top: 4px; }
}
@media(pointer:coarse) {
  .inventory-page .button, .inventory-page .input, .inventory-page summary { min-height: 48px; }
}

/* Remote assistance keeps the same canvas mounted for the entire session. */
.remote-dialog { width: min(1480px,calc(100vw - 32px)); height: calc(100dvh - 32px); max-width: none; max-height: calc(100dvh - 32px); padding: 16px; overflow: hidden; }
.remote-dialog[open] { display: flex; flex-direction: column; }
.remote-dialog > :not(.remote-scroll) { flex-shrink: 0; }
.remote-dialog.remote-expanded { width: 100vw; height: 100dvh; max-width: none; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
.remote-dialog [hidden] { display: none !important; }
.remote-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.remote-heading > div:first-child { min-width: 0; }
.remote-heading h2 { margin: 0 0 4px; color: var(--blue-dark); font-size: 1.12rem; line-height: 1.35; overflow-wrap: anywhere; }
.remote-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.remote-window-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.remote-window-actions .button { min-height: 44px; padding: 0 11px; font-size: .76rem; }
.remote-session-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .78rem; line-height: 1.4; }
.remote-status { display: inline-flex; align-items: center; gap: 8px; color: #75602e; }
.remote-status::before { content: ''; display: block; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.remote-status[data-state=active] { color: #176d4c; }
.remote-duration { color: var(--muted); font-variant-numeric: tabular-nums; }
.remote-error { margin: 0 0 8px; max-height: 12dvh; overflow: auto; color: var(--danger); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.remote-error:empty { display: none; }
.remote-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.remote-toolbar label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .77rem; font-weight: 600; }
.remote-toolbar .button { min-height: 44px; padding: 0 12px; }
.remote-toolbar .button[aria-pressed=true] { color: var(--blue-dark); background: #e8f2fb; border-color: #7aa8d0; box-shadow: inset 0 0 0 1px #7aa8d0; }
.remote-zoom { width: 122px; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: .82rem; }
.remote-display-status { margin-left: auto; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.remote-scroll { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.remote-setup { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,.45fr) auto; align-items: end; gap: 14px; flex-shrink: 0; max-height: 48%; padding: 14px; margin: 0 0 10px; overflow: auto; overscroll-behavior: contain; border-radius: 10px; background: #f5f8fb; border: 1px solid var(--line); }
.remote-setup .field { min-width: 0; margin: 0; }
.remote-setup textarea { resize: vertical; min-height: 70px; }
.remote-stage { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #102232; border: 1px solid #233c50; border-radius: 10px; scrollbar-color: #7290a6 #152c40; }
.remote-surface { display: grid; place-items: center; width: max-content; height: max-content; min-width: 100%; min-height: 100%; max-width: none; }
.remote-canvas { display: block; flex-shrink: 0; max-width: none; max-height: none; border: 0; background: #102232; }
.remote-canvas-control { cursor: crosshair; touch-action: none; }
.remote-panning .remote-canvas { cursor: grab; touch-action: none; user-select: none; }
.remote-dragging .remote-canvas { cursor: grabbing; }
.remote-canvas:focus-visible { outline: 3px solid #d6b35c; outline-offset: -3px; }
.remote-placeholder { margin: 0; max-width: min(640px,calc(100vw - 64px)); padding: 24px; color: #e4edf5; text-align: center; font-size: .9rem; line-height: 1.5; }
.remote-canvas-hint { flex-shrink: 0; margin: 6px 0 8px; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.remote-footer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); background: #fff; }
.remote-footer > .button { min-height: 44px; }
.remote-tools { min-width: 0; }
.remote-tools > summary { display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: var(--blue-dark); font-size: .8rem; font-weight: 650; cursor: pointer; list-style: none; }
.remote-tools > summary::-webkit-details-marker { display: none; }
.remote-tools > summary::after { content: '+'; font-size: 1rem; font-weight: 400; }
.remote-tools[open] > summary { border-color: var(--line); background: #f5f8fb; }
.remote-tools[open] > summary::after { content: '−'; }
.remote-tool-content { max-height: 28dvh; padding: 10px 2px 2px; overflow: auto; overscroll-behavior: contain; }
.remote-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.65fr); gap: 14px; }
.remote-controls .field { min-width: 0; margin: 0; }
.remote-controls .field-label { font-size: .77rem; }
.remote-input-row { display: flex; align-items: center; gap: 8px; }
.remote-input-row .input { min-width: 0; flex: 1; }
.remote-input-row .button { flex-shrink: 0; }
.remote-privacy-note { margin: 10px 0 0; max-width: 900px; font-size: .72rem; line-height: 1.45; }
@media(max-width:1000px) {
  .remote-heading { gap: 12px; }
  .remote-heading p { max-width: 560px; }
  .remote-window-actions { max-width: 50%; }
  .remote-controls { grid-template-columns: 1fr; }
}
@media(max-width:700px) {
  .remote-heading { flex-wrap: wrap; gap: 8px; }
  .remote-heading > div:first-child { width: 100%; }
  .remote-window-actions { max-width: none; width: 100%; justify-content: flex-start; }
  .remote-window-actions .button { flex: 1; }
  .remote-heading h2 { font-size: 1rem; }
  .remote-heading p { font-size: .72rem; }
  .remote-setup { grid-template-columns: 1fr 1fr; gap: 10px; max-height: 48%; padding: 12px; }
  .remote-setup > :first-child { grid-column: 1 / -1; }
  .remote-setup > .button { justify-self: end; }
  .remote-display-status { width: 100%; margin-left: 0; font-size: .7rem; }
}
@media(max-width:540px) {
  .remote-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); margin: 8px; padding: 12px; border-radius: 12px; }
  .remote-dialog.remote-expanded { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .remote-window-actions { gap: 5px; }
  .remote-window-actions .button { gap: 5px; padding: 0 7px; font-size: .7rem; }
  .remote-session-bar { font-size: .73rem; gap: 5px; }
  .remote-toolbar { gap: 6px; }
  .remote-toolbar label { gap: 6px; font-size: .72rem; }
  .remote-toolbar .button { flex: 1; padding: 0 8px; font-size: .74rem; }
  .remote-zoom { width: 110px; }
  .remote-setup { grid-template-columns: 1fr; max-height: 48%; padding: 10px; }
  .remote-setup > :first-child { grid-column: auto; }
  .remote-setup > .button { width: 100%; }
  .remote-setup .field-label { font-size: .76rem; }
  .remote-setup textarea { min-height: 64px; }
  .remote-setup .input { min-height: 44px; padding: 9px 10px; }
  .remote-placeholder { max-width: calc(100vw - 44px); padding: 16px; font-size: .82rem; }
  .remote-canvas-hint { font-size: .68rem; }
  .remote-footer { gap: 6px; }
  .remote-footer > .button { gap: 6px; padding: 0 10px; font-size: .74rem; }
  .remote-tools > summary { padding: 0 5px; font-size: .75rem; }
  .remote-tool-content { max-height: 24dvh; }
  .remote-input-row { flex-wrap: wrap; gap: 6px; }
  .remote-input-row .input { flex-basis: 100%; }
  .remote-input-row .button { width: 100%; }
}
@media(max-height:540px) and (min-width:701px) {
  .remote-dialog { padding: 10px; }
  .remote-heading { margin-bottom: 6px; }
  .remote-heading p { display: none; }
  .remote-session-bar { margin-bottom: 4px; }
  .remote-toolbar { padding: 4px 0; }
  .remote-canvas-hint { margin: 4px 0; }
  .remote-footer { padding-top: 4px; }
}

.receipt-heading-editor { display: grid; gap: 14px; min-width: 0; }
.receipt-heading-editor h3, .receipt-heading-editor p { margin: 0; }
.receipt-heading-words { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.receipt-heading-word { min-height: 44px; max-width: 100%; padding: 9px 14px; border: 1px solid #b7cadc; border-radius: 9px; color: var(--blue-dark); background: #fff; font: inherit; font-weight: 650; overflow-wrap: anywhere; cursor: pointer; }
.receipt-heading-word:hover:not(:disabled) { border-color: var(--blue); background: #eef5fc; }
.receipt-heading-word:focus-visible { outline: 3px solid #75ade0; outline-offset: 3px; }
.receipt-heading-word.is-excluded { color: var(--muted); background: #eef0f3; }
.receipt-heading-word.is-excluded > span:first-child { text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.receipt-heading-word-state { display: inline-block; margin-left: 7px; font-size: .7rem; font-weight: 500; text-decoration: none; }
.receipt-heading-word:disabled { cursor: default; opacity: .65; }
.receipt-heading-preview { display: grid; gap: 10px; padding: 18px; border: 1px dashed #aebdcc; border-radius: 12px; background: #fff; }
.receipt-heading-title { color: #172c40; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; overflow-wrap: anywhere; }
.receipt-heading-subtitle { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
