/* WorkSpace ERP Demo — monolith shell tokens */
.ws-app {
  --ws-primary: #cc036a;
  --ws-primary-hover: #ab0358;
  --ws-sidebar: #100220;
  --ws-sidebar-2: #19062f;
  /* Navigation tier typography — Application > Module > Feature > Process > Task */
  --nav-font-application: 0.84rem;
  --nav-font-module: 0.84rem;
  --nav-font-feature: 0.79rem;
  --nav-font-process: 0.74rem;
  --nav-font-process-nested: 0.72rem;
  --nav-font-task: 0.72rem;
}

.ws-app .sidebar {
  background: linear-gradient(180deg, var(--ws-sidebar) 0%, var(--ws-sidebar-2) 100%);
}

.ws-module-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ws-primary);
  background: #fde8f3;
  border: 1px solid #fbcfe8;
}

.header-currency-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.header-db-mode-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  letter-spacing: 0.03em;
}

.header-db-mode-badge--dedicated {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.ws-arch-banner {
  margin: 0.75rem 1.25rem 0;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #475569;
  background: linear-gradient(90deg, #f8f7fc, #fde8f3);
  border: 1px solid #e8e4f0;
}

.ws-arch-banner a {
  margin-left: 0.5rem;
  font-weight: 600;
  color: #cc036a;
  text-decoration: none;
}

.ws-arch-banner a:hover { text-decoration: underline; }

.hidden { display: none !important; }

.version-pill--demo,
.version-pill--v3 {
  background: linear-gradient(135deg, #100220, #cc036a);
  color: #fff;
}

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

.product-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.product-price {
  font-weight: 700;
  color: var(--ws-primary);
  margin: 0.5rem 0;
}

.je-lines-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

/* Income Journal 3-page wizard */
.je-wizard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.je-wizard__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  margin-bottom: 0.25rem;
}
.je-wizard__step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.je-wizard__step:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.je-wizard__step.is-active {
  border-color: var(--ws-primary, #cc036a);
  background: rgba(204, 3, 106, 0.06);
  color: var(--ws-primary, #cc036a);
}
.je-wizard__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}
.je-wizard__step.is-active .je-wizard__step-num {
  background: var(--ws-primary, #cc036a);
  color: #fff;
}
.je-wizard__connector {
  width: 1.25rem;
  height: 2px;
  background: #e2e8f0;
  border-radius: 1px;
}
.je-wizard__page {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.je-wizard__page[hidden] {
  display: none !important;
}
.je-validation-rules {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border, #d8dde6);
  border-radius: 6px;
  background: var(--surface-muted, #f6f7f9);
}
.je-validation-rules__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.je-validation-rules__summary::-webkit-details-marker {
  display: none;
}
.je-validation-rules__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: #1f2937;
  color: #fff;
}
.je-validation-rules__body {
  margin-top: 0.65rem;
}
.je-validation-rules__note {
  margin: 0 0 0.55rem;
}
.je-validation-rules__group {
  margin: 0 0 0.65rem;
}
.je-validation-rules__group:last-child {
  margin-bottom: 0;
}
.je-validation-rules__heading {
  font-size: 0.8rem;
  font-weight: 650;
  margin: 0 0 0.25rem;
  color: var(--text-muted, #4b5563);
}
.je-validation-rules ul {
  margin: 0;
  padding-left: 1.15rem;
}
.je-validation-rules li {
  margin: 0.15rem 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.je-batch-details {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border, #d8dde6);
  border-radius: 6px;
  background: var(--surface-muted, #f6f7f9);
  grid-column: 1 / -1;
}
.je-batch-details__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.je-batch-details__summary::-webkit-details-marker {
  display: none;
}
.je-batch-details__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: #0f766e;
  color: #fff;
}
.je-batch-details__toggle {
  font-weight: 500;
  margin-left: auto;
}
.je-batch-details__body {
  margin-top: 0.65rem;
}
.je-batch-details__note {
  margin: 0 0 0.55rem;
}
.je-batch-details__grid {
  margin: 0;
}
.je-ap-cc-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: inherit;
  align-items: start;
}
.je-ap-cc-reasons > .field,
.je-ap-cc-reasons > .field.field--full {
  grid-column: auto !important;
  min-width: 0;
}
/* Page 2 bill VAT keeps the two-column form even when a parent is full width. */
.je-line-vat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem 1.25rem;
}
.je-line-vat > .field,
.je-line-vat > .field.field--full {
  grid-column: auto !important;
  min-width: 0;
}
.je-acq-code-pair {
  margin: 0;
}
.je-wizard__batch-fields {
  margin: 0;
}
/* Keep Page 1 as a true two-column grid (search-selects must not span full width). */
.je-wizard__batch-fields .search-select.field--full {
  grid-column: auto;
}
/* Paired journal rows: searchable selects must share the line with the sibling field. */
.je-line .je-fx-row .search-select,
.je-line .je-line-identity-row .search-select,
.je-line .je-split-row .search-select,
.je-wizard .je-fx-row .search-select,
.je-wizard .je-line-identity-row .search-select,
.je-wizard .je-split-row .search-select {
  grid-column: auto;
  min-width: 0;
}
.je-wizard__batch-fields .form-section {
  grid-column: 1 / -1;
}
.je-wizard__summary-bar {
  display: block;
  margin: 0.15rem 0 0.5rem;
}
.je-wizard__summary-bar .je-batch-summary {
  margin: 0;
  width: 100%;
}
.je-wizard__id-date {
  margin: 0 0 0.85rem;
}
.je-wizard__id-date .field:first-child .input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}
.je-action-times {
  margin: 0 0 0.75rem;
}
.je-action-times__table {
  width: 100%;
  max-width: 42rem;
  border-collapse: collapse;
  margin: 0;
}
.je-action-times__table th,
.je-action-times__table td {
  text-align: left;
  padding: 0.35rem 0.7rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 0.8rem;
  vertical-align: top;
  width: 33.33%;
}
.je-action-times__table th {
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  font-weight: 600;
}
.je-action-times__status--na {
  color: var(--muted, #6b7280);
}
.je-action-times__status--pending {
  font-weight: 600;
}
.je-action-times__status--done {
  font-weight: 600;
}
.je-line-fx-rate {
  min-width: 0;
}
.je-fx-row {
  margin: 0;
}
.je-line-fx-rate.is-fx-required .field:first-child .input {
  border-color: #c4a35a;
  background: #fffbeb;
}
.je-line-fx-rate.is-fx-required .field:first-child .field-label::after {
  content: " (required)";
  font-weight: 500;
  color: #92400e;
  font-size: 0.85em;
}
.je-line-desc > .field {
  display: block;
  width: 100%;
}
.je-line-desc .field-label {
  color: #c62828;
  font-weight: 600;
}
.je-line-desc textarea.input,
.je-line-desc .input,
.je-line-desc textarea {
  border-color: #c62828;
  border-width: 1.5px;
}
.je-line-desc .field-hint {
  color: #c62828;
}
.je-acq-locked .field--disabled,
.je-acq-locked .field {
  opacity: 0.72;
}
.je-split-row {
  margin: 0 0 0.35rem;
}
.je-attach__pair {
  margin: 0 0 0.35rem;
}
.je-wizard__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.je-wizard__actions-nav,
.je-wizard__actions-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.je-wizard__actions-main {
  margin-left: auto;
}
#modal-host .modal-footer.je-wizard-footer-hidden,
#je-workspace-host .modal-footer.je-wizard-footer-hidden {
  display: none !important;
}

/* Journal processing — full workspace (replaces batch table, not overlay) */
.je-workspace {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 7.5rem);
  box-shadow: none;
  border-radius: 0.65rem;
}
.je-workspace__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.je-workspace__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  min-width: 0;
}
.je-workspace__header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.je-workspace__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.1rem 1.25rem;
  max-height: none;
}
.je-workspace .modal-footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border, #e2e8f0);
  background: #f8fafc;
  border-radius: 0 0 0.65rem 0.65rem;
}
.je-workspace .form-grid,
.je-workspace .form-grid--2 {
  max-width: none;
}
.main-content:has(.je-workspace) {
  padding-bottom: 0.5rem;
}
[data-je-wizard-save].is-disabled,
[data-je-wizard-save]:disabled,
[data-je-wizard-finish].is-disabled,
[data-je-wizard-finish]:disabled,
[data-je-wizard-submit].is-disabled,
[data-je-wizard-submit]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ws-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.65rem 0.75rem;
  align-items: stretch;
  width: 100%;
}
.ws-transfer__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-transfer__caption {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.25rem;
}
.ws-transfer__actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding-top: 1.15rem;
}
.ws-transfer__value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.ws-transfer .select--multi {
  min-height: 9.5rem;
}
@media (max-width: 720px) {
  .ws-transfer {
    grid-template-columns: 1fr;
  }
  .ws-transfer__actions {
    flex-direction: row;
    padding-top: 0;
  }
}

.je-batch-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  margin: 0.15rem 0 0.85rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
}
.je-wizard__page[data-je-page="2"] .je-batch-summary,
.je-wizard__page[data-je-page="3"] .je-batch-summary {
  margin: 0.15rem 0 0.85rem;
}
.je-composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0 0.75rem;
}
.je-composer {
  margin-bottom: 0.75rem;
}
.je-composer:empty {
  display: none;
}
.je-saved-list {
  margin-top: 0.25rem;
}
.je-attach {
  margin: 0.35rem 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fafbfc;
}
.je-attach__detail {
  margin-top: 0.35rem;
}
.je-attach__slots {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.je-attach__file-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.je-attach__file-name {
  word-break: break-all;
}
.je-attach__status {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.je-attach__status.is-complete {
  color: #15803d;
}
.je-line--income .je-attach,
.je-line--contra .je-attach {
  grid-column: 1 / -1;
}
.je-batch-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.je-batch-summary__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.je-batch-summary__value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.je-batch-summary__item--balance.is-balanced .je-batch-summary__value {
  color: #15803d;
}
.je-batch-summary__item--balance.is-unbalanced .je-batch-summary__value {
  color: #b45309;
}
@media (max-width: 900px) {
  .je-batch-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .je-batch-summary {
    grid-template-columns: 1fr;
  }
}

.je-line__save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
}
.je-line__save-status {
  font-weight: 600;
  color: #15803d;
}
.je-line--saved {
  background: rgba(240, 253, 244, 0.45);
  border-radius: 0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

/*
 * Two-column form standard (system default):
 * - Bare .form-grid and .form-grid--2 share the same layout
 * - Equal columns, same control height, aligned pairs
 * - .field--full / sections / form-actions / multiselect / textarea (default) span the full row
 * - Use .form-grid--1 only for intentional single-column panels (e.g. note entry)
 */
.form-grid,
.form-grid--2,
.form-grid--defaults {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 100%;
  align-items: start;
  column-gap: 1.25rem;
  row-gap: 0.9rem;
  gap: 0.9rem 1.25rem;
}

.form-grid--1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}

.form-grid > .field,
.form-grid > .search-select,
.form-grid--2 > .field,
.form-grid--2 > .search-select,
.form-grid--defaults > .field,
.form-grid--defaults > .search-select {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-sizing: border-box;
}

.form-grid > .field > .field-label,
.form-grid > .search-select > .field-label,
.form-grid--2 > .field > .field-label,
.form-grid--2 > .search-select > .field-label,
.form-grid--defaults > .field > .field-label,
.form-grid--defaults > .search-select > .field-label {
  min-height: 1.15rem;
  line-height: 1.25;
}

.form-grid > .field > .input,
.form-grid > .field > .select,
.form-grid > .field > input,
.form-grid > .field > select,
.form-grid > .field > textarea.input,
.form-grid > .search-select .search-select__control,
.form-grid > .search-select .input,
.form-grid--2 > .field > .input,
.form-grid--2 > .field > .select,
.form-grid--2 > .field > input,
.form-grid--2 > .field > select,
.form-grid--2 > .field > textarea.input,
.form-grid--2 > .search-select .search-select__control,
.form-grid--2 > .search-select .input,
.form-grid--defaults > .field > .input,
.form-grid--defaults > .field > .select,
.form-grid--defaults > .field > input,
.form-grid--defaults > .field > select,
.form-grid--defaults > .field > textarea.input,
.form-grid--defaults > .search-select .search-select__control,
.form-grid--defaults > .search-select .input {
  width: 100%;
  min-height: 2.4rem;
  box-sizing: border-box;
}

.form-grid > .field > textarea.input,
.form-grid--2 > .field > textarea.input,
.form-grid--defaults > .field > textarea.input {
  min-height: 4.5rem;
  height: auto;
  resize: vertical;
}

.form-grid > .form-actions,
.form-grid--2 > .form-actions,
.form-grid--defaults > .form-actions,
.form-grid > .form-section,
.form-grid--2 > .form-section,
.form-grid--defaults > .form-section {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .form-grid,
  .form-grid--2,
  .form-grid--defaults {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-grid--4 {
  grid-template-columns: 2fr 1fr 1fr 2fr;
}

.field--full { grid-column: 1 / -1; }

.field-rule {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.04rem 0.38rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
  vertical-align: middle;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 999px;
  white-space: nowrap;
}

.field-hint,
.field-hint.muted,
span.field-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--text-muted, #64748b);
}

.je-lines-wrap .muted.text-sm,
.je-income-splits .muted.text-sm {
  font-size: 0.72rem;
  line-height: 1.4;
  margin: 0.15rem 0 0.35rem;
}

.modal-card--wide .form-grid,
.modal-card .form-grid,
.modal-card .form-grid--2,
.je-workspace .form-grid,
.je-workspace .form-grid--2,
.card-body > .form-grid,
.card-body > .form-grid--2,
.card-body form.form-grid,
.card-body form.form-grid--2 {
  align-items: start;
  column-gap: 1.25rem;
  row-gap: 0.9rem;
}

.modal-card .field,
.modal-card .search-select,
.je-workspace .field,
.je-workspace .search-select {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.modal-card .field-label,
.je-workspace .field-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #334155;
}

/* Imprest / Claim / Cash Advance — bold field headlines */
.je-workspace[data-ap-request="1"] .field-label,
.modal-card[data-ap-request="1"] .field-label,
form[data-ap-request="1"] .field-label {
  font-weight: 700;
  color: #0f172a;
}

.modal-card .field .input,
.modal-card .field .select,
.modal-card .field textarea.input,
.modal-card .search-select .input,
.je-workspace .field .input,
.je-workspace .field .select,
.je-workspace .field textarea.input,
.je-workspace .search-select .input {
  width: 100%;
  min-height: 2.4rem;
  box-sizing: border-box;
}

/* Match date controls to standard text/select field height & width */
.modal-card input[type="date"].input,
.je-wizard input[type="date"].input,
.je-batch-filters input[type="date"].input,
input.input--date,
input.input--date-dmy {
  width: 100%;
  min-height: 2.4rem;
  height: 2.4rem;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.25;
  padding: 0.45rem 0.65rem;
}

/* Calendar picker + DD-MMM-YYYY display (legacy shell kept for compatibility) */
.date-dmy-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.date-dmy-control .date-dmy__display {
  width: 100%;
  min-height: 2.4rem;
  height: 2.4rem;
  box-sizing: border-box;
  padding-right: 2.75rem;
  cursor: pointer;
}
.date-dmy-control.is-readonly .date-dmy__display {
  cursor: default;
}
.date-dmy-control .date-dmy__picker {
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.1rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color-scheme: light;
  cursor: pointer;
  opacity: 0.85;
}
.date-dmy-control .date-dmy__picker::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.01;
}

/* Day / Month / Year journal date parts */
.field--date-parts .date-parts-control {
  display: grid;
  grid-template-columns: minmax(4.25rem, 0.7fr) minmax(5.5rem, 1fr) minmax(5.5rem, 1fr);
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
}
.date-parts-control .date-parts__day,
.date-parts-control .date-parts__month,
.date-parts-control .date-parts__year-display {
  min-height: 2.4rem;
  height: 2.4rem;
  width: 100%;
  box-sizing: border-box;
}
.date-parts-control .date-parts__year {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.date-parts-control .date-parts__year-display {
  padding-right: 2.5rem;
  cursor: pointer;
}
.date-parts-control.is-readonly .date-parts__year-display {
  cursor: default;
}
.date-parts-control .date-parts__year-icon {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--ws-muted, #64748b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.date-parts-control .date-parts__year-icon:hover,
.date-parts-control .date-parts__year-icon:focus-visible {
  color: var(--ws-text, #0f172a);
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}
.date-parts-control .date-parts__cal-svg {
  display: block;
  pointer-events: none;
}
/* Native date control is invisible — calendar opens via icon / year field click */
.date-parts-control .date-parts__year-picker {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  color-scheme: light;
}
.date-parts-control .date-parts__year-picker::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  width: 0;
  height: 0;
}
/* Legacy single-field date shell: icon-only trigger, no native date glyph */
.date-dmy-control .date-dmy__picker {
  opacity: 0;
  pointer-events: none;
}
.date-dmy-control .date-dmy__picker::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
}
@media (max-width: 640px) {
  .field--date-parts .date-parts-control {
    grid-template-columns: 1fr 1fr;
  }
  .date-parts-control .date-parts__year {
    grid-column: 1 / -1;
  }
}

.btn-export-soft {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}
.btn-export-soft:hover {
  background: #bfdbfe;
  border-color: #60a5fa;
  color: #1e3a8a;
}
.btn-upload-soft {
  background: #efe6d5;
  border: 1px solid #d4b896;
  color: #6b4423;
}
.btn-upload-soft:hover {
  background: #e5d6bc;
  border-color: #c4a574;
  color: #5a3820;
}

.je-entries-dual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.je-entries-panel {
  padding-top: 0.35rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.je-entries-panel:first-child {
  border-top: 0;
  padding-top: 0;
}
.je-entries-panel__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.je-line {
  grid-column: 1 / -1;
  padding: 0.85rem 0 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.je-line:last-child {
  border-bottom: 0;
}

.je-income-splits {
  margin-top: 0.25rem;
}

.je-line--focus {
  outline: 2px solid rgba(204, 3, 106, 0.35);
  outline-offset: 4px;
  border-radius: 0.35rem;
  background: rgba(253, 232, 243, 0.35);
}

.je-journal-list {
  margin: 0.35rem 0 0.75rem;
}

#modal-save.is-disabled,
#modal-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.search-select {
  position: relative;
}
.search-select.is-open,
.search-select:focus-within {
  z-index: 40;
}
.search-select__control {
  position: relative;
}
.search-select__query {
  width: 100%;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1.5h10L6 7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.7rem 0.45rem;
  cursor: pointer;
}
.search-select__query:focus {
  cursor: text;
}
.search-select__list {
  position: absolute;
  z-index: 400;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.search-select__option {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #0f172a;
}
.search-select__option:hover,
.search-select__option.is-active {
  background: #f1f5f9;
}
.search-select__empty {
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.badge-active { background: #ecfdf5; color: #065f46; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-pending { background: #fffbeb; color: #92400e; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }

.form-section {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.form-section:first-child,
.form-grid > .form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.form-section__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #334155;
}
.ap-instalment-host {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.proc-attach {
  grid-column: 1 / -1;
}
.proc-attach__slots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.proc-attach__row {
  padding-top: 0.65rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.ap-instalment-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.ap-instalment-row .field {
  margin: 0;
}
.ap-instalment-row .field.field--auto-amount .input {
  background: #f8fafc;
}
@media (max-width: 960px) {
  .ap-instalment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .ap-instalment-row {
    grid-template-columns: 1fr;
  }
}
.field.field--inactive {
  opacity: 0.45;
  pointer-events: none;
}
.field.field--inactive .input,
.field.field--inactive .select {
  background: #f8fafc;
}
.data-table th.num-cell,
.data-table td.num-cell,
.data-table th.col-num,
.data-table td.col-num,
.data-table th.col-count,
.data-table td.col-count,
.data-table th.col-amt,
.data-table td.col-amt,
.data-table .amt,
.access-config-table th.num-cell,
.access-config-table td.num-cell,
.module-pricing-table th.num-cell,
.module-pricing-table td.num-cell,
.pricing-catalog-table th.num-cell,
.pricing-catalog-table td.num-cell,
.num-cell,
.col-num,
.col-count,
.col-amt,
.amt {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.data-table td.num-cell,
.data-table td.col-num,
.data-table td.col-count,
.data-table td.col-amt,
.data-table td.amt,
.access-config-table td.num-cell,
.module-pricing-table td.num-cell,
.pricing-catalog-table td.num-cell {
  white-space: nowrap;
}
.data-table th.num-cell,
.data-table th.col-num,
.data-table th.col-count,
.data-table th.col-amt,
.data-table th.amt,
.access-config-table th.num-cell,
.module-pricing-table th.num-cell,
.pricing-catalog-table th.num-cell {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.2;
  vertical-align: bottom;
}
.data-table th.col-count,
.data-table td.col-count { width: 5.25rem; min-width: 4.75rem; }
.data-table th.col-amt,
.data-table td.col-amt,
.data-table th.amt,
.data-table td.amt { width: 7.5rem; min-width: 7rem; }
.data-table th.col-date,
.data-table td.col-date { width: 7.25rem; min-width: 7rem; white-space: nowrap; }
.data-table th.col-datetime,
.data-table td.col-datetime {
  width: 9.75rem;
  min-width: 9.25rem;
  white-space: nowrap;
}
.data-table--income-batches th.col-datetime,
.data-table--income-batches td.col-datetime {
  width: 10.25rem;
  min-width: 9.75rem;
}
.data-table th.col-code,
.data-table td.col-code { width: 8.5rem; min-width: 7.5rem; white-space: nowrap; }
/* AP / journal batch boards — Request/Payment IDs + group codes need more room */
.data-table--income-batches th.col-code,
.data-table--income-batches td.col-code {
  width: 12rem;
  min-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th.col-status,
.data-table td.col-status { width: 6.75rem; min-width: 5.75rem; white-space: nowrap; }
.data-table th.col-flag,
.data-table td.col-flag {
  width: 5.5rem;
  min-width: 4.75rem;
  white-space: nowrap;
  text-align: center;
}
.data-table th.col-contact-id,
.data-table td.col-contact-id {
  min-width: 10.5rem;
  white-space: nowrap;
  vertical-align: top;
}
.data-table th.col-name,
.data-table td.col-name {
  min-width: 8rem;
  max-width: 14rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}
.data-table th.col-label,
.data-table td.col-label {
  min-width: 12rem;
  max-width: 22rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data-table,
table.access-config-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.data-table td {
  vertical-align: top;
}
.cell-text {
  display: inline-block;
  max-width: 100%;
}
input.input--amt,
input.amt {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.field-control-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}
.field-control-wrap .input {
  flex: 1 1 auto;
  min-width: 0;
}
.field-control-wrap--pct .input--pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.field-suffix {
  flex: 0 0 auto;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}
/* Inline amount values (approval trackers, summaries, prose) */
span.amt,
strong.amt,
.amt-value,
dd.amt,
.mono.amt,
.data-table td.col-amt,
.data-table th.col-amt,
.data-table td.amt,
.data-table th.amt,
.access-config-table td.amt,
.access-config-table th.amt {
  display: inline-block;
  min-width: 6.5rem;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
td.col-amt,
td.amt,
th.col-amt,
th.amt {
  display: table-cell;
  min-width: 7rem;
}
.mgmt-stat-card__value,
.plan-total-bar__amount strong,
.plan-breakdown-list li > span:last-child,
.mod-pick__price,
.product-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mgmt-stat-card__value,
.plan-total-bar__amount strong,
.mod-pick__price,
.product-price {
  display: block;
}

.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem 1rem; font-size: 0.9rem; }
.detail-grid dt { color: #64748b; font-weight: 500; }
.detail-grid dd { margin: 0; }

.org-tree { list-style: none; margin: 0; padding-left: 1.25rem; }
.org-tree--root { padding-left: 0; }
.org-tree__label { display: inline-block; padding: 0.35rem 0.65rem; border-radius: 8px; margin: 0.2rem 0; }
.org-tree__intro { margin: 0 0 1rem; font-size: 0.9rem; }
.org-tree__skip { font-size: 0.75rem; color: #b45309; font-weight: 500; margin-left: 0.35rem; }
.org-tree__orphan-heading { list-style: none; margin-top: 1rem; }
.org-tree__label--board { background: #fef3c7; font-weight: 700; }
.org-tree__label--eo { background: #fce7f3; font-weight: 600; }
.org-tree__label--division { background: #ede9fe; font-weight: 600; }
.org-tree__label--group { background: #e0f2fe; }
.org-tree__label--dept { background: #f1f5f9; }
.org-tree__label--team { background: #ecfdf5; }

.aw-hierarchy-ladder { display: flex; flex-direction: column; gap: 0.5rem; }
.aw-hierarchy-step { display: grid; grid-template-columns: 1.5fr 1fr 0.8fr 1fr; gap: 0.75rem; padding: 0.65rem 0.85rem; border: 1px solid #e8e4f0; border-radius: 10px; align-items: center; font-size: 0.85rem; }
.aw-hierarchy-step__level { font-weight: 600; }
.aw-hint { font-size: 0.8rem; margin-top: 1rem; }
.aw-stages-cell { font-size: 0.78rem; max-width: 280px; }
.aw-stage-list { margin: 0; padding-left: 1.25rem; }
.aw-request-layout, .crm-case-layout { display: flex; flex-direction: column; gap: 1rem; }
.aw-stage-timeline { list-style: none; margin: 0; padding: 0; }
.aw-stage-timeline__item { padding: 0.75rem; border-left: 3px solid #e2e8f0; margin-bottom: 0.5rem; }
.aw-stage-timeline__item--active { border-left-color: #cc036a; background: #fdf2f8; }
.aw-stage-timeline__item--approved { border-left-color: #10b981; }
.aw-action-bar { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.aw-action-history, .case-timeline { list-style: none; margin: 0; padding: 0; }
.aw-action-history li, .case-timeline li { padding: 0.65rem 0; border-bottom: 1px solid #f1f5f9; }
.aw-resolution-path { font-size: 0.78rem; color: #64748b; margin-top: 0.25rem; }
.case-description { margin-top: 1rem; line-height: 1.55; }
.badge-priority--high, .badge-priority--critical, .badge-priority--p1 { background: #fef2f2; color: #b91c1c; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-priority--p2 { background: #fff7ed; color: #c2410c; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-priority--medium, .badge-priority--p3 { background: #fffbeb; color: #92400e; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-priority--low, .badge-priority--p4 { background: #f1f5f9; color: #475569; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-danger { background: #fef2f2; color: #b91c1c; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-warn { background: #fffbeb; color: #92400e; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-ok { background: #ecfdf5; color: #047857; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.badge-open { background: #eff6ff; color: #1d4ed8; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.cmd-dash-breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.cmd-dash-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.cmd-dash-card-title { font-weight: 600; }
.cmd-dash-card-sub { font-size: 0.8rem; color: #64748b; }
.cmd-dash-s-row { display: grid; grid-template-columns: 12px 88px 1fr 28px; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; font-size: 0.82rem; }
.cmd-dash-s-swatch { width: 12px; height: 12px; border-radius: 3px; }
.cmd-dash-s-bar-track { height: 6px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.cmd-dash-s-bar-fill { height: 100%; border-radius: 999px; }
.cmd-dash-pri-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.cmd-dash-pri-cell { display: flex; gap: 0.65rem; align-items: center; padding: 0.65rem; border: 1px solid #e8e4f0; border-radius: 10px; }
.cmd-dash-pri-cell--empty { opacity: 0.55; }
.cmd-dash-pri-dot { width: 2rem; height: 2rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; }
.cmd-dash-pri-name { font-weight: 600; font-size: 0.82rem; }
.cmd-dash-pri-sub { font-size: 0.75rem; color: #64748b; }
.text-sm { font-size: 0.8rem; }

.platform-onboard-panel { margin-bottom: 1rem; }
.platform-onboard-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.platform-onboard-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.platform-onboard-toolbar .input { flex: 1 1 180px; min-width: 140px; max-width: 280px; }
.platform-onboard-table { font-size: 0.82rem; }
.platform-onboard-table th { white-space: nowrap; }
.ob-tenant-row { cursor: pointer; }
.kyc-review-summary { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1rem; }
.kyc-review-summary__card { background: #f8fafc; border: 1px solid #e8e4f0; border-radius: 12px; padding: 0.85rem 1rem; min-width: 9rem; }
.kyc-review-summary__label { font-size: 0.76rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-bottom: 0.25rem; }
.kyc-review-summary__value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; color: #0f172a; }
.kyc-review-toolbar { margin-bottom: 1rem; }
.kyc-review-modal-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }
.kyc-review-modal-actions .inline-form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.kyc-file-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.kyc-file-preview__viewport { margin-top: 0.75rem; border: 1px solid #e2e8f0; border-radius: 0.55rem; overflow: hidden; background: #f8fafc; min-height: 120px; }
.kyc-file-preview__frame { display: block; width: 100%; height: 420px; border: 0; background: #fff; }
.kyc-file-preview__image { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; }
.kyc-file-preview__hint { margin: 0; padding: 1.25rem; font-size: 0.84rem; color: #64748b; line-height: 1.45; text-align: center; }
.detail-preview__section { margin-top: 1rem; }
.detail-preview__section:first-child { margin-top: 0; }
.detail-preview__prose { margin-top: 0.85rem; }
.detail-preview__prose-title { margin: 0 0 0.4rem; font-size: 0.88rem; font-weight: 700; color: #0f172a; }
.detail-preview__prose p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: #334155; }
.detail-preview__file-pill { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.55rem; border-radius: 0.5rem; background: #fff; border: 1px solid #e8e4ec; font-size: 0.82rem; }
.detail-preview__file-dot { flex-shrink: 0; min-width: 2rem; padding: 0.15rem 0.35rem; border-radius: 0.35rem; background: #fde8f3; color: #7c3aed; font-size: 0.65rem; font-weight: 700; text-align: center; }
.platform-onboard-detail .detail-grid { margin-bottom: 0.5rem; }

.alert--warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 0.65rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.aw-sla-alert { font-size: 0.85rem; }
.aw-sla-breach-tag { font-size: 0.68rem; color: #b91c1c; font-weight: 700; margin-left: 0.35rem; }
.aw-committee-card { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; }
.aw-committee-vote { border: 1px solid #e8e4f0; }
.aw-voter-list { list-style: none; margin: 0.75rem 0; padding: 0; }
.aw-voter-list li { padding: 0.35rem 0; }
.aw-voter-list__voted { color: #059669; font-weight: 600; }

.comm-hub { display: flex; flex-direction: column; gap: 0.75rem; }
.comm-hub--compact .comm-item { padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; }
.comm-item { padding: 1rem; border-radius: 12px; border: 1px solid #e8e4f0; background: #fff; }
.comm-item--inward { border-left: 4px solid #3b82f6; }
.comm-item--outward { border-left: 4px solid #cc036a; }
.comm-item__head { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 0.35rem; }
.comm-item__subject { margin: 0.25rem 0; font-size: 0.95rem; }
.comm-item__meta { font-size: 0.82rem; color: #64748b; margin: 0.25rem 0; }
.comm-item__body { margin: 0.5rem 0; line-height: 1.5; font-size: 0.88rem; }
.contact-link { color: #cc036a; font-weight: 600; text-decoration: none; }

.report-hub-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 1rem; }
.report-hub-card { background: #fff; border: 1px solid #e8e4f0; border-radius: 14px; padding: 1.1rem; }
.report-hub-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.report-hub-card p { margin: 0 0 0.75rem; font-size: 0.82rem; color: #64748b; }
.report-total-row { background: #f8fafc; font-weight: 600; }
.report-pl-summary { max-width: 420px; }
.report-pl-line { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px solid #f1f5f9; }
.report-pl-line--total { font-weight: 700; border-top: 2px solid #e2e8f0; margin-top: 0.5rem; padding-top: 0.65rem; }
.report-bs-columns { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.report-bs-line { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.3rem 0; }
.report-bs-total { font-size: 1.1rem; font-weight: 700; margin: 0.25rem 0 0.75rem; }
.report-metrics-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.report-metric { text-align: center; padding: 1rem; border: 1px solid #e8e4f0; border-radius: 12px; }
.report-metric__val { display: block; font-size: 1rem; font-weight: 700; color: #100220; }
.report-metric__lbl { font-size: 0.78rem; color: #64748b; }

.comm-item--meeting { border-left: 4px solid #8b5cf6; }
.comm-item--internal { border-left: 4px solid #64748b; background: #f8fafc; }
.comm-item--call { border-left-color: #0f766e; }
.call-live {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d8e8e5;
  border-radius: 10px;
  background: linear-gradient(180deg, #f4fbf9 0%, #eef7f5 100%);
}
.call-live-status { margin: 0 0 0.65rem; font-size: 0.88rem; color: #334155; }
.call-live-status--ringing { color: #b45309; font-weight: 600; }
.call-live-status--connected { color: #0f766e; font-weight: 600; }
.call-live-status--ended { color: #475569; }
.call-live-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.field--disabled { opacity: 0.72; }
.case-loc-details {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #f8fafc;
}
.case-loc-details__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 0.65rem;
}
.case-loc-details__empty { margin: 0; }
.case-loc-details__grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.case-loc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.case-loc-card strong { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; }
.case-loc-card__dl { margin: 0; display: grid; gap: 0.25rem; }
.case-loc-card__dl > div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.35rem; font-size: 0.78rem; }
.case-loc-card__dl dt { margin: 0; color: #64748b; font-weight: 500; }
.case-loc-card__dl dd { margin: 0; color: #0f172a; }

.case-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem 0.75rem;
  align-items: end;
  margin: 0 0 1rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.case-filters .field { margin: 0; min-width: 0; }
.case-filters .field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.case-filters .input,
.case-filters .select { width: 100%; }
.case-filters__actions {
  display: flex;
  align-items: end;
  padding-bottom: 0.1rem;
}

.sr-catalogue-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sr-catalogue-card { border: 1px solid #e8e4f0; border-radius: 12px; padding: 1rem; background: #fff; }
.sr-catalogue-card h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }

.stat-sub { margin-top: 0.25rem; }
.board-chair-history__list { margin: 0.35rem 0 0; padding-left: 1.1rem; font-size: 0.82rem; color: #64748b; line-height: 1.45; }
.board-chair-history__list li + li { margin-top: 0.25rem; }
.event-feed { list-style: none; margin: 0; padding: 0; }
.event-feed li { padding: 0.35rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }

.pipeline-board { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 1rem; }
.pipeline-col { background: #f8f7fc; border: 1px solid #e8e4f0; border-radius: 12px; padding: 0.75rem; min-height: 120px; }
.pipeline-col__title { margin: 0 0 0.65rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.pipeline-card { background: #fff; border: 1px solid #e8e4f0; border-radius: 10px; padding: 0.65rem; margin-bottom: 0.5rem; }
.pipeline-card strong { display: block; font-size: 0.88rem; margin-bottom: 0.25rem; }
.select-sm { font-size: 0.78rem; padding: 0.25rem 0.4rem; margin-top: 0.35rem; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-ok { background: #dcfce7; color: #15803d; }

/* Management / Platform-style dashboard cards */
.mgmt-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.mgmt-stat-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8e4f0);
  border-radius: 0.72rem;
  padding: 1rem;
}
.mgmt-stat-card__label {
  font-size: 0.79rem;
  color: #736987;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.mgmt-stat-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: #141414;
  line-height: 1.25;
}
.mgmt-stat-card__sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}
.mgmt-stat-card--accent {
  border-color: rgba(204, 3, 106, 0.22);
  background: linear-gradient(180deg, #fff 0%, #fef7fb 100%);
}
.mgmt-dashboard-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-width: 960px) {
  .mgmt-dashboard-dual { grid-template-columns: 1fr; }
}
.mgmt-dash-panel {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8e4f0);
  border-radius: 0.72rem;
  padding: 0.85rem 1rem 1rem;
}
.mgmt-dash-panel h4 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3f344f;
}
.mgmt-dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mgmt-dash-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
}
.mgmt-dash-list li:last-child { border-bottom: none; }
.mgmt-dash-list__meta { color: #64748b; font-size: 0.75rem; white-space: nowrap; }
.mgmt-section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #736987;
}

/* Dashboard charts */
.dash-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.dash-chart {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8e4f0);
  border-radius: 0.72rem;
  padding: 1rem 1rem 0.85rem;
}
.dash-chart h4 {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3f344f;
}
.dash-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 140px;
  padding-top: 0.25rem;
}
.dash-chart__bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.dash-chart__bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #cc036a 0%, #9d174d 100%);
  min-height: 4px;
  transition: height 0.3s ease;
}
.dash-chart__bar--muted { background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%); }
.dash-chart__bar--ok { background: linear-gradient(180deg, #22c55e 0%, #15803d 100%); }
.dash-chart__bar--warn { background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%); }
.dash-chart__bar-label {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}
.dash-chart__bar-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: #141414;
  margin-bottom: 0.25rem;
}
.dash-chart__svg {
  width: 100%;
  height: auto;
  display: block;
}
.dash-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  color: #64748b;
}
.dash-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dash-chart__legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dash-chart__donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-chart__donut-svg {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.dash-chart__donut-legend {
  flex: 1;
  min-width: 120px;
}
.dash-chart__donut-legend li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
}
.dash-chart__donut-legend li:last-child { border-bottom: none; }

/* Plan pricing (Basic / Custom / Dedicated) */
.plan-pricing-card .card-body { padding-top: 0.5rem; }
.plan-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 0.72rem;
  background: var(--surface-alt, #f8fafc);
}
.plan-total-bar__amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
.plan-total-bar__amount strong {
  font-size: 1.35rem;
  color: var(--primary, #7c3aed);
}
.plan-pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .plan-pricing-layout { grid-template-columns: 1fr; }
}
.tenant-module-groups { display: flex; flex-direction: column; gap: 1rem; }
.tenant-module-group__title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}
.mod-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 0.72rem;
  padding: 0.85rem 1rem;
  background: var(--surface, #fff);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.mod-pick.is-on {
  border-color: var(--field-stroke, #c4b5fd);
  box-shadow: 0 0 0 2px var(--selection-ring, rgba(124, 58, 237, 0.15));
}
.mod-pick.is-disabled { cursor: default; opacity: 0.92; }
.mod-pick--readonly { cursor: default; pointer-events: none; }
.mod-pick__check {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.35rem;
  background: #fff;
  border: 1px solid var(--form-panel-border, #e2e8f0);
  color: var(--primary, #7c3aed);
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.mod-pick h4 { margin: 0.2rem 0 0.35rem; font-size: 0.84rem; font-weight: 700; }
.mod-pick p { margin: 0 0 0.5rem; font-size: 0.76rem; color: var(--muted, #64748b); line-height: 1.4; flex: 1; }
.mod-pick__price {
  display: block;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary, #7c3aed);
}
.mod-pick__price--included { color: var(--ok, #16a34a); }
.module-catalog-lead { margin: 0 0 1rem; font-size: 0.84rem; color: var(--muted, #64748b); line-height: 1.5; }
.plan-breakdown-panel {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 0.72rem;
  padding: 0.85rem 1rem;
  background: var(--surface, #fff);
  position: sticky;
  top: 1rem;
}
.plan-breakdown-panel h4 { margin: 0 0 0.65rem; font-size: 0.88rem; font-weight: 700; }
.plan-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
}
.plan-breakdown-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.plan-breakdown-list li:last-child { border-bottom: none; }
.plan-breakdown-empty { margin: 0; font-size: 0.78rem; }

/* Access configuration (Admin Console parity) */
.access-config-intro { margin: 0 0 1rem; padding: 0 1rem; }
.access-config-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.access-config-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.access-config-toolbar .input-search { flex: 1 1 200px; min-width: 160px; }
.access-config-toolbar .select { min-width: 160px; }
.access-config-toolbar .toolbar-search-select {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 340px;
}
.access-config-toolbar .toolbar-search-select .search-select__query {
  min-height: 2.4rem;
}
.access-config-table code.structure-code {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.access-config-row-clickable { cursor: pointer; }
.access-config-row-clickable:hover { background: #f8fafc; }
.crud-row-clickable { cursor: pointer; }
.crud-row-clickable:hover { background: #f8fafc; }
.row-actions.actions {
  white-space: nowrap;
}
.row-actions.actions .btn {
  margin: 0 0.15rem 0.15rem 0;
}
.access-config-panel-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Data table pagination */
.access-config-pagination,
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}
.table-pagination-info { font-size: 0.875rem; color: #64748b; }
.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.table-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #475569;
}
.table-pagination-size .select-sm { min-width: 4.5rem; padding: 0.25rem 0.5rem; }
.table-pagination-pages {
  font-size: 0.875rem;
  color: #475569;
  min-width: 5.5rem;
  text-align: center;
}
.tenant-id-code { font-size: 0.8125rem; }
.tenant-id-label { font-size: 0.8125rem; margin-left: 0.15rem; }
.dual-pane-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0.75rem 0; }
@media (max-width: 768px) { .dual-pane-grid { grid-template-columns: 1fr; } }
.dual-pane-col { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 0.75rem; max-height: 420px; overflow-y: auto; }
.dual-pane-col h4 { margin: 0 0 0.5rem; font-size: 0.85rem; display: flex; align-items: center; gap: 0.35rem; }
.dual-pane-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.35rem 0; cursor: pointer; font-size: 0.82rem; }
.dual-pane-item span { display: flex; flex-direction: column; gap: 0.1rem; }
.dual-pane-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 0.75rem; }

.module-pricing-summary { margin: 0 1rem 1rem; }
.module-pricing-count { font-size: 0.85rem; }
.module-pricing-modal-id { font-size: 0.78rem; }
.module-pricing-table td .badge { margin-left: 0.35rem; vertical-align: middle; }

.plan-calc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0 0.15rem;
}
.plan-calc-facility { margin-bottom: 1.25rem; }
.plan-calc-facility h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.plan-calc-app { border: 1px solid var(--border, #e2e8f0); border-radius: 10px; margin-bottom: 0.65rem; overflow: hidden; }
.plan-calc-app__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.plan-calc-app__meta { color: #64748b; font-size: 0.85rem; white-space: nowrap; }
.plan-calc-app__body { padding: 0.75rem 1rem 1rem; }
.plan-calc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0 0.15rem;
}
.plan-calc-actions .btn.is-on,
#calc-dedicated.is-on {
  border-color: #0f766e;
  color: #0f766e;
  background: #ecfdf5;
}
.input--sm { max-width: 6rem; padding: 0.35rem 0.5rem; }
.mgmt-stat-card--accent .mgmt-stat-card__value { color: #0f766e; }
.badge-disabled {
  background: #fff5f7;
  color: #be2b43;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}
.badge-muted {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}
.public-data-version-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
  grid-column: 1 / -1;
}
.public-data-version-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  grid-column: 1 / -1;
}
.public-data-version-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e8edf3;
  border-radius: 0.5rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.public-data-version-item:hover { border-color: #cbd5e1; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
.public-data-version-item__num {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7a1030;
}
.public-data-version-item__meta { font-size: 0.75rem; color: #64748b; }
.public-data-version-item__summary { font-size: 0.8125rem; color: #334155; }
.record-version-history { grid-column: 1 / -1; margin-top: 0.5rem; }
.modal-card.modal-card--wide { width: min(640px, 100%); }
.modal-card.modal-card--detail { width: min(720px, 100%); }
.modal-card.modal-card--detail .modal-header { display: none; }
.modal-card.modal-card--detail .modal-body { padding: 0; }
.modal-footer--split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.modal-footer__start, .modal-footer__end { display: flex; gap: 0.5rem; align-items: center; }
.detail-preview__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
}
.detail-preview__context {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-preview__close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.detail-preview__divider { height: 1px; background: #e2e8f0; margin: 0 1.25rem; }
.detail-preview__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
}
.detail-preview__item-title { margin: 0; font-size: 1.25rem; }
.detail-preview__hero-actions { display: flex; gap: 0.5rem; }
.detail-preview__body { padding: 0 1.25rem 1.25rem; }
.detail-preview__section-title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.detail-preview__rows { display: grid; gap: 0.5rem; }
.detail-preview__kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}
.detail-preview__k { color: #64748b; font-weight: 500; }
.detail-preview__v { color: #0f172a; word-break: break-word; }
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
}
.btn-danger:hover { background: #b91c1c; }

.ai-section-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}
.ai-process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}
.ai-process-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-process-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.ai-process-card__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}
.ai-process-card__subtitle { margin: 0; font-size: 0.82rem; }
.ai-process-card__objective { margin: 0; font-size: 0.875rem; flex: 1; }
.ai-prototype-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.ai-assist-result {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.badge--info { background: #e0f2fe; color: #0369a1; }
.badge--accent { background: #fce7f3; color: #9d174d; }
.badge--warn { background: #fef3c7; color: #b45309; }

.ai-section-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}
.ai-process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}
.ai-process-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-process-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.ai-process-card__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}
.ai-process-card__objective {
  font-size: 0.875rem;
  color: #334155;
  flex: 1;
}
.badge--info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge--accent {
  background: #fce7f3;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}
.badge--warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.ai-prototype-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.ai-assist-result {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ws-reactivation-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 1.25rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}

.reactivation-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1100px) {
  .reactivation-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reactivation-grid > section:last-child {
    grid-column: 1 / -1;
  }
}

.reactivation-plan-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 0.75rem;
}

.reactivation-plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
}

.reactivation-plan-card.is-selected {
  border-color: #d81b60;
  box-shadow: 0 0 0 1px rgba(216, 27, 96, 0.25);
}

.reactivation-module-group {
  margin-top: 0.75rem;
}

.reactivation-module-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.reactivation-module-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.875rem;
}

.reactivation-status-header h2 {
  margin: 0.35rem 0;
}

.billing-breakdown {
  display: grid;
  gap: 0;
  font-size: 0.875rem;
}

.billing-breakdown__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
}

.billing-breakdown__row:first-child {
  border-top: 0;
}

.billing-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(216, 27, 96, 0.2);
  font-weight: 800;
  font-size: 1rem;
}

.contact-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.1rem 0.35rem 0.1rem 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.contact-type-chip__status {
  font-weight: 500;
  opacity: 0.85;
}

.contact-type-chip__status::before {
  content: "·";
  margin-right: 0.25rem;
}

.contact-type-chip--inactive {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

/* Onboarding stages */
.ob-stage-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ob-stage-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--surface, #fff);
}
.ob-stage-row.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ob-stage-row__index {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}
.ob-stage-row.is-complete .ob-stage-row__index {
  background: #16a34a;
  color: #fff;
}
.ob-stage-row__body h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}
.ob-stage-row__body p {
  margin: 0 0 0.35rem;
}
.ob-stage-row__meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.ob-stage-row__action {
  align-self: center;
}
.ob-dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ob-dash-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.ob-dash-step:last-child {
  border-bottom: 0;
}
.ob-dash-step__mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
}
.ob-dash-step.is-complete .ob-dash-step__mark {
  background: #16a34a;
  color: #fff;
}
