/* YAC Accounting Setup — overview redesign (content area only) */
.yac-as {
  --as-blue-700: #1d4ed8;
  --as-blue-600: #2563eb;
  --as-blue-500: #3b82f6;
  --as-blue-100: #dbeafe;
  --as-blue-50: #eff6ff;
  --as-gray-900: #0f172a;
  --as-gray-700: #334155;
  --as-gray-600: #475569;
  --as-gray-500: #64748b;
  --as-gray-400: #94a3b8;
  --as-gray-300: #cbd5e1;
  --as-gray-200: #e2e8f0;
  --as-gray-100: #f1f5f9;
  --as-gray-50: #f8fafc;
  --as-white: #ffffff;
  --as-radius: 10px;
  --as-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --as-shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
  color: var(--as-gray-900);
  -webkit-font-smoothing: antialiased;
}

.yac-as .as-content {
  padding: 28px 32px 60px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.yac-as .as-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 24px;
}

.yac-as .as-title-block h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -.01em;
  color: var(--as-gray-900);
}

.yac-as .as-title-block .as-subtitle {
  font-size: 13px;
  color: var(--as-gray-500);
  margin: 0;
  max-width: 640px;
  line-height: 1.5;
}

.yac-as .as-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.yac-as .as-tool-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--as-white);
  border: 1px solid var(--as-gray-200);
  border-radius: 8px;
  color: var(--as-gray-500);
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.yac-as .as-tool-btn:hover {
  background: var(--as-gray-50);
  color: var(--as-gray-700);
}

.yac-as .as-tool-btn svg {
  width: 16px;
  height: 16px;
}

.yac-as .as-tool-btn.refresh {
  width: auto;
  padding: 0 14px;
  gap: 7px;
  background: var(--as-blue-600);
  color: #fff;
  border-color: var(--as-blue-600);
  font-size: 13px;
  font-weight: 600;
}

.yac-as .as-tool-btn.refresh:hover {
  background: var(--as-blue-700);
  color: #fff;
}

.yac-as .as-tool-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.yac-as .as-status {
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.yac-as .as-status.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.yac-as .as-status.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.yac-as .as-phase {
  margin-bottom: 30px;
}

.yac-as .as-phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.yac-as .as-phase-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--as-blue-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yac-as .as-phase-header h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--as-gray-700);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
}

.yac-as .as-phase-header .as-phase-name {
  color: var(--as-gray-400);
  font-weight: 600;
}

.yac-as .as-phase-progress {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--as-gray-400);
  font-weight: 600;
}

.yac-as .as-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.yac-as .as-op-card {
  background: var(--as-white);
  border: 1px solid var(--as-gray-200);
  border-radius: var(--as-radius);
  padding: 16px 16px 15px;
  box-shadow: var(--as-shadow-sm);
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .15s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.yac-as .as-op-card:hover {
  box-shadow: var(--as-shadow-md);
  border-color: var(--as-blue-100);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.yac-as .as-op-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.yac-as .as-op-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--as-blue-50);
  color: var(--as-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yac-as .as-op-icon svg {
  width: 16px;
  height: 16px;
}

.yac-as .as-op-arrow {
  color: var(--as-gray-300);
  transition: transform .15s, color .15s;
  display: flex;
}

.yac-as .as-op-arrow svg {
  width: 14px;
  height: 14px;
}

.yac-as .as-op-card:hover .as-op-arrow {
  color: var(--as-blue-600);
  transform: translateX(2px);
}

.yac-as .as-op-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--as-gray-900);
}

.yac-as .as-op-card:hover h3 {
  color: var(--as-blue-600);
}

.yac-as .as-op-card p {
  font-size: 12px;
  color: var(--as-gray-500);
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .yac-as .as-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .yac-as .as-content {
    padding: 20px 16px 40px;
  }

  .yac-as .as-page-header {
    flex-direction: column;
  }

  .yac-as .as-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Practice Maintenance & setup form pages ========== */
.yac-setup {
  --ys-ink: #212934;
  --ys-ink2: #495663;
  --ys-muted: #6b7885;
  --ys-line: #e2e7ec;
  --ys-line2: #eef1f4;
  --ys-green: #1d7044;
  max-width: 1500px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--ys-ink);
  -webkit-font-smoothing: antialiased;
}

.yac-setup input,
.yac-setup select,
.yac-setup button,
.yac-setup textarea,
.yac-setup label,
.yac-setup table {
  font-family: inherit;
}

.yac-setup .ys-head {
  margin-bottom: 16px;
}

.yac-setup .ys-title {
  font-size: 21px;
  font-weight: 600;
  color: var(--ys-ink);
  margin: 0 0 4px;
  letter-spacing: -.2px;
}

.yac-setup .ys-sub {
  font-size: 13px;
  color: var(--ys-muted);
  max-width: 920px;
  margin: 0;
  line-height: 1.45;
}

.yac-setup .ys-page-status {
  font-size: 13px;
  padding: 8px 12px;
  margin: 12px 0 0;
  border-radius: 5px;
}

.yac-setup .ys-status-close {
  flex: 0 0 auto;
  padding: 0 6px;
  margin: 0 0 0 auto;
  opacity: 1;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  min-width: 28px;
  min-height: 28px;
}

.yac-setup .ys-page-status.alert-success .ys-status-close {
  color: #0f5132;
}

.yac-setup .ys-page-status.alert-danger .ys-status-close {
  color: #842029;
}

.yac-setup .ys-status-close:hover {
  opacity: .75;
}

.yac-setup .ys-input.is-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.yac-setup .ys-card-foot .ys-foot-status {
  margin: 0 auto 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  max-width: 62%;
}

.yac-setup .ys-card-foot .ys-foot-status.ok { color: #027a48; }
.yac-setup .ys-card-foot .ys-foot-status.err { color: #b42318; }

.yac-setup .ys-card {
  background: #fff;
  border: 1px solid var(--ys-line);
  border-radius: 6px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
  overflow: hidden;
}

.yac-setup .ys-policy-card {
  overflow: visible;
}

.yac-setup .ys-card-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--ys-line2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.yac-setup .ys-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ys-ink);
  margin: 0;
}

.modal .modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #212934;
}

.modal .modal-header .text-muted.small {
  font-size: 12.5px;
}

.modal-header .btn-close.ys-modal-close {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  opacity: 1;
  border: 1px solid #ccd4dc;
  border-radius: 4px;
  background-color: #fff;
  background-size: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.modal-header .btn-close.ys-modal-close:hover {
  background-color: #f3f6f9;
  border-color: #9aa8b5;
  opacity: 1;
}

.modal-header .btn-close.ys-modal-close:focus,
.modal-header .btn-close.ys-modal-close:focus-visible {
  outline: 2px solid var(--sl-theme, #7e67ff);
  outline-offset: 1px;
  border-color: var(--sl-theme, #7e67ff);
  box-shadow: 0 0 0 3px rgba(126, 103, 255, .22);
  opacity: 1;
}

.yac-setup .ys-card-note {
  font-size: 12px;
  color: var(--ys-muted);
  margin-left: 10px;
  line-height: 1.3;
}

.yac-setup .ys-card-head .ys-actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}

.yac-setup .ys-search {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}

.yac-setup .ys-search.ys-search-wide {
  width: min(360px, 42vw);
}

.yac-setup .ys-search > i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #8a96a3;
  pointer-events: none;
}

.yac-setup .ys-search .ys-input {
  height: 32px;
  padding-left: 28px;
}

/* Bootstrap buttons → violet theme (matches app --sl-theme) */
.yac-setup .btn.btn-primary,
.yac-setup .btn-primary {
  height: 28px;
  padding: 0 11px;
  border-radius: 4px;
  border: 1px solid var(--sl-theme, #7e67ff);
  background: var(--sl-theme, #7e67ff);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
}

.yac-setup .btn.btn-primary:hover,
.yac-setup .btn-primary:hover,
.yac-setup .btn.btn-primary:focus,
.yac-setup .btn-primary:focus {
  background: #6a54e8;
  border-color: #6a54e8;
  color: #fff;
  box-shadow: none;
}

.yac-setup .btn.btn-primary:disabled,
.yac-setup .btn-primary:disabled {
  opacity: .45;
}

.yac-setup .btn.btn-outline-secondary,
.yac-setup .btn-outline-secondary {
  height: 28px;
  padding: 0 11px;
  border-radius: 4px;
  border: 1px solid #ccd4dc;
  background: #fff;
  color: #495663;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
}

.yac-setup .btn.btn-outline-secondary:hover,
.yac-setup .btn-outline-secondary:hover {
  background: #f5f7f9;
  border-color: #ccd4dc;
  color: #212934;
}

.yac-setup .btn.btn-dark,
.yac-setup .btn-dark {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 4px;
  border: none;
  background: #6a7683;
  color: #fff;
  font-size: 11.5px;
  line-height: 1;
  box-shadow: none;
}

.yac-setup .btn.btn-dark:hover,
.yac-setup .btn-dark:hover {
  background: var(--sl-theme, #7e67ff);
  color: #fff;
}

.yac-setup .ys-card-body {
  padding: 18px;
}

.yac-setup .ys-card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--ys-line2);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fcfdfd;
}

.yac-setup .ys-label {
  display: block;
  font-size: 12.5px;
  color: var(--ys-ink2);
  margin-bottom: 5px;
  font-weight: 500;
}

.yac-setup .ys-card-note.ys-card-note-block {
  display: block;
  margin: 3px 0 0;
  max-width: 520px;
}

.yac-setup .ys-hint {
  font-size: 11.5px;
  color: var(--ys-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.yac-setup .ys-help {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ys-ink2);
  margin-top: 8px;
  padding: 8px 10px;
  background: #f3f6f9;
  border-radius: 4px;
  border-left: 3px solid var(--sl-theme, #7e67ff);
}

.yac-setup .ys-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 22px;
  align-items: start;
}

.yac-setup .ys-policy-grid .ys-help {
  min-height: 4.2em;
}

@media (max-width: 991.98px) {
  .yac-setup .ys-policy-grid {
    grid-template-columns: 1fr;
  }
  .yac-setup .ys-policy-grid .ys-help {
    min-height: 0;
  }
}

.yac-setup .ys-lock {
  font-size: 10px;
  color: var(--ys-muted);
  background: #eef1f4;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: .2px;
}

.yac-setup .ys-input,
.yac-setup .ys-select {
  display: block;
  width: 100%;
  height: 36px;
  border: 1px solid #ccd4dc;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ys-ink);
  -webkit-text-fill-color: var(--ys-ink);
  font-weight: 500;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}

.yac-setup textarea.ys-input {
  height: auto;
  min-height: 84px;
  padding: 8px 10px;
  line-height: 1.4;
  resize: vertical;
}

.yac-setup .ys-input::placeholder {
  color: var(--ys-muted);
  -webkit-text-fill-color: var(--ys-muted);
  font-weight: 400;
  opacity: 1;
}

.yac-setup input[type="number"].ys-input {
  color: var(--ys-ink);
  -webkit-text-fill-color: var(--ys-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.yac-setup input[type="number"].ys-input::-webkit-outer-spin-button,
.yac-setup input[type="number"].ys-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.yac-setup .ys-input:focus,
.yac-setup .ys-select:focus,
.yac-setup .ys-input:focus-visible,
.yac-setup .ys-select:focus-visible {
  border-color: var(--sl-theme, #7e67ff);
  box-shadow: 0 0 0 3px rgba(126, 103, 255, .22);
  outline: 2px solid var(--sl-theme, #7e67ff);
  outline-offset: 1px;
}

.yac-setup fieldset.ys-settings-body {
  border: 0;
  margin: 0;
  min-width: 0;
}

.yac-setup fieldset.ys-settings-locked {
  background: #f4f6f8;
}

.yac-setup fieldset.ys-settings-locked .ys-input,
.yac-setup fieldset.ys-settings-locked .ys-select {
  background: #eceff2;
  color: var(--ys-muted);
  -webkit-text-fill-color: var(--ys-muted);
  cursor: not-allowed;
}

.yac-setup .ys-input[readonly],
.yac-setup .ys-input:disabled,
.yac-setup .ys-select:disabled {
  background: #eceff2;
  color: var(--ys-muted);
  -webkit-text-fill-color: var(--ys-muted);
  font-weight: 500;
  cursor: not-allowed;
}

.yac-setup .ys-note {
  border: 1px solid #d9e4f0;
  background: #f3f8fd;
  border-radius: 5px;
  padding: 11px 14px;
  font-size: 12.5px;
  color: #2b4a70;
  display: flex;
  gap: 9px;
  line-height: 1.5;
  margin: 0;
}

.yac-setup .ys-note a {
  color: #1c5c93;
  text-decoration: underline;
}

.yac-setup .ys-note.crit a,
.yac-setup .ys-note a.yac-wo-link {
  color: #7a2e28;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.yac-setup .ys-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 400;
  margin-top: 18px;
}

.yac-setup .ys-tbl th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #77828e;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ys-line);
  white-space: nowrap;
  background: #fff;
}

.yac-setup .ys-tbl th.ys-col-actions,
.yac-setup .ys-tbl td.ys-col-actions {
  text-align: right;
  width: 220px;
  min-width: 200px;
}

.yac-setup .ys-tbl th.ys-col-chip,
.yac-setup .ys-tbl td.ys-col-chip {
  text-align: center;
}

.yac-setup .ys-tbl th.ys-col-center,
.yac-setup .ys-tbl td.ys-col-center {
  text-align: center;
}

.yac-setup .ys-tbl.ys-tbl-fixed {
  table-layout: fixed;
}

.yac-setup .ys-tbl.ys-tbl-fixed th,
.yac-setup .ys-tbl.ys-tbl-fixed td {
  overflow-wrap: break-word;
}

.yac-setup .ys-tbl-val th,
.yac-setup .ys-tbl-val td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.yac-setup .ys-tbl td.ys-col-chip .ys-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  min-width: 5.25rem;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  padding: 3px 8px;
}

.yac-setup .ys-tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ys-line2);
  vertical-align: middle;
  font-size: 13px;
  font-weight: 400;
  color: var(--ys-ink);
  line-height: 1.45;
}

/* Keep primary cells regular weight — mockup grids are not bold */
.yac-setup .ys-tbl td.fw-semibold,
.yac-setup .ys-tbl td.fw-bold,
.yac-setup .ys-tbl td > b,
.yac-setup .ys-tbl td > strong {
  font-weight: 400;
}

.yac-setup .ys-tbl tr:hover td {
  background: #fafcfd;
}

.yac-setup .ys-api-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ys-muted, #6b7885);
  background: #eef1f4;
  border-radius: 3px;
  padding: 1px 6px;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
  white-space: nowrap;
}

.yac-setup .ys-code {
  color: #b4530a;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.yac-setup .ys-format,
.yac-setup .ys-preview {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: .01em;
}

.yac-setup .ys-format {
  color: var(--ys-ink2, #495663);
}

.yac-setup .ys-preview {
  color: var(--ys-ink, #212934);
  font-weight: 600;
}

.yac-setup .ys-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: .25px;
  white-space: nowrap;
}

.yac-setup .ys-tag.on {
  background: #e6f4ec;
  color: var(--ys-green);
}

.yac-setup .ys-tag.off {
  background: #f0f2f4;
  color: #7a848f;
}

.yac-setup .ys-tag.warn {
  background: #fdf3e3;
  color: #9a6700;
}

.yac-setup .ys-tag.info {
  background: #e8f0f8;
  color: #1c5c93;
}

.yac-setup .ys-tag.err {
  background: #fdeceb;
  color: #a8322c;
}

.yac-setup .ys-status-note {
  margin: 4px 0 0;
  max-width: 220px;
  line-height: 1.35;
}

.yac-setup .ys-tag.sys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8eaee;
  color: #4a5560;
  border: 1px solid #d3d8de;
}

.yac-setup .ys-tag.sys i {
  font-size: 9px;
  line-height: 1;
}

/* Compact status alerts (override Bootstrap) */
.yac-setup > .alert {
  font-size: 13px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border-radius: 5px;
}

/* KPI strip — matches mock .kpis */
.yac-setup .ys-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.yac-setup .ys-kpi {
  background: #fff;
  border: 1px solid var(--ys-line);
  border-radius: 6px;
  padding: 13px 16px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
}

.yac-setup .ys-kpi-k {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--ys-muted);
  font-weight: 600;
}

.yac-setup .ys-kpi-v {
  font-size: 22px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: -.4px;
  color: var(--ys-ink);
  line-height: 1.2;
}

.yac-setup .ys-kpi-v-sm {
  font-size: 18px;
}

.yac-setup .ys-kpi-d {
  font-size: 11.5px;
  color: var(--ys-muted);
  margin-top: 2px;
}

.yac-setup .ys-kpi.good .ys-kpi-v { color: var(--ys-green); }
.yac-setup .ys-kpi.bad .ys-kpi-v { color: #a8322c; }
.yac-setup .ys-kpi.warn .ys-kpi-v { color: #9a6700; }

.yac-setup .ys-note.warn {
  background: #fdf8ee;
  border-color: #efe0c2;
  color: #7a5a12;
}

.yac-setup .ys-tag.ast { background: #e8f0f8; color: #1c5c93; }
.yac-setup .ys-tag.lia { background: #fdeeea; color: #a2432c; }
.yac-setup .ys-tag.eq { background: #f0ebf8; color: #5b3f92; }
.yac-setup .ys-tag.inc { background: #e6f4ec; color: #1d6b45; }
.yac-setup .ys-tag.exp { background: #fdf4e3; color: #8a6100; }

.yac-setup .ys-dr { color: #1c5c93; font-weight: 600; }
.yac-setup .ys-cr { color: #a2432c; font-weight: 600; }

.yac-setup .ys-act {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: none;
  background: #6a7683;
  color: #fff;
  cursor: pointer;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.yac-setup .ys-act:hover {
  background: var(--sl-theme, #7e67ff);
}

.yac-setup .ys-act:disabled,
.yac-setup .ys-act:disabled:hover {
  background: #c5ccd3;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.85;
}

.yac-setup .ys-act.on,
.yac-setup .ys-act.on:disabled,
.yac-setup .ys-act.on:disabled:hover {
  background: var(--sl-theme, #7e67ff);
  opacity: 1;
}

.yac-setup .ys-act-off {
  background: #fff;
  color: #5c6772;
  border: 1px solid #ccd4dc;
}

.yac-setup .ys-act-off:hover {
  background: #f4f6f8;
  color: #212934;
  border-color: #9aa8b5;
}

/* Edit / deactivate (and similar) action pairs — never flush together */
.yac-setup .ys-row-acts {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.yac-setup td.text-end > .ys-act + .ys-act,
.yac-setup td.text-end > .btn + .btn,
.yac-setup td.text-end > button + button {
  margin-left: 8px;
}

.yac-setup .ys-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 11.5px;
  color: var(--ys-muted);
  padding: 10px 18px;
  border-top: 1px solid var(--ys-line2);
  background: #fcfdfd;
}

.yac-setup .ys-legend-count {
  margin-left: auto;
}

.yac-setup .ys-legend-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-right: 14px;
  margin-right: 2px;
  border-right: 1px solid var(--ys-line, #dce3ea);
}

.yac-setup .ys-legend-group:last-of-type {
  border-right: none;
  padding-right: 0;
}

.yac-setup .ys-legend-h {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: var(--ys-muted);
}

.yac-setup .ys-tbl tr.ys-row-fx td:first-child {
  box-shadow: inset 3px 0 0 var(--sl-theme, #7e67ff);
}

.yac-setup .ys-tbl td .ys-code + .ys-tag {
  margin-left: 6px;
}

.yac-setup .ys-checkline + .ys-hint {
  margin: 0;
  padding-left: 23px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
}

.yac-setup .ys-checkgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 14px;
  align-items: start;
}

.yac-setup .ys-checkblock {
  min-width: 0;
}

.yac-setup .ys-checkblock .ys-hint {
  margin: 0;
  padding-left: 23px;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.yac-setup .ys-check-status {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ys-line, #dce3ea);
}

.yac-setup .ys-check-status .ys-hint {
  margin: 0;
  padding-left: 23px;
  max-width: 36em;
}

.yac-setup .ys-note.crit {
  background: #fdf1f0;
  border-color: #eecfcd;
  color: #8c332d;
}

.yac-setup .ys-steps {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
}

.yac-setup .ys-step {
  flex: 1;
  padding: 9px 12px;
  background: #f7f9fb;
  border: 1px solid var(--ys-line);
  border-right: none;
  font-size: 12px;
  color: var(--ys-muted);
}

.yac-setup .ys-step:first-child {
  border-radius: 4px 0 0 4px;
}

.yac-setup .ys-step:last-child {
  border-right: 1px solid var(--ys-line);
  border-radius: 0 4px 4px 0;
}

.yac-setup .ys-step.on {
  background: #e8f0f8;
  color: #1c3554;
  font-weight: 600;
  border-color: #c3d8ec;
}

.yac-setup .ys-step b {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .7;
  font-weight: 700;
}

.yac-setup .ys-drop {
  position: relative;
  border: 1.5px dashed #c5ced8;
  border-radius: 8px;
  background: #f8fafc;
  padding: 28px 20px;
  text-align: center;
  color: #5a6573;
}

.yac-setup .ys-drop.disabled {
  opacity: .65;
  pointer-events: none;
}

.yac-setup .ys-drop-title {
  font-size: 13.5px;
  color: #1a2332;
}

.yac-setup .ys-drop-sub {
  font-size: 11.5px;
  color: #6b7885;
  margin-top: 6px;
}

.yac-setup .ys-drop-file {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1c3554;
}

.yac-setup .ys-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Keep legacy KPI class in sync for other setup screens */
.yac-setup .yac-pcl-kpi {
  background: #fff;
  border: 1px solid var(--ys-line);
  border-radius: 6px;
  padding: 13px 16px;
  height: 100%;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
}

.yac-setup .yac-pcl-kpi-k {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--ys-muted);
  font-weight: 600;
}

.yac-setup .yac-pcl-kpi-v {
  font-size: 22px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: -.4px;
  color: var(--ys-ink);
  line-height: 1.2;
}

.yac-setup .yac-pcl-kpi-d {
  font-size: 11.5px;
  color: var(--ys-muted);
  margin-top: 2px;
}

.yac-setup .yac-pcl-kpi-good .yac-pcl-kpi-v { color: var(--ys-green); }
.yac-setup .yac-pcl-kpi-warn .yac-pcl-kpi-v { color: #9a6700; }
.yac-setup .yac-pcl-kpi-bad .yac-pcl-kpi-v { color: #a8322c; }

.yac-setup .ys-field {
  margin-bottom: 0;
}

.yac-setup .ys-field > .ys-hint + .ys-checkline {
  margin-top: 6px;
}

.yac-setup .ys-money {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.yac-setup .ys-money-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0 8px;
  border: 1px solid #ccd4dc;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #f4f6f8;
  color: var(--ys-ink2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.yac-setup .ys-money .ys-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.yac-setup .ys-money:focus-within .ys-money-symbol,
.yac-setup .ys-money:focus-within .ys-input {
  border-color: var(--sl-theme, #7e67ff);
}

.yac-setup input.yac-amount,
.yac-setup .yac-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.yac-setup .ys-row-gap {
  margin-top: 16px;
}

/* Add / edit entity modal */
.yac-setup .ys-req {
  color: #a8322c;
  margin-left: 2px;
}

.yac-setup .ys-input.ys-invalid,
.yac-setup .ys-select.ys-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.yac-setup .ys-input.ys-invalid:focus,
.yac-setup .ys-select.ys-invalid:focus {
  border-color: #a8322c;
  box-shadow: 0 0 0 3px rgba(168, 50, 44, 0.18);
}

.yac-setup .ys-field-error {
  font-size: 12px;
  color: #a8322c;
  margin-top: 4px;
  line-height: 1.35;
}

.yac-setup .ys-opt {
  color: var(--ys-muted, #6b7785);
  font-weight: 400;
  margin-left: 2px;
  font-size: 11.5px;
}

/* Section groups — mixed-case titles, subordinate to the card heading */
.yac-setup fieldset.yac-group {
  border: 1px solid var(--ys-line, #dce3ea);
  border-radius: 5px;
  padding: 14px 16px 16px;
  margin: 0;
  min-width: 0;
}

.yac-setup .ys-policy-card .ys-card-body {
  padding: 22px 22px 26px;
}

.yac-setup .ys-policy-grid > [class*="col-"] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: auto;
  max-width: none;
  flex: unset;
}

.yac-setup .ys-policy-grid .yac-group {
  padding: 18px 20px 20px;
  height: 100%;
}

.yac-setup .ys-policy-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.yac-setup .ys-policy-stack > .yac-group {
  height: auto;
}

.yac-setup .ys-policy-card fieldset.yac-group legend {
  font-size: 13.5px;
  margin-bottom: 8px;
  color: var(--ys-ink);
}

.yac-setup .ys-policy-card .ys-label {
  font-size: 13px;
  margin-bottom: 6px;
}

.yac-setup .ys-policy-card .ys-hint {
  font-size: 12.5px;
  line-height: 1.45;
}

.yac-setup .ys-policy-card .ys-checkline {
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.yac-setup .ys-policy-card .ys-checkline:last-child {
  margin-bottom: 0;
}

.yac-setup .ys-policy-card .ys-checkline input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.yac-setup fieldset.yac-group legend {
  float: none;
  width: auto;
  margin: 0;
  margin-bottom: 0;
  padding: 0 6px;
  font-size: 12.5px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ys-ink2, #495663);
  font-weight: 600;
}

.yac-setup .ys-checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #495663;
  margin-bottom: 4px;
  min-width: 0;
}

.yac-setup .ys-checkline:has(input:disabled) {
  opacity: 0.65;
  cursor: not-allowed;
}

.yac-setup .ys-checkline span {
  font-weight: 400;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
}

.yac-setup .form-check-label {
  font-size: 13px;
  font-weight: 400;
  color: #495663;
}

.yac-setup .ys-checkline input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--sl-theme, #7e67ff);
  flex-shrink: 0;
}

.yac-setup .ys-rules {
  border: 1px solid #dce6f2;
  background: #f6f9fc;
  border-radius: 5px;
  margin-top: 16px;
}

.yac-setup .ys-rules-h {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .75px;
  font-weight: 700;
  color: #3d5f8a;
  padding: 9px 14px;
  border-bottom: 1px solid #e2ebf5;
}

.yac-setup .ys-rules ol {
  margin: 0;
  padding: 10px 14px 12px 30px;
}

.yac-setup .ys-rules li {
  font-size: 12.5px;
  color: #2f4560;
  margin-bottom: 6px;
  line-height: 1.5;
}

.yac-setup .ys-rules li:last-child {
  margin-bottom: 0;
}

.modal.show {
  z-index: 1055;
}

body:has(.modal.show) .ys-page-status,
body:has(.modal.show) .oa-page-status {
  display: none;
}

.yac-dlg-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fdf1f0;
  border: 1px solid #eecfcd;
  color: #8c332d;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.yac-dlg-alert.ok {
  background: #eef7f0;
  border-color: #cde5d3;
  color: #2d6a3e;
}

.yac-dlg-alert-ic {
  flex: 0 0 16px;
  display: inline-flex;
  margin-top: 1px;
  font-weight: 700;
}

.yac-setup .ys-modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef1f4;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 1;
}

.yac-setup .ys-modal-foot .ys-lft {
  font-size: 11.5px;
  color: #6b7885;
  margin-right: auto;
  line-height: 1.35;
  max-width: 360px;
}

.yac-setup .yac-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #ccd4dc;
  background: #fff;
  color: #495663;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
}

.yac-setup .yac-icon-btn:hover {
  background: #f5f7f9;
}

.yac-setup .ys-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 4px;
  border: 1px solid var(--sl-theme, #7e67ff);
  background: var(--sl-theme, #7e67ff);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.yac-setup .ys-btn:hover {
  background: #6a54e8;
  border-color: #6a54e8;
  color: #fff;
}

.yac-setup .ys-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.yac-setup .ys-btn.ghost {
  background: #fff;
  color: #495663;
  border-color: #ccd4dc;
}

.yac-setup .ys-btn.ghost:hover {
  background: #f5f7f9;
  color: #212934;
}

.yac-setup .ys-mono {
  font-family: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.yac-setup .ys-tbl tr.table-active td {
  background: #f0f4fa;
}

.yac-setup .yac-dlg-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #e6e9f0;
}

.yac-setup .yac-dlg-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  margin-bottom: -1px;
  cursor: pointer;
  line-height: 1.3;
}

.yac-setup .yac-dlg-tab:hover {
  color: #111827;
}

.yac-setup .yac-dlg-tab.on {
  color: var(--sl-theme, #7e67ff);
  border-bottom-color: var(--sl-theme, #7e67ff);
  font-weight: 600;
}

/* Setup dialogs — compact width, scroll tall content instead of full-bleed xl */
.modal-dialog.ys-dlg {
  max-width: 860px;
  width: calc(100% - 2rem);
  margin: 1.25rem auto;
}

.modal-dialog.ys-dlg .modal-content {
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
}

.modal-dialog.ys-dlg .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
}

.yac-as input.yac-amount,
.yac-as .yac-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.yac-as input[type="number"]::-webkit-outer-spin-button,
.yac-as input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.yac-as input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
