/* IPOYOGI base styles: the six earlier stylesheets joined in their original load order (24 Oct 2026),
   so every rule keeps its priority. The lime design layer, yogi-ui.css, still loads after this file. */

/* ===================== was styles.css ===================== */
:root {
  --font-ui: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-display: "DM Sans", "Segoe UI", Arial, sans-serif;
  --bg: #f1f5f9;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d9e6f2;
  --line-strong: #c7d8ea;
  --text: #17324d;
  --muted: #5d738a;
  --brand: #1463b8;
  --brand-strong: #0b4f94;
  --brand-soft: #e8f1ff;
  --accent: #0f766e;
  --accent-soft: #e7f7f5;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #d97706;
  --shadow: 0 10px 30px rgba(15, 52, 96, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  background:
    linear-gradient(rgba(28, 66, 100, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 66, 100, 0.025) 1px, transparent 1px),
    radial-gradient(circle at top right, rgba(20, 99, 184, 0.08), transparent 24%),
    linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: var(--text);
  max-width: 100%;
  overflow-x: clip;
}

.shell {
  width: min(1380px, 100%);
  min-width: 0;
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 22px 36px;
}

.simple-shell {
  max-width: 1280px;
}

.top-nav-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 52, 96, 0.05);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #e2ebf4;
  background: #f8fbff;
  color: #365673;
  font-weight: 800;
  padding: 11px 16px;
  text-decoration: none;
  border-radius: 12px;
}

.nav-tab.active {
  background: #e8f1ff;
  color: #184d95;
  border-color: #bfd6fb;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.05);
}

.nav-tab:hover {
  background: #f1f7ff;
  border-color: #d6e2d8;
}

.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
}

.subscription-ticker {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid #bed8f4;
  border-radius: 12px;
  background: #edf6ff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.subscription-ticker-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #06294b, #0e5f7b);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.subscription-ticker-label small {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: none;
}

.subscription-ticker-window {
  min-width: 0;
  overflow: hidden;
  padding: 9px 0;
}

.subscription-ticker-track {
  display: flex;
  width: max-content;
  animation: subscription-ticker-scroll 60s linear infinite;
}

.subscription-ticker:hover .subscription-ticker-track {
  animation-play-state: paused;
}

.subscription-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px;
  white-space: nowrap;
  color: #254967;
  font-size: 12px;
  font-weight: 700;
}

.subscription-ticker-item strong {
  color: #123f72;
}

.subscription-ticker-item span {
  padding-left: 10px;
  border-left: 1px solid #c5dced;
}

.subscription-ticker-item .ticker-odds {
  color: #9a4f09;
}

.subscription-ticker-empty {
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.application-recording-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.application-recording-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.application-recording-status.is-complete {
  color: var(--success);
}

.funding-done {
  color: var(--success);
  font-weight: 800;
}

.funding-status-cell {
  text-align: center;
}

.applications-table {
  width: 920px;
  min-width: 920px;
  table-layout: fixed;
}

.application-register-wrap {
  width: 936px;
  max-width: 100%;
  padding: 7px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #e6eef5, #f7fafc);
  box-shadow: 0 10px 24px rgba(20, 50, 78, 0.08);
}

/* Keep the register a compact ledger; the global table rule must not stretch its columns. */
.erp-shell .applications-table {
  width: 920px;
  min-width: 920px;
}

.applications-table {
  border-collapse: separate;
  border-spacing: 0 5px;
}

.erp-shell .applications-table thead,
.erp-shell .applications-table th {
  background: #ffffff;
}

.applications-table th {
  padding-top: 9px;
  padding-bottom: 9px;
  border: 0;
  color: #587188;
  font-size: 12px;
  letter-spacing: 0.09em;
}

.filterable-header {
  position: relative;
  vertical-align: bottom;
}

.application-header-filter {
  position: static;
  display: block;
  width: 100%;
  min-width: 0;
  height: 25px;
  margin-top: 5px;
  padding: 0 18px 0 6px;
  border: 1px solid #bcd1e3;
  border-radius: 8px;
  background: #f8fbfe;
  color: #34536e;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.03em;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.filterable-header.has-active-filter .application-header-filter { border-color: #77aee2; background: #edf6ff; color: #185791; }

.applications-table th:first-child {
  border-radius: 10px 0 0 10px;
}

.applications-table th:last-child {
  border-radius: 0 10px 10px 0;
}

.applications-table tbody tr,
.applications-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.applications-table td {
  border-top: 1px solid #e2ebf2;
  border-bottom: 1px solid #e2ebf2;
  background: #ffffff;
  color: #1a3854;
}

.applications-table td:first-child {
  border-left: 1px solid #e2ebf2;
  border-radius: 10px 0 0 10px;
}

.applications-table td:last-child {
  border-right: 1px solid #e2ebf2;
  border-radius: 0 10px 10px 0;
}

.applications-table tbody tr:hover td {
  border-color: #c4dceb;
  background: #f5faff;
}

.applications-table .application-account-ledger-trigger {
  color: #19362f;
}

.applications-table .funding-done {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: #e6f7ed;
}

.applications-table .status-pill {
  border: 1px solid rgba(201, 151, 65, 0.12);
}

.applications-table th,
.applications-table td {
  padding: 5px 8px;
  height: 42px;
  font-size: 13px;
  line-height: 1.2;
}

.applications-table th:first-child,
.applications-table td:first-child {
  width: 36px;
  text-align: center;
}

.applications-table th:nth-child(2),
.applications-table td:nth-child(2) {
  width: 215px;
}

.applications-table th:nth-child(3),
.applications-table td:nth-child(3) {
  width: 210px;
  text-align: center;
}

.applications-table th:nth-child(4),
.applications-table td:nth-child(4) {
  width: 180px;
}

.applications-table th:nth-child(5),
.applications-table td:nth-child(5) {
  width: 170px;
}

.applications-table th:nth-child(6),
.applications-table td:nth-child(6) {
  width: 135px;
  text-align: center;
}

.application-account-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.application-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.application-actions .secondary-btn {
  padding: 5px 8px;
  font-size: 12px;
}

.application-actions .application-icon-action {
  display: inline-grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.application-actions .edit-icon-action {
  border-color: #bad3e8;
  background: #f4f9fd;
  color: #4a5f55;
}

.planned-delete-application-btn {
  border: 1px solid #f0c5c5;
  background: #fff5f5;
  color: #bd3030;
  box-shadow: none;
}

.delete-all-planned-btn {
  border-color: #f0caca;
  background: #fff6f6;
  color: #b42d35;
}

.funding-needed {
  margin-right: 7px;
}

.compact-record-funding-btn {
  padding: 5px 7px;
  font-size: 12px;
  box-shadow: none;
}

.refund-plan-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plan-refund-btn {
  padding: 5px 7px;
  border: 1px solid #b9d8c6;
  border-radius: 8px;
  background: #f3fbf6;
  color: #276345;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  box-shadow: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.applications-table td:hover .plan-refund-btn,
.refund-plan-wrap:focus-within .plan-refund-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}


.applications-table .status-pill {
  min-width: 0;
  padding: 4px 8px;
  font-size: 12px;
}

.applications-table .secondary-btn,
.applications-table .primary-btn {
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.1;
  box-shadow: none;
}

.applications-table .application-actions .application-icon-action {
  width: 27px;
  height: 27px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.application-account-ledger-trigger {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #19362f;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
}

.application-account-ledger-trigger:hover {
  transform: none;
  color: var(--brand-strong);
  text-decoration: underline;
}

.account-ledger-header-actions {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 7px;
  min-width: 120px;
}

.ipo-ledger-dialog .dialog-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.ipo-ledger-dialog .dialog-title-row > div:first-child {
  min-width: 0;
}

.ipo-ledger-dialog .dialog-title-row p {
  white-space: normal;
}

.ledger-close-btn {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid #d4e2f1;
  border-radius: 50%;
  background: #f6faff;
  color: #466784;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.ledger-close-btn:hover {
  transform: none;
  border-color: #aac5df;
  background: #eaf3fd;
  color: #19362f;
}

.account-ledger-balances {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.account-ledger-balances span {
  color: #58728d;
  font-size: 12px;
  font-weight: 700;
  max-width: 150px;
  text-align: right;
  white-space: normal;
}

.account-ledger-balances .is-settled {
  color: #43825a;
}

.account-ledger-balance {
  color: #68819a;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.account-ledger-account-name {
  margin: 0 0 8px;
  color: #637c95;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ledger-funding {
  margin: 6px 0;
  padding: 11px 10px;
  border: 1px solid #cdebd6;
  border-radius: 12px;
  background: #effbf2;
}

.ledger-return {
  margin: 6px 0;
  padding: 11px 10px;
  border: 1px solid #f2d6d6;
  border-radius: 12px;
  background: #fff3f3;
}

.allotment-encouragement {
  display: block;
  max-width: 190px;
  margin-top: 6px;
  color: #607b50;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.allotment-congratulations {
  color: #9a6500;
}

.closing-checklist-list {
  display: grid;
  gap: 14px;
}
.closing-applicant-orbit { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.closing-applicant-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; padding: 13px; border: 1px solid #d8e4ed; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(22, 56, 84, .06); }
.closing-applicant-avatar { display: grid; width: 58px; height: 58px; place-items: center; overflow: hidden; border: 0; border-radius: 50%; background: linear-gradient(135deg, #0b6a8a, #1454a0); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.closing-applicant-avatar { width: 52px; height: 52px; cursor: default; }
.closing-applicant-avatar img { width: 100%; height: 100%; object-fit: cover; }
.closing-applicant-card.is-complete .closing-applicant-avatar { background: linear-gradient(135deg, #13864c, #47ad73); }
.closing-applicant-detail { display: grid; gap: 9px; min-width: 0; }
.closing-applicant-detail strong, .closing-applicant-detail small { display: block; }
.closing-applicant-detail small { margin-top: 2px; color: #63809a; font-size: 12px; }
.closing-applicant-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.closing-applicant-heading strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.closing-applicant-ipo-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.closing-applicant-ipo-meta span { min-width: 0; color: #315d85; font-size: 12px; line-height: 1.25; }
.closing-applicant-ipo-meta b { display: block; margin-bottom: 2px; color: #7890a4; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.closing-applicant-detail .closing-checklist-items { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; }
.closing-applicant-detail .checkbox { margin: 0; font-size: 12px; }
.closing-applicant-detail .secondary-btn { justify-self: start; min-height: 31px; padding: 6px 9px; font-size: 12px; }

.workflow-checklist-panel { margin-top: 14px; padding: 14px; border: 1px solid #dce7ef; border-radius: 16px; background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%); }
.workflow-checklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.workflow-checklist-heading h3, .workflow-checklist-heading p { margin: 0; }
.workflow-checklist-heading h3 { color: #214d76; }
.workflow-checklist-heading > div > p:last-child { margin-top: 3px; color: #627269; font-size: 12px; }
.workflow-checklist-panel .closing-checklist-list { gap: 10px; }
.workflow-checklist-panel .closing-checklist-ipo { padding: 12px; }

.closing-checklist-ipo {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.closing-checklist-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.closing-checklist-title h3,
.closing-checklist-title p {
  margin: 0;
}

.closing-checklist-title p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.closing-checklist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.closing-checklist-items .checkbox {
  color: var(--text);
}

.closing-checklist-footer {
  margin-top: 14px;
}

.closing-checklist-complete {
  margin: 0;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

@keyframes subscription-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 4px 18px;
}

.top-strip-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.brand-logo-header {
  width: 116px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(23, 59, 99, 0.1);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.top-strip-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.strip-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: #31516d;
  font-size: 12px;
  font-weight: 700;
}

.hero,
.panel,
.card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.04) 55%, transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: grid;
  gap: 12px;
  min-width: 210px;
}

.simple-hero {
  align-items: center;
}

.compact-header {
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  max-width: 760px;
  margin-bottom: 10px;
}

h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.028em;
  margin-bottom: 6px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.024em;
}

.subtext,
.panel-header p,
.note-panel li,
label,
.empty,
.empty-block,
.mini-item,
.stack-item span {
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.compact-cards {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.card {
  padding: 18px 18px 16px;
  border-top: 4px solid rgba(37, 99, 235, 0.18);
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 52, 96, 0.1);
}

.small-card h3 {
  font-size: 22px;
}

.card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card h3 {
  margin: 0;
  font-size: 28px;
  color: #183b65;
}

.panel {
  padding: 20px 20px 18px;
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header h2 {
  position: relative;
  padding-left: 14px;
}

.panel-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.simple-focus-grid,
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  align-items: start;
}

.quick-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quick-actions-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
}

.workflow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 11px;
  min-height: 170px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #edf5fc 100%);
  box-shadow: 0 8px 0 rgba(130, 158, 185, 0.16), 0 15px 24px rgba(23, 50, 77, 0.08);
  color: #22476f;
  text-align: left;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.workflow-step:hover { transform: translateY(-3px); box-shadow: 0 11px 0 rgba(130, 158, 185, 0.15), 0 21px 30px rgba(23, 50, 77, 0.12); }
.workflow-step:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(130, 158, 185, 0.16), 0 8px 14px rgba(23, 50, 77, 0.08); }
.workflow-step.needs-action { border-color: #edc473; background: linear-gradient(145deg, #fffefa 0%, #fff3d9 100%); }
.workflow-step.is-clear { border-color: #b9e0c8; background: linear-gradient(145deg, #ffffff 0%, #eaf8ef 100%); }
.workflow-step-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(145deg, #2775c7, #14569d); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 4px 8px rgba(20, 86, 157, .24); color: #fff; font-size: 13px; font-weight: 800; }
.workflow-step-copy { min-width: 0; }
.workflow-step strong, .workflow-step b, .workflow-step small { display: block; }
.workflow-step b { margin-top: 3px; font-size: 28px; color: #17324d; letter-spacing: -0.055em; }
.workflow-step small { margin-top: 4px; color: #59728a; font-size: 12px; letter-spacing: normal; text-transform: none; }
.workflow-step-action { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid rgba(72, 111, 146, 0.16); color: #1b5e9f; font-size: 12px; letter-spacing: 0.025em; }
.workflow-step-action i { font-style: normal; color: #4d7799; font-size: 12px; }
.workflow-form-staging { display: none; }

.workflow-action-dialog { width: min(860px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border-color: #d7e4ef; border-radius: 22px; box-shadow: 0 24px 70px rgba(28, 55, 79, .23); }
.workflow-action-dialog-shell { padding: 22px; }
.workflow-action-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 0 2px; }
.workflow-action-dialog-header h3 { margin: 3px 0 0; color: #19362f; font-size: 28px; letter-spacing: -.035em; }
.workflow-action-dialog .simple-form { height: auto; gap: 10px; padding: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 22px; background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%); }
.workflow-action-dialog .simple-form h3 { display: none; }
.workflow-action-dialog .simple-form label { align-items: start; align-content: start; gap: 5px; font-size: 12px; }
.workflow-action-dialog .simple-form label[hidden] { display: none !important; }
.workflow-action-dialog .simple-form input,
.workflow-action-dialog .simple-form select { align-self: start; height: 42px; min-height: 42px; padding: 9px 12px; }
.workflow-action-dialog .simple-form .hint-box,
.workflow-action-dialog .simple-form .application-form-tools,
.workflow-action-dialog .simple-form .application-form-more,
.workflow-action-dialog .simple-form .funding-form-tools,
.workflow-action-dialog .simple-form > button { grid-column: 1 / -1; }
.workflow-action-dialog .simple-form::before { grid-column: 1 / -1; margin-bottom: -2px; }
.workflow-action-dialog .simple-form .hint-box { min-height: 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
.application-form-tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.application-form-more { border: 1px solid #dce8f2; border-radius: 12px; background: rgba(255, 255, 255, .66); }
.application-form-more summary { padding: 10px 13px; cursor: pointer; color: #315d85; font-size: 12px; font-weight: 750; }
.application-form-more[open] summary { border-bottom: 1px solid #dce8f2; }
.application-form-more .application-form-tools { padding: 9px; }
.workflow-action-dialog .text-action-btn { width: auto; min-height: auto; margin-top: 5px; padding: 0; border: 0; background: transparent; color: #1763ab; font-size: 12px; font-weight: 700; text-align: left; box-shadow: none; }
.workflow-action-dialog .text-action-btn:hover { color: #0c4b87; text-decoration: underline; transform: none; }
.workflow-action-dialog .application-form-tools .secondary-btn { width: auto; min-height: 36px; padding: 7px 11px; border: 1px solid #d6e3ef; border-radius: 12px; background: #fff; color: #315d85; font-size: 12px; box-shadow: none; }
.workflow-action-dialog .application-form-tools .application-template-btn { border-style: solid; background: #f8fbfe; }
.funding-form-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid #dce8f2; border-radius: 12px; background: rgba(255, 255, 255, .72); }
.workflow-action-dialog .funding-form-tools .secondary-btn { width: auto; min-height: 36px; padding: 7px 11px; border: 1px solid #d6e3ef; border-radius: 12px; background: #fff; color: #315d85; font-size: 12px; box-shadow: none; }
.workflow-action-dialog .simple-form > .primary-btn { justify-self: end; min-height: 42px; padding: 10px 18px; border-radius: 12px; }
.workflow-action-dialog #applicationForm,
.workflow-action-dialog #fundingForm { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 920px) {
  .workflow-action-dialog #applicationForm,
  .workflow-action-dialog #fundingForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.focus-box,
.simple-form {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.focus-box {
  position: relative;
}

.focus-box::before,
.simple-form::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  margin-bottom: 12px;
}

.simple-form {
  display: grid;
  gap: 12px;
  align-content: start;
  height: 100%;
  min-width: 0;
}

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

.simple-form h3,
.focus-box h3,
.advanced-content h3 {
  margin-bottom: 2px;
  color: #19362f;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #23486f;
}

.advanced-content {
  padding-top: 18px;
}

.compact-workspace-section {
  border: 1px solid #d7e5f1;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbfdff, #f5faff);
  overflow: hidden;
}

.compact-workspace-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  color: #173d61;
}

.compact-workspace-section > summary::-webkit-details-marker { display: none; }
.compact-workspace-section summary strong { display: block; font-size: 14px; }
.compact-workspace-section summary small { display: block; margin-top: 3px; color: #698095; font-size: 12px; font-weight: 500; }
.compact-section-toggle { padding: 5px 10px; border-radius: 999px; background: #e8f1fa; color: #1f65a5; font-size: 12px; font-weight: 800; }
.compact-workspace-section[open] .compact-section-toggle { background: #e1f4e7; color: #18743a; }
.compact-workspace-content { padding: 4px 16px 16px; }
.compact-workspace-content > :first-child { margin-top: 12px; }
.compact-workspace-content .spaced-section { margin-top: 14px; }

.section-note {
  margin: -4px 0 14px;
  color: var(--muted);
}

.lower-add-grid {
  margin-bottom: 20px;
}

.spaced-section {
  margin-top: 18px;
}

.mini-list,
.stack-list {
  display: grid;
  gap: 10px;
}

.mini-item,
.stack-item {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stack-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

button.stack-item {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

button.stack-item:hover {
  border-color: #b9d2f2;
  background: #f4f8ff;
  transform: translateY(-1px);
}

.stack-item strong {
  color: #163d67;
  white-space: nowrap;
}

.source-name-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.source-name {
  color: var(--muted);
}

.closing-balance {
  color: #73869a;
  font-size: 12px;
  font-weight: 700;
}

.source-ledger-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.ledger-header h3 {
  margin-bottom: 4px;
}

.ledger-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.hint-box {
  padding: 11px 12px;
  background: linear-gradient(180deg, #eff7ff, #e8f4ff);
  border: 1px solid #cfe3fb;
  border-radius: 12px;
  color: #35516d;
  font-size: 13px;
  line-height: 1.45;
}

.reset-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-message {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--danger);
}

.reset-btn.confirming {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #9a3412;
}

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.old-ipos-scroll {
  max-height: 315px;
  overflow-y: auto;
}

.old-ipos-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.old-ipo-action-cell {
  width: 1%;
  text-align: right;
}

.old-ipo-check-btn {
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.market-ipo-list {
  overflow: hidden;
}

.market-ipo-table td {
  padding: 0;
}

.market-ipo-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.market-ipo-row:hover {
  transform: none;
  background: #f3f8fe;
}

.market-ipo-name {
  color: #19362f;
  font-weight: 800;
}

.market-ipo-timing {
  color: #456889;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Operational density pass: summaries stay compact, details open only when needed. */
.closing-applicant-card { display: block; padding: 0; overflow: hidden; }
.closing-applicant-card > summary { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 72px; padding: 10px 12px; cursor: pointer; list-style: none; }
.closing-applicant-card > summary::-webkit-details-marker { display: none; }
.closing-applicant-card > summary:hover { background: #f8fbf5; }
.closing-applicant-card .closing-applicant-avatar { width: 46px; height: 46px; }
.closing-applicant-card .closing-applicant-heading { display: grid; gap: 2px; min-width: 0; }
.closing-applicant-card .closing-applicant-summary { display: grid; gap: 2px; text-align: right; white-space: nowrap; }
.closing-applicant-card .closing-applicant-summary b { color: #9a7233; font-size: 12px; }
.closing-applicant-card.is-complete .closing-applicant-summary b { color: #397347; }
.closing-applicant-card .closing-applicant-summary small { color: #71806d; font-size: 12px; }
.closing-applicant-card .closing-applicant-detail { padding: 0 14px 15px; border-top: 1px solid #e6eadf; }
.closing-applicant-card:not([open]) .closing-applicant-detail { display: none; }
.closing-applicant-card .closing-applicant-ipo-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid #dfe8d8; border-radius: 12px; background: #f4f8ef; }
.closing-applicant-card .closing-applicant-ipo-meta b { font-size: 12px; }
.closing-applicant-card .closing-applicant-ipo-meta span { font-size: 12px; }

.transaction-history-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 35px; }
.history-pagination { display: inline-flex; align-items: center; gap: 8px; }
.history-pagination strong { color: #53705b; font-size: 12px; font-weight: 700; white-space: nowrap; }
.history-pagination .secondary-btn { min-height: 32px; padding: 5px 9px; font-size: 12px; }

.application-register-panel .application-category-summary .application-category-tile { display: grid; width: 100%; border-style: solid; text-align: left; cursor: pointer; font: inherit; }
.application-register-panel .application-category-summary .application-category-tile em { position: relative; z-index: 1; margin-top: 7px; color: #547267; font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.application-register-panel .application-category-summary .application-category-tile:hover { transform: translateY(-1px); border-color: #6e9a6a; box-shadow: 0 9px 20px rgba(31, 64, 87, .1); }
.application-register-panel .application-category-summary .application-category-tile.is-active { outline: 3px solid #4d8b60; outline-offset: 2px; }

.application-register-panel .application-actions-menu { position: relative; display: inline-block; }
.application-register-panel .application-actions-menu > summary { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #d6e2d8; border-radius: 12px; background: #fff; color: #4a5f55; cursor: pointer; font-weight: 900; letter-spacing: .08em; list-style: none; }
.application-register-panel .application-actions-menu > summary::-webkit-details-marker { display: none; }
.application-register-panel .application-actions-menu[open] > summary { border-color: #5b9770; background: #f2f9ee; color: #2f6c48; }
.application-register-panel .application-actions-menu > div { position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; display: grid; min-width: 146px; padding: 5px; border: 1px solid #d9e5dc; border-radius: 12px; background: #fffefa; box-shadow: 0 12px 26px rgba(31, 61, 45, .16); }
.application-register-panel .application-actions-menu button { justify-content: flex-start; min-height: 32px; padding: 6px 8px; border: 0; background: transparent; color: #36543e; font-size: 12px; text-align: left; box-shadow: none; }
.application-register-panel .application-actions-menu button:hover { background: #edf5e8; }
.application-register-panel .application-actions-menu .delete-application-btn { color: #a4493d; }

.market-ipo-row { align-items: stretch; min-height: 86px; padding: 14px 16px; border-bottom: 1px solid #e4ebe0; }
.market-ipo-row:last-child { border-bottom: 0; }
.market-ipo-main, .market-ipo-meta { display: grid; gap: 5px; }
.market-ipo-name { font-size: 14px; }
.market-ipo-main small { color: #7b8a77; font-size: 12px; }
.market-ipo-meta { justify-items: end; align-content: center; }
.market-ipo-meta b { color: #9a7233; font-size: 12px; }
.market-ipo-meta em { color: #347259; font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }

/* Preserve a clear visual hierarchy: no critical status depends on tiny type. */
.studio-theme .sidebar-label, .studio-theme .erp-shell :is(th, .summary-market-card p) { font-size: 12px; }
.studio-theme .erp-shell :is(.status-pill, .badge) { font-size: 12px; }
.studio-theme .closing-applicant-ipo-meta b { font-size: 12px; }

@media (max-width: 720px) {
  .closing-applicant-card > summary { grid-template-columns: 42px minmax(0, 1fr); }
  .closing-applicant-card .closing-applicant-summary { grid-column: 2; justify-items: start; text-align: left; }
  .closing-applicant-card .closing-applicant-detail { padding: 0 12px 13px; }
  .closing-applicant-card .closing-applicant-ipo-meta { grid-template-columns: 1fr 1fr; }
  .transaction-history-status { align-items: flex-start; flex-direction: column; }
  .history-pagination { width: 100%; justify-content: space-between; }
  .market-ipo-row { min-height: 76px; }
}

.ipo-ledger-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(11, 40, 70, 0.28);
}

.ipo-ledger-dialog::backdrop {
  background: rgba(15, 42, 71, 0.45);
  backdrop-filter: blur(4px);
}

.ipo-ledger-dialog-content {
  padding: 24px;
}

.ipo-ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.ipo-ledger-summary div {
  padding: 12px;
  border: 1px solid #dce9f7;
  border-radius: 12px;
  background: #f7fbff;
}

.ipo-ledger-summary span,
.ipo-ledger-row small {
  display: block;
  color: #617a93;
  font-size: 12px;
}

.ipo-ledger-summary strong {
  display: block;
  margin-top: 4px;
  color: #19362f;
}

.ipo-ledger-rows {
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid #e2edf8;
}

.ipo-ledger-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e8f0f8;
}

.ipo-ledger-row > span {
  color: #617a93;
  font-size: 12px;
}

.ipo-ledger-row b {
  color: #19362f;
  white-space: nowrap;
}

/* Market Desk IPO detail: keep the ledger calm, spacious, and action-oriented. */
.market-ipo-dialog {
  width: min(760px, calc(100vw - 32px));
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(208, 222, 233, .92);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(24, 57, 86, .24);
}

.market-ipo-dialog::backdrop {
  background: rgba(21, 49, 74, .34);
  backdrop-filter: blur(10px) saturate(.9);
}

.market-ipo-dialog .ipo-ledger-dialog-content { padding: 28px; }
.market-ipo-dialog .dialog-title-row { padding-bottom: 20px; border-bottom: 1px solid #e7eef4; }
.market-ipo-dialog .dialog-title-row h3 { max-width: 560px; margin-top: 5px; color: #173b5c; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.045em; line-height: 1.1; }
.market-ipo-dialog .dialog-title-row p:not(.eyebrow) { max-width: 490px; color: #657d91; font-size: 14px; line-height: 1.45; }
.market-ipo-dialog .dialog-title-row .secondary-btn { min-width: 88px; }

.market-ipo-dialog .ipo-ledger-summary {
  margin: 18px 0;
  gap: 10px;
}

.market-ipo-dialog .ipo-ledger-summary div {
  padding: 14px;
  border-color: #dfe9ef;
  border-radius: 12px;
  background: linear-gradient(145deg, #fbfdff, #f5f9fb);
}

.market-ipo-dialog .ipo-ledger-summary span { color: #6d8395; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.market-ipo-dialog .ipo-ledger-summary strong { color: #193d5e; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.market-ipo-dialog .ipo-ledger-rows { max-height: min(300px, 35vh); border-top: 0; border-bottom: 1px solid #e5edf3; }
.market-ipo-dialog .ipo-ledger-row { grid-template-columns: 94px minmax(0, 1fr) auto; gap: 14px; padding: 13px 4px; border-color: #edf2f6; }
.market-ipo-dialog .ipo-ledger-row:hover { background: #f8fbfd; }
.market-ipo-dialog .ipo-ledger-row > span { color: #627269; font-size: 12px; font-weight: 700; }
.market-ipo-dialog .ipo-ledger-row strong { color: #264968; font-size: 13px; }
.market-ipo-dialog .ipo-ledger-row small { margin-top: 2px; color: #72879a; font-size: 12px; }
.market-ipo-dialog .ipo-ledger-row b { color: #193d5e; font-size: 13px; font-variant-numeric: tabular-nums; }

.ipo-ledger-plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cfe0eb;
  border-radius: 16px;
  background: linear-gradient(135deg, #f2f9fc, #fbfdff);
}

.ipo-ledger-plan-bar > div { display: grid; gap: 2px; min-width: 0; }
.ipo-ledger-plan-bar span { color: #57748b; font-size: 12px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.ipo-ledger-plan-bar strong { color: #193d5e; font-size: 16px; letter-spacing: -.02em; }
.ipo-ledger-plan-bar small { color: #6d8394; font-size: 12px; line-height: 1.35; }
.ipo-ledger-plan-bar .primary-btn { flex: 0 0 auto; min-height: 42px; padding-inline: 17px; }
.ipo-ledger-plan-bar .primary-btn:disabled { cursor: not-allowed; opacity: .55; }
.ipo-ledger-plan-bar .ipo-ledger-plan-actions { display: flex; flex: 0 0 auto; gap: 9px; align-items: center; }
.ipo-ledger-plan-actions .secondary-btn { min-height: 42px; padding-inline: 14px; font-size: 12px; }
.market-quick-plan-dialog { width: min(940px, calc(100vw - 32px)); }
.market-quick-plan-dialog .edit-account-form { gap: 14px; }
.market-quick-plan-dialog input[readonly] { background: #f7fafc; color: #244b6b; font-weight: 600; }
.market-quick-plan-rows { display: grid; gap: 10px; max-height: min(52vh, 520px); overflow: auto; padding-right: 3px; }
.market-quick-plan-row { padding: 12px; border: 1px solid #d8e5ee; border-radius: 12px; background: #fbfdff; }
.market-quick-plan-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #234d73; font-size: 13px; }
.market-quick-plan-remove { width: 28px; height: 28px; border: 1px solid #f1c3c7; border-radius: 8px; background: #fff8f8; color: #c83f4c; font-size: 18px; line-height: 1; cursor: pointer; }
.market-quick-plan-remove:disabled { opacity: .35; cursor: not-allowed; }
.market-quick-plan-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 12px; }
.market-quick-plan-fields label { display: grid; gap: 5px; color: #46647e; font-size: 12px; font-weight: 750; }
.market-quick-plan-fields input, .market-quick-plan-fields select { min-height: 40px; padding: 8px 10px; font-size: 12px; }
.market-quick-plan-add { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #d8e5ee; border-radius: 12px; background: #f8fbfd; }
.market-quick-plan-add small { color: #667f93; font-size: 12px; }
@media (max-width: 700px) { .market-quick-plan-fields { grid-template-columns: 1fr; } .market-quick-plan-add { align-items: flex-start; flex-direction: column; } }

.capacity-plan-guidance {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: -2px 0 12px;
  padding: 9px 12px;
  border: 1px solid #cbe1ef;
  border-radius: 12px;
  background: #f3f9fd;
  color: #355e7e;
  font-size: 12px;
  font-weight: 700;
}

.plan-cta-pulse { position: relative; isolation: isolate; }
.plan-cta-pulse::after {
  position: absolute;
  z-index: -1;
  inset: -9px;
  border: 2px solid rgba(28, 116, 190, .54);
  border-radius: 12px;
  content: "";
  pointer-events: none;
  animation: plan-cta-ring 1.65s ease-out infinite;
}

@keyframes plan-cta-ring {
  0% { opacity: .8; transform: scale(.92); }
  75%, 100% { opacity: 0; transform: scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  .plan-cta-pulse::after { animation: none; opacity: .8; transform: none; }
}

@media (max-width: 620px) {
  .market-ipo-dialog { width: calc(100vw - 20px); border-radius: 22px; }
  .market-ipo-dialog .ipo-ledger-dialog-content { padding: 19px; }
  .market-ipo-dialog .dialog-title-row { gap: 12px; }
  .market-ipo-dialog .ipo-ledger-summary { grid-template-columns: 1fr; }
  .market-ipo-dialog .ipo-ledger-row { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
  .market-ipo-dialog .ipo-ledger-row b { grid-column: 2; }
  .ipo-ledger-plan-bar { align-items: stretch; flex-direction: column; }
  .ipo-ledger-plan-bar .primary-btn { width: 100%; }
  .ipo-ledger-plan-bar .ipo-ledger-plan-actions { flex-direction: column-reverse; }
  .ipo-ledger-plan-actions .secondary-btn { width: 100%; }
}

.compact td,
.compact th {
  white-space: nowrap;
}

.history-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-toolbar input,
.history-toolbar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #c9d8e8;
  border-radius: 12px;
  background: #fff;
  color: #17324d;
  font: inherit;
}

.history-toolbar input {
  min-width: 260px;
}

.transaction-history-status {
  margin: 8px 0 10px;
}

.transaction-history-table td,
.transaction-history-table th {
  white-space: normal;
  vertical-align: top;
}

.transaction-history-details {
  min-width: 320px;
  color: #38556f;
  line-height: 1.5;
}

.action-queue-panel {
  border-top: 3px solid #1f6b52;
}

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

.action-queue-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid #d9e6f0;
  border-radius: 12px;
  background: #fff;
  color: #17324d;
  text-align: left;
  cursor: pointer;
}

.action-queue-item:hover,
.action-queue-item:focus-visible {
  border-color: #1f6b52;
  box-shadow: 0 0 0 3px rgba(11, 95, 174, 0.14);
  outline: 0;
}

.action-queue-item.needs-action { background: #fffaf0; }
.action-queue-item.is-clear { background: #f5fbf7; }

.action-queue-count {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1f6b52;
  color: #fff;
  font-weight: 800;
}

.action-queue-item.is-clear .action-queue-count { background: #197447; }
.action-queue-item strong,
.action-queue-item small { display: block; }
.action-queue-item small { margin-top: 3px; color: #4a5f55; line-height: 1.35; }
.action-queue-arrow { color: #1f6b52; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.history-workspace-intro { margin-bottom: 18px; }

.history-toolbar {
  align-items: center;
  justify-content: flex-end;
}

.history-toolbar input[type="date"] { min-width: 138px; }

.history-ipo-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #1f6b52;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.history-ipo-link:hover,
.history-ipo-link:focus-visible { text-decoration: underline; outline: 0; }

.application-ipo-group td {
  padding: 10px 12px;
  background: #edf5fd;
  color: #17324d;
  border-top: 1px solid #c9d8e8;
}

.application-ipo-group strong { margin-right: 10px; }
.application-ipo-group span { color: #4a5f55; font-size: 12px; }
.ipo-group-select { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; color: #2168ae; font-size: 12px; font-weight: 800; }
.ipo-group-select input { width: 15px; height: 15px; accent-color: #1766ad; }

.application-category-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.application-category-summary > div {
  padding: 13px 15px;
  border: 1px solid #d9e6f0;
  border-radius: 12px;
  background: #f8fbfe;
}

.application-category-summary span,
.application-category-summary small { display: block; color: #4a5f55; }
.application-category-summary strong { display: block; margin: 3px 0; color: #17324d; font-size: 22px; }

/* Use the full workspace width while keeping each register column easy to scan. */
.applications-table,
.erp-shell .applications-table {
  width: 100%;
  min-width: 1160px;
  border-spacing: 0 3px;
}

.application-register-wrap { width: 100%; padding: 5px; }

.applications-table th,
.applications-table td { padding: 4px 6px; height: 38px; }

.applications-table th:nth-child(2),
.applications-table td:nth-child(2) { width: 15%; }
.applications-table th:nth-child(3),
.applications-table td:nth-child(3) { width: 17%; }
.applications-table th:nth-child(4),
.applications-table td:nth-child(4) { width: 13%; }
.applications-table th:nth-child(5),
.applications-table td:nth-child(5) { width: 8%; text-align: center; }
.applications-table th:nth-child(6),
.applications-table td:nth-child(6) { width: 10%; text-align: center; }
.applications-table th:nth-child(7),
.applications-table td:nth-child(7) { width: 12%; text-align: center; }
.applications-table th:nth-child(8),
.applications-table td:nth-child(8) { width: 17%; text-align: center; }
.applications-table th:nth-child(9),
.applications-table td:nth-child(9) { width: 7%; text-align: center; }

.applications-table .application-actions { gap: 4px; }
.applications-table .application-actions .application-icon-action { width: 25px; height: 25px; }
.applications-table td:nth-child(8) {
  padding-right: 12px;
  text-align: right;
}

.applications-table .refund-plan-wrap {
  display: flex;
  width: 100%;
  position: relative;
  min-height: 27px;
  justify-content: flex-end;
}

.applications-table td:nth-child(8) > .status-pill,
.applications-table .refund-plan-wrap .status-pill {
  display: inline-flex;
  width: 184px;
  min-width: 184px;
  justify-content: center;
  box-sizing: border-box;
}

/* The optional refund action must not consume a second column's width. */
.applications-table .refund-plan-wrap .plan-refund-btn {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  transform: none;
}

/* Keep the application register inside the workspace instead of forcing a page-wide scroll. */
.applications-table,
.erp-shell .applications-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.application-register-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.applications-table th,
.applications-table td {
  padding: 3px 5px;
  height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.applications-table th:first-child,
.applications-table td:first-child { width: 3%; }
.applications-table th:nth-child(2),
.applications-table td:nth-child(2) { width: 14%; }
.applications-table th:nth-child(3),
.applications-table td:nth-child(3) { width: 17%; }
.applications-table th:nth-child(4),
.applications-table td:nth-child(4) { width: 11%; }
.applications-table th:nth-child(5),
.applications-table td:nth-child(5) { width: 7%; }
.applications-table th:nth-child(6),
.applications-table td:nth-child(6) { width: 9%; }
.applications-table th:nth-child(7),
.applications-table td:nth-child(7) { width: 9%; }
.applications-table th:nth-child(8),
.applications-table td:nth-child(8) { width: 17%; padding-right: 5px; }
.applications-table th:nth-child(9),
.applications-table td:nth-child(9) { width: 13%; }

.applications-table .application-funding-source,
.applications-table .application-account-ledger-trigger {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.applications-table .refund-plan-wrap,
.applications-table td:nth-child(8) > .status-pill,
.applications-table .refund-plan-wrap .status-pill {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.applications-table .application-actions {
  width: 100%;
  gap: 3px;
}

.applications-table .check-allotment-btn {
  min-width: 0;
  padding: 5px 7px;
  font-size: 12px;
}

.application-category-label {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf5fd;
  color: #4a5f55;
  font-size: 12px;
  font-weight: 800;
}

.application-funding-source {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.application-funding-source.is-recorded { color: #245a86; }
.application-funding-source.is-savings { color: #64798e; font-weight: 600; }
.application-funding-source.is-pending { color: #a26713; }

.funding-done,
.funding-covered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.funding-done { background: #e8f8ed; color: #168239; }
.funding-covered { background: #edf5fd; color: #416b90; }

.bulk-funding-review { display: grid; gap: 8px; }
.bulk-funding-review .eyebrow { margin: 0; }
.bulk-funding-review select { min-width: 180px; }
.account-ledger-edit-btn { padding: 5px 9px; font-size: 12px; }

.operations-report-panel { margin-bottom: 22px; }

.capacity-transfer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.capacity-savings-metric {
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding-right: 12px;
  border-right: 1px solid #dce7f0;
  text-align: right;
}

.capacity-savings-metric span {
  color: #6a8094;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.capacity-savings-metric strong {
  color: #153b60;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
}

.capacity-transfer-action-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.capacity-transfer-action-buttons .secondary-btn,
.capacity-transfer-action-buttons .primary-btn {
  min-width: 132px;
  white-space: nowrap;
}

.capacity-ledger-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dce7f0;
  border-radius: 16px;
  background: linear-gradient(145deg, #fbfdff, #f3f8fc);
}

.capacity-ledger-shortcut .eyebrow { margin: 0 0 4px; }
.capacity-ledger-shortcut h3 { margin: 0 0 4px; color: #1c405f; font-size: 16px; }
.capacity-ledger-shortcut p { margin: 0; }
.capacity-ledger-shortcut .secondary-btn { white-space: nowrap; }

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

.workflow-heading-actions .secondary-btn {
  min-height: 38px;
  white-space: nowrap;
}

.savings-transfer-ledger-dialog { width: min(1120px, calc(100vw - 32px)); max-width: none; }
.savings-transfer-ledger-dialog .edit-account-form { max-width: none; }
.savings-ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid #e0eaf2;
  border-radius: 12px;
  background: #f8fbfe;
}
.savings-ledger-toolbar .capacity-savings-metric { text-align: left; }
.savings-transfer-table-wrap { max-height: min(52vh, 480px); overflow: auto; }

@media (max-width: 820px) {
  .capacity-transfer-actions {
    width: 100%;
    justify-content: space-between;
  }

  .capacity-transfer-action-buttons { flex: 1; justify-content: flex-end; }

  .capacity-ledger-shortcut { align-items: flex-start; flex-direction: column; }
  .workflow-heading-actions { width: 100%; justify-content: flex-start; }
  .savings-ledger-toolbar { align-items: stretch; flex-direction: column; }
  .savings-ledger-toolbar .capacity-savings-metric { border-right: 0; border-bottom: 1px solid #dce7f0; padding: 0 0 10px; }
  .savings-ledger-toolbar .capacity-transfer-action-buttons { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .capacity-transfer-actions,
  .capacity-transfer-action-buttons { align-items: stretch; flex-direction: column; }
  .capacity-savings-metric { padding: 0 0 9px; border: 0; border-bottom: 1px solid #dce7f0; text-align: left; }
  .capacity-transfer-action-buttons .secondary-btn,
  .capacity-transfer-action-buttons .primary-btn { width: 100%; }
  .capacity-ledger-shortcut .secondary-btn { width: 100%; }
  .workflow-heading-actions .secondary-btn { width: 100%; }
  .savings-transfer-ledger-dialog { width: calc(100vw - 20px); }
}

@media (max-width: 980px) {
  .action-queue { grid-template-columns: 1fr; }
  .history-toolbar { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .history-toolbar input,
  .history-toolbar select,
  .history-toolbar input[type="date"] { min-width: 100%; width: 100%; }
  .transaction-history-table th:first-child,
  .transaction-history-table td:first-child { position: sticky; left: 0; background: #fff; }
  .transaction-history-table thead th:first-child { background: #edf5fd; }
  .application-category-summary { grid-template-columns: 1fr; }
}

/* Applications register: final compact desktop layout.
   Keep the high-information register readable without letting the table push
   the page horizontally. */
.application-register-panel .application-category-summary {
  gap: 12px;
  margin: 0 0 14px;
}

.application-register-panel .application-category-summary .application-category-tile {
  min-height: 104px;
  padding: 16px 18px;
  border-radius: 16px;
  align-content: center;
}

.application-register-panel .application-category-summary .application-category-tile span {
  font-size: 13px;
}

.application-register-panel .application-category-summary .application-category-tile strong {
  margin: 2px 0;
  font-size: 28px;
  line-height: 1;
}

.application-register-panel .application-category-summary .application-category-tile small {
  font-size: 13px;
}

.application-register-panel .application-register-wrap {
  overflow-x: hidden;
  padding: 10px;
  border-radius: 16px;
  background: #f7fafc;
}

.application-register-panel .applications-table,
.application-register-panel .erp-shell .applications-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-spacing: 0 6px;
}

.application-register-panel .applications-table th {
  padding: 7px 8px 9px;
  color: #617b93;
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: .055em;
  white-space: normal;
}

.application-register-panel .applications-table td {
  min-width: 0;
  height: 46px;
  padding: 7px 8px;
  font-size: 12px;
}

.application-register-panel .applications-table th:nth-child(1),
.application-register-panel .applications-table td:nth-child(1) { width: 3%; }
.application-register-panel .applications-table th:nth-child(2),
.application-register-panel .applications-table td:nth-child(2) { width: 14%; }
.application-register-panel .applications-table th:nth-child(3),
.application-register-panel .applications-table td:nth-child(3) { width: 17%; }
.application-register-panel .applications-table th:nth-child(4),
.application-register-panel .applications-table td:nth-child(4) { width: 14%; }
.application-register-panel .applications-table th:nth-child(5),
.application-register-panel .applications-table td:nth-child(5) { width: 7%; }
.application-register-panel .applications-table th:nth-child(6),
.application-register-panel .applications-table td:nth-child(6) { width: 9%; }
.application-register-panel .applications-table th:nth-child(7),
.application-register-panel .applications-table td:nth-child(7) { width: 9%; }
.application-register-panel .applications-table th:nth-child(8),
.application-register-panel .applications-table td:nth-child(8) { width: 14%; }
.application-register-panel .applications-table th:nth-child(9),
.application-register-panel .applications-table td:nth-child(9) { width: 13%; }

.application-register-panel .applications-table select,
.application-register-panel .applications-table .filter-control {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 12px;
  font-size: 12px;
}

.application-register-panel .applications-table .funding-source-chip,
.application-register-panel .applications-table .category-badge,
.application-register-panel .applications-table .status-badge,
.application-register-panel .applications-table .refund-badge {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-register-panel .applications-table .funding-status {
  white-space: normal;
  font-size: 12px;
  line-height: 1.2;
}

.application-register-panel .applications-table .application-actions {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.application-register-panel .applications-table .application-actions button,
.application-register-panel .applications-table .application-actions .secondary-btn {
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 12px;
  font-size: 12px;
}

.application-register-panel .applications-table .application-actions .check-result-btn {
  min-width: 74px;
}

.application-register-panel .application-register-collapsed td {
  height: auto;
  padding: 10px 12px !important;
}

.application-register-panel .application-register-picker {
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fbfdff, #f2f8fc);
}

.application-register-panel .application-register-picker > div > strong {
  font-size: 14px;
}

.application-register-panel .application-register-picker > div > span {
  font-size: 12px;
}

.application-register-panel .application-ipo-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.application-register-panel .application-ipo-summary-card {
  min-width: 0;
  min-height: 90px;
  padding: 13px 14px;
  border-radius: 12px;
}

.application-register-panel .application-ipo-summary-card strong {
  font-size: 14px;
}

.application-register-panel .application-ipo-summary-card span,
.application-register-panel .application-ipo-summary-card button {
  font-size: 12px;
}

.application-register-panel .application-old-ipo-section {
  gap: 9px;
  padding-top: 12px;
  border-top-color: #dce8f0;
}

@media (max-width: 1100px) {
  .application-register-panel .application-register-wrap { overflow-x: auto; }
  .application-register-panel .applications-table,
  .application-register-panel .erp-shell .applications-table { min-width: 980px; }
}

/* Keep the dashboard decision-first while retaining detailed tools on demand. */
body[data-route]:not([data-route="overview"]) .subscription-ticker { display: none; }
.overview-more-tools { margin-top: 14px; }
.overview-more-tools > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d8e5ee;
  border-radius: 12px;
  background: #f7fafc;
  color: #214565;
  cursor: pointer;
  list-style: none;
}
.overview-more-tools > summary::-webkit-details-marker { display: none; }
.overview-more-tools-title { font-size: 14px; font-weight: 800; }
.overview-more-tools-note { min-width: 0; color: #627269; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-more-tools-chevron { width: 9px; height: 9px; border-right: 2px solid #2e5774; border-bottom: 2px solid #2e5774; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.overview-more-tools[open] > summary { border-color: #bcd7e8; background: #f1f7fb; }
.overview-more-tools[open] .overview-more-tools-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.overview-more-tools > .panel:first-of-type { margin-top: 12px; }
.overview-more-tools > .panel + .panel { margin-top: 14px; }

/* Prevent long market/register labels from forcing a second canvas. */
body[data-route="applications"], body[data-route="old-applications"] { overflow-x: hidden; }
.application-register-panel,
.application-register-panel .application-register-wrap,
.application-register-panel .application-register-picker,
.application-register-panel .application-old-ipo-section { box-sizing: border-box; max-width: 100%; }
.application-register-panel .application-register-picker,
.application-register-panel .application-old-ipo-section { width: 100%; }

@media (max-width: 760px) {
  .overview-more-tools > summary { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 13px; }
  .overview-more-tools-note { grid-column: 1; grid-row: 2; }
}

/* Period ledger reporting: MARG-style accounting context in the existing visual language. */
.account-ledger-workspace-dialog {
  width: min(1500px, calc(100vw - 28px));
  max-height: min(940px, calc(100dvh - 28px));
}

.account-ledger-workspace-shell { padding: 22px 24px; }
.account-ledger-workspace { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); min-height: 650px; }
.account-ledger-account-pane { padding-top: 14px; }
.account-ledger-account-list { max-height: 600px; }
.account-ledger-detail-pane { padding: 14px 0 0 18px; }
.account-ledger-detail-header { align-items: center; margin-bottom: 10px; }
.account-ledger-detail-header h3 { font-size: 18px; }

.account-ledger-report-bar {
  display: grid;
  grid-template-columns: auto auto minmax(170px, 1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dce8f1;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fbfe, #f1f7fb);
}

.account-ledger-period-fields { display: grid; grid-template-columns: repeat(2, 132px); gap: 7px; }
.account-ledger-period-controls { display: grid; grid-template-columns: 92px minmax(132px, 1fr); gap: 7px; min-width: 0; }
.account-ledger-period-controls .account-ledger-period-fields { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-ledger-period-controls [hidden] { display: none !important; }
.account-ledger-report-bar label { display: grid; gap: 4px; color: #607b93; font-size: 12px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.account-ledger-report-bar input { width: 100%; height: 34px; min-height: 34px; padding: 5px 8px; border: 1px solid #caddea; border-radius: 8px; background: #fff; color: #214563; font: inherit; font-size: 12px; font-weight: 700; }
.account-ledger-report-bar input:focus { border-color: #78aef0; box-shadow: 0 0 0 3px rgba(64, 139, 223, .13); outline: none; }
.account-ledger-movement-search { min-width: 0; }

.account-ledger-view-switch { display: inline-flex; height: 34px; padding: 3px; border: 1px solid #d3e2ec; border-radius: 8px; background: #eaf2f8; }
.account-ledger-view-switch button,
.account-ledger-report-actions button,
.account-ledger-detail-btn {
  min-width: 0;
  min-height: 0;
  border: 0;
  box-shadow: none;
  font-family: inherit;
}
.account-ledger-view-switch button { padding: 4px 9px; border-radius: 8px; background: transparent; color: #607a91; font-size: 12px; font-weight: 800; }
.account-ledger-view-switch button.is-active { background: #fff; color: #1766a9; box-shadow: 0 1px 5px rgba(29, 75, 111, .12); }
.account-ledger-report-actions { display: flex; align-items: end; gap: 6px; min-width: 0; }
.account-ledger-report-actions select { height: 34px; min-width: 112px; max-width: 142px; padding: 0 8px; border: 1px solid #cbddea; border-radius: 8px; background: #fff; color: #2c628e; font: inherit; font-size: 12px; font-weight: 800; }
.account-ledger-report-actions button { height: 34px; padding: 0 11px; border: 1px solid #cbddea; border-radius: 8px; background: #fff; color: #2c628e; font-size: 12px; font-weight: 800; }
.account-ledger-report-actions button:hover { border-color: #8eb8de; background: #f7fbff; }

.account-ledger-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 9px 0 6px; }
.account-ledger-summary > div { display: grid; align-content: center; min-height: 58px; padding: 8px 11px; border: 1px solid #dce7ef; border-radius: 12px; background: #fff; }
.account-ledger-summary > div.is-closing { border-color: #bedaf0; background: linear-gradient(145deg, #f2f9ff, #e9f4ff); }
.account-ledger-summary span { color: #627269; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.account-ledger-summary strong { margin-top: 2px; overflow: hidden; color: #173e60; font-size: clamp(13px, 1.1vw, 17px); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.account-ledger-summary .is-closing strong { color: #0c659f; }

.account-ledger-report-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 25px; padding: 0 3px; color: #627269; font-size: 12px; }
.account-ledger-report-meta p { margin: 0; font-weight: 700; }
.account-ledger-report-meta label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.account-ledger-report-meta input { margin: 0; accent-color: #1978bf; }

.account-ledger-workspace-dialog .account-ledger-table-wrap { max-height: 285px; }
.account-ledger-workspace-dialog .account-ledger-table-wrap table { min-width: 790px; table-layout: fixed; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th { padding: 9px 10px; font-size: 12px; letter-spacing: .06em; }
.account-ledger-workspace-dialog .account-ledger-table-wrap td { height: 44px; padding: 7px 10px; color: #21425e; font-size: 12px; font-variant-numeric: tabular-nums; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(1) { width: 12%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(2) { width: 18%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(3) { width: 25%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(4),
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(5),
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(6) { width: 11%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(7) { width: 12%; }
.account-ledger-movement-row { cursor: pointer; }
.account-ledger-movement-row:hover td { background: #f5faff; }
.account-ledger-movement-row.is-selected td { background: #eaf4fe; }
.account-ledger-movement-row:focus { outline: 2px solid #73aef0; outline-offset: -2px; }
.account-ledger-movement-row td:nth-child(3) span,
.account-ledger-movement-row td:nth-child(3) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-ledger-movement-row td:nth-child(3) small { margin-top: 2px; color: #7a8fa1; font-size: 12px; }
.account-ledger-opening-row td { height: 36px !important; background: #f8fafc; color: #627269 !important; font-size: 12px !important; font-style: italic; }
.account-ledger-detail-btn { padding: 6px 8px; border: 1px solid #cddfeb; border-radius: 8px; background: #fff; color: #21669d; font-size: 12px; font-weight: 800; }
.account-ledger-workspace-actions { gap: 4px; }
.account-ledger-workspace-actions button { min-height: 28px !important; padding: 5px 7px !important; border-radius: 8px !important; font-size: 12px !important; }

.account-ledger-transaction-detail { margin-top: 8px; padding: 10px 12px; border: 1px solid #d5e5f0; border-radius: 12px; background: linear-gradient(145deg, #fff, #f5f9fc); }
.account-ledger-transaction-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.account-ledger-transaction-detail-heading div { display: flex; align-items: baseline; gap: 8px; }
.account-ledger-transaction-detail-heading span { color: #6e8497; font-size: 12px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.account-ledger-transaction-detail-heading strong { color: #20496b; font-size: 12px; }
.account-ledger-transaction-detail-heading #closeLedgerTransactionDetailBtn { display: grid; width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #eaf2f8; color: #50718c; box-shadow: none; font-size: 18px; flex:0 0 36px; }
.account-ledger-transaction-detail dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 14px; margin: 0; }
.account-ledger-transaction-detail dl > div { min-width: 0; }
.account-ledger-transaction-detail dl > div.is-wide { grid-column: span 2; }
.account-ledger-transaction-detail dt { color: #7a8fa1; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.account-ledger-transaction-detail dd { margin: 2px 0 0; overflow: hidden; color: #234866; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-ledger-keyboard-hint { margin: 7px 2px 0; color: #7890a2; font-size: 12px; text-align: right; }
.account-ledger-keyboard-hint kbd { padding: 1px 4px; border: 1px solid #d1e0ea; border-radius: 4px; background: #f7fafc; color: #4a5f55; font-family: inherit; font-size: 12px; font-weight: 800; }

@media (max-width: 1080px) {
  .account-ledger-workspace { grid-template-columns: 210px minmax(0, 1fr); }
  .account-ledger-report-bar { grid-template-columns: 1fr auto; }
  .account-ledger-period-controls { grid-template-columns: 92px minmax(132px, 1fr); }
  .account-ledger-movement-search { grid-column: 1; }
  .account-ledger-report-actions { grid-column: 2; grid-row: 2; }
}

@media (max-width: 760px) {
  .account-ledger-workspace-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .account-ledger-workspace-shell { padding: 16px; }
  .account-ledger-workspace { grid-template-columns: 1fr; min-height: 0; }
  .account-ledger-account-pane { padding: 12px 0; border-right: 0; border-bottom: 1px solid #e1ebf3; }
  .account-ledger-account-list { max-height: 150px; }
  .account-ledger-detail-pane { padding: 12px 0 0; }
  .account-ledger-detail-header { align-items: flex-start; }
  .account-ledger-summary { grid-template-columns: repeat(2, 1fr); }
  .account-ledger-summary > div.is-closing { grid-column: span 2; }
  .account-ledger-transaction-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  body.account-ledger-printing * { visibility: hidden !important; }
  body.account-ledger-printing #accountLedgerWorkspaceDialog,
  body.account-ledger-printing #accountLedgerWorkspaceDialog * { visibility: visible !important; }
  body.account-ledger-printing #accountLedgerWorkspaceDialog { position: absolute; inset: 0; display: block; width: 100%; max-height: none; margin: 0; border: 0; box-shadow: none; }
  body.account-ledger-printing .account-ledger-workspace-shell { padding: 12px; }
  body.account-ledger-printing .account-ledger-workspace-title button,
  body.account-ledger-printing .account-ledger-account-pane,
  body.account-ledger-printing .account-ledger-view-switch,
  body.account-ledger-printing .account-ledger-movement-search,
  body.account-ledger-printing .account-ledger-report-actions,
  body.account-ledger-printing .account-ledger-detail-actions button,
  body.account-ledger-printing .account-ledger-report-meta label,
  body.account-ledger-printing .account-ledger-table-wrap th:last-child,
  body.account-ledger-printing .account-ledger-table-wrap td:last-child,
  body.account-ledger-printing .account-ledger-transaction-detail,
  body.account-ledger-printing .account-ledger-keyboard-hint { display: none !important; }
  body.account-ledger-printing .account-ledger-workspace { display: block; min-height: 0; }
  body.account-ledger-printing .account-ledger-detail-pane { padding: 10px 0 0; }
  body.account-ledger-printing .account-ledger-report-bar { grid-template-columns: auto; }
  body.account-ledger-printing .account-ledger-table-wrap { max-height: none !important; overflow: visible !important; }
  body.account-ledger-printing .account-ledger-table-wrap table { min-width: 0; }
}

/* Journal voucher and ledger: make the cash direction explicit without adding visual weight. */
.voucher-lines .voucher-line label > span {
  color: #234d71;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-transform: none;
}

.voucher-lines .voucher-swap-line {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 5px 0;
  border-top: 1px solid #e7eff6;
  background: #fbfdff;
}

.voucher-lines .voucher-swap-line .voucher-swap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #c8dced;
  border-right: 0;
  border-radius: 999px;
  background: #f7fbff;
  color: #24639a;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.voucher-lines .voucher-swap-line .voucher-swap-btn:hover,
.voucher-lines .voucher-swap-line .voucher-swap-btn:focus-visible {
  border-color: #74a8d7;
  background: #eaf4ff;
  outline: none;
}

.voucher-lines .voucher-swap-line .voucher-swap-btn::first-letter {
  font-size: 16px;
}

.account-ledger-workspace-dialog .account-ledger-table-wrap table {
  min-width: 640px;
}

.account-ledger-workspace-dialog .account-ledger-table-wrap th {
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.account-ledger-workspace-dialog .account-ledger-table-wrap td {
  height: auto;
  padding: 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.account-ledger-workspace-dialog .account-ledger-table-wrap tbody tr {
  height: 52px;
}

.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(1) { width: 13%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(2) { width: 17%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(3) { width: 22%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(4),
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(5) { width: 11%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(6) { width: 12%; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(7) { width: 14%; }

.account-ledger-workspace-dialog .account-ledger-workspace-actions {
  gap: 5px;
}

.account-ledger-workspace-dialog .account-ledger-workspace-actions .secondary-btn,
.account-ledger-workspace-dialog .account-ledger-voucher-delete-btn {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
}

/* OD metrics use a dedicated, calm summary treatment rather than generic cards. */
#odInfoCards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

#odInfoCards .od-metric-card {
  display: flex;
  min-height: 126px;
  padding: 18px 18px 16px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #d9e8ee;
  border-top: 1px solid #d9e8ee;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.68) 0 20%, transparent 20.5%),
    linear-gradient(135deg, #f8fcfa, #eaf7f1);
  box-shadow: 0 8px 20px rgba(28, 85, 70, 0.055);
}

#odInfoCards .od-metric-card::before {
  display: none;
}

#odInfoCards .od-metric-card p {
  min-height: 30px;
  margin: 0;
  color: #4a5f55;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.22;
}

#odInfoCards .od-metric-card h3 {
  margin: 12px 0 0;
  color: #19362f;
  font-size: clamp(25px, 2vw, 34px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1;
}

#odInfoCards .od-metric-card-2,
#odInfoCards .od-metric-card-5,
#odInfoCards .od-metric-card-7 {
  border-color: #f1db9f;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.62) 0 20%, transparent 20.5%),
    linear-gradient(135deg, #fffdf4, #fff2c9);
}

#odInfoCards .od-metric-card-3,
#odInfoCards .od-metric-card-4,
#odInfoCards .od-metric-card-6 {
  border-color: #d6e2d8;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.64) 0 20%, transparent 20.5%),
    linear-gradient(135deg, #f7fbff, #e6f3fb);
}

@media (max-width: 1180px) {
  #odInfoCards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  #odInfoCards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #odInfoCards .od-metric-card { min-height: 112px; padding: 15px; }
  #odInfoCards .od-metric-card h3 { font-size: 28px; }
}

/* Keep an open voucher picker above the next accounting row. */
.voucher-line:has(.voucher-account-picker.is-open) {
  position: relative;
  z-index: 30;
}

.voucher-line label:has(.voucher-account-picker.is-open),
.voucher-account-picker.is-open {
  position: relative;
  z-index: 31;
  overflow: visible;
}

.voucher-account-picker.is-open .voucher-account-picker-list {
  z-index: 32;
  max-height: 230px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(25, 60, 89, 0.22);
}

/* Reconciliation centre: compact account scan without inheriting the larger
   dashboard-panel rhythm. */
.reconciliation-panel { padding: 16px 18px 18px; }
.reconciliation-panel .panel-header {
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}
.reconciliation-panel .panel-header > div { min-width: 0; }
.reconciliation-panel .panel-header .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin: 0 0 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .075em;
  white-space: nowrap;
}
.reconciliation-panel .panel-header h2 {
  margin: 0 0 3px;
  font-size: 22px;
  line-height: 1.12;
}
.reconciliation-panel .panel-header p {
  margin: 0;
  font-size: 12px;
  line-height: 1.38;
}
.reconciliation-panel .panel-header .secondary-btn {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.reconciliation-panel .reconciliation-grid { gap: 10px; }
.reconciliation-panel .reconciliation-account {
  gap: 7px;
  min-height: 0;
  padding: 12px 13px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f8fbfd);
}
.reconciliation-panel .reconciliation-account > div { gap: 0; }
.reconciliation-panel .reconciliation-account > div strong { font-size: 14px; line-height: 1.2; }
.reconciliation-panel .reconciliation-account > div span { font-size: 12px; line-height: 1.25; }
.reconciliation-panel .reconciliation-account dl { gap: 8px; }
.reconciliation-panel .reconciliation-account dt { font-size: 12px; line-height: 1.1; }
.reconciliation-panel .reconciliation-account dd { margin-top: 2px; font-size: 12px; line-height: 1.15; }
.reconciliation-panel .reconciliation-account .secondary-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

@media (max-width: 620px) {
  .reconciliation-panel { padding: 14px; }
  .reconciliation-panel .panel-header { align-items: flex-start; flex-direction: column; }
  .reconciliation-panel .panel-header .secondary-btn { width: 100%; }
}

/* Final compact workflow layout: keep Daily operations dense and aligned. */
.daily-workflow-panel {
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(21, 55, 90, 0.05);
}

.daily-workflow-panel .panel-header {
  min-height: 0;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.daily-workflow-panel .panel-header h2 {
  margin: 0 0 2px;
  font-size: 18px;
}

.daily-workflow-panel .panel-header p {
  margin: 0;
  font-size: 12px;
}

.daily-workflow-panel .workflow-heading-actions {
  display: flex;
  gap: 8px;
}

.daily-workflow-panel .workflow-heading-actions .secondary-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.daily-workflow-panel .workflow-steps {
  gap: 8px;
}

.daily-workflow-panel .workflow-step {
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 5px 8px;
  min-height: 112px;
  padding: 10px;
  border-radius: 12px;
}

.daily-workflow-panel .workflow-step-number {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.daily-workflow-panel .workflow-step strong {
  font-size: 12px;
  line-height: 1.15;
}

.daily-workflow-panel .workflow-step b {
  margin-top: 2px;
  font-size: 18px;
}

.daily-workflow-panel .workflow-step small {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
}

.daily-workflow-panel .workflow-step-action {
  min-height: 27px;
  padding: 4px 7px;
  font-size: 12px;
}

.daily-workflow-panel .workflow-step-action i {
  font-size: 12px;
}

@media (max-width: 760px) {
  .daily-workflow-panel { padding: 13px; }
  .daily-workflow-panel .panel-header { gap: 10px; }
  .daily-workflow-panel .workflow-heading-actions { width: 100%; }
  .daily-workflow-panel .workflow-heading-actions .secondary-btn { flex: 1; }
}

/* The IPO picker is a separate browse state, not a compressed transaction table. */
.application-register-panel.is-ipo-picker .application-register-wrap {
  padding: 14px;
  overflow: visible;
  background: #f7fafc;
}

.application-register-panel.is-ipo-picker .applications-table {
  min-width: 0;
  table-layout: auto;
  border-spacing: 0;
}

.application-register-panel.is-ipo-picker .applications-table thead,
.application-register-panel.is-ipo-picker .applications-table tbody,
.application-register-panel.is-ipo-picker .applications-table tr,
.application-register-panel.is-ipo-picker .applications-table th,
.application-register-panel.is-ipo-picker .applications-table td {
  display: block;
  width: auto !important;
}

.application-register-panel.is-ipo-picker .applications-table thead tr {
  display: grid;
  grid-template-columns: 28px minmax(160px, 1fr) minmax(190px, 1.2fr) repeat(4, minmax(100px, 0.62fr));
  gap: 10px;
  align-items: end;
  padding: 0 4px 12px;
}

.application-register-panel.is-ipo-picker .applications-table th {
  min-width: 0;
  height: auto;
  padding: 0;
  text-align: left;
}

.application-register-panel.is-ipo-picker .applications-table th:first-child {
  display: grid;
  place-items: end center;
  min-height: 30px;
}

.application-register-panel.is-ipo-picker .applications-table th:nth-child(4),
.application-register-panel.is-ipo-picker .applications-table th:nth-child(9) {
  display: none;
}

.application-register-panel.is-ipo-picker .applications-table .filterable-header {
  display: grid;
  gap: 5px;
}

.application-register-panel.is-ipo-picker .applications-table .filterable-header > span {
  overflow: visible;
  color: #607a92;
  font-size: 12px;
  letter-spacing: 0.07em;
  line-height: 1.1;
  text-overflow: clip;
  white-space: nowrap;
}

.application-register-panel.is-ipo-picker .application-header-filter {
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 28px 0 10px;
  font-size: 12px;
}

.application-register-panel.is-ipo-picker .application-register-collapsed td {
  padding: 0 !important;
}

.application-register-panel.is-ipo-picker .application-register-picker {
  gap: 12px;
  padding: 18px 14px 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fbfdff, #f1f7fb);
}

.application-register-panel.is-ipo-picker .application-register-picker > div:first-child {
  text-align: center;
}

.application-register-panel.is-ipo-picker .application-register-picker > div:first-child strong {
  font-size: 16px;
}

.application-register-panel.is-ipo-picker .application-ipo-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.application-register-panel.is-ipo-picker .application-ipo-summary-card {
  min-width: 0;
  min-height: 116px;
  padding: 15px;
  align-content: start;
  border-radius: 12px;
}

.application-register-panel.is-ipo-picker .application-ipo-summary-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.application-register-panel.is-ipo-picker .application-old-ipo-section {
  gap: 10px;
  padding-top: 12px;
}

@media (max-width: 1050px) {
  .application-register-panel.is-ipo-picker .applications-table thead tr {
    grid-template-columns: 28px repeat(3, minmax(150px, 1fr));
  }

  .application-register-panel.is-ipo-picker .application-ipo-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .application-register-panel.is-ipo-picker .applications-table thead tr,
  .application-register-panel.is-ipo-picker .application-ipo-summary-grid {
    grid-template-columns: 1fr;
  }

  .application-register-panel.is-ipo-picker .applications-table th:first-child {
    display: none;
  }
}

/* Clear responsibility split: snapshot above, exceptions here, entry forms in Daily operations. */
.daily-workflow-panel .workflow-step {
  min-height: 128px;
  padding: 12px;
}
.daily-workflow-panel .workflow-step b { font-size: 22px; }
.daily-workflow-panel .workflow-step small { margin-top: 5px; }

@media (max-width: 760px) {
  .command-center-clear { align-items: flex-start; flex-direction: column; }
}

/* Final compact workflow layout: an NSE-style operational strip, not a dashboard. */
.daily-workflow-panel {
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(23, 50, 77, .035);
}
.daily-workflow-panel .panel-header {
  min-height: 0;
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.daily-workflow-panel .panel-header h2 { margin: 0 0 2px; font-size: 18px; }
.daily-workflow-panel .panel-header p { margin: 0; font-size: 12px; }
.daily-workflow-panel .workflow-heading-actions { display: flex; gap: 8px; }
.daily-workflow-panel .workflow-heading-actions .secondary-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}
.daily-workflow-panel .workflow-steps { gap: 8px; }
.daily-workflow-panel .workflow-step {
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 5px 8px;
  min-height: 112px;
  padding: 10px;
  border-radius: 12px;
}
.daily-workflow-panel .workflow-step-number { width: 24px; height: 24px; font-size: 12px; }
.daily-workflow-panel .workflow-step strong { font-size: 12px; line-height: 1.15; }
.daily-workflow-panel .workflow-step b { margin-top: 2px; font-size: 18px; }
.daily-workflow-panel .workflow-step small { margin-top: 3px; font-size: 12px; line-height: 1.3; }
.daily-workflow-panel .workflow-step-action { min-height: 27px; padding: 4px 7px; font-size: 12px; }
.daily-workflow-panel .workflow-step-action i { font-size: 12px; }

@media (max-width: 760px) {
  .daily-workflow-panel { padding: 13px; }
  .daily-workflow-panel .panel-header { gap: 10px; }
  .daily-workflow-panel .workflow-heading-actions { width: 100%; }
  .daily-workflow-panel .workflow-heading-actions .secondary-btn { flex: 1; }
}

/* Bank statement reconciliation keeps the review list compact and readable. */
.edit-dialog.bank-statement-dialog {
  width: min(1040px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}

.bank-statement-dialog-shell {
  display: grid;
  gap: 16px;
  max-width: none;
  padding: 24px 26px;
}

.bank-statement-dialog .dialog-title-row { align-items: flex-start; }
.bank-statement-dialog .dialog-title-row h3 { margin: 4px 0 5px; }
.bank-statement-dialog .dialog-title-row p:not(.eyebrow) { max-width: 630px; }

.bank-statement-upload-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr);
  gap: 14px;
}

.bank-statement-upload-grid label,
.bank-statement-toggle {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
}

.bank-statement-upload-grid input,
.bank-statement-upload-grid select { width: 100%; min-width: 0; }

.bank-statement-toggle {
  display: flex;
  align-items: center;
  color: var(--text);
  font-weight: 650;
}

.bank-statement-toggle input { width: 16px; height: 16px; accent-color: var(--primary); }

.bank-statement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bank-statement-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #dce8f1;
  border-radius: 12px;
  background: #f8fbfd;
  color: #5c7489;
  font-size: 12px;
  font-weight: 800;
}

.bank-statement-stat strong { color: #193d5d; font-size: 22px; letter-spacing: -.03em; }
.bank-statement-stat.is-warning { border-color: #f3d7a1; background: #fffaf0; }
.bank-statement-stat.is-warning strong { color: #a4610a; }

.bank-statement-table-wrap { max-height: min(400px, 45vh); overflow: auto; border-radius: 12px; }
.bank-statement-reconciliation-table { width: 100%; min-width: 760px; table-layout: fixed; }
.bank-statement-reconciliation-table th:nth-child(1) { width: 112px; }
.bank-statement-reconciliation-table th:nth-child(3) { width: 125px; }
.bank-statement-reconciliation-table th:nth-child(4) { width: 110px; }
.bank-statement-reconciliation-table th:nth-child(5) { width: 240px; }
.bank-statement-reconciliation-table td { vertical-align: middle; font-size: 13px; }
.bank-statement-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-statement-amount { font-weight: 800; white-space: nowrap; }
.bank-statement-direction { color: #557087; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.bank-statement-match { display: grid; gap: 2px; }
.bank-statement-match strong { color: #177e45; font-size: 12px; }
.bank-statement-match span { color: #6d8293; font-size: 12px; }
.bank-statement-unmatched { color: #a4610a; font-size: 12px; font-weight: 800; }

.application-templates-dialog { width: min(720px, calc(100vw - 28px)); }
.application-templates-shell { display: grid; gap: 14px; max-width: none; padding: 24px 26px; }
.application-templates-list { display: grid; gap: 8px; max-height: min(440px, 55vh); overflow: auto; }
.application-template-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid #dce7f0; border-radius: 12px; background: #fbfdff; }
.application-template-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.application-template-row strong { color: #1c405f; font-size: 13px; }
.application-template-row span { overflow: hidden; color: #667f93; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.application-template-row > div:last-child { display: flex; gap: 6px; flex-shrink: 0; }
.application-template-row .secondary-btn { min-height: 34px; padding: 6px 9px; font-size: 12px; }
@media (max-width: 720px) { .application-templates-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); } .application-templates-shell { padding: 18px; } .application-template-row { align-items: stretch; flex-direction: column; } .application-template-row > div:last-child { width: 100%; } .application-template-row .secondary-btn { flex: 1; } }

@media (max-width: 720px) {
  .edit-dialog.bank-statement-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .bank-statement-dialog-shell { padding: 18px; }
  .bank-statement-upload-grid,
  .bank-statement-summary { grid-template-columns: 1fr; }
  .bank-statement-table-wrap { max-height: 42vh; }
}

/* Final workspace polish: quiet surfaces, tighter rhythm, and clearer hierarchy. */
.erp-shell {
  --shadow: 0 8px 24px rgba(15, 52, 96, 0.06);
}

.erp-shell .top-nav-tabs {
  gap: 6px;
  padding: 6px;
  border-color: rgba(199, 216, 234, 0.88);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 52, 96, 0.055);
  backdrop-filter: blur(12px);
}

.erp-shell .nav-tab {
  min-height: 36px;
  padding: 8px 11px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
}

.erp-shell .nav-tab:hover {
  background: #f2f7fc;
  border-color: #e1ebf4;
}

.erp-shell .nav-tab.active {
  border-color: #c5dcf7;
  background: linear-gradient(135deg, #e8f3ff, #f5faff);
  box-shadow: 0 3px 10px rgba(20, 99, 184, 0.09);
}

.erp-shell .nav-old-ipo-shortcut {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid #d8e6f0;
  background: #f7fbfe;
  color: #2a648e;
  cursor: pointer;
  font: inherit;
}

.erp-shell .nav-old-ipo-shortcut:hover { border-color: #a9cce2; background: #eef7fc; }

.erp-shell .panel {
  padding: 17px 18px;
  border-radius: 12px;
}

.erp-shell .panel-header {
  margin-bottom: 13px;
  padding-bottom: 10px;
}

.erp-shell .panel-header h2::before {
  width: 3px;
  background: linear-gradient(180deg, #1d75c9, #159286);
}

.erp-shell .cards {
  gap: 11px;
  margin-bottom: 14px;
}

.erp-shell .card {
  min-height: 104px;
  padding: 13px 15px;
  border-radius: 12px;
}

.erp-shell .card p {
  margin-bottom: 5px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.erp-shell .card h3 {
  font-size: clamp(22px, 2vw, 27px);
}

.erp-shell input,
.erp-shell select {
  min-height: 40px;
  border-color: #cdddeb;
  border-radius: 12px;
  background: #fbfdff;
}

.erp-shell input:hover,
.erp-shell select:hover {
  border-color: #a9c8e5;
}

.erp-shell .primary-btn,
.erp-shell .secondary-btn {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12px;
}

.erp-shell .secondary-btn {
  border-color: #d2e0ec;
  background: #f8fbfd;
}

.erp-shell .table-wrap {
  border-color: #dbe7f0;
  border-radius: 12px;
}

.erp-shell th {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
  letter-spacing: 0.07em;
}

.erp-shell td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.erp-shell .status-pill,
.erp-shell .badge {
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.045em;
}

.erp-shell .simple-form,
.erp-shell .focus-box {
  border-radius: 12px;
  box-shadow: none;
}

.erp-shell .simple-form::before,
.erp-shell .focus-box::before {
  width: 28px;
  height: 3px;
  margin-bottom: 8px;
}

.tab-section.active {
  animation: workspace-reveal 180ms ease-out both;
}

@keyframes workspace-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  background: linear-gradient(180deg, #f7fbff 0%, #edf5fd 100%);
}

th,
td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid #e5eef8;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: rgba(245, 249, 253, 0.65);
}

tbody tr:hover {
  background: rgba(232, 241, 255, 0.6);
}

th {
  color: #4e6983;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

td {
  color: #183552;
}

td a {
  color: var(--brand-strong);
  text-decoration: none;
  font-weight: 700;
}

td a:hover {
  text-decoration: underline;
}

.danger {
  color: var(--danger);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

input,
select,
button,
.secondary-btn {
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.simple-form input,
.simple-form select,
.simple-form button,
.simple-form .hint-box {
  width: 100%;
  min-width: 0;
}

input:focus,
select:focus,
button:focus,
.secondary-btn:focus {
  outline: none;
  border-color: #8cb5f3;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 800;
  border: none;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
button:hover {
  transform: translateY(-1px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
  color: #21476e;
  font-weight: 700;
}

.danger-btn {
  background: #fff1f1;
  border-color: #f7c9c9;
  color: #991b1b;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.inline-filter {
  white-space: nowrap;
}

.checkbox input {
  width: auto;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.badge-high,
.status-bad {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.badge-medium,
.status-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5a08;
}

.badge-low,
.badge-neutral {
  background: rgba(37, 99, 235, 0.1);
  color: #2156a9;
}

.status-good {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.status-neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #52667a;
}

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

.note-panel ul {
  margin-bottom: 0;
}

details.panel > summary {
  list-style: none;
}

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

.edit-dialog {
  width: min(600px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 52, 96, 0.24);
}

.edit-dialog::backdrop {
  background: rgba(15, 35, 58, 0.38);
}

.od-transaction-edit-dialog {
  z-index: 20;
  width: min(1080px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  overflow-x: hidden;
}

.od-transaction-edit-dialog::backdrop {
  background: rgba(15, 35, 58, 0.18);
}

.od-transaction-edit-dialog .edit-account-form,
.od-transaction-edit-dialog #odTransactionEditFields,
.od-transaction-edit-dialog label {
  min-width: 0;
  max-width: 100%;
}

.od-transaction-edit-dialog #odTransactionEditFields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.od-transaction-edit-dialog input,
.od-transaction-edit-dialog select {
  width: 100%;
  min-width: 0;
}

.edit-account-form {
  padding: 24px;
}

.dialog-title-row {
  grid-column: span 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-title-row h3,
.dialog-title-row p {
  margin: 0;
}

.dialog-title-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* A focused return composer with a stable, app-like action bar. */
.plan-refund-dialog {
  width: min(680px, calc(100vw - 28px));
  border-color: #d6e2ee;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(15, 52, 96, 0.22);
}

.plan-refund-form {
  gap: 16px;
  padding: 28px;
}

.plan-refund-dialog .dialog-title-row {
  align-items: center;
  padding-bottom: 2px;
}

.plan-refund-dialog .dialog-title-row h3 {
  font-size: 28px;
  letter-spacing: -0.035em;
}

.plan-refund-dialog .dialog-title-row p {
  max-width: 390px;
  font-size: 13px;
  line-height: 1.45;
}

.plan-refund-dialog label {
  gap: 7px;
  color: #526b83;
  font-size: 12px;
  letter-spacing: 0.025em;
}

.plan-refund-dialog input,
.plan-refund-dialog select {
  height: 48px;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.plan-refund-dialog input[readonly] {
  border-color: #e0e9f2;
  background: #f7fafd;
  color: #36516b;
}

.plan-refund-dialog .dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  padding-top: 17px;
  border-top: 1px solid #e5edf4;
}

.plan-refund-dialog .dialog-actions button {
  min-height: 42px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.plan-refund-dialog #viewRefundApplicantLedgerBtn {
  justify-self: start;
  border-color: transparent;
  background: #edf5fc;
  color: #1c5b94;
}

.plan-refund-dialog #cancelPlanRefundBtn { background: #fff; color: #49657d; }
.plan-refund-dialog .primary-btn { min-width: 118px; box-shadow: 0 5px 12px rgba(11, 79, 148, 0.18); }

@media (max-width: 640px) {
  .plan-refund-dialog { width: calc(100vw - 20px); }
  .plan-refund-form { grid-template-columns: 1fr; gap: 13px; padding: 20px; }
  .plan-refund-dialog .dialog-title-row { grid-column: span 1; align-items: flex-start; }
  .plan-refund-dialog .dialog-actions { grid-column: span 1; grid-template-columns: 1fr; gap: 8px; }
  .plan-refund-dialog .dialog-actions button,
  .plan-refund-dialog #viewRefundApplicantLedgerBtn { width: 100%; justify-self: stretch; }
}

.balance-batch-form {
  display: grid;
  gap: 12px;
}

.balance-shortcut-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #c9def7;
  background: linear-gradient(100deg, #f7fbff, #ecf5ff);
}

.balance-shortcut-panel h2 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.balance-shortcut-panel p:last-child {
  margin: 0;
  color: var(--muted);
}

.balance-batch-form td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.balance-batch-input {
  min-width: 160px;
  margin: 0;
}

.balance-batch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

/* Balance reconciliation needs a wider, denser register than a normal form. */
.balance-update-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.balance-update-dialog .edit-account-form {
  max-height: calc(100dvh - 28px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 20px;
  overflow: hidden;
}

.balance-update-dialog .dialog-title-row { margin-bottom: 0; }
.balance-update-dialog .dialog-title-row h3 { margin-bottom: 4px; }
.balance-update-dialog .dialog-title-row p { margin: 0; }
.balance-update-dialog .balance-effective-date { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(190px, 280px) 1fr; gap: 4px 14px; align-items: center; margin: 0; }
.balance-update-dialog .balance-date-control { grid-column: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.balance-update-dialog .balance-effective-date input { width: 100%; min-height: 36px; }
.balance-update-dialog .balance-date-control .secondary-btn { min-height: 36px; padding: 7px 11px; font-size: 13px; white-space: nowrap; }
.balance-update-dialog .balance-effective-date small { grid-column: 2; color: var(--muted); font-size: 13px; line-height: 1.35; }
.balance-update-dialog .table-wrap { min-height: 0; max-height: none; overflow: auto; }
.balance-update-dialog table { width: 100%; table-layout: fixed; }
.balance-update-dialog th,
.balance-update-dialog td { padding: 5px 12px; }
.balance-update-dialog th:nth-child(1),
.balance-update-dialog td:nth-child(1) { width: 52%; }
.balance-update-dialog th:nth-child(2),
.balance-update-dialog td:nth-child(2) { width: 24%; white-space: nowrap; }
.balance-update-dialog th:nth-child(3),
.balance-update-dialog td:nth-child(3) { width: 24%; }
.balance-update-dialog td small { display: inline; margin: 0 0 0 6px; }
.balance-update-dialog .balance-batch-input { width: 100%; min-width: 0; height: 36px; padding: 6px 10px; }
.balance-update-dialog .dialog-actions { margin-top: 0; }

.balance-update-choice-dialog { width: min(720px, calc(100vw - 36px)); }
.balance-update-choice-dialog .edit-account-form { display: grid; gap: 16px; padding: 24px; }
.balance-update-choice-dialog .dialog-title-row { display: flex; }
.balance-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.balance-choice-card { display: grid; gap: 8px; min-height: 156px; padding: 18px; text-align: left; border: 1px solid #cddfed; border-radius: 16px; background: #fff; color: #173b5c; cursor: pointer; }
.balance-choice-card:hover, .balance-choice-card:focus-visible { border-color: #2473c6; background: #f4f9ff; box-shadow: 0 10px 26px rgba(31, 94, 151, .12); outline: none; }
.balance-choice-card strong { font-size: 16px; line-height: 1.25; }
.balance-choice-card span { color: #647b90; font-size: 13px; line-height: 1.45; font-weight: 600; }

/* Batch funding keeps several ledger entries visible and editable in one review window. */
.batch-funding-dialog {
  width: min(1240px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.batch-funding-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-height: calc(100dvh - 28px);
  padding: 18px 20px;
  overflow: hidden;
}

.batch-funding-form .dialog-title-row,
.batch-funding-form .batch-funding-table-wrap,
.batch-funding-form .batch-funding-footer,
.batch-funding-form .hint-box,
.batch-funding-form .dialog-actions { grid-column: 1; }

.batch-funding-table-wrap {
  min-height: 0;
  max-height: min(50dvh, 470px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.batch-funding-dialog table { width: 100%; min-width: 0; table-layout: fixed; }
.batch-funding-dialog th,
.batch-funding-dialog td { padding: 7px 8px; vertical-align: middle; }
.batch-funding-dialog th:nth-child(1) { width: 27%; }
.batch-funding-dialog th:nth-child(2),
.batch-funding-dialog th:nth-child(3) { width: 18%; }
.batch-funding-dialog th:nth-child(4) { width: 13%; }
.batch-funding-dialog th:nth-child(5) { width: 10%; }
.batch-funding-dialog th:nth-child(6) { width: 12%; }
.batch-funding-dialog th:nth-child(7) { width: 42px; }
.batch-funding-dialog select,
.batch-funding-dialog input { width: 100%; min-width: 0; height: 36px; margin: 0; padding: 6px 8px; font-size: 12px; }
.batch-funding-dialog select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-funding-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.batch-funding-total { color: var(--brand-strong); font-size: 14px; white-space: nowrap; }
.batch-remove-row-btn { width: 30px; height: 30px; border: 1px solid #f0c5c7; border-radius: 50%; background: #fff7f7; color: #be3340; font-size: 18px; line-height: 1; cursor: pointer; }
.batch-remove-row-btn:hover { background: #ffeaea; }

.return-todo-panel { border-color: #f2d6a3; background: linear-gradient(110deg, #fffdf7, #fff8e9); }
.return-todo-list { display: grid; gap: 8px; }
.return-todo-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border: 1px solid #f0dfb6; border-radius: 12px; background: #fff; }
.return-todo-row strong,
.return-todo-row span,
.return-todo-row small { display: block; }
.return-todo-row span { margin-top: 2px; color: var(--text); font-weight: 700; }
.return-todo-row small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.return-todo-row .primary-btn { min-width: 132px; }

.closing-celebration-panel { padding: 0; border: 0; background: transparent; }
.closing-celebration-card { padding: 16px 20px; border: 1px solid #a7d9bc; border-radius: 12px; color: #135b37; background: linear-gradient(105deg, #e9f9ef, #f8fff9); box-shadow: 0 8px 22px rgba(22, 121, 70, 0.08); }
.closing-celebration-card span { display: block; margin-bottom: 3px; color: #238250; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.closing-celebration-card strong { font-size: 16px; }
.closing-celebration-card p { margin: 3px 0 0; }

.application-checklist-dialog { width: min(1080px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; }
.application-checklist-form { display: grid; gap: 12px; max-height: calc(100dvh - 28px); padding: 18px 20px; overflow: hidden; }
.application-checklist-table-wrap { min-height: 0; max-height: min(55dvh, 500px); overflow: auto; }
.application-checklist-dialog table { width: 100%; min-width: 960px; table-layout: fixed; }
.application-checklist-dialog th,
.application-checklist-dialog td { padding: 7px 9px; vertical-align: middle; }
.application-checklist-dialog th:nth-child(1) { width: 8%; }
.application-checklist-dialog th:nth-child(2) { width: 18%; }
.application-checklist-dialog th:nth-child(3) { width: 22%; }
.application-checklist-dialog th:nth-child(4) { width: 11%; }
.application-checklist-dialog th:nth-child(5) { width: 14%; }
.application-checklist-dialog th:nth-child(6),
.application-checklist-dialog th:nth-child(7) { width: 13.5%; }
.application-checklist-dialog select { width: 100%; min-width: 0; height: 35px; margin: 0; padding: 6px 8px; font-size: 12px; }

.old-ipo-planner-dialog { width: min(1120px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; }
.old-ipo-planner-form { display: grid; gap: 12px; max-height: calc(100dvh - 28px); padding: 18px 20px; overflow: hidden; }
.old-ipo-planner-rows { display: grid; gap: 10px; min-height: 0; overflow: auto; }
.old-ipo-planner-row { padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-soft); }
.old-ipo-main-fields { display: grid; grid-template-columns: 1.35fr 1.45fr 1.15fr 32px; gap: 9px; align-items: end; }
.old-ipo-main-fields label, .old-ipo-add-source-label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.old-ipo-main-fields select, .old-ipo-funding-source select, .old-ipo-funding-source input, .old-ipo-add-source-label select { width: 100%; min-width: 0; height: 35px; margin: 0; padding: 6px 8px; font-size: 12px; }
.old-ipo-funding-area { display: grid; gap: 7px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.old-ipo-funding-area > strong { font-size: 12px; }
.old-ipo-source-list { display: grid; gap: 7px; }
.old-ipo-funding-source { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, .7fr) 30px; gap: 8px; }
.old-ipo-remove-row, .old-ipo-remove-source { width: 30px; height: 30px; border: 1px solid #f0c5c7; border-radius: 50%; background: #fff7f7; color: #be3340; font-size: 18px; line-height: 1; cursor: pointer; }
.old-ipo-own-balance { color: var(--muted); font-size: 12px; }
.old-ipo-planner-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .old-ipo-planner-dialog { width: calc(100vw - 18px); }
  .old-ipo-planner-form { padding: 16px; }
  .old-ipo-main-fields { grid-template-columns: 1fr; }
  .old-ipo-main-fields .old-ipo-remove-row { justify-self: end; }
  .old-ipo-planner-footer { align-items: stretch; flex-direction: column; }
  .old-ipo-planner-footer .secondary-btn { width: 100%; }
}

@media (max-width: 720px) {
  .return-todo-row { align-items: stretch; flex-direction: column; }
  .return-todo-row .primary-btn { width: 100%; }
  .application-checklist-dialog { width: calc(100vw - 18px); }
  .application-checklist-form { padding: 16px; }
}

@media (max-width: 720px) {
  .batch-funding-dialog { width: calc(100vw - 18px); }
  .batch-funding-form { padding: 16px; }
  .batch-funding-footer { align-items: stretch; flex-direction: column; }
  .batch-funding-footer .secondary-btn { width: 100%; }
}

@media (max-width: 640px) {
  .balance-update-dialog { width: calc(100vw - 20px); }
  .balance-update-dialog .edit-account-form { padding: 16px; }
  .balance-update-dialog th,
  .balance-update-dialog td { padding: 7px 8px; }
  .balance-update-dialog td small { display: block; margin: 2px 0 0; }
  .balance-update-dialog .balance-effective-date { display: block; }
  .balance-update-dialog .balance-date-control { display: grid; margin-top: 5px; }
  .balance-update-dialog .balance-effective-date small { display: block; margin-top: 5px; }
  .balance-choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .balance-shortcut-panel { align-items: stretch; flex-direction: column; }
  .balance-shortcut-panel .primary-btn { width: 100%; }
  .balance-batch-actions { align-items: stretch; flex-direction: column; }
  .balance-batch-actions .primary-btn { width: 100%; }
}

.allotment-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid #b9e4cc;
  border-radius: 22px;
  padding: 0;
  text-align: center;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 52, 96, 0.24);
}

.allotment-dialog::backdrop {
  background: rgba(15, 35, 58, 0.45);
}

.allotment-dialog-content {
  padding: 28px;
}

.celebration-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 44px;
  background: #e9f9ef;
}

.celebration-logo.is-celebrating {
  animation: celebration-pop 700ms ease-out both;
}

.allotment-dialog h2 {
  margin: 0;
}

.allotment-dialog p {
  color: var(--muted);
  line-height: 1.5;
}

.allotment-list {
  margin: 18px 0;
  text-align: left;
}

.allotment-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.allotment-row span {
  color: var(--muted);
  font-size: 13px;
}

@keyframes celebration-pop {
  0% { transform: scale(0.6) rotate(-14deg); opacity: 0; }
  65% { transform: scale(1.12) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ERP workspace layout */
.erp-shell {
  max-width: none;
  min-height: 100vh;
  padding-left: 286px;
}

.erp-shell .top-nav-tabs {
  position: fixed;
  inset: 16px auto 16px 16px;
  z-index: 50;
  width: 246px;
  margin: 0;
  padding: 16px 12px;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 5px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  color: #17324d;
}

.sidebar-brand strong,
.sidebar-brand small { display: block; }

.sidebar-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.sidebar-label {
  margin: 12px 8px 5px;
  color: #7990a7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.nav-spacer { flex: 1; min-height: 10px; }

.profile-menu { position: relative; margin: 8px 4px 2px; }
.profile-menu-btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #dbe7f0;
  border-radius: 12px;
  background: #f8fbfd;
  color: #234765;
  text-align: left;
  cursor: pointer;
}
.profile-menu-btn:hover,
.profile-menu-btn[aria-expanded="true"] { border-color: #9ec5e9; background: #edf6ff; }
.profile-menu-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #1769aa, #159b91); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.profile-menu-btn strong, .profile-menu-btn small { display: block; }
.profile-menu-btn strong { overflow: hidden; max-width: 145px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-btn small { margin-top: 2px; color: #71879b; font-size: 12px; font-weight: 700; }
.profile-menu-chevron { margin-left: auto; color: #6a849c; font-size: 16px; line-height: 1; }
.profile-menu-panel { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 80; width: 190px; padding: 12px; border: 1px solid #d6e2d8; border-radius: 12px; background: rgba(255, 255, 255, .98); box-shadow: 0 14px 30px rgba(23, 59, 99, .16); }
.profile-menu-panel[hidden] { display: none; }
.profile-menu-caption { margin: 0 0 4px; color: #7790a7; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.profile-menu-panel > strong { display: block; overflow: hidden; color: #19362f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.profile-logout-btn { width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid #f0c7c7; border-radius: 8px; background: #fff8f8; color: #b33d42; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.profile-logout-btn:hover { border-color: #db8f91; background: #fff0f0; }

.erp-shell .nav-tab {
  width: 100%;
  min-height: 43px;
  justify-content: flex-start;
  padding: 10px 13px;
  border-color: transparent;
  background: transparent;
  border-radius: 12px;
  font-size: 13px;
}

.erp-shell .nav-tab:hover {
  background: #edf5ff;
  border-color: #dceafa;
}

.erp-shell .nav-tab.active {
  color: #164d99;
  background: linear-gradient(90deg, #e5f0ff, #f4f8ff);
  border-color: #cbdffc;
  box-shadow: none;
}

.erp-shell .top-strip {
  min-height: 48px;
  padding: 2px 4px 14px;
}

.erp-shell .top-strip-links { gap: 7px; }

.erp-shell .strip-pill {
  padding: 6px 10px;
  font-size: 12px;
}

.erp-shell .hero {
  min-height: 0;
  padding: 20px 24px;
  margin-bottom: 18px;
  border-radius: 16px;
}

.erp-shell .hero h1 {
  max-width: 830px;
  font-size: 28px;
  margin-bottom: 7px;
}

.erp-shell .hero .eyebrow { margin-bottom: 7px; }

.erp-shell .hero .subtext {
  margin-bottom: 0;
  font-size: 13px;
}

.erp-shell .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 360px;
}

.erp-shell .hero-actions > * { min-width: 120px; }

/* Dashboard hero: a compact financial-command-center treatment. */
.erp-shell .simple-hero {
  min-height: 300px;
  padding: 38px 42px;
  border: 0;
  border-radius: 22px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 78% 24%, rgba(35, 108, 178, 0.48), transparent 31%),
    linear-gradient(122deg, #071c34 0%, #0b2d51 56%, #0d3c66 100%);
  box-shadow: 0 22px 46px rgba(9, 35, 62, 0.19);
}

.dashboard-market-rail[hidden] { display: none; }

/* The rail belongs to Dashboard only, even when a tab is opened directly by URL. */
.erp-shell:has(.tab-section[data-tab-panel="overview"].active) .dashboard-market-rail:not([hidden]) {
  display: grid;
}

.erp-shell:has(.tab-section[data-tab-panel]:not([data-tab-panel="overview"]).active) .dashboard-market-rail {
  display: none !important;
}

.erp-shell .simple-hero::after {
  inset: auto -54px -112px auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(104, 188, 255, 0.24), rgba(104, 188, 255, 0.03) 56%, transparent 70%);
}

.erp-shell .simple-hero > .market-motif {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  color: #a9dcff;
  pointer-events: none;
}

.market-chart {
  position: absolute;
  right: 10%;
  bottom: -10%;
  width: min(56%, 650px);
  opacity: 0.14;
}

.market-animal {
  position: absolute;
  width: 158px;
  opacity: 0.16;
}

.market-bull {
  right: 40%;
  bottom: 12%;
  color: #96e7be;
  transform: rotate(-8deg);
}

.market-bear {
  right: 12%;
  top: 11%;
  color: #efb0aa;
  transform: rotate(7deg);
}

.market-motif-label {
  position: absolute;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  opacity: 0.28;
}

.bull-label {
  right: 48%;
  bottom: 9%;
  color: #9deac1;
}

.bear-label {
  right: 16%;
  top: 10%;
  color: #f1bbb4;
}

.erp-shell .simple-hero h1 {
  max-width: 690px;
  margin: 0 0 16px;
  color: #ffffff;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(39px, 4.2vw, 61px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.052em;
}

.erp-shell .simple-hero .eyebrow {
  margin-bottom: 17px;
  padding: 7px 11px;
  border: 1px solid rgba(183, 219, 255, 0.28);
  background: rgba(152, 202, 255, 0.12);
  color: #c9e4ff;
}

.erp-shell .simple-hero .subtext {
  max-width: 590px;
  color: #c9d9e9;
  font-size: 14px;
  line-height: 1.6;
}

.erp-shell .simple-hero .hero-actions {
  display: block;
  min-width: 292px;
  padding: 16px;
  border: 1px solid rgba(208, 231, 255, 0.18);
  border-radius: 16px;
  background: rgba(2, 21, 42, 0.25);
  backdrop-filter: blur(10px);
}

.hero-actions-label {
  margin: 0 0 10px;
  color: #abc9e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

.erp-shell .hero-action-grid > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  text-decoration: none;
}

.erp-shell .hero-action-grid #syncIpojiBtn {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 1px solid #8ac5ff;
  color: #05213c;
  background: #c7e7ff;
  box-shadow: none;
}

.erp-shell .hero-action-grid .secondary-btn {
  border-color: rgba(208, 231, 255, 0.24);
  color: #e7f3ff;
  background: rgba(255, 255, 255, 0.07);
}

.erp-shell .hero-action-grid .secondary-btn:hover {
  border-color: rgba(208, 231, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
}

/* Refined market rail: restrained tones, live indicators, and a small bullish crest. */
.erp-shell .simple-hero {
  min-height: 126px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: center;
  gap: 22px;
  color: #1b3148;
  border: 1px solid #cfe0f1;
  border-left: 4px solid var(--brand);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 37px, rgba(20, 99, 184, 0.05) 38px);
  box-shadow: 0 12px 28px rgba(20, 99, 184, 0.08);
}

.erp-shell .simple-hero::after { display: none; }

.erp-shell .simple-hero > .market-motif {
  color: var(--accent);
  opacity: 1;
}

.erp-shell .simple-hero h1 {
  max-width: none;
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: #18334e;
}

.erp-shell .simple-hero .eyebrow {
  margin-bottom: 6px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
}

.hero-live-dot,
.indicator-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px 1px 7px;
  border-radius: 50%;
  background: #6cb6f1;
  box-shadow: 0 0 0 3px rgba(108, 182, 241, 0.12);
}

.hero-live-dot { background: #1e9a5b; box-shadow: 0 0 0 3px rgba(30, 154, 91, 0.14); }
.indicator-dot.bullish { background: #1e9a5b; box-shadow: 0 0 0 3px rgba(30, 154, 91, 0.14); }

.erp-shell .simple-hero .subtext {
  max-width: 630px;
  color: #61758a;
  font-size: 12px;
  line-height: 1.35;
}

.hero-market-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.hero-market-indicators span {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid #d9e4ec;
  border-radius: 8px;
  background: #ffffff;
  color: #66798b;
  font-size: 12px;
  font-weight: 700;
}

.hero-market-indicators .indicator-dot { margin-left: 0; }
.hero-market-indicators strong { margin-left: 5px; color: #28445d; font-weight: 800; }

.erp-shell .simple-hero .hero-actions {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dae5ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.hero-actions-label { margin-bottom: 6px; color: var(--brand-strong); }
.hero-action-grid { gap: 6px; }

.erp-shell .hero-action-grid > * {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.erp-shell .hero-action-grid #syncIpojiBtn {
  min-height: 34px;
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.erp-shell .hero-action-grid .secondary-btn {
  border-color: #d6e1e9;
  color: #36526b;
  background: #f8fbfd;
}

.market-bull {
  right: 34%;
  bottom: 13%;
  width: 78px;
  opacity: 0.15;
}

.bull-label { right: 35.2%; bottom: 10%; color: var(--accent); font-size: 12px; }
.market-chart { right: 12%; bottom: -77%; width: min(42%, 500px); opacity: 0.07; }

/* IPO Market Desk: quiet editorial surfaces with a live company-logo watchlist. */
.erp-shell .simple-hero {
  grid-template-columns: minmax(280px, 1.12fr) minmax(310px, 0.88fr) 218px;
  gap: 16px;
  padding: 17px 18px 17px 24px;
  border: 1px solid rgba(194, 216, 234, 0.96);
  border-left: 4px solid #1874c5;
  border-radius: 22px;
  background:
    radial-gradient(circle at 59% 4%, rgba(117, 191, 228, 0.15), transparent 29%),
    linear-gradient(135deg, #ffffff 0%, #f5faff 52%, #edf7f7 100%);
  box-shadow: 0 16px 38px rgba(18, 79, 130, 0.09), inset 0 1px rgba(255, 255, 255, 0.95);
}

.erp-shell .simple-hero > .market-motif { display: none; }

.erp-shell .simple-hero h1 {
  max-width: 460px;
  margin-bottom: 5px;
  color: #183851;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.15vw, 33px);
  font-weight: 600;
  letter-spacing: -0.052em;
}

.erp-shell .simple-hero .subtext { max-width: 470px; color: #62798e; }

.market-logo-shelf {
  align-self: stretch;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(202, 222, 234, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95), 0 8px 20px rgba(37, 97, 143, 0.05);
  backdrop-filter: blur(14px);
}

.market-logo-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 8px;
  color: #31516b;
}

.market-logo-shelf-head span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.market-logo-shelf-head small { color: #7a91a3; font-size: 12px; font-weight: 700; }

.market-logo-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.market-logo-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(209, 225, 235, 0.84);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #284761;
  text-align: left;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.market-logo-card:hover {
  border-color: rgba(70, 145, 201, 0.52);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.market-logo-image {
  grid-row: 1 / -1;
  display: grid;
  width: 28px;
  height: 28px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(207, 224, 235, 0.9);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 244, 252, 0.92), rgba(245, 250, 252, 0.74));
}

.market-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
  opacity: 0.94;
  filter: saturate(1.05) contrast(1.04);
}

.market-logo-image b { color: #2c72a8; font-size: 12px; letter-spacing: -0.04em; }
.market-logo-image img + b { display: none; }
.market-logo-name { overflow: hidden; color: #31506b; font-size: 12px; font-weight: 800; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.market-logo-card small { overflow: hidden; color: #7890a2; font-size: 12px; font-weight: 700; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.market-logo-loading { grid-column: 1 / -1; padding: 16px 8px; color: #7c92a3; font-size: 12px; text-align: center; }

/* A quieter second pass for the dashboard-only market desk. */
.dashboard-market-rail .hero-market-copy { align-self: center; }
.erp-shell .dashboard-market-rail.simple-hero h1 {
  margin-bottom: 7px;
  font-size: clamp(25px, 2vw, 31px);
  letter-spacing: -0.046em;
}
.dashboard-market-rail .hero-market-indicators { margin-top: 11px; }
.dashboard-market-rail .market-logo-shelf {
  padding: 11px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(241, 249, 253, 0.78));
}
.dashboard-market-rail .market-logo-shelf-head { padding-bottom: 9px; }
.dashboard-market-rail .market-logo-card {
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 8px;
  min-height: 47px;
  padding: 6px 7px;
  border-radius: 12px;
}
.dashboard-market-rail .market-logo-image {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #ffffff;
}
.dashboard-market-rail .market-logo-name { font-size: 12px; letter-spacing: -0.015em; }
.dashboard-market-rail .market-logo-card small { font-size: 12px; }
.dashboard-market-rail .hero-actions {
  padding: 11px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 253, 0.9));
  box-shadow: 0 8px 18px rgba(28, 82, 123, 0.05);
}
.dashboard-market-rail .hero-actions-label { margin: 1px 0 8px; }

@media (max-width: 1260px) {
  .erp-shell .simple-hero { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.82fr); }
  .erp-shell .simple-hero .hero-actions { grid-column: 1 / -1; }
  .hero-action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .erp-shell .hero-action-grid #syncIpojiBtn { grid-column: auto; }
}

@media (max-width: 820px) {
  .erp-shell .simple-hero { grid-template-columns: 1fr; gap: 12px; padding: 17px; }
  .erp-shell .simple-hero .hero-actions { width: 100%; }
  .hero-market-indicators span { font-size: 12px; }
  .market-logo-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-shell .hero-action-grid #syncIpojiBtn { grid-column: 1 / -1; }
}

.erp-shell .cards {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.erp-shell .card {
  padding: 14px 16px;
  border-radius: 12px;
}

.erp-shell .card h3 { margin-bottom: 0; }

.erp-shell .panel {
  border-radius: 16px;
  margin-bottom: 18px;
}

@media (max-width: 1050px) {
  .erp-shell { padding-left: 270px; }
  .erp-shell .top-nav-tabs { width: 230px; }
  .erp-shell .hero-actions { min-width: 260px; }
}

@media (max-width: 840px) {
  .erp-shell { padding-left: 16px; }

  .erp-shell .top-nav-tabs {
    position: sticky;
    inset: auto;
    width: auto;
    margin: 0 0 16px;
    padding: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 16px;
  }

  .sidebar-brand,
  .sidebar-label,
  .nav-spacer { display: none; }

  .erp-shell .nav-tab {
    width: auto;
    min-height: 38px;
    padding: 8px 10px;
    justify-content: center;
    font-size: 12px;
  }

  .erp-shell .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .erp-shell .hero-actions {
    min-width: 0;
    justify-content: flex-start;
  }

  .erp-shell .simple-hero {
    min-height: 0;
    padding: 28px 24px;
  }

  .erp-shell .simple-hero h1 {
    font-size: clamp(37px, 11vw, 52px);
  }

  .erp-shell .simple-hero .hero-actions {
    width: 100%;
  }
}

/* Editorial typography refinements */
.top-strip-brand strong,
.sidebar-brand strong {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.top-strip-brand strong {
  font-size: 16px;
}

.brand-sub,
.sidebar-brand small {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.erp-shell .hero h1 {
  font-size: clamp(28px, 2.6vw, 38px);
  max-width: 790px;
}

.eyebrow,
.sidebar-label,
.card p,
th,
.workflow-step {
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
}

.subtext,
.panel-header p {
  max-width: 780px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: -0.012em;
}

.erp-shell .nav-tab {
  font-weight: 700;
  letter-spacing: -0.018em;
}

.card p {
  margin-bottom: 8px;
  color: #6a8198;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.card h3,
.small-card h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.85vw, 30px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.small-card h3 {
  font-size: clamp(20px, 1.55vw, 25px);
}

.panel-header h2 {
  font-size: 18px;
}

.workflow-step {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  color: #416078;
}

label {
  color: #425f78;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

input,
select,
button,
.secondary-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: -0.008em;
}

button,
.primary-btn,
.secondary-btn {
  font-weight: 800;
}

th {
  color: #668099;
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 13px;
  font-weight: 500;
}

.status-pill,
.badge {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.065em;
}

.hint-box,
.section-note {
  font-size: 12px;
  line-height: 1.55;
}

.narada-import-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, .8fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #d6e2d8;
  border-radius: 12px;
  background: linear-gradient(90deg, #f7fbff, #eef6ff);
}

.narada-import-bar textarea {
  grid-column: 1 / -1;
  min-height: 92px;
  resize: vertical;
}

.narada-import-bar strong,
.narada-import-bar span {
  display: block;
}

.narada-import-bar strong {
  font-family: var(--font-display);
  font-size: 14px;
}

.narada-import-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .narada-import-bar {
    grid-template-columns: 1fr;
  }
}

.capacity-planner-panel {
  background: linear-gradient(135deg, #f8fcff 0%, #eef7f2 100%);
}

.capacity-planner-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.capacity-planner-controls select {
  min-width: 220px;
  padding: 9px 11px;
  font-size: 12px;
}

.capacity-planner-controls .primary-btn {
  padding: 10px 13px;
  white-space: nowrap;
}

.capacity-balance-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.capacity-balance-summary div {
  padding: 12px 14px;
  border: 1px solid #d8e9e0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.capacity-balance-summary .capacity-balance-card {
  padding: 12px 14px;
  border: 1px solid #8bb7df;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6fbff 0%, #e9f4ff 100%);
  text-align: left;
  cursor: pointer;
}

.capacity-balance-summary .capacity-balance-card:hover { border-color: #2168ae; transform: translateY(-1px); }
.capacity-balance-summary .capacity-balance-card small { display: block; margin-top: 5px; color: #2168ae; font-size: 12px; font-weight: 800; }
.capacity-balance-summary .capacity-od-account-card { border-color: #8fc8bd; background: linear-gradient(135deg, #f7fffd 0%, #e9f8f4 100%); }
.capacity-balance-summary .capacity-od-account-card:hover { border-color: #218c7e; }

.savings-breakdown-dialog { width: min(760px, calc(100vw - 28px)); }
.existing-ipo-blocks-dialog { width: min(1060px, calc(100vw - 28px)); }
.existing-ipo-blocks-table-wrap { max-height: min(58vh, 560px); overflow: auto; }
.existing-ipo-blocks-table-wrap td small { display: block; margin-top: 3px; color: #6f879d; font-size: 12px; font-weight: 700; }
.existing-ipo-blocks-table-wrap .amount-cell { white-space: nowrap; color: #19362f; }
.existing-ipo-blocks-table-wrap .existing-ipo-edit-btn { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.capacity-blocks-summary-trigger { border-color: #d8c48d !important; background: linear-gradient(135deg, #fffdf6 0%, #fff7df 100%) !important; }
.capacity-blocks-summary-trigger:hover { border-color: #bf8a20 !important; }
.savings-breakdown-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 13px 14px; border-radius: 12px; background: #edf6ff; color: #234d73; }
.savings-breakdown-total strong { font-size: 18px; }
.savings-breakdown-account-btn { padding: 0; border: 0; background: none; color: #19362f; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.savings-breakdown-account-btn:hover { color: #0a63ad; text-decoration: underline; }

/* Keep the OD ledger readable without horizontal scrolling on a desktop screen. */
.od-available-dialog {
  width: min(1420px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.od-available-dialog .ipo-ledger-dialog-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  max-height: calc(100dvh - 28px);
  padding: 20px 22px;
  overflow: hidden;
}

.od-available-dialog .dialog-title-row { grid-column: auto; }
.od-available-dialog .ipo-ledger-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; }
.od-available-dialog .ipo-ledger-summary div { padding: 10px 12px; }
.od-available-dialog .ipo-ledger-summary strong { font-size: 18px; }
.od-available-dialog .table-wrap { min-height: 0; max-height: none; overflow: auto; }
.od-available-dialog table { width: 100%; min-width: 0; table-layout: fixed; }
.od-available-dialog th,
.od-available-dialog td { padding: 8px 10px; white-space: nowrap; }
.od-available-dialog th:nth-child(1), .od-available-dialog td:nth-child(1) { width: 9%; }
.od-available-dialog th:nth-child(2), .od-available-dialog td:nth-child(2) { width: 9%; }
.od-available-dialog th:nth-child(3), .od-available-dialog td:nth-child(3) { width: 21%; overflow: hidden; text-overflow: ellipsis; }
.od-available-dialog th:nth-child(4), .od-available-dialog td:nth-child(4) { width: 18%; overflow: hidden; text-overflow: ellipsis; }
.od-available-dialog th:nth-child(5), .od-available-dialog td:nth-child(5) { width: 14%; }
.od-available-dialog th:nth-child(6), .od-available-dialog td:nth-child(6) { width: 15%; }
.od-available-dialog th:nth-child(7), .od-available-dialog td:nth-child(7) { width: 14%; text-align: right; }
.od-available-dialog .secondary-btn { min-width: 58px; padding: 7px 10px; }

@media (max-width: 820px) {
  .od-available-dialog { width: calc(100vw - 20px); }
  .od-available-dialog .ipo-ledger-dialog-content { padding: 16px; }
  .od-available-dialog .ipo-ledger-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od-transaction-edit-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .od-transaction-edit-dialog .edit-account-form { padding: 16px; }
  .od-transaction-edit-dialog #odTransactionEditFields { grid-template-columns: 1fr; }
}

.action-history-panel { margin-top: 18px; }
.action-history-details summary { color: #1f6b52; cursor: pointer; font-weight: 700; }
.action-history-details pre { max-width: 440px; margin: 8px 0 0; padding: 9px; overflow: auto; border-radius: 8px; background: #f4f8fc; color: #4a5f55; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.action-history-table .undo-action-btn[disabled] { opacity: .65; cursor: not-allowed; }

.restore-preview-card { display: grid; gap: 14px; padding: 15px; border: 1px solid #d5e4ee; border-radius: 12px; background: linear-gradient(145deg, #f8fbfd, #eef7ff); }
.restore-preview-heading { display: grid; gap: 3px; }
.restore-preview-heading strong { color: #1c405f; font-size: 14px; overflow-wrap: anywhere; }
.restore-preview-heading span { color: #6b8294; font-size: 12px; font-weight: 650; }
.restore-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.restore-preview-grid > div { display: grid; gap: 3px; padding: 10px; border: 1px solid #dce8ef; border-radius: 12px; background: #fff; }
.restore-preview-grid span { color: #6b8294; font-size: 12px; font-weight: 750; }
.restore-preview-grid strong { color: #1c405f; font-size: 16px; }
.restore-preview-warning { margin: 0; padding: 10px 11px; border-radius: 8px; background: #fff8e8; color: #875c16; font-size: 12px; font-weight: 700; }
.restore-preview-actions { display: flex; justify-content: flex-end; gap: 8px; }
.restore-preview-actions .danger-btn { min-height: 36px; padding: 7px 12px; border: 1px solid #f7c9c9; border-radius: 8px; font-size: 12px; font-weight: 800; }
@media (max-width: 620px) {
  .restore-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .restore-preview-actions { flex-direction: column-reverse; }
  .restore-preview-actions button { width: 100%; }
}

.advanced-content { display: grid; gap: 18px; }
.advanced-content > section, .advanced-content > .grid-two { margin: 0; }
.advanced-content h3 { margin-bottom: 5px; }
.advanced-content .form-grid, .advanced-content .quick-add-grid { gap: 10px; }
.balance-update-centre { border: 1px solid #cddfed; border-radius: 12px; background: #f8fbfe; overflow: hidden; }
.balance-update-centre summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; color: #193d61; cursor: pointer; list-style: none; }
.balance-update-centre summary::-webkit-details-marker { display: none; }
.balance-update-centre summary small { display: block; margin-top: 3px; color: #647c91; font-size: 12px; }
.balance-update-open { padding: 5px 9px; border-radius: 999px; background: #e6f1fb; color: #1d65a7; font-size: 12px; font-weight: 800; }
.balance-update-centre[open] .balance-update-open { background: #dff4e7; color: #18743a; }
.balance-update-centre .section-copy, .balance-update-centre .balance-batch-form { margin-left: 16px; margin-right: 16px; }
.balance-update-centre .balance-batch-form { margin-bottom: 16px; }

/* Setup is a management workspace: keep the report visible and place maintenance work behind calm, focused disclosures. */
.setup-page {
  display: grid;
  gap: 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e5ee;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 250, 253, .96));
  box-shadow: 0 18px 44px rgba(22, 58, 91, .08);
}

.setup-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e1eaf1;
  background: linear-gradient(105deg, #ffffff 0%, #f5faff 100%);
}

.setup-page-header .eyebrow {
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #245d9d;
}

.setup-page-header h2 {
  margin: 0;
  color: #193953;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 650;
  letter-spacing: -.05em;
}

.setup-page-header p:not(.eyebrow) {
  max-width: 620px;
  margin: 6px 0 0;
  color: #637b90;
  font-size: 13px;
  line-height: 1.5;
}

.setup-page-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.setup-page-actions .secondary-btn { min-height: 38px; padding: 8px 12px; border-radius: 12px; }

.backup-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 20px;
  margin: 0 18px;
  padding: 14px 16px;
  border: 1px solid #cfe2ef;
  border-radius: 12px;
  background: linear-gradient(110deg, #f6fbff, #eef8f4);
}
.backup-center-copy .eyebrow { margin: 0 0 4px; color: #2470ae; font-size: 12px; }
.backup-center-copy h3 { margin: 0; color: #1c4161; font-size: 16px; letter-spacing: -.02em; }
.backup-center-copy p:not(.eyebrow) { margin: 3px 0 0; color: #688199; font-size: 12px; }
.backup-center-actions { display: flex; align-items: center; gap: 8px; }
.backup-center-actions .secondary-btn,
.backup-center-actions .primary-btn { min-height: 36px; padding: 7px 11px; border-radius: 8px; font-size: 12px; }
.backup-status { grid-column: 1 / -1; margin: 0; color: #257443; font-size: 12px; font-weight: 700; }
.backup-status.is-error { color: #b34343; }
.backup-status .backup-issues-btn { margin-left: 8px; padding: 0; color: inherit; font-size: inherit; text-decoration: underline; }
.integrity-issue-list { display: grid; gap: 8px; }
.integrity-issue-row { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #d8e5ef; border-radius: 12px; background: #f8fbfd; }
.integrity-issue-row strong { color: #19362f; font-size: 12px; text-transform: capitalize; }
.integrity-issue-row span { color: #6b8295; font-size: 12px; }

.setup-page-content {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.setup-page .operations-report-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 20px;
  border: 1px solid #d9e5ed;
  border-radius: 16px;
  background: #ffffff;
}

.setup-page .operations-report-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid #e1eaf0;
}

.setup-page .operations-report-panel .panel-header .eyebrow { margin: 0 0 6px; color: #16746e; }
.setup-page .operations-report-panel .panel-header h3 { margin: 0; color: #1a3f5f; font-size: 18px; letter-spacing: -.035em; }
.setup-page .operations-report-panel .section-note { margin: 4px 0 0; color: #6b8194; font-size: 12px; }

.setup-page .operations-report-panel .cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  background: #f8fbfd;
}

.setup-page .operations-report-panel .card {
  min-width: 0;
  min-height: 82px;
  padding: 13px 14px;
  border: 0;
  border-left: 1px solid #dbe6ee;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.setup-page .operations-report-panel .card:first-child { border-left: 0; }

.setup-page .operations-report-panel .card p { overflow: hidden; margin: 0 0 6px; color: #6d8397; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.setup-page .operations-report-panel .card h3 { overflow: hidden; color: #1b4262; font-size: clamp(17px, 1.55vw, 23px); text-overflow: ellipsis; white-space: nowrap; }
.setup-page .operations-report-panel > .table-wrap { grid-column: 1 / -1; margin: 0; border: 1px solid #dfe8ef; border-radius: 12px; background: #fff; }
.setup-page .operations-report-panel table { min-width: 0; }
.setup-page .operations-report-panel th,
.setup-page .operations-report-panel td { padding: 8px 11px; }

.setup-page .compact-workspace-section {
  border-color: #dce7ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(30, 74, 108, .035);
}

.setup-page .compact-workspace-section > summary {
  min-height: 66px;
  padding: 14px 16px 14px 18px;
}

.setup-page .compact-workspace-section > summary::before {
  content: "";
  width: 4px;
  align-self: stretch;
  border-radius: 99px;
  background: linear-gradient(180deg, #1971b9, #129381);
}

.setup-page .compact-workspace-section > summary > span:first-child { flex: 1; }
.setup-page .compact-workspace-section summary strong { color: #19362f; font-size: 14px; letter-spacing: -.02em; }
.setup-page .compact-workspace-section summary small { color: #627269; font-size: 12px; }
.setup-page .compact-section-toggle { min-width: 50px; text-align: center; }
.setup-page .compact-workspace-section[open] .compact-section-toggle { font-size: 0; }
.setup-page .compact-workspace-section[open] .compact-section-toggle::after { content: "Close"; font-size: 12px; }
.setup-page .compact-workspace-content {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  border-top: 1px solid #edf2f6;
  background: linear-gradient(180deg, #fbfdff, #f7fafc);
}
.setup-page .compact-workspace-content > :first-child { margin-top: 0; }
.setup-page .compact-workspace-content .spaced-section { margin-top: 0; }

.setup-page .compact-workspace-content > section,
.setup-page .compact-workspace-content > .grid-two > section,
.setup-page .compact-workspace-content > .grid-two > details {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0e9f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
}

.setup-page .compact-workspace-content h3 { margin: 0 0 4px; color: #19362f; font-size: 14px; letter-spacing: -.025em; }
.setup-page .compact-workspace-content .section-note,
.setup-page .compact-workspace-content .section-copy { margin: 0 0 11px; color: #627269; font-size: 12px; }
.setup-page .compact-workspace-content .form-grid { gap: 9px; }
.setup-page .compact-workspace-content label { gap: 4px; font-size: 12px; }
.setup-page .compact-workspace-content input,
.setup-page .compact-workspace-content select { min-height: 37px; padding: 7px 9px; font-size: 12px; }
.setup-page .compact-workspace-content .primary-btn,
.setup-page .compact-workspace-content .secondary-btn { min-height: 36px; padding: 7px 10px; border-radius: 8px; font-size: 12px; }

.setup-page .quick-add-grid { gap: 12px; margin: 0; }
.setup-page .quick-add-grid .simple-form { padding: 14px; border-radius: 12px; box-shadow: none; }
.setup-page .quick-add-grid .simple-form::before { width: 28px; height: 3px; margin-bottom: 6px; }
.setup-page .quick-add-grid .simple-form h3 { font-size: 14px; }
.setup-page .grid-two { gap: 12px; }

.setup-page .balance-update-centre { padding: 0; background: #fbfdff; }
.setup-page .balance-update-centre summary { min-height: 100%; padding: 14px; }
.setup-page .balance-update-centre .section-copy { margin: 0 14px 10px; }
.setup-page .balance-update-centre .balance-batch-actions { margin: 0 14px 14px; }

.setup-page .operations-report-panel + .compact-workspace-section { margin-top: 0; }
.setup-page .history-toolbar { gap: 7px; }

/* Setup menu: management report stays visible; maintenance areas reveal on demand. */
.setup-page-content { display: grid; gap: 16px; }
.setup-page .operations-report-panel { margin: 0; }
.setup-menu-group {
  position: relative;
  margin: 0;
  overflow: visible;
  border: 1px solid #d9e5ee;
  border-radius: 16px;
  background: #f8fbfd;
  box-shadow: 0 8px 24px rgba(24, 64, 92, .04);
}
.setup-menu-group > summary {
  min-height: 60px;
  padding: 14px 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbfd, #eef6fb);
}
.setup-menu-group > summary strong { font-size: 14px; }
.setup-menu-group > summary small { display: block; margin-top: 3px; }
.setup-menu-group > summary::after { content: "Explore"; }
.setup-menu-group[open] > summary::after { content: "Collapse"; }
.setup-menu-group[open] > summary { background: linear-gradient(135deg, #eaf4fb, #f5fbf9); }
.setup-menu-group > .compact-workspace-content {
  display: none;
  padding: 14px 16px 16px;
  border-top: 1px solid #dce8ef;
  animation: setup-menu-reveal .18s ease-out;
}
.setup-menu-group[open] > .compact-workspace-content { display: block; }
.setup-menu-group .compact-workspace-content > section,
.setup-menu-group .compact-workspace-content > .grid-two > section,
.setup-menu-group .compact-workspace-content > .grid-two > details {
  padding: 14px;
  border: 1px solid #dce8ef;
  border-radius: 12px;
  background: #fff;
}
.setup-menu-group .compact-workspace-content > section + section,
.setup-menu-group .compact-workspace-content > .grid-two,
.setup-menu-group .compact-workspace-content > .spaced-section { margin-top: 12px; }
.setup-menu-group .compact-workspace-content > section h3,
.setup-menu-group .compact-workspace-content > .grid-two h3 { margin-bottom: 8px; }
.setup-menu-group .compact-workspace-content .quick-add-grid { margin-top: 10px; }
.setup-menu-group .compact-workspace-content > section,
.setup-menu-group .compact-workspace-content > .grid-two > section { cursor: default; }
.setup-menu-group .compact-workspace-content > section > :not(h3),
.setup-menu-group .compact-workspace-content > .grid-two > section > :not(h3) {
  display: revert;
}
@keyframes setup-menu-reveal { from { opacity: .4; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
  .setup-page .operations-report-panel .panel-header { padding: 0 0 12px; border-bottom: 1px solid #e1eaf0; }
}

@media (max-width: 800px) {
  .setup-page-header { align-items: stretch; flex-direction: column; padding: 18px 16px 15px; }
  .setup-page-actions { justify-content: flex-start; }
  .backup-center { grid-template-columns: 1fr; margin: 0 12px; }
  .backup-center-actions { flex-wrap: wrap; }
  .backup-center-actions > * { flex: 1 1 180px; }
  .setup-page-content { padding: 0 12px 12px; }
  .setup-page .operations-report-panel { padding: 14px; }
  .setup-page .operations-report-panel .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-page .operations-report-panel .card:last-child { grid-column: span 2; }
  .setup-page .compact-workspace-section > summary { min-height: 62px; padding: 12px 13px; }
  .setup-page .compact-workspace-content { padding: 0 10px 10px; }
}

.capacity-balance-summary span,
.capacity-plan-result span {
  display: block;
  color: #5f788c;
  font-size: 12px;
  font-weight: 700;
}

.capacity-balance-summary strong {
  display: block;
  margin-top: 4px;
  color: #19362f;
  font-size: 16px;
}

.capacity-plan-result {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eaf7ef;
  color: #25613f;
  font-size: 13px;
}

.capacity-allocation {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.capacity-category-btn {
  padding: 8px 11px;
  border: 1px solid #b9d8c6;
  border-radius: 999px;
  background: #f4fbf6;
  color: #276345;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.capacity-category-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.capacity-category-btn.is-manual {
  border-color: #d7c28d;
  background: #fffaf0;
  color: #876625;
}

.capacity-manual-warning {
  padding: 9px 11px;
  border: 1px solid #ecd7a4;
  border-radius: 12px;
  background: #fffaf0;
  color: #7c622b;
  font-size: 12px;
  font-weight: 700;
}

.capacity-account-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid #d5e7dc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.capacity-account-picker > strong,
.capacity-account-picker > span {
  grid-column: 1 / -1;
}

.capacity-account-picker > span {
  color: #5f788c;
  font-size: 12px;
}

.capacity-account-picker label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.capacity-account-picker select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
}

.capacity-account-action {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.capacity-account-action .capacity-account-select {
  flex: 1 1 48%;
  min-width: 260px;
}

.capacity-required-balance {
  flex: 0 0 auto;
  color: #6b7f91;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
}

.capacity-account-action .secondary-btn {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .capacity-account-action { flex-wrap: wrap; }
  .capacity-account-action .capacity-account-select { flex-basis: 100%; width: 100%; }
  .capacity-account-action .secondary-btn { margin-left: auto; }
}

.capacity-account-picker .primary-btn {
  justify-self: start;
  margin-top: 2px;
  padding: 9px 12px;
  font-size: 12px;
}

.application-template-btn {
  border-style: dashed;
  color: #285d8e;
  background: #f5faff;
}

/* Productivity workspace: decisions, market dates, and quick record access. */
.nav-utility { display: flex; gap: 5px; margin-left: auto; }
.nav-utility-btn {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #d4e2ee;
  border-radius: 8px;
  background: #f7fbfe;
  color: #315773;
  font-size: 12px;
  font-weight: 800;
}

.command-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.command-center-panel {
  min-width: 0;
  overflow: hidden;
  border-color: #d7e5ed;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbfd 100%);
}
.command-center-panel .panel-header {
  align-items: center;
  margin-bottom: 12px;
  padding: 0 0 11px;
}
.command-center-panel .panel-header .eyebrow {
  margin-bottom: 5px;
  background: linear-gradient(135deg, #e5f4f0, #eaf2ff);
  color: #17666d;
}
.command-center-panel .panel-header h2 {
  font-size: 22px;
  line-height: 1.08;
}
.command-center-panel .panel-header p {
  margin: 4px 0 0;
  color: #61788e;
  font-size: 12px;
  line-height: 1.4;
}
.command-center-panel .panel-header .secondary-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-color: #cddfea;
  font-size: 12px;
}
.command-center-item {
  display: grid;
  grid-template-areas:
    "label value"
    "detail detail"
    "action action";
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 5px 8px;
  min-width: 0;
  min-height: 94px;
  padding: 11px 12px 10px;
  border: 1px solid #d9e3ea;
  border-radius: 12px;
  background: #ffffff;
  color: #1d405e;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(19, 51, 76, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.command-center-item:hover {
  transform: translateY(-1px);
  border-color: #a9c4d6;
  box-shadow: 0 8px 20px rgba(19, 51, 76, .08);
}
.command-center-item > span {
  grid-area: label;
  align-self: baseline;
  color: #60778c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.1;
  text-transform: uppercase;
}
.command-center-item > strong {
  grid-area: value;
  min-width: 0;
  align-self: baseline;
  color: #173b5c;
  font-size: clamp(16px, 1.28vw, 20px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
  text-align: right;
}
.command-center-item > small {
  grid-area: detail;
  align-self: center;
  color: #5d7489;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}
.command-center-item > b {
  grid-area: action;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #1266a7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}
.command-center-item > b::after {
  content: "→";
  margin-left: 5px;
  font-size: 13px;
  line-height: 1;
}
.command-center-item.clear {
  border-top: 3px solid #58a688;
  background: linear-gradient(145deg, #ffffff, #f4fbf7);
}
.command-center-item.watch {
  border-top: 3px solid #4d8fbd;
  background: linear-gradient(145deg, #ffffff, #f3f9fe);
}
.command-center-item.urgent {
  border-top: 3px solid #c99242;
  background: linear-gradient(145deg, #ffffff, #fffbf3);
}
.command-center-clear {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #cde6d8;
  border-left: 4px solid #58a688;
  border-radius: 12px;
  background: linear-gradient(120deg, #f5fcf7, #fbfefd);
}
.command-center-clear div { display: grid; gap: 3px; }
.command-center-clear strong { color: #1d5b44; font-size: 14px; }
.command-center-clear span { color: #638074; font-size: 12px; }
.command-center-clear .secondary-btn { flex: 0 0 auto; }
.data-health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.data-health-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; padding: 11px 12px; border: 1px solid #dce6ed; border-radius: 12px; background: #fbfdff; color: #244963; text-align: left; box-shadow: none; }
.data-health-item > span { color: #60788d; font-size: 12px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }.data-health-item > strong { color: #183d5d; font-size: 18px; }.data-health-item > small { grid-column: 1 / -1; color: #687f91; font-size: 12px; font-weight: 650; line-height: 1.35; }.data-health-item > b { color: #1672b2; font-size: 12px; }.data-health-item.needs-review { border-top: 3px solid #d39a42; background: #fffdf8; }.data-health-item.is-clear { border-top: 3px solid #57a588; }

@media (max-width: 1280px) {
  .command-center-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .data-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.reconciliation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.reconciliation-account { display: grid; gap: 9px; padding: 12px; border: 1px solid #dbe7f0; border-radius: 12px; background: #fbfdff; }
.reconciliation-account > div { display: grid; gap: 1px; }
.reconciliation-account > div strong { color: #19362f; font-size: 13px; }
.reconciliation-account > div span { color: #627269; font-size: 12px; }
.reconciliation-account dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
.reconciliation-account dl div { min-width: 0; }
.reconciliation-account dt { color: #627269; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.reconciliation-account dd { margin: 2px 0 0; overflow: hidden; color: #19362f; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.reconciliation-account .secondary-btn { width: 100%; }

.exposure-monitor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.exposure-account { display: grid; gap: 10px; padding: 12px; border: 1px solid #dbe7f0; border-radius: 12px; background: linear-gradient(135deg, #fbfdff, #f4f9fd); color: #244963; text-align: left; box-shadow: none; }
.exposure-account:hover { border-color: #a8cde9; background: #f5faff; }
.exposure-account > div { display: grid; gap: 2px; }
.exposure-account > div strong { overflow: hidden; color: #19362f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.exposure-account > div span { color: #627269; font-size: 12px; }
.exposure-account dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.exposure-account dt { color: #627269; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.exposure-account dd { margin: 2px 0 0; overflow: hidden; color: #19362f; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.exposure-account > b { color: #1f6b52; font-size: 12px; }

.ipo-calendar { display: grid; gap: 6px; }
.ipo-calendar-row { display: grid; grid-template-columns: minmax(150px, 1.8fr) repeat(4, minmax(78px, 1fr)); gap: 8px; align-items: center; padding: 9px 11px; border: 1px solid #e0eaf2; border-radius: 12px; background: #fff; color: #19362f; text-align: left; box-shadow: none; }
.ipo-calendar-row:hover { border-color: #9dc3e8; background: #f7fbff; }
.ipo-calendar-row > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ipo-calendar-row span { display: grid; gap: 1px; color: #19362f; font-size: 12px; font-weight: 700; }
.ipo-calendar-row b { color: #627269; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ipo-calendar-row.is-closing { border-left: 3px solid #d58b1e; background: #fffaf1; }

.cashflow-calendar-panel { min-width: 0; }
.cashflow-calendar-legend { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 12px; }
.cashflow-calendar-legend span { padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .025em; }
.cashflow-close { background: #fff2dc; color: #9a5c08; }
.cashflow-funding { background: #eaf5ff; color: #1f6b52; }
.cashflow-refund { background: #e9f8ef; color: #167345; }
.cashflow-od { background: #f0edf9; color: #635092; }
.cashflow-calendar { display: grid; gap: 7px; }
.cashflow-day { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 11px; border: 1px solid #e0eaf2; border-radius: 12px; background: linear-gradient(115deg, #fbfdff, #fff); }
.cashflow-day time { padding-top: 7px; color: #4a5f55; font-size: 12px; font-weight: 800; }
.cashflow-events { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.cashflow-event { display: grid; gap: 2px; min-width: 148px; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; color: #234762; text-align: left; box-shadow: none; }
.cashflow-event b { font-size: 12px; letter-spacing: .035em; text-transform: uppercase; }
.cashflow-event span { max-width: 230px; overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.cashflow-event.close { border-color: #f4d29b; background: #fff9ef; color: #955b0c; }
.cashflow-event.funding { border-color: #c7e2f6; background: #f3faff; color: #17669f; }
.cashflow-event.refund { border-color: #c6e8d1; background: #f3fbf6; color: #177644; }
.cashflow-event.od { border-color: #ddd5f1; background: #f8f6fd; color: #604b91; }
.cashflow-event:hover { filter: brightness(.985); transform: translateY(-1px); }

.global-search-dialog { width: min(680px, calc(100vw - 28px)); }
.global-search-dialog .edit-account-form { display: grid; gap: 12px; }
.global-search-results { display: grid; gap: 6px; max-height: min(54vh, 460px); overflow: auto; }
.global-search-result { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #dce7f0; border-radius: 8px; background: #fff; color: #234764; text-align: left; box-shadow: none; }
.global-search-result:hover { border-color: #9fc6ea; background: #f6fbff; }
.global-search-result strong { font-size: 13px; }
.global-search-result span { color: #637a8f; font-size: 12px; }
.command-palette-actions { display: grid; gap: 6px; }
.command-palette-action { grid-template-columns: minmax(0, 1fr) auto; }
.command-palette-action span { grid-column: 1; }
.command-palette-action kbd { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* Compact command palette: search first, then clear operational shortcuts. */
.global-search-dialog { width: min(760px, calc(100vw - 28px)); }
.global-search-dialog .edit-account-form { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 22px 24px; }
.global-search-dialog .dialog-title-row { align-items: center; padding-bottom: 10px; border-bottom: 1px solid #e5edf3; }
.global-search-dialog .dialog-title-row h3 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.03em; }
.global-search-dialog #globalSearchInput { box-sizing: border-box; width: 100%; min-height: 46px; height: 46px; margin: 0; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.global-search-dialog .global-search-results { max-height: min(380px, 48vh); overflow: auto; }
.global-search-dialog .command-palette-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.global-search-dialog .command-palette-action { min-height: 72px; padding: 11px 12px; border-radius: 12px; }
.global-search-dialog .command-palette-action strong { font-size: 13px; }
.global-search-dialog .command-palette-action span { font-size: 12px; }
.global-search-dialog .section-note { margin: 0; font-size: 12px; }
@media (max-width: 620px) { .global-search-dialog .edit-account-form { padding: 18px; } .global-search-dialog .command-palette-actions { grid-template-columns: 1fr; } .global-search-dialog .command-palette-action { min-height: 62px; } }
.mobile-quick-actions { display: none; }
@media (max-width: 720px) { body { padding-bottom: 78px; } .mobile-quick-actions { position: fixed; z-index: 40; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 8px; border: 1px solid rgba(205, 222, 235, .95); border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(21, 53, 81, .18); backdrop-filter: blur(14px); } .mobile-quick-actions button { min-height: 44px; padding: 6px 3px; border: 1px solid #dbe7f0; border-radius: 12px; background: #f8fbfe; color: #24537b; font-size: 12px; font-weight: 850; box-shadow: none; } .mobile-quick-actions button:first-child { border-color: #bcdaf1; background: #edf7ff; color: #1264a0; } .mobile-quick-actions button:nth-child(2) { border-color: #c5e6d4; background: #f1fbf5; color: #197643; } .mobile-quick-actions button:nth-child(3) { border-color: #f0d9ab; background: #fff9ee; color: #98600d; } .mobile-quick-actions button:nth-child(4) { border-color: #ddd3f0; background: #f8f6fd; color: #635090; } }
kbd { padding: 1px 5px; border: 1px solid #d6e2d8; border-radius: 4px; background: #f5f8fb; color: #4a5f55; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }

.application-timeline-dialog { width: min(720px, calc(100vw - 28px)); }
.application-timeline-dialog .edit-account-form { display: grid; gap: 14px; }
.timeline-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.timeline-summary span { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid #dce8f1; border-radius: 8px; color: #6a8196; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.timeline-summary strong { color: #193d60; font-size: 14px; text-transform: none; }
.application-timeline { display: grid; gap: 0; }
.application-timeline article { display: grid; grid-template-columns: 105px 1fr; gap: 14px; padding: 10px 0 10px 14px; border-left: 2px solid #bad7ee; }
.application-timeline article:last-child { border-left-color: transparent; }
.application-timeline time { color: #6b8296; font-size: 12px; font-weight: 800; }
.application-timeline div { display: grid; gap: 2px; }
.application-timeline strong { color: #1c405f; font-size: 13px; }
.application-timeline span { color: #60788d; font-size: 12px; }

.operator-mode .top-strip,
.operator-mode .dashboard-market-rail,
.operator-mode .subscription-ticker,
.operator-mode .section-note,
.operator-mode .subtext,
.operator-mode .eyebrow { display: none !important; }
.operator-mode .panel { margin-bottom: 10px; }
.operator-mode .panel-header { margin-bottom: 9px; }

@media (max-width: 980px) {
  .command-center-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reconciliation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exposure-monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ipo-calendar-row { grid-template-columns: minmax(130px, 1.4fr) repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .nav-utility { width: 100%; margin-left: 0; }
  .nav-utility-btn { flex: 1; }
  .command-center-grid, .data-health-grid, .reconciliation-grid, .exposure-monitor-grid, .timeline-summary { grid-template-columns: 1fr; }
  .ipo-calendar-row { grid-template-columns: 1fr 1fr; }
  .ipo-calendar-row > strong { grid-column: 1 / -1; }
  .cashflow-day { grid-template-columns: 1fr; gap: 7px; }
  .cashflow-day time { padding: 0; }
  .cashflow-event { flex: 1 1 145px; }
  .application-timeline article { grid-template-columns: 1fr; gap: 3px; }
}

/* Market-workspace polish: compact, scan-friendly surfaces for daily decisions. */
.erp-shell .panel,
.erp-shell .card {
  border-color: #d8e3ed;
  box-shadow: 0 7px 18px rgba(24, 57, 86, 0.045);
}

.erp-shell .panel {
  background: rgba(255, 255, 255, 0.94);
}

.erp-shell .panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf4;
}

.erp-shell .panel-header h2,
.erp-shell .card h3 {
  color: #102f4d;
  letter-spacing: -0.025em;
}

.erp-shell .card {
  position: relative;
  overflow: hidden;
}

.erp-shell .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #27a66b, #1084a2);
}

.erp-shell th {
  background: #f3f7fa;
  color: #4a5f55;
}

.erp-shell tbody tr:hover {
  background: #f2f8fc;
}

.erp-shell .status-good {
  background: #e7f7ec;
  color: #197447;
}

.erp-shell .status-warn {
  background: #fff4df;
  color: #9a5a08;
}

.erp-shell .status-bad {
  background: #fff0f0;
  color: #b52b32;
}

.erp-shell .primary-btn {
  background: linear-gradient(135deg, #1f6b52, #0b4a8a);
}

.erp-shell .primary-btn:hover {
  background: linear-gradient(135deg, #126ec1, #0b579f);
}

@media (max-width: 720px) {
  .erp-shell .hero h1 {
    font-size: 28px;
  }

  .card h3,
  .small-card h3 {
    font-size: 22px;
  }
}

@media (max-width: 980px) {
  .grid-two,
  .form-grid,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .top-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    min-width: unset;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .quick-add-grid {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .shell {
    padding: 14px 14px 28px;
  }

  h1 {
    font-size: 28px;
  }

  .panel,
  .hero,
  .card {
    border-radius: 16px;
  }

  .top-strip-links {
    gap: 8px;
  }

  .strip-pill {
    font-size: 12px;
  }

  .top-nav-tabs {
    top: 6px;
    padding: 8px;
  }

  .nav-tab {
    width: 100%;
    justify-content: center;
  }
}

/* Application register: a calm, readable workspace without sacrificing data density. */
[data-tab-panel="applications"] {
  display: grid;
  gap: 20px;
}

.application-register-panel,
.application-archive-panel {
  padding: 22px;
  border-color: #dce7f1;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 253, 0.99));
  box-shadow: 0 12px 30px rgba(22, 53, 84, 0.07);
}

.application-register-panel .panel-header,
.application-archive-panel .panel-header {
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid #e5edf4;
}

.application-register-panel .panel-header h2,
.application-archive-panel .panel-header h2 {
  margin-bottom: 4px;
  font-size: clamp(24px, 2.1vw, 30px);
  letter-spacing: -0.04em;
}

.application-register-panel .panel-header p,
.application-archive-panel .panel-header p {
  margin: 0;
  color: #61788d;
}

.application-register-panel .application-recording-actions {
  max-width: 620px;
  gap: 8px;
}

.application-register-panel .application-recording-status {
  flex: 1 1 180px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f3f8fc;
  color: #4a5f55;
  line-height: 1.25;
}

.application-register-panel .application-recording-actions button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.application-register-panel .application-category-summary {
  gap: 12px;
  margin: 18px 0;
}

.application-register-panel .application-category-summary > div {
  padding: 14px 16px;
  border-color: #e0eaf3;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f5f9fc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.application-register-panel .application-category-summary strong {
  margin: 4px 0;
  font-size: 28px;
}

/* Compact category tiles keep the register lively without competing with its data. */
.application-register-panel .application-category-summary {
  gap: 10px;
  margin: 14px 0;
}

.application-register-panel .application-category-summary .application-category-tile {
  position: relative;
  min-height: 92px;
  padding: 12px 15px 11px;
  overflow: hidden;
  border-width: 1px;
  border-radius: 16px;
  box-shadow: 0 7px 18px rgba(31, 64, 87, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.application-register-panel .application-category-summary .application-category-tile::after {
  position: absolute;
  top: -28px;
  right: -17px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  content: "";
}

.application-register-panel .application-category-summary .application-category-tile span,
.application-register-panel .application-category-summary .application-category-tile small,
.application-register-panel .application-category-summary .application-category-tile strong {
  position: relative;
  z-index: 1;
}

.application-register-panel .application-category-summary .application-category-tile span {
  color: #4a5f55;
  font-size: 13px;
  font-weight: 750;
}

.application-register-panel .application-category-summary .application-category-tile strong {
  margin: 2px 0 1px;
  color: #19362f;
  font-size: 28px;
  line-height: 1;
}

.application-register-panel .application-category-summary .application-category-tile small {
  color: #4a5f55;
  font-size: 12px;
  font-weight: 700;
}

.application-register-panel .application-category-summary .is-retail {
  border-color: #d7ead3;
  background: linear-gradient(135deg, #f9fff2 0%, #e3f6d9 100%);
}

.application-register-panel .application-category-summary .is-shni {
  border-color: #f4dfaa;
  background: linear-gradient(135deg, #fffbed 0%, #fff0c4 100%);
}

.application-register-panel .application-category-summary .is-bhni {
  border-color: #f3c991;
  background: linear-gradient(135deg, #fff7e9 0%, #ffe0ac 100%);
}

.application-register-panel .application-register-wrap {
  width: 100%;
  max-width: 100%;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid #e1eaf2;
  border-radius: 16px;
  background: #f6f9fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.application-register-panel .applications-table,
.application-register-panel .erp-shell .applications-table {
  width: 100%;
  min-width: 1060px;
  max-width: none;
  table-layout: fixed;
  border-spacing: 0 7px;
}

.application-register-panel .applications-table th {
  height: auto;
  padding: 8px 10px 11px;
  background: transparent;
  color: #688096;
  font-size: 12px;
  letter-spacing: 0.075em;
}

.application-register-panel .applications-table td {
  height: 48px;
  padding: 8px 10px;
  border-top: 1px solid #e4edf4;
  border-bottom: 1px solid #e4edf4;
  background: #ffffff;
  color: #1d3e5e;
  font-size: 13px;
  line-height: 1.35;
}

.application-register-panel .applications-table td:first-child {
  border-left: 1px solid #e4edf4;
  border-radius: 11px 0 0 11px;
}

.application-register-panel .applications-table td:last-child {
  border-right: 1px solid #e4edf4;
  border-radius: 0 11px 11px 0;
}

.application-register-panel .applications-table tbody tr:not(.application-ipo-group):hover td {
  border-color: #ccdfef;
  background: #f7fbff;
}

.application-register-panel .applications-table th:nth-child(2),
.application-register-panel .applications-table td:nth-child(2) { width: 15%; }
.application-register-panel .applications-table th:nth-child(3),
.application-register-panel .applications-table td:nth-child(3) { width: 17%; }
.application-register-panel .applications-table th:nth-child(4),
.application-register-panel .applications-table td:nth-child(4) { width: 13%; }
.application-register-panel .applications-table th:nth-child(5),
.application-register-panel .applications-table td:nth-child(5) { width: 8%; }
.application-register-panel .applications-table th:nth-child(6),
.application-register-panel .applications-table td:nth-child(6) { width: 10%; }
.application-register-panel .applications-table th:nth-child(7),
.application-register-panel .applications-table td:nth-child(7) { width: 12%; }
.application-register-panel .applications-table th:nth-child(8),
.application-register-panel .applications-table td:nth-child(8) { width: 17%; }
.application-register-panel .applications-table th:nth-child(9),
.application-register-panel .applications-table td:nth-child(9) { width: 7%; }

.application-register-panel .application-header-filter {
  height: 30px;
  margin-top: 6px;
  padding: 0 24px 0 8px;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
}

.application-register-panel .applications-table .application-actions { gap: 5px; }
.application-register-panel .applications-table .application-actions .application-icon-action { width: 28px; height: 28px; }

.application-register-panel .application-ipo-group td {
  height: auto;
  padding: 10px 12px;
  border-color: #d8e5f0;
  border-radius: 12px;
  background: linear-gradient(145deg, #eff6fc, #e8f1fa);
  color: #244f77;
  width: auto !important;
  text-align: left !important;
  vertical-align: middle;
}

.application-register-collapsed td { padding: 12px !important; border: 0 !important; background: transparent !important; }
.application-register-picker { display: grid; gap: 14px; padding: 16px; border: 1px solid #d7e4ee; border-radius: 16px; background: linear-gradient(145deg, #f9fcff, #f2f8fc); }
.application-register-picker > div > strong, .application-register-picker > div > span { display: block; }
.application-register-picker > div > strong { color: #244c70; font-size: 14px; }
.application-register-picker > div > span { margin-top: 3px; color: #6a8295; font-size: 12px; }
.application-ipo-summary-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.application-ipo-summary-card { display: grid; min-width: min(100%, 260px); flex: 1 1 260px; gap: 3px; padding: 12px 13px; border: 1px solid #d4e2ed; border-radius: 12px; background: rgba(255,255,255,.9); color: #214a70; text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.application-ipo-summary-card:hover, .application-ipo-summary-card:focus-visible { border-color: #79add4; box-shadow: 0 8px 18px rgba(46, 99, 140, .12); outline: 0; transform: translateY(-1px); }
.application-ipo-summary-card strong { font-size: 14px; }
.application-ipo-summary-card span { color: #607c92; font-size: 12px; }
.application-ipo-summary-card small { color: #1766ad; font-size: 12px; font-weight: 800; }
.application-old-ipo-section { display: grid; gap: 9px; padding-top: 13px; border-top: 1px solid #dbe6ee; }
.application-old-ipo-section > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.application-old-ipo-section > div:first-child strong { color: #6c5d47; font-size: 13px; }
.application-old-ipo-section > div:first-child span { margin: 0; color: #887967; font-size: 12px; }
.application-picker-empty { color: #6a8295; font-size: 12px; }

.application-register-panel .ipo-group-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 0 0;
  padding: 5px 8px;
  border: 1px solid #d6e2d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #39617f;
  line-height: 1;
  vertical-align: middle;
}

.application-register-panel .ipo-group-select input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.application-register-panel .application-ipo-group strong,
.application-register-panel .application-ipo-group span {
  display: inline-block;
  vertical-align: middle;
}

.application-register-panel .applications-table .refund-plan-wrap { min-height: 28px; }

/* Register controls need a guaranteed action column; never compress them into unreadable fragments. */
.application-register-panel .applications-table,
.application-register-panel .erp-shell .applications-table {
  min-width: 1020px;
}

.application-register-panel .applications-table th:first-child,
.application-register-panel .applications-table td:first-child { width: 4%; }
.application-register-panel .applications-table th:nth-child(2),
.application-register-panel .applications-table td:nth-child(2) { width: 14%; }
.application-register-panel .applications-table th:nth-child(3),
.application-register-panel .applications-table td:nth-child(3) { width: 16%; }
.application-register-panel .applications-table th:nth-child(4),
.application-register-panel .applications-table td:nth-child(4) { width: 11%; }
.application-register-panel .applications-table th:nth-child(5),
.application-register-panel .applications-table td:nth-child(5) { width: 7%; }
.application-register-panel .applications-table th:nth-child(6),
.application-register-panel .applications-table td:nth-child(6) { width: 9%; }
.application-register-panel .applications-table th:nth-child(7),
.application-register-panel .applications-table td:nth-child(7) { width: 9%; }
.application-register-panel .applications-table th:nth-child(8),
.application-register-panel .applications-table td:nth-child(8) { width: 15%; }
.application-register-panel .applications-table th:nth-child(9),
.application-register-panel .applications-table td:nth-child(9) { width: 15%; }

.application-register-panel .applications-table .application-actions {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
  gap: 5px;
}

.application-register-panel .applications-table .check-allotment-btn {
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

.application-register-panel .applications-table .application-actions .application-icon-action {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  place-items: center;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

/* Source and category now read as one calm, structured detail pair. */
.application-register-panel .applications-table th:nth-child(4),
.application-register-panel .applications-table td:nth-child(4) { width: 12%; }
.application-register-panel .applications-table th:nth-child(5),
.application-register-panel .applications-table td:nth-child(5) { width: 8%; }
.application-register-panel .applications-table th:nth-child(6),
.application-register-panel .applications-table td:nth-child(6) { width: 9%; }
.application-register-panel .applications-table th:nth-child(7),
.application-register-panel .applications-table td:nth-child(7) { width: 9%; }
.application-register-panel .applications-table th:nth-child(8),
.application-register-panel .applications-table td:nth-child(8) { width: 13%; }
.application-register-panel .applications-table th:nth-child(9),
.application-register-panel .applications-table td:nth-child(9) { width: 15%; }

.application-register-panel .applications-table .application-funding-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #dce8f2;
  border-radius: 8px;
  background: #f7fafc;
  color: #4a5f55;
  font-size: 12px;
  font-weight: 800;
}

/* Keep long funding requirements readable within their fixed register column. */
.application-register-panel .applications-table td.funding-status-cell {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.application-register-panel .applications-table .funding-needed {
  display: inline-flex;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: #4a5f55;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.12;
  white-space: normal;
}

.application-register-panel .applications-table .funding-needed strong {
  display: block;
  max-width: 100%;
  color: #1d476d;
  font-size: clamp(9px, 0.76vw, 11px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.application-register-panel .applications-table .funding-needed small {
  color: #66819a;
  font-size: 12px;
  font-weight: 700;
}

.funding-pending-hint.is-warning {
  border-color: #e7c46d;
  background: #fff8e7;
  color: #77520d;
}

.funding-pending-hint.is-complete {
  border-color: #b7dcc4;
  background: #effaf3;
  color: #216b3c;
}

.application-register-panel .applications-table .funding-status-cell .compact-record-funding-btn {
  margin-top: 4px;
}

/* Type-ahead keeps a long ledger list fast to use without losing account groups. */
.voucher-account-picker-list .voucher-account-search {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  min-height: 34px;
  margin: 0 0 5px;
  padding: 6px 9px;
  box-sizing: border-box;
  border: 1px solid #cbddec;
  border-radius: 8px;
  background: #fbfdff;
  color: #1d405f;
  font: inherit;
  font-size: 12px;
}

.voucher-account-picker-list .voucher-account-search:focus {
  border-color: #79aefa;
  box-shadow: 0 0 0 3px rgba(80, 145, 237, 0.14);
  outline: 0;
}

.voucher-line .voucher-debit-marker,
.voucher-line .voucher-credit-marker {
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.voucher-line .voucher-debit-marker small,
.voucher-line .voucher-credit-marker small {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.application-register-panel .applications-table .application-funding-source i {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4f9a78;
}

.application-register-panel .applications-table .application-funding-source.is-savings i { background: #7f9a89; }
.application-register-panel .applications-table .application-funding-source.is-pending i { background: #c98b35; }
.application-register-panel .applications-table td:nth-child(4) { padding-right: 3px; }
.application-register-panel .applications-table td:nth-child(5) { padding-left: 3px; }

.application-register-panel .applications-table .check-allotment-btn {
  flex: 0 0 86px;
  width: 86px;
  min-width: 86px;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  letter-spacing: -0.01em;
}

/* Applicant ledger: keep every transaction in one composed, scannable row. */
.account-ledger-dialog {
  width: min(790px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border-radius: 22px;
  background: #fbfdff;
}

.account-ledger-dialog .ipo-ledger-dialog-content { padding: 26px; }

.account-ledger-dialog .dialog-title-row {
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e3edf5;
}

.account-ledger-dialog .account-ledger-account-name {
  margin: 0 0 6px;
  color: #688097;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.account-ledger-dialog .account-ledger-balance {
  color: #19362f;
  font-size: 22px;
  font-weight: 800;
}

.account-ledger-dialog .account-ledger-header-actions {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.account-ledger-dialog .account-ledger-balances {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.account-ledger-dialog .account-ledger-balances span {
  max-width: 210px;
  padding: 5px 8px;
  border: 1px solid #dce8f2;
  border-radius: 999px;
  background: #f4f8fc;
  color: #55718b;
  font-size: 12px;
  line-height: 1.25;
}

.account-ledger-dialog .account-ledger-balances .is-settled {
  border-color: #d5eadc;
  background: #f0faf3;
  color: #377654;
}

.account-ledger-dialog .ipo-ledger-rows {
  max-height: 430px;
  margin-top: 16px;
  border: 1px solid #e0eaf2;
  border-radius: 16px;
  background: #ffffff;
}

.account-ledger-dialog .ipo-ledger-row {
  grid-template-columns: 88px minmax(0, 1fr) minmax(92px, auto) auto;
  gap: 14px;
  min-height: 64px;
  margin: 0;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid #e7eef5;
  border-radius: 0;
  background: transparent;
}

.account-ledger-dialog .ipo-ledger-row:last-child { border-bottom: 0; }
.account-ledger-dialog .ipo-ledger-row:hover { background: #f7fbff; }

.account-ledger-dialog .ledger-row-date {
  color: #6d8498;
  font-size: 12px;
  font-weight: 700;
}

.account-ledger-dialog .ledger-row-detail strong {
  display: block;
  margin-bottom: 3px;
  color: #234766;
  font-size: 13px;
}

.account-ledger-dialog .ledger-row-detail small { line-height: 1.35; }
.account-ledger-dialog .ipo-ledger-row b { color: #19362f; font-size: 13px; text-align: right; }

.account-ledger-dialog .ledger-funding b { color: #287747; }
.account-ledger-dialog .ledger-refund b { color: #a45b31; }
.account-ledger-dialog .ledger-transfer b { color: #276a98; }

.account-ledger-dialog .account-ledger-edit-btn {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: none;
}

.account-ledger-dialog .account-ledger-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.account-ledger-dialog .account-ledger-delete-btn {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #f2c9c9;
  border-radius: 8px;
  background: #fff8f8;
  color: #b34040;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.account-ledger-dialog .account-ledger-delete-btn:hover { background: #fff0f0; }

.account-ledger-workspace-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-ledger-voucher-delete-btn {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #f2c9c9;
  border-radius: 8px;
  background: #fff8f8;
  color: #b34040;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.account-ledger-voucher-delete-btn:hover { background: #fff0f0; }

.ledger-shortcut-key {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid #d9e6f2;
  border-radius: 8px;
  background: #f5f9fc;
  color: #58738b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}

/* Accounting workspace: choose a ledger at left, review its complete trail at right. */
.account-ledger-workspace-dialog {
  width: min(1320px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  border-radius: 22px;
  background: #fbfdff;
}

.account-ledger-workspace-shell { padding: 26px; }
.account-ledger-workspace-title { padding-bottom: 18px; border-bottom: 1px solid #e1ebf3; }
.account-ledger-workspace-title h3 { margin: 4px 0 5px; color: #19362f; font-size: 28px; }
.account-ledger-workspace-title p:not(.eyebrow) { margin: 0; color: #637b93; }
.account-ledger-workspace { display: grid; grid-template-columns: minmax(238px, .34fr) minmax(0, 1fr); min-height: 580px; }
.account-ledger-account-pane { padding: 18px 16px 18px 0; border-right: 1px solid #e1ebf3; }
.account-ledger-search-label { display: grid; gap: 7px; color: #46627d; font-size: 12px; font-weight: 800; }
.account-ledger-search-label input { min-height: 38px; padding: 8px 10px; border: 1px solid #cddfed; border-radius: 12px; background: #fff; }
.account-ledger-list-heading { display: flex; justify-content: space-between; margin: 18px 10px 8px; color: #6f869a; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.account-ledger-account-list { display: grid; max-height: 510px; overflow-y: auto; border: 1px solid #e0eaf2; border-radius: 12px; background: #fff; }
.account-ledger-account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf2f6; border-radius: 0; background: #fff; color: #284a68; text-align: left; box-shadow: none; }
.account-ledger-account-row:last-child { border-bottom: 0; }
.account-ledger-account-row span { min-width: 0; overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-ledger-account-row b { color: #19362f; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-ledger-account-row:hover { background: #f5f9fc; }
.account-ledger-account-row.is-selected { background: #eaf4ff; box-shadow: inset 3px 0 0 #1675c1; }
.account-ledger-empty { margin: 0; padding: 18px; color: #627269; font-size: 12px; }
.account-ledger-detail-pane { min-width: 0; padding: 18px 0 0 20px; }
.account-ledger-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.account-ledger-detail-header h3 { margin: 3px 0 4px; color: #19362f; font-size: 22px; }
.account-ledger-detail-header p:not(.eyebrow) { margin: 0; color: #698097; font-size: 12px; }
.account-ledger-detail-actions { display: flex; align-items: center; gap: 10px; }
.account-ledger-transaction-detail-heading .account-ledger-detail-actions { flex-wrap: wrap; justify-content: flex-end; }
.account-ledger-transaction-detail-heading .danger-btn { min-height: 28px; padding: 5px 9px; border: 1px solid #f7c9c9; border-radius: 8px; font-size: 12px; font-weight: 800; }
.account-ledger-transaction-detail-heading #deleteLedgerFundingBtn[hidden],
.account-ledger-transaction-detail-heading #deleteLedgerVoucherBtn[hidden] { display: none !important; }
.account-ledger-detail-actions > strong { padding: 10px 13px; border: 1px solid #cfe1f1; border-radius: 12px; background: #f5faff; color: #174a74; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-ledger-detail-actions .primary-btn { min-height: 40px; padding: 9px 14px; border-radius: 12px; white-space: nowrap; }
.account-ledger-workspace-dialog .account-ledger-table-wrap { max-height: 315px; margin: 0; border: 1px solid #dce8f2; border-radius: 12px; }
.account-ledger-workspace-dialog .account-ledger-table-wrap table { min-width: 720px; }
.account-ledger-workspace-dialog .account-ledger-table-wrap th { position: sticky; top: 0; z-index: 1; background: #eef6ff; }

/* MARG's keyboard-first voucher flow, in the app's Apple-style dialog language. */
.voucher-type-dialog, .voucher-entry-dialog { border: 1px solid rgba(202, 218, 232, .9); border-radius: 28px; background: rgba(255, 255, 255, .98); box-shadow: 0 30px 90px rgba(24, 57, 86, .26); color: #19362f; }
.voucher-type-dialog { width: min(620px, calc(100vw - 32px)); }.voucher-entry-dialog { width: min(1020px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.voucher-type-dialog::backdrop, .voucher-entry-dialog::backdrop { background: rgba(26, 46, 67, .38); backdrop-filter: blur(7px); }
.voucher-marg-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 0 26px; border-bottom: 1px solid #e3edf5; background: linear-gradient(135deg, #f9fcff, #eef6fd); color: #58728d; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.voucher-marg-bar button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #54708a; font-size: 22px; font-weight: 400; box-shadow: none; }.voucher-marg-bar button:hover { background: #e6f1fa; color: #1d5f98; }
.voucher-type-content { padding: 28px; }.voucher-type-content h3, .voucher-entry-header h3 { margin: 5px 0 7px; color: #19362f; font-family: inherit; font-size: 28px; letter-spacing: -.035em; }.voucher-type-content > p:not(.eyebrow), .voucher-entry-header p:not(.eyebrow) { margin: 0; color: #617a93; }
.voucher-type-list { display: grid; gap: 10px; margin: 24px 0; }.voucher-type-choice { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 14px; padding: 15px; border: 1px solid #d7e5f0; border-radius: 16px; background: #fff; color: #234766; text-align: left; box-shadow: 0 3px 10px rgba(25, 62, 93, .035); }.voucher-type-choice:hover, .voucher-type-choice:focus-visible, .voucher-type-choice.is-active { border-color: #8bbbf0; background: #f5faff; box-shadow: 0 8px 20px rgba(38, 111, 174, .12); outline: none; transform: translateY(-1px); }.voucher-type-choice kbd { display: grid; place-items: center; width: 36px; height: 30px; border: 1px solid #bfd7ec; border-radius: 8px; background: #eef6ff; color: #23659f; font-size: 12px; font-weight: 800; }.voucher-type-choice strong, .voucher-type-choice small { display: block; }.voucher-type-choice strong { font-size: 16px; }.voucher-type-choice small { margin-top: 2px; color: #627269; font-size: 12px; }.voucher-type-actions { display: flex; align-items: center; justify-content: space-between; color: #627269; font-size: 12px; }.voucher-type-actions kbd { padding: 2px 5px; border: 1px solid #d2e2ef; border-radius: 8px; background: #f7fbff; color: #52718e; }
.voucher-entry-shell { min-height: 0; }.voucher-entry-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 26px 18px; border-bottom: 1px solid #e3edf5; }.voucher-entry-header .secondary-btn { border-radius: 12px; background: #f8fbfe; }.voucher-meta { display: grid; grid-template-columns: 1fr 180px; gap: 20px; padding: 15px 26px; background: #fbfdff; border-bottom: 1px solid #e6eef5; }
.voucher-entry-shell label { display: grid; gap: 6px; color: #4d6983; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.voucher-entry-shell input, .voucher-entry-shell select, .voucher-entry-shell textarea { width: 100%; border: 1px solid #c8dced; border-radius: 12px; background: #fff; color: #1d405f; box-shadow: inset 0 1px 2px rgba(21, 55, 85, .025); font-family: inherit; font-size: 14px; }.voucher-entry-shell input:focus, .voucher-entry-shell select:focus, .voucher-entry-shell textarea:focus { border-color: #79aefa; box-shadow: 0 0 0 4px rgba(80, 145, 237, .14); outline: none; }.voucher-entry-shell input, .voucher-entry-shell select { min-height: 42px; padding: 8px 11px; }.voucher-entry-shell textarea { min-height: 72px; padding: 10px 11px; resize: vertical; }
.voucher-lines { margin: 18px 26px 0; overflow: visible; border: 1px solid #d4e3ef; border-radius: 16px; background: #fff; }.voucher-line-head, .voucher-line { display: grid; grid-template-columns: 64px minmax(300px, 1.55fr) minmax(130px, .6fr) minmax(140px, .65fr); align-items: stretch; }.voucher-line-head { background: #eef6ff; color: #63809a; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.voucher-line-head span, .voucher-line > * { min-width: 0; padding: 10px; border-right: 1px solid #e2edf5; }.voucher-line-head span:last-child, .voucher-line > *:last-child { border-right: 0; }.voucher-line { min-height: 70px; border-top: 1px solid #e7eff6; }.voucher-line strong { display: flex; align-items: center; justify-content: center; font-size: 14px; }.voucher-debit-marker { color: #2472b4; background: #f0f7ff; }.voucher-credit-marker { color: #a75a3d; background: #fff7f2; }.voucher-line label { padding: 8px 10px; }.voucher-line label select { min-height: 36px; padding: 5px 8px; border-radius: 8px; font-size: 12px; }.voucher-account-picker { position: relative; }.voucher-account-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }.voucher-account-trigger { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 5px 34px 5px 8px; border: 1px solid #c8dced; border-radius: 8px; background: #fff; color: #1d405f; font: inherit; font-size: 12px; font-weight: 700; text-align: left; box-shadow: inset 0 1px 2px rgba(21, 55, 85, .025); }.voucher-account-trigger::after { position: absolute; top: 50%; right: 13px; width: 7px; height: 7px; border-right: 1.5px solid #315b7e; border-bottom: 1.5px solid #315b7e; content: ""; transform: translateY(-68%) rotate(45deg); }.voucher-account-trigger:focus { border-color: #79aefa; box-shadow: 0 0 0 4px rgba(80, 145, 237, .14); outline: none; }.voucher-account-picker-list { position: absolute; z-index: 12; top: calc(100% + 6px); right: 0; left: 0; max-height: 255px; overflow: auto; padding: 6px; border: 1px solid #cddfec; border-radius: 12px; background: rgba(255, 255, 255, .99); box-shadow: 0 16px 32px rgba(25, 60, 89, .18); }.voucher-account-group + .voucher-account-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid #e5eef5; }.voucher-account-group > strong { display: block; padding: 6px 8px 4px; color: #6b8295; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }.voucher-account-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; width: 100%; gap: 16px; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: #234766; text-align: left; box-shadow: none; }.voucher-account-option span { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.voucher-account-option b { color: #4d718f; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }.voucher-account-option:hover, .voucher-account-option:focus, .voucher-account-option.is-selected { background: #eaf4ff; color: #164f84; outline: none; }.voucher-account-option.is-selected b { color: #164f84; }.voucher-line output { display: flex; align-items: center; justify-content: flex-end; color: #315b7e; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }.voucher-line input { align-self: stretch; border: 0; border-radius: 0; padding: 10px; text-align: right; font-size: 16px; font-weight: 800; }.voucher-notes { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; padding: 18px 26px; }.voucher-entry-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 26px; border-top: 1px solid #e0ebf4; background: #fbfdff; }.voucher-entry-footer div { min-width: 122px; padding-right: 14px; border-right: 1px solid #dce9f2; }.voucher-entry-footer span, .voucher-entry-footer strong { display: block; }.voucher-entry-footer span { color: #627269; font-size: 12px; text-transform: uppercase; }.voucher-entry-footer strong { color: #19362f; font-size: 14px; }.voucher-entry-footer .secondary-btn, .voucher-entry-footer .primary-btn { min-height: 40px; border-radius: 12px; }.voucher-entry-footer .primary-btn { background: #1468b8; box-shadow: 0 8px 18px rgba(24, 100, 181, .2); }

/* Daily workflow: a quiet, practical operating panel inspired by trading workspaces. */
.daily-workflow-panel {
  padding: 22px;
  border-color: #e0e7ed;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(23, 50, 77, 0.045);
}

.daily-workflow-panel .panel-header {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf1f4;
}

.daily-workflow-panel .panel-header h2 {
  margin-bottom: 3px;
  color: #293b4d;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.daily-workflow-panel .panel-header p {
  color: #6b7c8b;
  font-size: 12px;
}

.daily-workflow-panel .workflow-heading-actions .secondary-btn {
  min-height: 34px;
  border-color: #d9e1e7;
  border-radius: 8px;
  color: #387ed1;
  font-size: 12px;
  font-weight: 700;
}

.daily-workflow-panel .workflow-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.daily-workflow-panel .workflow-step {
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 7px 10px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid #e1e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: #415466;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.daily-workflow-panel .workflow-step:hover {
  transform: none;
  border-color: #b8cde0;
  background: #fcfdfe;
  box-shadow: 0 3px 10px rgba(41, 70, 96, 0.07);
}

.daily-workflow-panel .workflow-step:active { transform: none; box-shadow: none; }
.daily-workflow-panel .workflow-step.needs-action { border-top: 3px solid #e6a23c; background: #fffdfa; }
.daily-workflow-panel .workflow-step.is-clear { border-top: 3px solid #42a86c; background: #fcfffd; }

.daily-workflow-panel .workflow-step-number {
  grid-column: 1;
  grid-row: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef5fc;
  box-shadow: none;
  color: #387ed1;
  font-size: 12px;
}

.daily-workflow-panel .workflow-step-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-top: 1px;
}
.daily-workflow-panel .workflow-step strong {
  color: #31485e;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.daily-workflow-panel .workflow-step b {
  margin-top: 4px;
  color: #202f3d;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.daily-workflow-panel .workflow-step small {
  margin-top: 7px;
  color: #748594;
  font-size: 12px;
  line-height: 1.4;
}

.daily-workflow-panel .workflow-step-action {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 3;
  align-items: center;
  justify-content: space-between;
  align-self: end;
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid #e0e9f1;
  border-radius: 8px;
  background: #f8fbfe;
  color: #387ed1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
}

.daily-workflow-panel .workflow-step-action i {
  display: inline;
  margin-top: 0;
  color: #6b8eb1;
  font-size: 12px;
}

@media (max-width: 760px) {
  [data-tab-panel="applications"] { gap: 14px; }

  .application-register-panel,
  .application-archive-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .application-register-panel .panel-header,
  .application-archive-panel .panel-header { flex-direction: column; }

  .application-register-panel .application-recording-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .application-register-panel .application-recording-status {
    flex-basis: 100%;
    width: 100%;
  }

  .application-register-panel .application-recording-actions button { flex: 1 1 calc(50% - 8px); }
  .application-register-panel .application-category-summary { grid-template-columns: 1fr; gap: 8px; }
  .application-register-panel .applications-table { min-width: 990px; }

  .account-ledger-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .account-ledger-dialog .ipo-ledger-dialog-content { padding: 18px; }
  .account-ledger-dialog .dialog-title-row { align-items: flex-start; }
  .account-ledger-dialog .account-ledger-header-actions { flex-direction: column; align-items: flex-end; gap: 8px; }
  .account-ledger-dialog .ipo-ledger-row { grid-template-columns: 72px minmax(0, 1fr) 52px; gap: 9px; padding: 11px; }
  .account-ledger-dialog .ipo-ledger-row b { grid-column: 2; grid-row: 2; text-align: left; }
  .account-ledger-dialog .account-ledger-entry-actions { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }

  .account-ledger-workspace-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 16px; }
  .account-ledger-workspace-shell { padding: 18px; }
  .account-ledger-workspace { grid-template-columns: 1fr; min-height: 0; }
  .account-ledger-account-pane { padding: 14px 0; border-right: 0; border-bottom: 1px solid #e1ebf3; }
  .account-ledger-account-list { max-height: 210px; }
  .account-ledger-detail-pane { padding: 16px 0 0; }
  .account-ledger-detail-header { align-items: stretch; flex-direction: column; }
  .account-ledger-detail-actions { width: 100%; justify-content: space-between; }
  .account-ledger-detail-actions > strong { width: fit-content; }
  .account-ledger-workspace-dialog .account-ledger-table-wrap { max-height: 270px; }

  .voucher-type-dialog, .voucher-entry-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .voucher-entry-shell { min-height: 0; }
  .voucher-entry-header { padding: 16px; }.voucher-entry-header h3, .voucher-type-content h3 { font-size: 22px; }
  .voucher-meta, .voucher-notes { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .voucher-lines { margin: 0 16px; overflow-x: auto; }
  .voucher-line-head, .voucher-line { min-width: 650px; }
  .voucher-entry-footer { flex-wrap: wrap; padding: 12px 16px; }.voucher-entry-footer div { flex: 1; }

  .daily-workflow-panel { padding: 16px; border-radius: 12px; }
  .daily-workflow-panel .panel-header { align-items: flex-start; }
  .daily-workflow-panel .workflow-steps { grid-template-columns: 1fr; }
  .daily-workflow-panel .workflow-step { min-height: 132px; }
}

@media (min-width: 761px) and (max-width: 1200px) {
  .daily-workflow-panel .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Application capacity: a balanced planning surface with one clear visual language. */
.capacity-planner-panel {
  padding: 22px;
  border-color: #e0e7ed;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f7f9fb 100%);
  box-shadow: 0 8px 22px rgba(23, 50, 77, 0.045);
}

.capacity-planner-panel .panel-header {
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9eef2;
}

.capacity-planner-panel .panel-header h2 {
  margin-bottom: 3px;
  color: #263b4f;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.capacity-planner-panel .panel-header p { color: #6e7f8f; font-size: 12px; }

.capacity-planner-panel .capacity-planner-controls {
  flex: 0 1 510px;
  min-width: min(100%, 360px);
  padding: 4px;
  border: 1px solid #e1e7ec;
  border-radius: 12px;
  background: #f4f6f8;
}

.capacity-planner-panel .capacity-planner-controls select {
  min-width: 270px;
  height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: #ffffff;
  color: #344c60;
  font-size: 12px;
}

.capacity-planner-panel .capacity-planner-controls select:disabled {
  color: #8a98a5;
  background-color: #f8f9fa;
}

.capacity-planner-panel .capacity-planner-controls .primary-btn {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  background: #1677e8;
  box-shadow: none;
  font-size: 12px;
}

.capacity-planner-panel .capacity-balance-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.capacity-planner-panel .capacity-balance-summary > div,
.capacity-planner-panel .capacity-balance-summary .capacity-balance-card {
  min-height: 94px;
  padding: 15px;
  border: 1px solid #e0e6eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.capacity-planner-panel .capacity-balance-summary .capacity-balance-card {
  border-color: #cfe0f0;
  background: linear-gradient(145deg, #ffffff, #f3f8fd);
}

.capacity-planner-panel .capacity-balance-summary .capacity-balance-card:hover {
  transform: none;
  border-color: #8ab7e1;
  box-shadow: 0 3px 10px rgba(40, 91, 133, 0.08);
}

.capacity-planner-panel .capacity-balance-summary span {
  color: #718394;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.capacity-planner-panel .capacity-balance-summary strong {
  margin-top: 8px;
  color: #2a3e50;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.capacity-planner-panel .capacity-balance-summary small {
  margin-top: 6px;
  color: #2875bf;
  font-size: 12px;
}

.capacity-planner-panel .capacity-plan-result {
  min-height: 48px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #d9e7f3;
  border-radius: 12px;
  background: #f5faff;
  color: #35617f;
  font-size: 12px;
}

.capacity-planner-panel .capacity-allocation {
  gap: 8px;
  margin-top: 12px;
}

.capacity-planner-panel .capacity-category-btn,
.capacity-planner-panel .capacity-allocation .secondary-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 12px;
}

.capacity-planner-panel .capacity-category-btn {
  border-color: #cae0d1;
  background: #f2faf5;
  color: #31754e;
}

.capacity-planner-panel .capacity-ledger-shortcut {
  align-items: center;
  margin-top: 16px;
  padding: 15px 16px;
  border-color: #e1e7ec;
  border-radius: 12px;
  background: #fbfcfd;
}

.capacity-planner-panel .capacity-ledger-shortcut h3 { color: #324a5d; }
.capacity-planner-panel .capacity-ledger-shortcut .secondary-btn {
  min-height: 38px;
  border-radius: 8px;
  color: #2e6fae;
  font-size: 12px;
}

@media (max-width: 980px) {
  .capacity-planner-panel .panel-header { align-items: flex-start; flex-direction: column; }
  .capacity-planner-panel .capacity-planner-controls { width: 100%; max-width: 560px; }
  .capacity-planner-panel .capacity-balance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .capacity-planner-panel { padding: 16px; border-radius: 12px; }
  .capacity-planner-panel .capacity-planner-controls { align-items: stretch; flex-direction: column; }
  .capacity-planner-panel .capacity-planner-controls select,
  .capacity-planner-panel .capacity-planner-controls .primary-btn { width: 100%; min-width: 0; }
  .capacity-planner-panel .capacity-balance-summary { grid-template-columns: 1fr; }
  .capacity-planner-panel .capacity-balance-summary > div,
  .capacity-planner-panel .capacity-balance-summary .capacity-balance-card { min-height: 82px; }
}

/* Final workspace containment: inactive panels must never influence another tab's layout. */
body { overflow-x: hidden; }
.tab-section:not(.active) { display: none !important; }
.tab-section[data-tab-panel="applications"].active { display: grid; }

.application-register-panel { min-width: 0; overflow: hidden; }
.application-register-panel .application-register-wrap { overscroll-behavior-inline: contain; }

/* Dates remain on one calm, readable line in the transaction register. */
.transaction-history-table th:first-child,
.transaction-history-table td:first-child {
  width: 104px;
  min-width: 104px;
  white-space: nowrap;
}

/* Dashboard market strip: compact NSE-style session metrics on one desktop line. */
.erp-shell #summaryCards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid #dce7ee;
  border-radius: 16px;
  background: rgba(248, 251, 253, .82);
}

.erp-shell #summaryCards .summary-market-card {
  position: relative;
  min-width: 0;
  min-height: 82px;
  padding: 13px 12px 11px;
  overflow: hidden;
  border: 1px solid #dde7ed;
  border-radius: 12px;
  border-top: 3px solid #3d8ebd;
  background: linear-gradient(145deg, #fff, #f9fbfc);
  box-shadow: none;
}

.erp-shell #summaryCards .summary-market-card:nth-child(1),
.erp-shell #summaryCards .summary-market-card:nth-child(5) { border-top-color: #4aa27d; }
.erp-shell #summaryCards .summary-market-card:nth-child(3) { border-top-color: #1c719f; }
.erp-shell #summaryCards .summary-market-card:nth-child(4) { border-top-color: #b17d3b; }

.erp-shell #summaryCards .summary-market-card p {
  min-height: 22px;
  margin: 0 0 7px;
  overflow: hidden;
  color: #647c91;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .065em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.erp-shell #summaryCards .summary-market-card h3 {
  margin: 0;
  overflow: hidden;
  color: #173d5f;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.25vw, 22px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .erp-shell #summaryCards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .erp-shell #summaryCards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 7px; }
  .erp-shell #summaryCards .summary-market-card { min-height: 76px; padding: 11px 10px; }
}

/* Savings ledger: a wide, contained transaction workspace rather than a squeezed form dialog. */
.edit-dialog.savings-transfer-ledger-dialog {
  width: min(1080px, calc(100vw - 36px));
  max-width: min(1080px, calc(100vw - 36px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid #d5e2eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(21, 55, 83, .22);
}

.savings-transfer-ledger-dialog::backdrop {
  background: rgba(17, 46, 70, .34);
  backdrop-filter: blur(8px) saturate(.9);
}

.savings-transfer-ledger-dialog .edit-account-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  padding: 24px 26px 22px;
}

.savings-transfer-ledger-dialog .dialog-title-row,
.savings-transfer-ledger-dialog .savings-ledger-toolbar,
.savings-transfer-ledger-dialog .savings-transfer-table-wrap { grid-column: 1; }

.savings-transfer-ledger-dialog .dialog-title-row {
  align-items: flex-start;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8eef3;
}

.savings-transfer-ledger-dialog .dialog-title-row h3 { margin-top: 4px; color: #193d5d; font-size: 22px; letter-spacing: -.035em; }
.savings-transfer-ledger-dialog .dialog-title-row p:not(.eyebrow) { max-width: 640px; color: #6b8192; font-size: 13px; line-height: 1.45; }
.savings-transfer-ledger-dialog .dialog-title-row .secondary-btn { min-width: 84px; }

.savings-transfer-ledger-dialog .savings-ledger-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 13px 14px;
  border-color: #dfeaf1;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbfd, #f2f8fb);
}

.savings-transfer-ledger-dialog .capacity-savings-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-right: 16px;
  border-right: 1px solid #dbe7ee;
}
.savings-transfer-ledger-dialog .capacity-savings-metric span { color: #688095; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.savings-transfer-ledger-dialog .capacity-savings-metric strong { color: #173d5f; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; white-space: nowrap; }

.savings-transfer-ledger-dialog .capacity-transfer-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.savings-transfer-ledger-dialog .capacity-transfer-action-buttons .primary-btn,
.savings-transfer-ledger-dialog .capacity-transfer-action-buttons .secondary-btn {
  min-width: 0;
  min-height: 37px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12px;
}

.savings-transfer-ledger-dialog .savings-transfer-table-wrap {
  max-height: min(420px, 49vh);
  min-height: 0;
  margin: 0;
  overflow: auto;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
}

.savings-transfer-ledger-dialog .savings-ledger-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.savings-transfer-ledger-dialog .savings-ledger-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px;
  background: #f2f7fb;
  color: #627b91;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.savings-transfer-ledger-dialog .savings-ledger-table td {
  padding: 13px 12px;
  color: #274965;
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.savings-transfer-ledger-dialog .savings-ledger-table tr:nth-child(even) td { background: #fbfdfe; }
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(1) { width: 12%; }
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(2),
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(3) { width: 18%; }
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(4) { width: 13%; }
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(5) { width: 18%; }
.savings-transfer-ledger-dialog .savings-ledger-table th:nth-child(6) { width: 21%; }
.savings-transfer-ledger-dialog .savings-ledger-table td:nth-child(1),
.savings-transfer-ledger-dialog .savings-ledger-table td:nth-child(4) { white-space: nowrap; }
.savings-transfer-ledger-dialog .savings-ledger-table td:nth-child(4) { color: #173d5f; font-weight: 800; font-variant-numeric: tabular-nums; }

.savings-ledger-row-actions { display: flex; gap: 6px; white-space: nowrap; }
.savings-ledger-row-actions .secondary-btn { min-height: 28px; padding: 4px 7px; border-radius: 8px; box-shadow: none; font-size: 12px; }

@media (max-width: 820px) {
  .edit-dialog.savings-transfer-ledger-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .savings-transfer-ledger-dialog .edit-account-form { padding: 18px; }
  .savings-transfer-ledger-dialog .savings-ledger-toolbar { grid-template-columns: 1fr; }
  .savings-transfer-ledger-dialog .capacity-savings-metric { padding: 0 0 11px; border-right: 0; border-bottom: 1px solid #dbe7ee; }
  .savings-transfer-ledger-dialog .capacity-transfer-action-buttons { justify-content: flex-start; flex-wrap: wrap; }
  .savings-transfer-ledger-dialog .savings-ledger-table { min-width: 760px; }
}

/* Historical planning: a focused single-column sheet with compact planning rows. */
.edit-dialog.old-ipo-planner-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-width: min(1040px, calc(100vw - 36px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid #d5e2eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(21, 55, 83, .22);
}

.old-ipo-planner-dialog::backdrop { background: rgba(17, 46, 70, .34); backdrop-filter: blur(8px) saturate(.9); }

.old-ipo-planner-dialog .old-ipo-planner-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  width: 100%;
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  padding: 24px 26px 22px;
}

.old-ipo-planner-dialog .dialog-title-row,
.old-ipo-planner-dialog .old-ipo-planner-rows,
.old-ipo-planner-dialog .old-ipo-planner-footer,
.old-ipo-planner-dialog .dialog-actions { grid-column: 1; }

.old-ipo-planner-dialog .dialog-title-row { align-items: flex-start; padding-bottom: 15px; border-bottom: 1px solid #e8eef3; }
.old-ipo-planner-dialog .dialog-title-row h3 { margin-top: 4px; color: #193d5d; font-size: 22px; letter-spacing: -.035em; }
.old-ipo-planner-dialog .dialog-title-row p:not(.eyebrow) { max-width: 630px; color: #6b8192; font-size: 13px; line-height: 1.45; }
.old-ipo-planner-dialog .dialog-title-row .secondary-btn { min-width: 84px; }

.old-ipo-planner-dialog .old-ipo-planner-rows { display: grid; gap: 10px; min-height: 0; max-height: min(420px, 48vh); overflow: auto; padding-right: 2px; }
.old-ipo-planner-dialog .old-ipo-planner-row { padding: 16px; border-color: #dbe7ee; border-radius: 12px; background: linear-gradient(145deg, #fff, #f8fbfd); box-shadow: 0 3px 10px rgba(23, 61, 91, .025); }
.old-ipo-planner-dialog .old-ipo-main-fields { grid-template-columns: 1.2fr 1.3fr 1fr 32px; gap: 12px; }
.old-ipo-planner-dialog .old-ipo-main-fields label,
.old-ipo-planner-dialog .old-ipo-add-source-label { color: #60788d; font-size: 12px; letter-spacing: .02em; }
.old-ipo-planner-dialog .old-ipo-account-label { position: relative; }
.old-ipo-planner-dialog .old-ipo-existing-application {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  color: #7a8d9e;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.old-ipo-planner-dialog .old-ipo-planner-row.has-existing-application .old-ipo-funding-area { margin-top: 29px; }
.old-ipo-planner-dialog .old-ipo-main-fields select,
.old-ipo-planner-dialog .old-ipo-funding-source select,
.old-ipo-planner-dialog .old-ipo-funding-source input,
.old-ipo-planner-dialog .old-ipo-add-source-label select { height: 38px; border-color: #ccddea; border-radius: 12px; background: #fbfdff; font-size: 12px; }
.old-ipo-planner-dialog .old-ipo-funding-area { gap: 9px; margin-top: 14px; padding-top: 13px; border-top-color: #e3edf3; }
.old-ipo-planner-dialog .old-ipo-funding-area > strong { color: #284a67; font-size: 12px; }
.old-ipo-planner-dialog .old-ipo-funding-source { grid-template-columns: minmax(220px, 1.15fr) minmax(150px, .7fr) minmax(150px, .7fr) 32px; gap: 10px; align-items: end; }
.old-ipo-planner-dialog .old-ipo-funding-source label { display: grid; gap: 4px; color: #60788d; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.old-ipo-planner-dialog .old-ipo-remove-row,
.old-ipo-planner-dialog .old-ipo-remove-source {
  display: grid;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  place-items: center;
  align-self: end;
  box-sizing: border-box;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1;
}
.old-ipo-planner-dialog .old-ipo-planner-footer { align-items: center; padding: 11px 13px; border: 1px solid #dce8ef; border-radius: 12px; background: #f7fbfd; color: #637b8f; font-size: 12px; }
.old-ipo-planner-dialog .old-ipo-planner-footer .secondary-btn { min-height: 35px; border-radius: 8px; font-size: 12px; }
.old-ipo-planner-dialog .old-ipo-planner-footer .secondary-btn[hidden] { display: none; }
.old-ipo-planner-dialog .dialog-actions { margin-top: 0; padding-top: 2px; }

#editOldIpoFromPlannerBtn:not([hidden]) { margin-right: auto; }

.data-health-dialog { width: min(820px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); }
.data-health-dialog-shell { display: grid; gap: 14px; max-width: none; padding: 24px 26px; }
.data-health-dialog .dialog-title-row { align-items: flex-start; padding-bottom: 13px; border-bottom: 1px solid #e4edf3; }
.data-health-dialog .dialog-title-row h3 { margin: 4px 0 5px; font-size: 22px; letter-spacing: -.035em; }
.data-health-dialog-rows { display: grid; gap: 8px; max-height: min(510px, 60vh); overflow: auto; padding-right: 3px; }
.data-health-dialog-rows article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 13px; border: 1px solid #dce7ef; border-radius: 12px; background: linear-gradient(135deg, #fff, #f8fbfd); }
.data-health-dialog-rows article > div { display: grid; gap: 3px; min-width: 0; }
.data-health-dialog-rows strong { overflow: hidden; color: #1c405f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.data-health-dialog-rows span { color: #6b8294; font-size: 12px; font-weight: 650; }
.data-health-dialog-rows .secondary-btn { min-width: 96px; min-height: 36px; padding: 7px 10px; flex-shrink: 0; font-size: 12px; }
.data-health-bulk-toolbar { display: grid; grid-template-columns: auto minmax(210px, 1fr) auto; align-items: end; gap: 10px; padding: 11px 12px; border: 1px solid #dce7ef; border-radius: 12px; background: #f5f9fc; }
.data-health-bulk-toolbar .checkbox { align-self: center; white-space: nowrap; color: #31536e; font-size: 12px; font-weight: 700; }
.data-health-date-field { display: grid; gap: 4px; color: #58738a; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.data-health-date-field input { min-height: 36px; padding: 7px 9px; border: 1px solid #c9ddec; border-radius: 8px; background: #fff; color: #1c405f; font: inherit; letter-spacing: normal; text-transform: none; }
.data-health-bulk-toolbar .primary-btn { min-height: 36px; padding: 7px 12px; font-size: 12px; white-space: nowrap; }
.data-health-date-list { display: grid; gap: 8px; }
.data-health-date-list article { padding: 10px 12px; }
.data-health-date-select { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.data-health-date-select > span { display: grid; gap: 3px; min-width: 0; }
.data-health-date-select input, .data-health-bulk-toolbar input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #1769aa; }
@media (max-width: 680px) { .data-health-bulk-toolbar { grid-template-columns: 1fr; align-items: stretch; } .data-health-bulk-toolbar .checkbox { align-self: auto; } }

.global-search-dialog .edit-account-form { display: grid !important; grid-template-columns: 1fr !important; align-items: start !important; }
.global-search-dialog #globalSearchInput { grid-column: 1 !important; grid-row: auto !important; height: 46px !important; min-height: 46px !important; }
.global-search-dialog .global-search-results { grid-column: 1 !important; grid-row: auto !important; width: 100% !important; max-height: min(400px, 48vh) !important; }
.global-search-dialog .global-search-result { width: 100%; box-sizing: border-box; }

@media (max-width: 720px) {
  .edit-dialog.old-ipo-planner-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .old-ipo-planner-dialog .old-ipo-planner-form { padding: 18px; }
  .old-ipo-planner-dialog .old-ipo-main-fields,
  .old-ipo-planner-dialog .old-ipo-funding-source { grid-template-columns: 1fr; }
  .old-ipo-planner-dialog .old-ipo-remove-row,
  .old-ipo-planner-dialog .old-ipo-remove-source { justify-self: end; }
  .old-ipo-planner-dialog .old-ipo-planner-footer { align-items: stretch; flex-direction: column; }
}

/* Final precedence for the Applications register. These rules intentionally
   sit at the end of the stylesheet so earlier legacy table styles cannot
   reintroduce clipping or excess vertical space. */
.application-register-panel .application-category-summary { gap: 12px; margin: 0 0 14px; }
.application-register-panel .application-category-summary .application-category-tile { min-height: 104px; padding: 16px 18px; border-radius: 16px; align-content: center; }
.application-register-panel .application-category-summary .application-category-tile span { font-size: 13px; }
.application-register-panel .application-category-summary .application-category-tile strong { margin: 2px 0; font-size: 28px; line-height: 1; }
.application-register-panel .application-category-summary .application-category-tile small { font-size: 13px; }

.application-register-panel .application-register-wrap { overflow-x: hidden; padding: 10px; border-radius: 16px; background: #f7fafc; }
.application-register-panel .applications-table,
.application-register-panel .erp-shell .applications-table { width: 100%; min-width: 0; table-layout: fixed; border-spacing: 0 6px; }
.application-register-panel .applications-table th { padding: 7px 8px 9px; color: #617b93; font-size: 12px; line-height: 1.15; letter-spacing: .055em; white-space: normal; }
.application-register-panel .applications-table td { min-width: 0; height: 46px; padding: 7px 8px; font-size: 12px; }
.application-register-panel .applications-table th:nth-child(1), .application-register-panel .applications-table td:nth-child(1) { width: 3%; }
.application-register-panel .applications-table th:nth-child(2), .application-register-panel .applications-table td:nth-child(2) { width: 14%; }
.application-register-panel .applications-table th:nth-child(3), .application-register-panel .applications-table td:nth-child(3) { width: 17%; }
.application-register-panel .applications-table th:nth-child(4), .application-register-panel .applications-table td:nth-child(4) { width: 14%; }
.application-register-panel .applications-table th:nth-child(5), .application-register-panel .applications-table td:nth-child(5) { width: 7%; }
.application-register-panel .applications-table th:nth-child(6), .application-register-panel .applications-table td:nth-child(6) { width: 9%; }
.application-register-panel .applications-table th:nth-child(7), .application-register-panel .applications-table td:nth-child(7) { width: 9%; }
.application-register-panel .applications-table th:nth-child(8), .application-register-panel .applications-table td:nth-child(8) { width: 14%; }
.application-register-panel .applications-table th:nth-child(9), .application-register-panel .applications-table td:nth-child(9) { width: 13%; }
.application-register-panel .applications-table select,
.application-register-panel .applications-table .filter-control { width: 100%; min-width: 0; height: 34px; padding: 0 28px 0 10px; border-radius: 12px; font-size: 12px; }
.application-register-panel .applications-table .funding-source-chip,
.application-register-panel .applications-table .category-badge,
.application-register-panel .applications-table .status-badge,
.application-register-panel .applications-table .refund-badge { max-width: 100%; box-sizing: border-box; overflow: hidden; font-size: 12px; line-height: 1.1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.application-register-panel .applications-table .funding-status { white-space: normal; font-size: 12px; line-height: 1.2; }
.application-register-panel .applications-table .application-actions { display: flex; min-width: 0; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.application-register-panel .applications-table .application-actions button,
.application-register-panel .applications-table .application-actions .secondary-btn { min-width: 0; min-height: 34px; padding: 6px 9px; border-radius: 12px; font-size: 12px; }
.application-register-panel .applications-table .application-actions .check-result-btn { min-width: 74px; }
.application-register-panel .application-register-collapsed td { height: auto; padding: 10px 12px !important; }
.application-register-panel .application-register-picker { gap: 12px; padding: 14px; border-radius: 12px; background: linear-gradient(145deg, #fbfdff, #f2f8fc); }
.application-register-panel .application-register-picker > div > strong { font-size: 14px; }
.application-register-panel .application-register-picker > div > span { font-size: 12px; }
.application-register-panel .application-ipo-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.application-register-panel .application-ipo-summary-card { min-width: 0; min-height: 90px; padding: 13px 14px; border-radius: 12px; }
.application-register-panel .application-ipo-summary-card strong { font-size: 14px; }
.application-register-panel .application-ipo-summary-card span,
.application-register-panel .application-ipo-summary-card button { font-size: 12px; }
.application-register-panel .application-old-ipo-section { gap: 9px; padding-top: 12px; border-top-color: #dce8f0; }

@media (max-width: 1100px) {
  .application-register-panel .application-register-wrap { overflow-x: auto; }
  .application-register-panel .applications-table,
  .application-register-panel .erp-shell .applications-table { min-width: 980px; }
}
.new-ledger-dialog {
  width: min(650px, calc(100vw - 28px));
}

/* Keep the decision layer compact and separate from the execution workflow. */
.command-center-panel { margin-bottom: 16px; }
.command-center-panel + .daily-workflow-panel,
.daily-workflow-panel { margin-top: 0; }
.daily-workflow-panel .workflow-steps { margin-top: 14px; }

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid #b9e3cf;
  border-radius: 12px;
  background: #effaf4;
  color: #176b43;
  box-shadow: 0 14px 34px rgba(20, 54, 83, 0.16);
  font-size: 14px;
  font-weight: 700;
}

.app-toast[hidden] { display: none; }
.app-toast.error { border-color: #f0c5c5; background: #fff5f5; color: #a52c2c; }

/* A single branded decision surface for warnings, confirmations, and compact prompts. */
.workspace-message-dialog {
  width: min(500px, calc(100vw - 28px));
  max-width: 500px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(26, 73, 57, .18);
  border-radius: 22px;
  background: #fffdf8;
  color: #183d34;
  box-shadow: 0 30px 90px rgba(19, 44, 38, .28), 0 3px 0 rgba(206, 164, 74, .2);
}
.workspace-message-dialog::backdrop { background: rgba(18, 39, 35, .46); backdrop-filter: blur(9px) saturate(.8); }
.workspace-message-shell { position: relative; display: grid; gap: 18px; margin: 0; padding: 26px; }
.workspace-message-accent { position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #116149, #22996d 68%, #d1a440); }
.workspace-message-header { display: grid; grid-template-columns: 48px minmax(0, 1fr) 34px; align-items: center; gap: 13px; }
.workspace-message-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #b9d9cc; border-radius: 16px; background: linear-gradient(145deg, #edf8f2, #fff); color: #167255; box-shadow: 0 7px 16px rgba(31, 108, 80, .12); font-family: Georgia, serif; font-size: 22px; font-weight: 800; }
.workspace-message-header .eyebrow { margin: 0 0 3px; color: #708579; font-size: 12px; letter-spacing: .13em; }
.workspace-message-header h3 { margin: 0; color: #153f34; font-size: 22px; line-height: 1.15; letter-spacing: -.025em; }
.workspace-message-close { align-self: start; width: 32px; height: 32px; padding: 0; border: 1px solid #d7e3dc; border-radius: 50%; background: #fff; color: #60766c; font-size: 22px; line-height: 1; cursor: pointer; }
.workspace-message-close:hover { border-color: #afcbbf; background: #f3f8f5; color: #174f3d; }
.workspace-message-copy { margin: 0; padding: 15px 16px; border: 1px solid #dce8df; border-radius: 12px; background: linear-gradient(145deg, #f8faf5, #fffdf8); color: #536c61; font-size: 14px; font-weight: 650; line-height: 1.55; white-space: pre-line; }
.workspace-message-input { display: grid; gap: 7px; color: #526d61; font-size: 12px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.workspace-message-input[hidden] { display: none; }
.workspace-message-input input { box-sizing: border-box; width: 100%; height: 46px; padding: 0 13px; border: 1px solid #bfd2c8; border-radius: 12px; background: #fff; color: #173f35; font: inherit; font-size: 14px; text-transform: none; outline: none; }
.workspace-message-input input:focus { border-color: #19805e; box-shadow: 0 0 0 4px rgba(25, 128, 94, .12); }
.workspace-message-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.workspace-message-actions button { min-width: 112px; min-height: 42px; }
.workspace-message-dialog.is-warning .workspace-message-accent { background: linear-gradient(90deg, #b17b17, #e2b84e, #267957); }
.workspace-message-dialog.is-warning .workspace-message-icon { border-color: #ead69f; background: #fff8df; color: #9b6810; }
.workspace-message-dialog.is-danger .workspace-message-accent { background: linear-gradient(90deg, #9e3030, #d95a49 70%, #d1a440); }
.workspace-message-dialog.is-danger .workspace-message-icon { border-color: #efc4bc; background: #fff1ee; color: #ad382e; }
.workspace-message-actions .danger-btn { border-color: #a93c32; background: linear-gradient(135deg, #b94136, #8f2b27); color: #fff; box-shadow: 0 8px 18px rgba(158, 48, 43, .2); }
.workspace-message-actions .danger-btn:hover { background: linear-gradient(135deg, #c94b3f, #9c302a); }

@media (max-width: 520px) {
  .workspace-message-shell { gap: 15px; padding: 22px 18px 18px; }
  .workspace-message-header { grid-template-columns: 42px minmax(0, 1fr) 30px; gap: 10px; }
  .workspace-message-icon { width: 40px; height: 40px; border-radius: 12px; }
  .workspace-message-header h3 { font-size: 18px; }
  .workspace-message-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-message-actions button { min-width: 0; }
  .workspace-message-cancel[hidden] + .workspace-message-confirm { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .app-toast { right: 14px; bottom: 14px; max-width: calc(100vw - 28px); }
}

/* Hosted accounts get a calm entry point without changing the application shell. */
.touch-id-btn { display: flex; width: 100%; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 14px; border: 1px solid #cbdccf; border-radius: 12px; background: linear-gradient(145deg, #fffdf8, #f1f6ef); color: #194f3e; text-align: left; cursor: pointer; }
.touch-id-btn[hidden] { display: none; }
.touch-id-btn:hover { border-color: #90b6a3; box-shadow: 0 7px 18px rgba(28, 86, 64, .1); }
.touch-id-btn:disabled { opacity: .6; cursor: wait; }
.touch-id-btn span:last-child { display: grid; gap: 2px; }
.touch-id-btn strong { font-size: 13px; }
.touch-id-btn small { color: #71877a; font-size: 12px; }
.touch-id-symbol { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #c5d9cd; border-radius: 12px; background: #eaf4ed; color: #157052; font-size: 28px; font-weight: 300; }
.profile-security-btn { width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid #c9dccf; border-radius: 8px; background: #f3f8f3; color: #216047; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.profile-security-btn:hover { border-color: #8eb59e; background: #ebf5ee; }

.security-settings-dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: auto; border: 1px solid rgba(35, 89, 68, .18); border-radius: 22px; background: #fffdf8; box-shadow: 0 30px 90px rgba(19, 44, 38, .28); }
.security-settings-dialog::backdrop { background: rgba(18, 39, 35, .46); backdrop-filter: blur(9px) saturate(.8); }
.security-settings-shell { display: grid; gap: 17px; padding: 25px; }
.security-settings-shell .dialog-title-row { align-items: flex-start; }
.security-settings-shell .dialog-title-row h3 { color: #153f34; }
.security-touch-id-card { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid #d4e3d7; border-radius: 12px; background: linear-gradient(145deg, #f3f8f2, #fffdf8); }
.security-touch-id-card div { display: grid; gap: 3px; }
.security-touch-id-card strong { color: #194c3c; font-size: 13px; }
.security-touch-id-card p { margin: 0; color: #6d8376; font-size: 12px; line-height: 1.4; }
.security-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.security-form-grid label { display: grid; gap: 6px; color: #526d61; font-size: 12px; font-weight: 850; }
.security-form-grid label small { color: #839188; font-size: 12px; font-weight: 650; }
.security-form-grid input, .security-form-grid select { box-sizing: border-box; width: 100%; height: 43px; border: 1px solid #c6d8cd; border-radius: 12px; background-color: #fff; color: #173f35; }
.security-remove-pin { display: flex; align-items: center; gap: 8px; color: #765c32; font-size: 12px; font-weight: 800; }
.security-remove-pin input { width: 16px; height: 16px; }

@media (max-width: 650px) {
  .security-settings-shell { padding: 20px 17px; }
  .security-form-grid { grid-template-columns: 1fr; }
}

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

.new-ledger-dialog .dialog-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .new-ledger-dialog .form-grid {
    grid-template-columns: 1fr;
  }

  .new-ledger-dialog .dialog-actions {
    grid-column: auto;
  }
}

/* Final visual stability pass: hidden content must not reserve space, and
   operational controls should stay still while the pointer moves across them. */
.capacity-plan-guidance[hidden] {
  display: none !important;
}

.erp-shell .primary-btn:hover,
.erp-shell .secondary-btn:hover,
.erp-shell button:hover,
.erp-shell .clickable-card:hover,
.erp-shell .workflow-step:hover,
.erp-shell .command-center-item:hover,
.erp-shell .market-logo-card:hover,
.erp-shell .cashflow-event:hover,
.erp-shell .application-ipo-summary-card:hover {
  transform: none;
}

.erp-shell .plan-refund-btn {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.erp-shell .subscription-ticker-window {
  overflow-x: auto;
  scrollbar-width: thin;
}

.erp-shell .subscription-ticker-track {
  animation: none;
}

@media (min-width: 721px) and (max-width: 1050px) {
  .erp-shell #summaryCards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 721px) and (max-width: 1280px) {
  .erp-shell #summaryCards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 841px) and (max-width: 1200px) {
  .account-ledger-workspace-dialog .account-ledger-table-wrap {
    overflow-x: hidden;
  }

  .account-ledger-workspace-dialog .account-ledger-table-wrap table {
    min-width: 0;
    table-layout: fixed;
  }

  .account-ledger-workspace-dialog .account-ledger-table-wrap th,
  .account-ledger-workspace-dialog .account-ledger-table-wrap td {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 12px;
  }

  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(1) { width: 12%; }
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(2) { width: 17%; }
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(3) { width: 22%; }
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(4),
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(5),
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(6) { width: 11%; }
  .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(7) { width: 16%; }

  .account-ledger-workspace-dialog .account-ledger-workspace-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .erp-shell #summaryCards .summary-market-card:last-child {
    grid-column: 1 / -1;
  }
}

/* Final product pass: one spacing rhythm, calm status surfaces, and tighter actions. */
.erp-shell {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
}

.workspace-status-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
  gap: 8px 18px;
  margin: -10px 0 14px;
  padding: 8px 12px;
  border: 1px solid #dbe7ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 5px 16px rgba(15, 52, 96, .035);
}
.workspace-status-primary,
.workspace-status-item { min-width: 0; }
.workspace-status-primary { display: flex; align-items: center; gap: 8px; }
.workspace-status-primary > div { display: grid; min-width: 0; gap: 1px; }
.workspace-status-primary strong { overflow: hidden; color: #234e70; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-status-primary span { overflow: hidden; color: #7790a2; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-status-dot { display: block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #2b9a69; box-shadow: 0 0 0 3px #e0f3e8; }
.workspace-status-item { display: grid; gap: 1px; padding-left: 14px; border-left: 1px solid #e1ebf2; }
.workspace-status-item span { color: #8194a4; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.workspace-status-item strong { overflow: hidden; color: #315a79; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

.erp-shell #summaryCards .summary-market-card {
  display: grid;
  align-content: start;
  width: 100%;
  min-height: 94px;
  padding-bottom: 9px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.erp-shell #summaryCards .summary-market-card:focus-visible { outline: 2px solid #73aef0; outline-offset: 2px; }
.summary-card-action { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; color: #2370ae; font-size: 12px; font-weight: 800; }
.summary-card-action b { color: #5790bd; font-size: 13px; font-weight: 700; }

.erp-shell .panel { margin-bottom: 14px; }
.erp-shell .panel:last-child { margin-bottom: 0; }
.erp-shell .panel-header { gap: 12px; }
.erp-shell .panel-header > div { min-width: 0; }
.erp-shell .panel-header p { margin-bottom: 0; }
.erp-shell .data-health-panel,
.erp-shell .command-center-panel { background: linear-gradient(145deg, #fff, #f8fbfd); }
.erp-shell .command-center-grid,
.erp-shell .data-health-grid,
.erp-shell .reconciliation-grid,
.erp-shell .exposure-monitor-grid { gap: 8px; }
.erp-shell .workflow-step,
.erp-shell .command-center-item,
.erp-shell .data-health-item,
.erp-shell .reconciliation-account { box-shadow: none; }
.erp-shell .table-wrap { border-radius: 12px; }
.erp-shell .applications-table { border-spacing: 0 3px; }
.erp-shell .applications-table td { padding-top: 7px; padding-bottom: 7px; }
.erp-shell .application-actions { display: inline-flex; align-items: center; gap: 4px; }
.erp-shell .application-actions .check-allotment-btn { max-width: 84px; overflow: hidden; padding-right: 7px; padding-left: 7px; text-overflow: ellipsis; white-space: nowrap; }

.erp-shell .edit-dialog,
.erp-shell .ipo-ledger-dialog,
.erp-shell .allotment-dialog { max-height: min(860px, calc(100dvh - 24px)); }
.erp-shell .edit-account-form,
.erp-shell .ipo-ledger-dialog-content { padding: 20px; }
.erp-shell .dialog-title-row { gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e5edf3; }
.erp-shell .dialog-title-row h3 { font-size: clamp(22px, 3vw, 30px); }
.erp-shell .dialog-actions { gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid #e5edf3; }
.erp-shell .dialog-actions .primary-btn,
.erp-shell .dialog-actions .secondary-btn { min-height: 38px; }

.erp-shell .top-nav-tabs { margin-bottom: 12px; }
.erp-shell .top-strip { padding-bottom: 12px; }
.erp-shell .subscription-ticker { margin-bottom: 12px; }
.erp-shell .hero { margin-bottom: 14px; }
.erp-shell .hero-actions-label { margin-bottom: 3px; }

@media (max-width: 840px) {
  .workspace-status-bar { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
  .workspace-status-item:last-child { grid-column: 2; }
  .workspace-status-item:nth-child(3) { border-left: 0; }
}

@media (max-width: 620px) {
  .workspace-status-bar { grid-template-columns: 1fr 1fr; margin-top: -4px; }
  .workspace-status-primary { grid-column: 1 / -1; }
  .workspace-status-item { padding-left: 0; border-left: 0; }
  .workspace-status-item:last-child { grid-column: auto; }
  .erp-shell .panel { padding: 14px; }
  .erp-shell .panel-header { align-items: flex-start; flex-direction: column; }
  .erp-shell .panel-header > button,
  .erp-shell .panel-header > .workflow-heading-actions { width: 100%; }
  .erp-shell .workflow-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .erp-shell .dialog-actions { flex-wrap: wrap; }
  .erp-shell .dialog-actions > * { flex: 1 1 140px; }
}
.refund-balance-preview { grid-column:1 / -1; padding:16px; border:1px solid #c9dbc1; border-radius:16px; background:linear-gradient(135deg,#f9fcf5,#eaf2df); box-shadow:0 3px 0 #dce5d4; color:#234d3e; }
.refund-balance-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.refund-balance-grid span,.refund-balance-grid strong { display:block; }
.refund-balance-grid span { font-size:12px; margin-bottom:4px; }
.refund-balance-grid strong { font-variant-numeric:tabular-nums; font-size:18px; }
.refund-balance-preview progress { width:100%; height:12px; accent-color:#317e63; display:block; margin-bottom:8px; }
.refund-balance-preview.is-warning { border-color:#c69145; background:#fff6df; }
.refund-balance-preview p { margin:8px 0 0; }
@media(max-width:420px) { .refund-balance-grid { grid-template-columns:1fr; } }
dialog.edit-dialog.od-sweep-dialog { width:min(900px,94vw); max-height:90vh; overflow:auto; padding:24px; box-sizing:border-box; }
.od-sweep-dialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.od-sweep-dialog form { display:flex; flex-direction:column; gap:14px; }
.od-sweep-dialog label { display:flex; flex-direction:column; gap:6px; }
.od-sweep-dialog .advisor-check { flex-direction:row; align-items:center; }
.od-sweep-hold { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:12px; border-bottom:1px solid #dce5d4; }
.od-sweep-hold strong { grid-column:1 / -1; }
.od-sweep-dialog [data-preview]:not(:empty) { padding:18px; border-radius:16px; background:#edf4e5; margin:16px 0; box-shadow:0 3px 0 #dce5d4; }
.od-sweep-dialog footer { display:flex; flex-direction:column; gap:12px; }

/* ===================== was studio.css ===================== */
/* IPOYOGI Studio: shared presentation for the desktop and browser workspace. */
@font-face { font-family: 'Yogi Sans'; src: url('/assets/fonts/dm-sans-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Yogi Sans'; src: url('/assets/fonts/dm-sans-semibold.ttf') format('truetype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Yogi Sans'; src: url('/assets/fonts/dm-sans-bold.ttf') format('truetype'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Yogi Editorial'; src: url('/assets/fonts/newsreader.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }

body.studio-theme {
  --font-ui: 'Yogi Sans', sans-serif;
  --font-display: 'Yogi Sans', sans-serif;
  --bg: #f5f5ef;
  --panel: #fffefa;
  --panel-soft: #f4f6f0;
  --line: #dfe5dd;
  --line-strong: #c5d3c8;
  --text: #19362f;
  --muted: #697970;
  --brand: #25775f;
  --brand-strong: #175844;
  --brand-soft: #eaf4ec;
  --accent: #417e66;
  --accent-soft: #e8f2e9;
  --danger: #b64042;
  --success: #22734f;
  --warn: #946022;
  --ink: #152e31;
  --lime: #d9efa3;
  --shadow: 0 6px 24px #20362c08;
  color: var(--text);
  background: radial-gradient(ellipse at 100% 0, #dfead477, transparent 42%), #f5f5ef;
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: -.015em;
}
.studio-theme [hidden] { display: none !important; }
.studio-theme .erp-shell { --shadow: 0 6px 24px #20362c08; width: 100%; padding: 0 30px 36px 268px; max-width: 1920px; }
.studio-theme button, .studio-theme input, .studio-theme select, .studio-theme textarea { font-family: var(--font-ui); }
.studio-theme button, .studio-theme a, .studio-theme summary { -webkit-tap-highlight-color: transparent; }
.studio-theme :focus-visible { outline: 3px solid #3b997b; outline-offset: 3px; }
.studio-theme ::selection { background: #d5ebbd; color: #173a2e; }
.studio-theme .studio-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.studio-kicker { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .13em; }

/* A fixed navigation rail and a compact, purposeful workspace header. */
.studio-theme .erp-shell .top-nav-tabs { inset: 14px auto 14px 14px; width: 226px; padding: 22px 12px 12px; gap: 4px; border: 1px solid #2a4344; border-radius: 22px; background: radial-gradient(ellipse at 10% 0%, #2c4b4c, transparent 55%), #142c30; box-shadow: 0 12px 28px #102b2b15; overflow-y: auto; scrollbar-width: thin; }
.studio-theme .sidebar-brand { border-color: #ffffff16; color: #fffef7; padding: 0 6px 22px; margin-bottom: 13px; gap: 10px; }
.studio-theme .sidebar-brand strong { font: 700 18px var(--font-ui); letter-spacing: .025em; }
.studio-brand-dot { color: var(--lime); }
.studio-theme .sidebar-brand small { color: #aabeb6; font-size: 12px; margin-top: 5px; }
.studio-theme .sidebar-mark { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; background: #fffefa; padding: 3px; box-shadow: 0 3px 0 #9baaa166; }
.studio-theme .sidebar-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.studio-theme .sidebar-label { margin: 10px 12px 8px; font-size: 12px; letter-spacing: .16em; color: #829e94; }
.studio-theme .erp-shell .nav-tab { position: relative; gap: 11px; min-height: 43px; padding: 10px 12px; font-size: 12px; color: #becfc8; background: transparent; border: 1px solid transparent; border-radius: 12px; text-align: left; transition: background 160ms, color 160ms; }
.studio-theme .erp-shell .nav-tab:hover { color: #fff; background: #ffffff0c; transform: none; }
.studio-theme .erp-shell .nav-tab.active { background: var(--lime); color: #203c30; box-shadow: 0 3px 0 #7f9c583b, inset 0 1px 0 #ffffffad; border-color: #e7f6c3; }
.studio-theme .nav-tab.active::after { content: ''; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #2c634b; }
.studio-theme .nav-tab .studio-icon { width: 17px; height: 17px; }
.studio-theme .nav-spacer { min-height: 20px; }
.studio-theme .profile-menu-btn { border-color: #ffffff18; background: #ffffff05; color: #f0f4e9; padding: 10px 8px; }
.studio-theme .profile-menu-btn:hover, .studio-theme .profile-menu-btn[aria-expanded=true] { background: #ffffff10; border-color: #ffffff30; }
.studio-theme .profile-menu-btn small, .studio-theme .profile-menu-chevron { color: #9cb4a9; }
.studio-theme .profile-menu-icon { background: #e3edc9; color: #2d5140; border-radius: 12px; width: 31px; height: 31px; }
.studio-theme .nav-utility { gap: 6px; padding: 6px 4px 0; justify-content: stretch; }
.studio-theme .nav-utility-btn { flex: 1; padding: 7px 5px; background: transparent; border: 1px solid #ffffff20; color: #adcbc0; border-radius: 8px; font-size: 12px; }
.studio-theme .nav-utility-btn:hover { background: #ffffff0b; color: #fff; }
.studio-theme .erp-shell .studio-topbar { display: flex; justify-content: space-between; align-items: center; min-height: 94px; padding: 16px 0; gap: 16px; border: 0; }
.studio-page-heading { display: grid; gap: 4px; }
.studio-page-heading strong { font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.studio-topbar-actions { display: flex; align-items: center; gap: 10px; }
.studio-today { margin-right: 12px; color: #788279; font-size: 12px; }
.studio-search { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; color: #6b7d73; font-size: 12px; cursor: pointer; }
.studio-search kbd { font-family: inherit; font-size: 12px; margin-left: 18px; padding: 3px 5px; background: #f0f2ea; color: #879085; border: 0; border-radius: 4px; }
.studio-create, .studio-preferences { position: relative; z-index: 55; }
.studio-theme :is(.studio-create, .studio-preferences) > summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 10px 15px; border-radius: 12px; font-weight: 600; font-size: 12px; cursor: pointer; list-style: none; background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.studio-theme .studio-preferences > summary { padding: 10px; background: transparent; color: var(--ink); border-color: var(--line); }
.studio-theme summary::-webkit-details-marker { display: none; }
.studio-popover { position: absolute; top: calc(100% + 10px); right: 0; width: 264px; padding: 14px; border: 1px solid #dde4d8; border-radius: 16px; background: #fffefa; box-shadow: 0 18px 45px #132f3426; color: var(--text); }
.studio-popover > button { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; padding: 12px 8px; border-radius: 8px; background: transparent; color: var(--text); text-align: left; font-size: 13px; cursor: pointer; }
.studio-popover > button:hover { background: #eef3e8; }
.studio-popover .studio-kicker { display: block; padding: 4px 8px 9px; }
.studio-popover p { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 5px 0 16px; }
.studio-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--text); }
.studio-theme .studio-switch input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--brand); }

/* A tactile welcome scene. Its decorative layers never obscure live figures. */
.studio-theme .erp-shell .dashboard-market-rail.simple-hero { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 0 24px; padding: 24px 28px 14px; margin: 0 0 22px; border: 1px solid #dce5d7; border-radius: 22px; background: radial-gradient(ellipse at 90% 15%, #dbedbcaa, transparent 52%), linear-gradient(115deg, #fbfcf5, #eef4e6); box-shadow: 0 4px 0 #dde5d255, 0 16px 30px #2d452807; overflow: hidden; }
.studio-theme .erp-shell .dashboard-market-rail .hero-market-copy { align-self: center; min-width: 0; padding: 4px 0 18px; }
.studio-theme .erp-shell .dashboard-market-rail h1 { max-width: none; margin: 14px 0 10px; font: 500 clamp(42px, 4vw, 61px)/.98 'Yogi Editorial', Georgia, serif; letter-spacing: -.045em; color: #233e30; }
.studio-theme .dashboard-market-rail h1 em { font-weight: inherit; color: #538057; }
.studio-theme .erp-shell .dashboard-market-rail .eyebrow { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; background: transparent; color: #527052; font-size: 12px; line-height: 1.4; letter-spacing: .12em; }
.studio-hello-dot { width: 6px; height: 6px; border-radius: 50%; background: #5b8d53; }
.studio-theme .erp-shell .dashboard-market-rail .subtext { max-width: 355px; font-size: 13px; line-height: 1.7; color: #72816c; margin: 0; }
.studio-hero-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 23px; }
.studio-theme .erp-shell .studio-hero-buttons .primary-btn { padding: 11px 16px; min-height: 42px; }
.studio-theme .studio-link-btn { display: inline-flex; gap: 6px; align-items: center; border: 0; background: transparent; color: #3c6049; font-size: 12px; font-weight: 600; padding: 8px 0; cursor: pointer; }
.studio-hero-footnote { display: flex; align-items: center; gap: 6px; margin-top: 20px; color: #86917c; font-size: 12px; }
.studio-hero-footnote .studio-icon { width: 13px; height: 13px; }
.studio-sculpture { position: relative; min-height: 265px; align-self: center; perspective: 1100px; }
.studio-orbit-scene { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; transform: rotateX(var(--scene-x, 0deg)) rotateY(var(--scene-y, 0deg)); transition: transform 240ms ease-out; }
.studio-orbit { position: absolute; left: 9%; top: 17%; width: 83%; height: 62%; border: 1px solid #8eaa6066; border-radius: 50%; transform: rotate(-28deg); }
.studio-orbit-back { transform: rotate(28deg); opacity: .5; }
.studio-plinth { position: absolute; left: 23%; bottom: 16%; width: 60%; height: 36px; border-radius: 50%; background: #516f3330; filter: blur(17px); }
.studio-coin { position: absolute; left: 28%; top: 16%; width: 165px; height: 165px; border-radius: 50%; transform: rotateY(-22deg) rotateX(15deg) rotate(-16deg); }
.studio-coin-back { margin: 17px 0 0 -18px; transform: translateZ(-25px) rotateY(-22deg) rotateX(15deg) rotate(-16deg); background: linear-gradient(135deg, #8cbe63, #274e39); box-shadow: -1px 1px 0 #193e2f, -3px 3px 0 #315d41, -5px 5px 0 #254f35, -7px 7px 0 #214731, 0 26px 28px #24482630; }
.studio-coin-main { transform: translateZ(35px) rotateY(-22deg) rotateX(15deg) rotate(-16deg); }
.studio-coin-main { display: grid; place-items: center; background: radial-gradient(circle at 24% 19%, #f4ffcf, #c4dfa2 32%, #81af65 79%, #618951); border: 2px solid #f5ffcf; box-shadow: inset 0 0 0 9px #dcf2b7, inset 0 0 0 10px #91b175, inset 5px 6px 18px #f7ffdaaa, -1px 2px 0 #7a9d57, -3px 4px 0 #7a9d57, -5px 6px 0 #638344, -7px 8px 0 #618344, -10px 11px 0 #4c703d, 10px 15px 24px #315d3128; }
.studio-coin-main > span { font: 500 100px/1 'Yogi Editorial', Georgia, serif; color: #5c8049; text-shadow: 1px 2px 0 #e2f4b7, -1px -1px 1px #3b652944; transform: translateY(7px); }
.studio-coin-main > i { position: absolute; inset: 20px; border: 1px dashed #91b273; border-radius: 50%; }
.studio-orbit-front { border-right-color: #4b7853; border-bottom-color: #517d4b; transform: rotate(-28deg) translateZ(36px); }
.studio-sphere { position: absolute; width: 39px; height: 39px; top: 61%; left: 11%; border-radius: 50%; background: radial-gradient(circle at 28% 23%, #fff9d9, #dac77b 42%, #83713b 100%); box-shadow: 6px 11px 13px #70592925, inset -2px -2px 5px #76622b33; }
.studio-spark { position: absolute; color: #5c8461; font: 300 28px Georgia, serif; }
.studio-spark-one { left: 17%; top: 7%; transform: rotate(18deg); }
.studio-spark-two { right: 10%; bottom: 22%; transform: rotate(-12deg); font-size: 18px; }
.studio-floating-note { position: absolute; display: flex; align-items: center; gap: 9px; width: 202px; min-height: 61px; padding: 11px 13px; background: #fffef7ed; border: 1px solid #fffffff0; border-radius: 12px; box-shadow: 0 5px 0 #a7bda227, 0 15px 27px #264c2911; text-align: left; color: #244934; cursor: pointer; backdrop-filter: blur(8px); }
.studio-floating-note > span:nth-child(2) { flex: 1; }
.studio-floating-note small { display: block; font-size: 12px; color: #809177; letter-spacing: .065em; }
.studio-floating-note strong { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; }
.studio-note-icon { display: grid; place-items: center; width: 31px; height: 31px; background: #edf3df; border-radius: 12px; color: #4f7854; }
.studio-note-top { right: 0; top: 14px; transform: rotate(5deg); }
.studio-note-bottom { left: 4%; bottom: 32px; transform: rotate(-5deg); }
.studio-theme .erp-shell .studio-floating-note:hover { border-color: #98b68b; background: #fffef8; }
.studio-sculpture-caption { position: absolute; bottom: 1px; right: 10%; color: #86947c; font: italic 14px 'Yogi Editorial', Georgia, serif; }
.studio-theme .dashboard-market-rail .market-logo-shelf { grid-column: 1 / -1; padding: 15px 0 12px; background: transparent; border: 0; border-top: 1px solid #d9e3cf; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.studio-theme .market-logo-shelf-head { padding: 0 0 10px; color: #566f4c; }
.studio-theme .market-logo-shelf-head span { font-size: 12px; letter-spacing: .12em; }
.studio-theme .market-logo-shelf-head small { color: #849178; }
.studio-theme .market-logo-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.studio-theme .dashboard-market-rail .market-logo-card { min-height: 49px; grid-template-columns: 32px minmax(0,1fr); background: #ffffffa6; border: 1px solid #dce6d8; border-radius: 12px; padding: 7px; }
.studio-theme .market-logo-name { color: #32563e; font-size: 12px; }
.studio-theme .market-logo-card small { color: #6e8066; font-size: 12px; }
.studio-theme .dashboard-market-rail .market-logo-image { width: 31px; height: 31px; border-color: #e4e8dd; }
.studio-theme .erp-shell .dashboard-market-rail .hero-actions { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 16px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.studio-theme .hero-actions-label { font-size: 12px; color: #8b957e; letter-spacing: .09em; margin: 0; }
.studio-theme .hero-action-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.studio-theme .erp-shell .hero-action-grid > * { min-height: 30px; width: auto; padding: 6px 10px; border: 1px solid #d4dec9; border-radius: 8px; background: transparent; color: #57724a; font-size: 12px; box-shadow: none; }
.studio-theme .erp-shell .hero-action-grid #syncIpojiBtn { color: #326344; background: #e2eed6; border: 1px solid #cbdcbb; }
.studio-theme .subscription-ticker { border: 1px solid var(--line); background: #fdfef8; border-radius: 12px; box-shadow: none; margin: 0 0 20px; }
.studio-theme .subscription-ticker-label { background: #eef2e7; color: #5d7154; border-color: var(--line); }
.studio-theme .subscription-ticker-label small { color: #829277; }
.studio-theme .subscription-ticker-item { border-color: #dfe6d8; color: #48633c; }
.studio-theme .workspace-status-bar { display: flex; align-items: center; gap: 24px; padding: 12px 0 16px; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.studio-theme .workspace-status-primary { flex: 1; gap: 8px; }
.studio-theme .workspace-status-primary strong { font-size: 12px; color: #587150; }
.studio-theme .workspace-status-primary span { display: none; }
.studio-theme .workspace-status-dot { background: #699660; box-shadow: 0 0 0 3px #6a99551a; width: 6px; height: 6px; }
.studio-theme .workspace-status-bar[data-health=review] .workspace-status-dot { background: #b87632; box-shadow: 0 0 0 3px #b876321a; }
.studio-theme .workspace-status-bar[data-health=review] .workspace-status-primary strong { color: #986124; }
.studio-theme .workspace-status-item { min-width: 0; display: flex; align-items: center; gap: 5px; border: 0; padding: 0; }
.studio-theme .workspace-status-item span { font-size: 12px; color: #8a9485; }
.studio-theme .workspace-status-item strong { font-size: 12px; color: #5e7259; }

/* A shared language for numbers, cards, actions, and operational screens. */
.studio-theme .erp-shell #summaryCards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.studio-theme .erp-shell #summaryCards .summary-market-card { position: relative; min-height: 136px; padding: 17px; border: 1px solid #e0e5db; border-radius: 16px; background: #fffefa; box-shadow: 0 3px 0 #e3e7da55; }
.studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) { background: #1e4038; color: #f9fdeb; border-color: #284b40; box-shadow: 0 3px 0 #13322a; }
.studio-theme .erp-shell #summaryCards .summary-market-card::before { display: none; }
.studio-theme .erp-shell #summaryCards .summary-market-card p { color: #7f8a77; font-size: 12px; letter-spacing: .07em; font-weight: 600; margin: 0 0 15px; }
.studio-theme .erp-shell #summaryCards .summary-market-card h3 { color: #2b4334; font: 500 clamp(23px, 2vw, 32px)/1.1 var(--font-ui); letter-spacing: -.065em; margin: 0; font-variant-numeric: tabular-nums; }
.studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) h3 { color: #e5f1c8; }
.studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) p { color: #a1bdac; }
.studio-theme .summary-card-action { color: #63906b; font-size: 12px; font-weight: 500; padding-top: 14px; }
.studio-theme .summary-card-action b { color: inherit; font-size: 16px; }
.studio-theme .summary-market-card:nth-child(3) .summary-card-action { color: #a3c1a5; }
.studio-theme .erp-shell .panel { border: 1px solid #e0e5dc; border-radius: 22px; padding: 24px; margin-bottom: 22px; background: #fffefa; box-shadow: 0 4px 15px #213a2604; }
.studio-theme .erp-shell .panel-header { margin-bottom: 18px; padding: 0 0 16px; border-bottom: 1px solid #e9ece3; align-items: center; }
.studio-theme .erp-shell .panel-header h2 { font-family: var(--font-ui); color: #244334; font-size: 22px; font-weight: 500; letter-spacing: -.045em; }
.studio-theme .erp-shell .panel-header h2::before { display: none; }
.studio-theme .erp-shell .panel-header p { color: #87927f; font-size: 12px; margin-top: 5px; line-height: 1.5; }
.studio-theme .eyebrow, .studio-theme .erp-shell .panel-header .eyebrow { display: inline-block; background: #eef2e4; border: 0; border-radius: 8px; padding: 5px 8px; font-size: 12px; color: #6b8556; letter-spacing: .08em; line-height: 1.3; margin: 0 0 8px; }
.studio-theme .erp-shell .command-center-panel .panel-header h2 { font: 500 28px/1.12 'Yogi Editorial', Georgia, serif; }
.studio-theme :is(.primary-btn, .secondary-btn), .studio-theme .erp-shell :is(.primary-btn, .secondary-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 9px 13px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; }
.studio-theme .primary-btn, .studio-theme .erp-shell .primary-btn { background: linear-gradient(160deg, #347b5c, #246347); color: #fffdf5; border: 1px solid #286647; box-shadow: 0 3px 0 #194d3430, inset 0 1px 0 #ffffff22; }
.studio-theme .secondary-btn, .studio-theme .erp-shell .secondary-btn { background: #fffef9; border: 1px solid #d8e2d2; color: #496844; box-shadow: 0 2px 0 #d8e0cc22; }
.studio-theme .primary-btn:hover, .studio-theme .erp-shell .primary-btn:hover { background: #20593f; border-color: #184c32; }
.studio-theme .secondary-btn:hover, .studio-theme .erp-shell .secondary-btn:hover { background: #f0f5e9; border-color: #aabd9e; }
.studio-theme :is(.primary-btn, .secondary-btn):active { box-shadow: inset 0 2px 3px #1b432f20; }
.studio-theme button:disabled { opacity: .55; cursor: not-allowed; }
.studio-theme :is(.text-btn, .text-action-btn, .text-link-btn) { color: #397650; }
.studio-theme .erp-shell .command-center-grid { gap: 12px; }
.studio-theme .erp-shell .command-center-item { min-height: 148px; padding: 18px; border: 1px solid #e0e6d6; border-radius: 12px; background: #f5f8ee; box-shadow: none; }
.studio-theme .command-center-item > span { font-size: 12px; letter-spacing: .06em; color: #708362; }
.studio-theme .command-center-item > strong { font: 500 34px/1.1 var(--font-ui); letter-spacing: -.06em; color: #365732; margin: 6px 0; }
.studio-theme .command-center-item > small { font-size: 12px; font-weight: 400; color: #7d8a71; }
.studio-theme .command-center-item > b { font-size: 12px; color: #537742; border-color: #dce6ce; }
.studio-theme .erp-shell .command-center-item.urgent { background: #fdf3e9; border-color: #efddc8; }
.studio-theme .command-center-item.urgent > strong { color: #946530; }
.studio-theme .erp-shell :is(.data-health-item, .reconciliation-account, .exposure-card) { border: 1px solid #dfe5d8; border-radius: 12px; background: #fafbf5; padding: 14px; box-shadow: none; }
.studio-theme .data-health-item.needs-review { background: #fff9ec; border-color: #eddebc; }
.studio-theme .data-health-item > span { color: #73866c; font-size: 12px; }
.studio-theme .data-health-item > strong { color: #4e6441; }
.studio-theme .data-health-item > small { color: #87927e; font-weight: 400; font-size: 12px; }
.studio-theme .data-health-item > b { color: #648650; }
.studio-theme .erp-shell :is(.card, .focus-box, .simple-form) { border-color: #dfe7d8; border-radius: 16px; background: #fafcf6; box-shadow: none; }
.studio-theme .erp-shell .card h3 { color: #30563e; font-family: var(--font-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.studio-theme .erp-shell .card p { color: #7c8d72; }
.studio-theme .erp-shell .card::before, .studio-theme .simple-form::before, .studio-theme .focus-box::before { display: none; }
.studio-theme .erp-shell .workflow-steps { gap: 14px; }
.studio-theme .erp-shell .workflow-step { padding: 19px; gap: 13px; border: 1px solid #dce5d5; border-radius: 16px; background: #f7f9ee; box-shadow: 0 4px 0 #e4e9d5; text-align: left; }
.studio-theme .workflow-step-number { background: #e8edcc; color: #678048; box-shadow: 0 3px 0 #c3d1a2; width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
.studio-theme .workflow-step:nth-child(2) .workflow-step-number { background: #daebde; color: #4c7e5b; box-shadow: 0 3px 0 #b4d0bb; }
.studio-theme .workflow-step:nth-child(3) .workflow-step-number { background: #f3e6cc; color: #9e7a3c; box-shadow: 0 3px 0 #dac59b; }
.studio-theme .workflow-step:nth-child(4) .workflow-step-number { background: #dfe8ec; color: #4a5f55; box-shadow: 0 3px 0 #c0d1d8; }
.studio-theme .workflow-step-copy strong { color: #365239; font-size: 13px; font-weight: 600; }
.studio-theme .workflow-step-copy b { color: #345332; font-size: 34px; font-weight: 500; }
.studio-theme .workflow-step-copy small { color: #839075; font-size: 12px; line-height: 1.6; }
.studio-theme .workflow-step-action { border-color: #dce5d0; color: #5b7e43; font-size: 12px; }
.studio-theme .workflow-step-action i { color: inherit; }
.studio-theme :is(.workflow-checklist-panel, .closing-checklist-group) { border-color: #e2e8dc; background: #f6f8f0; border-radius: 16px; }
.studio-theme :is(.closing-checklist-group h3, .workflow-checklist-heading h3) { color: #385437; font-weight: 500; }
.studio-theme .closing-applicant-card { padding: 16px; border-color: #e0e5d6; background: #fffefa; box-shadow: none; }
.studio-theme .closing-applicant-avatar { border-radius: 16px; background: linear-gradient(135deg, #6e8d66, #32533f); box-shadow: 0 3px 0 #1e422930; }
.studio-theme .closing-applicant-ipo-meta { background: #f3f7ed; border: 1px solid #e4eadb; border-radius: 12px; padding: 9px; }
.studio-theme .closing-applicant-ipo-meta span { color: #4f6a42; }
.studio-theme .closing-applicant-ipo-meta b { color: #8b997e; font-size: 12px; }
.studio-theme :is(.hint-box, .capacity-summary, .capacity-plan-guidance, .account-ledger-stat, .reconciliation-account-summary) { border: 1px solid #dce6d4; background: #f3f7ec; color: #5a7950; border-radius: 12px; }
.studio-theme :is(.overview-more-tools, .application-form-more, .setup-group, .settings-group) { border-color: #dde4d4; background: #fdfdf6; border-radius: 12px; }
.studio-theme .overview-more-tools > summary { color: #46603d; padding: 18px 20px; }
.studio-theme :is(.overview-more-tools-note, .section-note, .field-help) { color: #89977f; }
.studio-theme .backup-center-panel { background: linear-gradient(125deg, #eff4e5, #f7f9f0); border-color: #d5dfc7; }
.studio-theme .erp-shell .backup-center { background: linear-gradient(125deg, #edf4e3, #f7f9f0); border-color: #d5dfc7; }
.studio-theme .erp-shell .setup-page-header { background: #f7f9f0; border-color: #e0e7d7; }
.studio-theme .erp-shell :is(.setup-page-header, .backup-center, .operations-report-panel) h2, .studio-theme .erp-shell .backup-center h3 { color: #2b4d34; }
.studio-theme .erp-shell .capacity-balance-card { min-height: 112px; border: 1px solid #dce5d2; background: #f8faf2; border-radius: 12px; box-shadow: 0 3px 0 #e3e9d955; }
.studio-theme .erp-shell .capacity-balance-card :is(span, strong) { color: #315139; }
.studio-theme .erp-shell .capacity-balance-card :is(p, small) { color: #5e7750; }
.studio-theme .erp-shell .capacity-blocks-summary-trigger { background: #fbf3df; border-color: #e8d7ae; }
.studio-theme .erp-shell .capacity-od-account-card { background: #eaf1e4; border-color: #d2dfc6; }
.studio-theme .erp-shell :is(.capacity-plan-result, .capacity-ledger-shortcut, .capacity-planner-controls) { background: #f5f8ee; border-color: #dce6d1; color: #4c6741; }
.studio-theme .erp-shell .capacity-plan-result { padding: 14px 16px; border-radius: 12px; }
.studio-theme .erp-shell .capacity-ledger-shortcut h3 { color: #365239; }

/* Tables remain precise; colour communicates status, never money direction alone. */
.studio-theme .table-wrap, .studio-theme .erp-shell .table-wrap { border: 1px solid #dfe5d7; border-radius: 12px; background: #fffefa; scrollbar-width: thin; scrollbar-color: #becbb2 #f2f5e9; }
.studio-theme th, .studio-theme .erp-shell th { padding: 12px; background: #eff3e7; color: #809271; border-color: #e1e8d6; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.studio-theme td, .studio-theme .erp-shell td { padding: 12px; border-color: #e6ebdf; color: #3d593b; font-size: 12px; font-variant-numeric: tabular-nums; }
.studio-theme tbody tr:nth-child(even) td { background: #f9fbf4; }
.studio-theme tbody tr:hover td { background: #f0f5e7; }
.studio-theme .erp-shell :is(.status-pill, .badge) { padding: 5px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .025em; }
.studio-theme :is(.status-good, .badge-success) { background: #e8f1e2; color: #4a7734; border-color: #d4e4c8; }
.studio-theme :is(.status-warn, .badge-warning) { background: #fbf0db; color: #9a7233; border-color: #eedbb6; }
.studio-theme :is(.status-bad, .badge-danger) { background: #f8e9e2; color: #ae6354; border-color: #edccbd; }
.studio-theme .status-neutral { background: #eef0e9; color: #7c8870; border-color: #dfe4d6; }
.studio-theme .erp-shell .application-actions { flex-wrap: wrap; }
.studio-theme .erp-shell .application-actions .check-allotment-btn { max-width: none; }
.studio-theme .erp-shell .application-recording-status:empty { display: none; }
.studio-theme .erp-shell .application-register-panel.is-ipo-picker .applications-table { display: block; min-width: 0; width: 100%; }
.studio-theme .erp-shell .application-register-panel.is-ipo-picker .applications-table thead tr { grid-template-columns: 24px minmax(0,1.3fr) minmax(0,1.5fr) repeat(4,minmax(0,.8fr)); gap: 8px; }
.studio-theme .erp-shell .application-register-picker { background: #f6f9ee; color: #41613c; border-color: #dce5cf; }
.studio-theme .erp-shell .application-ipo-summary-card { background: #fffef8; border-color: #dbe5ce; color: #3e613b; }
.studio-theme .erp-shell .application-ipo-summary-card :is(strong, small), .studio-theme .erp-shell .application-register-picker > div > strong { color: #355b34; }
.studio-theme .erp-shell .application-ipo-summary-card span { color: #627b52; }
.studio-theme .erp-shell .application-ipo-summary-card strong { white-space: normal; overflow-wrap: anywhere; }
.studio-theme .erp-shell .application-old-ipo-section { border-color: #dce6ce; }
.studio-theme .erp-shell .delete-all-planned-btn { color: #9a4f3e; background: #fff5ed; border-color: #e8cbbd; }
.studio-theme :is(.filter-bar, .account-ledger-period-controls, .applications-filter-bar) { border-color: #e1e7d7; background: #f5f8ee; }
.studio-theme .account-ledger-account-row { border-color: #e8edde; background: #fffefa; color: #526b45; }
.studio-theme .account-ledger-account-row.active { background: #eaf2df; border-left-color: #6e9449; color: #34592d; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th { background: #eff3e7; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap td { color: #3d593b; font-size: 12px; }
.studio-theme .account-ledger-transaction-detail { background: #f8faf0; border-color: #dce6cd; }
.studio-theme .account-ledger-stat strong { color: #3d5d32; }
.studio-theme .account-ledger-report-stats { gap: 8px; }
.studio-theme .account-ledger-workspace-dialog { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
.studio-theme .account-ledger-workspace { grid-template-columns: 248px minmax(0,1fr); min-height: 0; }
.studio-theme .account-ledger-account-pane { border-color: #e1e8d7; padding-right: 14px; }
.studio-theme .account-ledger-account-list { grid-template-columns: minmax(0,1fr); max-height: calc(100dvh - 230px); border-color: #e0e7d7; scrollbar-width: thin; scrollbar-color: #c1ceb3 #f2f5e9; }
.studio-theme .account-ledger-account-row { width: 100%; min-width: 0; gap: 7px; }
.studio-theme .account-ledger-account-row span { flex: 1; }
.studio-theme .account-ledger-account-row.is-selected { background: #edf4e1; box-shadow: inset 3px 0 0 #86a653; }
.studio-theme .account-ledger-account-row b { color: #436337; flex-shrink: 0; font-size: 12px; }
.studio-theme .account-ledger-detail-header { flex-wrap: wrap; }
.studio-theme .account-ledger-detail-header h3 { color: #34562f; font-size: 22px; font-weight: 500; }
.studio-theme .account-ledger-detail-header p:not(.eyebrow) { color: #7b8e6b; }
.studio-theme .account-ledger-detail-actions > strong { background: #eef4e3; border-color: #d9e4c7; color: #42622d; }
.studio-theme .account-ledger-report-bar { grid-template-columns: minmax(240px,1fr) auto; background: #f4f7ed; border-color: #e0e7d6; gap: 10px; padding: 12px; }
.studio-theme .account-ledger-period-controls { grid-template-columns: 110px minmax(0,1fr); background: transparent; }
.studio-theme .account-ledger-view-switch { justify-self: end; align-self: end; background: #e8eedb; border-color: #d7e2c6; height: 38px; }
.studio-theme .account-ledger-view-switch button { color: #748b60; }
.studio-theme .account-ledger-view-switch button.is-active { background: #fffef8; color: #4a6f37; box-shadow: 0 2px 3px #203b2010; }
.studio-theme .account-ledger-movement-search { grid-column: 1; grid-row: 2; }
.studio-theme .account-ledger-report-actions { grid-column: 2; grid-row: 2; justify-content: end; }
.studio-theme .account-ledger-report-actions button { border-color: #d7e2c8; color: #5d7b48; }
.studio-theme .account-ledger-summary > div { background: #fffef9; border-color: #dfe6d5; }
.studio-theme .account-ledger-summary > div.is-closing { background: #edf4df; border-color: #d1e1b9; }
.studio-theme .account-ledger-summary span { color: #7c8e6c; font-weight: 500; }
.studio-theme .account-ledger-summary strong, .studio-theme .account-ledger-summary .is-closing strong { color: #3f6030; font-weight: 600; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap { max-height: none; min-height: 160px; flex: 1; border-color: #dce5cd; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap table { width: 100%; min-width: 730px; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap :is(th,td) { padding: 10px 8px; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(1) { width: 11%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(2) { width: 16%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(3) { width: 19%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(4), .studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(5) { width: 11%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(6) { width: 13%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:nth-child(7) { width: 19%; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-workspace-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-workspace-actions button { flex: 0 0 auto; }
.studio-theme .account-ledger-movement-row.is-selected td { background: #eaf3dd; }
.studio-theme .account-ledger-keyboard-hint { color: #7e906e; }
.studio-theme :is(.delete-btn, .danger-btn, .account-ledger-voucher-delete-btn) { color: #b25744; border-color: #eacabb; background: #fff5ed; }

/* Dialogs sit above the shell, so they share the theme from the body. */
.studio-theme dialog { max-width: calc(100vw - 28px); max-height: calc(100dvh - 32px); border: 1px solid #dbe4d3; border-radius: 22px; padding: 0; background: #fffef9; color: var(--text); box-shadow: 0 30px 100px #102c3440, 0 0 0 5px #ffffff22; }
.studio-theme dialog::backdrop { background: #102b346b; backdrop-filter: blur(5px); }
.studio-theme .workflow-action-dialog { width: min(940px, calc(100vw - 40px)); }
.studio-theme :is(.edit-account-form, .ipo-ledger-dialog-content, .workflow-action-dialog-shell, .account-ledger-workspace-shell) { padding: 25px; }
.studio-theme :is(.dialog-title-row, .workflow-action-dialog-header) { padding-bottom: 16px; border-bottom: 1px solid #e4e9db; gap: 16px; align-items: flex-start; }
.studio-theme :is(.dialog-title-row, .workflow-action-dialog-header, .account-ledger-workspace-title) h3 { font: 500 32px/1.1 'Yogi Editorial', Georgia, serif; color: #2a4d35; letter-spacing: -.035em; margin-top: 6px; }
.studio-theme :is(.dialog-title-row, .account-ledger-workspace-title) p:not(.eyebrow) { font-size: 12px; color: #839278; line-height: 1.6; }
.studio-theme .simple-form, .studio-theme .workflow-action-dialog .simple-form { background: #f8faf2; border: 1px solid #e4eadb; padding: 18px; gap: 12px 16px; }
.studio-theme label { color: #5d7751; font-size: 12px; font-weight: 500; }
.studio-theme input:not([type=checkbox]):not([type=radio]):not([type=file]), .studio-theme select, .studio-theme textarea, .studio-theme .erp-shell input:not([type=checkbox]):not([type=radio]):not([type=file]), .studio-theme .erp-shell select { min-height: 42px; border: 1px solid #d6dfcb; border-radius: 8px; background: #fffefb; color: #37542f; font-size: 13px; padding: 10px 12px; box-shadow: inset 0 2px 2px #27452203; }
.studio-theme select { appearance: none; padding-right: 32px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23789064' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; }

/* Custom dropdowns: warm glass panels with crisp hierarchy and native form behavior. */
.studio-theme .cool-select-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; }
.studio-theme .cool-select { position: relative; display: block; min-width: 0; width: 100%; }
.studio-theme .cool-select-trigger { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 9px 11px 9px 13px; border: 1px solid #d5dfcb; border-radius: 12px; background: linear-gradient(180deg, #fffefa, #fbfcf5); color: #304c39; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #d9e2d155; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; transition: border-color 150ms, box-shadow 150ms, background 150ms; }
.studio-theme .cool-select-trigger:hover { border-color: #9fb892; background: #fff; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d7e2ce77; }
.studio-theme .cool-select.is-open .cool-select-trigger { border-color: #4d8767; background: #fff; box-shadow: 0 0 0 3px #4d87671c, 0 4px 12px #284b370c; }
.studio-theme .cool-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-theme .cool-select-chevron { position: relative; width: 20px; height: 20px; border-radius: 8px; background: #edf3e5; }
.studio-theme .cool-select-chevron::before, .studio-theme .cool-select-chevron::after { position: absolute; top: 9px; width: 6px; height: 1.5px; border-radius: 2px; background: #54705a; content: ''; transition: transform 160ms; }
.studio-theme .cool-select-chevron::before { left: 5px; transform: rotate(42deg); }
.studio-theme .cool-select-chevron::after { right: 5px; transform: rotate(-42deg); }
.studio-theme .cool-select.is-open .cool-select-chevron::before { transform: rotate(-42deg); }
.studio-theme .cool-select.is-open .cool-select-chevron::after { transform: rotate(42deg); }
.studio-theme .cool-select.is-disabled { opacity: .55; }
.studio-theme .cool-select.is-disabled .cool-select-trigger { cursor: not-allowed; }
.cool-select-panel { position: fixed; z-index: 100000; max-height: min(390px, calc(100dvh - 20px)); padding: 7px; overflow: hidden; border: 1px solid #cddac3; border-radius: 16px; background: rgba(255, 254, 248, .97); box-shadow: 0 22px 60px rgba(19, 43, 31, .22), 0 4px 14px rgba(19, 43, 31, .12), inset 0 1px 0 #fff; backdrop-filter: blur(18px) saturate(1.15); animation: cool-select-in 150ms ease-out; }
.cool-select-panel[hidden] { display: none !important; }
.cool-select-search { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 6px; padding: 7px 10px; border: 1px solid #dce5d4; border-radius: 12px; background: #f5f8ef; }
.cool-select-search span { width: 13px; height: 13px; border: 1.5px solid #66806b; border-radius: 50%; }
.cool-select-search span::after { display: block; width: 5px; height: 1.5px; margin: 10px 0 0 9px; transform: rotate(45deg); border-radius: 2px; background: #66806b; content: ''; }
.cool-select-search input { width: 100%; min-height: 26px !important; padding: 0 !important; border: 0 !important; outline: 0; background: transparent !important; color: #294736; box-shadow: none !important; font: 600 12px var(--font-ui); }
.cool-select-options { max-height: 326px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bacbb0 transparent; }
.cool-select-group { position: sticky; top: 0; z-index: 1; padding: 10px 10px 5px; background: #fffef8ee; color: #849177; font: 800 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.cool-select-option { display: grid; grid-template-columns: minmax(0, 1fr) 22px; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 9px 8px 11px; border: 0; border-radius: 8px; background: transparent; color: #35523d; cursor: pointer; font: 600 12px/1.35 var(--font-ui); text-align: left; }
.cool-select-option:hover, .cool-select-option.is-keyboard-active { background: #eef4e7; color: #244733; }
.cool-select-option.is-selected { background: linear-gradient(90deg, #e2efd7, #f2f7ea); color: #28513a; font-weight: 750; }
.cool-select-option i { display: none; width: 18px; height: 18px; place-items: center; border-radius: 8px; background: #477b59; color: #fff; }
.cool-select-option i::after { width: 7px; height: 4px; transform: translateY(-1px) rotate(-45deg); border-bottom: 1.8px solid currentColor; border-left: 1.8px solid currentColor; content: ''; }
.cool-select-option.is-selected i { display: grid; }
.cool-select-option:disabled { opacity: .42; cursor: not-allowed; }
.filterable-header .cool-select-trigger { min-height: 28px; padding: 4px 5px 4px 8px; border-radius: 8px; font-size: 12px; box-shadow: none; }
.filterable-header .cool-select-chevron { width: 17px; height: 17px; border-radius: 8px; }
.filterable-header .cool-select-chevron::before, .filterable-header .cool-select-chevron::after { top: 8px; }
.history-toolbar > .cool-select { width: auto; min-width: 150px; }
.capacity-planner-controls > .cool-select { flex: 1 1 280px; width: auto; min-width: 250px; }
.account-ledger-report-actions > .cool-select, .filter-bar > .cool-select { width: auto; min-width: 145px; }
.capacity-account-action > .cool-select { flex: 1 1 240px; width: auto; }
.table-wrap td > .cool-select { min-width: 112px; }
@keyframes cool-select-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
  .cool-select-panel { right: 10px; left: 10px !important; width: auto !important; max-height: min(430px, calc(100dvh - 20px)); }
  .cool-select-options { max-height: 360px; }
  .cool-select-option { min-height: 44px; font-size: 13px; }
  .history-toolbar > .cool-select, .capacity-planner-controls > .cool-select, .account-ledger-report-actions > .cool-select, .filter-bar > .cool-select { width: 100%; min-width: 0; }
}
.studio-theme input::placeholder, .studio-theme textarea::placeholder { color: #a0ad91; font-weight: 400; }
.studio-theme input[readonly] { background-color: #eef2e7 !important; color: #7a8e69; }
.studio-theme input:focus, .studio-theme select:focus, .studio-theme textarea:focus { border-color: #7ba766; outline: 2px solid #96b87644; outline-offset: 1px; box-shadow: none; }
.studio-theme input[type=checkbox], .studio-theme input[type=radio] { accent-color: #4c8153; min-height: 16px; width: 16px; height: 16px; }
.studio-theme .dialog-actions { border-top: 1px solid #e4eadb; padding-top: 16px; gap: 8px; }
.studio-theme .batch-funding-table-wrap { border: 0; background: transparent; max-height: min(490px, calc(100dvh - 330px)); overflow-x: hidden; }
.studio-theme .batch-funding-dialog :is(table, tbody) { display: block; width: 100%; min-width: 0; }
.studio-theme .batch-funding-dialog thead { display: none; }
.studio-theme .batch-funding-dialog tr { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px 18px; margin-bottom: 12px; padding: 18px 54px 18px 18px; border: 1px solid #dce5cf; border-radius: 12px; background: #f6f9ef; }
.studio-theme .batch-funding-dialog td { display: block; padding: 0; width: auto; min-width: 0; border: 0; background: transparent; }
.studio-theme .batch-funding-dialog td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: #587248; font-size: 12px; font-weight: 600; }
.studio-theme .batch-funding-dialog td:last-child { position: absolute; top: 14px; right: 12px; }
.studio-theme .batch-funding-dialog .batch-remove-row-btn { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 8px; }
.studio-theme .workflow-action-dialog :is(#applicationForm, #fundingForm) { grid-template-columns: repeat(2,minmax(0,1fr)); }
.studio-theme .workflow-action-dialog .simple-form label { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 7px; }
.studio-theme .workflow-action-dialog .simple-form :is(input, select) { flex: 0 0 42px; height: 42px; min-width: 0; width: 100%; }
.studio-theme .workflow-action-dialog .studio-field-label { display: block; min-height: 18px; }
.studio-theme .workflow-action-dialog .simple-form .field-help { font-size: 12px; line-height: 1.5; }
.studio-theme :is(.voucher-marg-bar, .voucher-type-shell) { background: #f0f4e5; color: #4d6c3d; }
.studio-theme :is(.voucher-entry-shell, .voucher-type-content) { background: #fffef9; }
.studio-theme :is(.voucher-entry-footer, .voucher-lines) { background: #f5f8ed; border-color: #dce6cd; }
.studio-theme .voucher-type-choice { border-color: #d7e3c8; background: #fafcf4; color: #4b6b3c; }
.studio-theme .voucher-type-choice:hover { background: #edf4e1; border-color: #aabd8e; }
.studio-theme .app-toast { background: #244b36; border: 1px solid #4e7352; border-radius: 12px; color: #fffdec; box-shadow: 0 8px 25px #16342933; }
.studio-theme .app-toast.error { background: #853f33; border-color: #b17565; }
.studio-theme .brand-logo-auth { width: 100px; height: 100px; object-fit: contain; border-radius: 0; box-shadow: none; background: transparent; }
.studio-theme .erp-shell .panel-header p, .studio-theme .data-health-item > small, .studio-theme .workflow-step-copy small, .studio-theme .command-center-item > small, .studio-theme :is(.section-note, .field-help) { color: #6c7c60; }
.studio-theme .workspace-status-item span, .studio-theme .studio-hero-footnote, .studio-theme .studio-sculpture-caption { color: #718266; }
.studio-theme .erp-shell :is(th, .data-health-item > span, .summary-market-card p, .closing-applicant-ipo-meta b), .studio-theme :is(.dialog-title-row p:not(.eyebrow), .account-ledger-summary span, .account-ledger-keyboard-hint) { color: #627651; }
.studio-theme .erp-shell #summaryCards .summary-market-card p { color: #65745c; }
.studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) p { color: #b8ccb5; }

/* Motion is confined to introductions and the sculpture. Operational rows stay still. */
.studio-theme .studio-mobile-menu { display: none; }
@keyframes studio-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes studio-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.studio-theme:not(.studio-reduced-motion) .tab-section.active { animation: studio-enter 320ms ease both; }
.studio-theme:not(.studio-reduced-motion) .studio-note-top { animation: studio-float 8s ease-in-out infinite; }
.studio-theme:not(.studio-reduced-motion) .studio-note-bottom { animation: studio-float 9s ease-in-out -4s infinite; }
.studio-theme :is(.summary-market-card, .workflow-step, .command-center-item, .market-logo-card) { transition: border-color 160ms, box-shadow 160ms, background 160ms; }
.studio-theme .erp-shell :is(.summary-market-card, .workflow-step, .command-center-item, .market-logo-card):hover { transform: none; border-color: #aac296; box-shadow: 0 4px 0 #ccdabd66, 0 8px 16px #28482008; }
.studio-theme .erp-shell .summary-market-card:nth-child(3):hover { border-color: #7ca87a; }
.studio-theme.studio-reduced-motion *, .studio-theme.studio-reduced-motion *::before, .studio-theme.studio-reduced-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.studio-theme.studio-reduced-motion .studio-orbit-scene { transform: none; }
.studio-theme.studio-compact .erp-shell .panel { padding: 16px; margin-bottom: 14px; }
.studio-theme.studio-compact .erp-shell :is(td, th) { padding-top: 8px; padding-bottom: 8px; }
.studio-theme.studio-compact .erp-shell #summaryCards .summary-market-card { min-height: 112px; padding: 13px; }
.studio-theme.studio-compact .erp-shell .dashboard-market-rail { padding-top: 18px; }

@media (min-width: 1660px) { .studio-theme .erp-shell { padding-left: 290px; padding-right: 48px; } .studio-theme .erp-shell .top-nav-tabs { width: 238px; } }
@media (min-width: 841px) and (max-height: 850px) {
  .studio-theme .erp-shell .top-nav-tabs { padding-top: 16px; gap: 3px; }
  .studio-theme .sidebar-brand { padding-bottom: 16px; margin-bottom: 7px; }
  .studio-theme .sidebar-label { margin-top: 7px; margin-bottom: 5px; }
  .studio-theme .erp-shell .nav-tab { min-height: 37px; padding-top: 8px; padding-bottom: 8px; }
  .studio-theme .nav-spacer { min-height: 10px; }
  .studio-theme .erp-shell .studio-topbar { min-height: 80px; }
  .studio-theme .studio-hero-footnote { margin-top: 12px; }
  .studio-theme .workflow-action-dialog-shell { padding: 18px 22px; }
  .studio-theme .workflow-action-dialog-header { margin-bottom: 12px; padding-bottom: 12px; }
  .studio-theme .workflow-action-dialog .simple-form { gap: 10px 16px; padding: 14px; }
}
@media (max-width: 1200px) {
  .studio-theme .erp-shell { padding-left: 239px; padding-right: 20px; }
  .studio-theme .erp-shell .top-nav-tabs { width: 202px; padding-left: 8px; padding-right: 8px; }
  .studio-theme .erp-shell .nav-tab { font-size: 12px; gap: 8px; }
  .studio-today { display: none; }
  .studio-theme .erp-shell .dashboard-market-rail.simple-hero { padding: 26px 24px 16px; grid-template-columns: minmax(0,1fr) minmax(250px,.8fr); gap: 0 14px; }
  .studio-theme .erp-shell .dashboard-market-rail h1 { font-size: 44px; }
  .studio-floating-note { width: 177px; padding: 10px; }
  .studio-note-top { right: -6px; }
  .studio-note-bottom { left: -5px; }
  .studio-coin { left: 24%; width: 147px; height: 147px; top: 21%; }
  .studio-theme .market-logo-rail { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .studio-theme .erp-shell #summaryCards { gap: 8px; }
  .studio-theme .erp-shell #summaryCards .summary-market-card { padding: 13px; }
  .studio-theme .erp-shell #summaryCards .summary-market-card h3 { font-size: 22px; }
  .studio-theme .workspace-status-bar { gap: 14px; }
  .studio-theme .workspace-status-item:last-child { display: none; }
  .studio-theme .erp-shell .workflow-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 840px) {
  .studio-theme .studio-mobile-menu { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid #d8e2d2; background: #fffef9; border-radius: 12px; color: #375a3c; font-size: 12px; }
  .studio-theme:not(.studio-nav-open) .erp-shell .top-nav-tabs { display: none; }
  .studio-theme .account-ledger-workspace { grid-template-columns: 1fr; }
  .studio-theme .account-ledger-account-pane { border-right: 0; border-bottom: 1px solid #e1e8d7; padding-right: 0; }
  .studio-theme .account-ledger-account-list { max-height: 150px; }
  .studio-theme .account-ledger-detail-pane { padding-left: 0; }
  .studio-theme .erp-shell { padding: 0 18px 86px; }
  .studio-theme .erp-shell .top-nav-tabs { position: static; display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; margin: 0 0 16px; padding: 8px; border-radius: 12px; gap: 4px; overflow: visible; }
  .studio-theme .erp-shell .nav-tab { flex: 1 0 auto; width: auto; min-height: 35px; font-size: 12px; padding: 8px 10px; }
  .studio-theme .top-nav-tabs :is(.sidebar-brand, .sidebar-label, .nav-spacer) { display: none; }
  .studio-theme .top-nav-tabs .profile-menu { margin: 0; width: auto; }
  .studio-theme .profile-menu-btn { min-height: 34px; padding: 4px 6px; }
  .studio-theme .profile-menu-btn small { display: none; }
  .studio-theme .profile-menu-panel { top: calc(100% + 8px); bottom: auto; }
  .studio-theme .nav-utility { padding: 0; flex: 1; align-items: stretch; }
  .studio-theme .erp-shell .studio-topbar { min-height: 80px; }
  .studio-theme .erp-shell .dashboard-market-rail h1 { font-size: 44px; }
  .studio-theme .mobile-quick-actions { background: #152e31ed; border-color: #314f49; padding: 10px; backdrop-filter: blur(15px); }
  .studio-theme .mobile-quick-actions button { background: #dcebbb; color: #34502e; border-color: #dcebbb; }
  .studio-theme .erp-shell .data-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-theme .workspace-status-bar { flex-wrap: wrap; padding-top: 0; }
  .studio-theme .workspace-status-primary { min-width: 40%; }
  .studio-theme .erp-shell #summaryCards { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .studio-theme .erp-shell .application-register-panel.is-ipo-picker .applications-table thead tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-theme .erp-shell .application-register-panel.is-ipo-picker .applications-table th:first-child { grid-column: 1 / -1; place-items: start; }
  .studio-theme .erp-shell .application-ipo-summary-grid { grid-template-columns: 1fr; }
  .studio-theme .batch-funding-dialog tr { grid-template-columns: 1fr; padding: 16px 42px 16px 14px; }
  .studio-theme .account-ledger-report-bar { grid-template-columns: 1fr; }
  .studio-theme .account-ledger-period-controls { grid-column: 1; }
  .studio-theme .account-ledger-view-switch { grid-column: 1; justify-self: start; }
  .studio-theme .account-ledger-movement-search { grid-row: auto; }
  .studio-theme .account-ledger-report-actions { grid-column: 1; grid-row: auto; justify-content: start; flex-wrap: wrap; }
  .studio-theme .account-ledger-detail-actions { flex-wrap: wrap; }
  .studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap { max-height: 350px; }
  .studio-theme .erp-shell { padding: 0 12px 90px; }
  .studio-page-heading strong { font-size: 18px; }
  .studio-kicker { font-size: 12px; }
  .studio-topbar-actions { gap: 6px; }
  .studio-search { padding: 10px; }
  .studio-search > span:not(:first-child), .studio-search kbd { display: none; }
  .studio-theme .studio-create > summary { padding: 10px; font-size: 12px; }
  .studio-theme .studio-preferences > summary { padding: 8px; }
  .studio-theme .erp-shell .studio-topbar { gap: 8px; }
  .studio-theme .erp-shell .dashboard-market-rail.simple-hero { grid-template-columns: minmax(0,1fr); padding: 24px 21px 15px; border-radius: 22px; }
  .studio-theme .erp-shell .dashboard-market-rail h1 { font-size: 55px; }
  .studio-theme .erp-shell .dashboard-market-rail .hero-market-copy { padding-bottom: 0; }
  .studio-theme .studio-sculpture { min-height: 242px; width: min(100%,350px); justify-self: center; }
  .studio-coin { top: 16%; left: 29%; width: 137px; height: 137px; }
  .studio-coin-main > span { font-size: 82px; }
  .studio-note-top { top: 25px; right: 0; }
  .studio-note-bottom { bottom: 27px; }
  .studio-sculpture-caption { font-size: 13px; }
  .studio-theme .market-logo-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-theme .hero-actions-label { display: none; }
  .studio-theme .hero-action-grid { justify-content: flex-start; gap: 6px; }
  .studio-theme .erp-shell .hero-action-grid > * { font-size: 12px; }
  .studio-theme .workspace-status-primary { flex: 1 0 100%; }
  .studio-theme .workspace-status-bar { gap: 6px 18px; padding-bottom: 12px; }
  .studio-theme .erp-shell #summaryCards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) { grid-column: 1 / -1; grid-row: 1; min-height: 124px; }
  .studio-theme .erp-shell #summaryCards .summary-market-card:nth-child(3) h3 { font-size: 34px; }
  .studio-theme .erp-shell .panel { padding: 18px; border-radius: 16px; }
  .studio-theme .erp-shell .panel-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .studio-theme .erp-shell .panel-header h2 { font-size: 22px; }
  .studio-theme .erp-shell .command-center-panel .panel-header h2 { font-size: 28px; }
  .studio-theme .erp-shell .command-center-grid { grid-template-columns: 1fr; }
  .studio-theme .erp-shell .workflow-steps { grid-template-columns: 1fr; }
  .studio-theme :is(.edit-account-form, .ipo-ledger-dialog-content, .workflow-action-dialog-shell, .account-ledger-workspace-shell) { padding: 18px; }
  .studio-theme .workflow-action-dialog :is(#applicationForm, #fundingForm), .studio-theme .workflow-action-dialog .simple-form { grid-template-columns: 1fr; }
  .studio-theme .dialog-title-row h3, .studio-theme .workflow-action-dialog-header h3 { font-size: 28px; }
  .studio-theme .closing-applicant-orbit { grid-template-columns: 1fr; }
  .studio-theme .closing-applicant-card { grid-template-columns: 40px minmax(0,1fr); padding: 12px; gap: 10px; }
  .studio-theme .closing-applicant-avatar { width: 40px; height: 40px; }
  .studio-theme .subscription-ticker { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-theme *, .studio-theme *::before, .studio-theme *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .studio-theme .studio-orbit-scene { transform: none; }
}
@media print {
  .studio-theme { background: #fff; }
  .studio-theme .studio-topbar, .studio-theme .studio-sculpture { display: none; }
  .studio-theme dialog { box-shadow: none; max-height: none; }
}

/* Setup is a control room, not a second dashboard. Keep the common actions visible
   and progressively disclose reports, configuration, migration, and reset tools. */
.studio-theme .setup-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.studio-theme .setup-tabs button { min-height: 42px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.studio-theme .setup-tabs button[aria-pressed="true"] { color: white; background: var(--brand-strong); border-color: var(--brand-strong); }
.studio-theme .drive-backup-help { grid-column: 1 / -1; font-size: 13px; line-height: 1.7; }
.studio-theme .drive-backup-help summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.studio-theme .drive-backup-help ol { padding-left: 22px; }
.studio-theme #workspaceNotice { width: min(480px, calc(100vw - 32px)); }
.studio-theme #workspaceNotice form { display: grid; gap: 18px; padding: 24px; }
.studio-theme .workspace-confirmation { width: min(520px, calc(100vw - 32px)); }
.studio-theme .workspace-confirmation form { padding: 24px; display: grid; gap: 18px; }
.studio-theme .workspace-confirmation p { white-space: pre-wrap; line-height: 1.6; }
.studio-theme .workspace-confirmation footer { display: flex; justify-content: flex-end; gap: 10px; }
.studio-theme .funding-row-totals { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; }
.studio-theme .funding-row-totals span { display: flex; justify-content: space-between; gap: 10px; }
.studio-theme .ledger-action-note { display: block; max-width: 170px; font-size: 12px; color: #53654d; line-height: 1.4; }
.studio-theme #workspaceNotice p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.studio-theme .app-toast { display: flex; align-items: center; gap: 16px; max-width: min(620px, calc(100vw - 32px)); }
.studio-theme .app-toast button { border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; padding: 8px; }
.studio-theme .funding-progress-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.studio-theme .funding-progress-summary span { font-size: 12px; }
.studio-theme .funding-progress-summary strong { display: block; font-size: 16px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.studio-theme .account-ledger-workspace-shell { height: 100%; max-height: none; display: flex; flex-direction: column; padding: 20px; box-sizing: border-box; }
.studio-theme .account-ledger-workspace { flex: 1; overflow: hidden; }
.studio-theme .account-ledger-detail-pane { display: flex; flex-direction: column; min-height: 0; overflow: auto; gap: 10px; }
.studio-theme .account-ledger-transaction-detail { max-height: 30dvh; overflow: auto; flex-shrink: 0; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:last-child,
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap td:last-child { position: sticky; right: 0; background: var(--panel); min-width: 168px; }
.studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap th:last-child { z-index: 3; background: var(--panel-soft); }
.studio-theme .account-ledger-workspace-title p:not(.eyebrow), .studio-theme .account-ledger-detail-header p { display: none; }
.studio-theme .account-ledger-keyboard-hint { font-size: 12px; }
.studio-theme .workflow-action-dialog-header, .studio-theme .dialog-title-row { align-items: start; }
.studio-theme dialog .simple-form > button[type="submit"] { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 18px var(--panel); grid-column: 1 / -1; }
.studio-theme dialog :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) { height: 42px; min-height: 42px; box-sizing: border-box; }
.studio-theme .simple-form label { min-width: 0; align-self: start; }
.studio-theme .workflow-action-dialog .workspace-form-footer { grid-column: 1 / -1; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; background: var(--panel); }
.studio-theme .workflow-action-dialog .workspace-form-footer > button { width: 100%; min-width: 0; grid-column: auto; white-space: nowrap; }
.studio-theme .workflow-action-dialog .workspace-form-footer { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 16px var(--panel); }
.studio-theme .erp-shell :is(th, .status-pill, .badge), .studio-theme .closing-applicant-ipo-meta b { font-size: 12px; color: #42573e; }
.studio-theme .erp-shell td, .studio-theme .account-ledger-workspace-dialog .account-ledger-table-wrap td { font-size: 13px; }
.studio-theme .field-help, .studio-theme .section-note { font-size: 12px; color: #53654d; }
.studio-theme .erp-shell :is(button, .clickable-card):hover { transform: none; }
@media (max-width: 760px) {
  .studio-theme .account-ledger-workspace { grid-template-columns: 1fr; overflow: auto; }
  .studio-theme .account-ledger-account-list { max-height: 160px; }
  .studio-theme .account-ledger-detail-pane { overflow: visible; }
  .studio-theme .account-ledger-workspace-shell { padding: 12px; }
  .studio-theme .workflow-action-dialog :is(#applicationForm, #fundingForm) { grid-template-columns: 1fr; }
  .studio-theme .funding-progress-summary { grid-template-columns: 1fr; }
}
.studio-theme .setup-page {
  gap: 12px;
  padding: 0 0 18px;
  overflow: hidden;
}
.studio-theme .setup-page-header {
  align-items: center;
  min-height: 112px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e6eadf;
  background: linear-gradient(120deg, #fffef9 0%, #f7faef 72%, #eef4e3 100%);
}
.studio-theme .setup-page-header h2 {
  font: 500 clamp(30px, 3vw, 43px)/1 'Yogi Editorial', Georgia, serif;
  color: #294b35;
}
.studio-theme .setup-page-header p:not(.eyebrow) { max-width: 720px; color: #718368; font-size: 13px; }
.studio-theme .backup-center {
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px 22px;
  margin: 0 18px;
  padding: 16px 18px;
  border-color: #d5e2c7;
  border-radius: 16px;
  background: linear-gradient(120deg, #f4f8eb, #fbfcf4);
  box-shadow: none;
}
.studio-theme .backup-center-copy h3 { color: #355c37; font-size: 16px; }
.studio-theme .backup-center-copy p:not(.eyebrow) { color: #748568; }
.studio-theme .backup-center-actions { flex-wrap: wrap; justify-content: flex-end; }
.studio-theme .backup-center-actions :is(.primary-btn, .secondary-btn) { min-height: 36px; white-space: nowrap; }
.studio-theme .backup-status { color: #5d7d4b; font-weight: 500; }
.studio-theme .backup-health-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.studio-theme .backup-health-meta span { padding: 8px 10px; border: 1px solid #dde6d2; border-radius: 8px; background: #fffef9aa; color: #53654d; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.studio-theme .backup-health-meta strong { display: block; margin-top: 3px; color: #47633e; font-size: 12px; text-transform: none; letter-spacing: 0; }
.studio-theme .backup-health-meta strong.is-warning { color: #a9693f; }
.studio-theme .setup-page-content {
  display: grid;
  gap: 12px;
  padding: 0 18px;
}
.studio-theme .setup-command-grid { order: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.studio-theme .setup-command-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dfe6d5;
  border-radius: 12px;
  background: #fffef9;
  color: #48633f;
  text-align: left;
  box-shadow: 0 5px 16px #28442809;
}
.studio-theme .setup-command-card:hover { border-color: #b9caa8; background: #fafcf4; transform: none; }
.studio-theme .setup-command-card:focus-visible { outline: 3px solid #bbce9b; outline-offset: 2px; }
.studio-theme .setup-command-card > span:last-child { min-width: 0; }
.studio-theme .setup-command-card strong { display: block; color: #365832; font-size: 13px; font-weight: 650; }
.studio-theme .setup-command-card small { display: block; margin-top: 3px; color: #849177; font-size: 12px; line-height: 1.35; }
.studio-theme .setup-command-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d6e1c8;
  border-radius: 12px;
  background: #eff5e4;
  color: #547a3f;
  font: 600 16px/1 'Yogi Sans', sans-serif;
}
.studio-theme .setup-page .operations-report-panel {
  order: 2;
  gap: 11px;
  padding: 17px;
  border: 1px solid #dfe6d6;
  border-radius: 16px;
  background: #fffefa;
  box-shadow: none;
}
.studio-theme .setup-page .operations-report-panel .panel-header { padding: 0; border: 0; }
.studio-theme .setup-page .operations-report-panel .panel-header h3 { color: #355537; font-size: 22px; }
.studio-theme .setup-page .operations-report-panel .cards {
  overflow: hidden;
  border: 1px solid #e0e6d8;
  border-radius: 12px;
  background: #f9fbf4;
}
.studio-theme .setup-page .operations-report-panel .card {
  min-height: 74px;
  padding: 13px 14px;
  border-color: #e1e7d8;
  border-radius: 0;
  background: transparent;
}
.studio-theme .setup-page .operations-report-panel .card h3 { color: #395b36; font-size: clamp(16px, 1.4vw, 21px); }
.studio-theme .setup-inline-report,
.studio-theme .setup-subsection {
  overflow: hidden;
  border: 1px solid #e0e6d8;
  border-radius: 12px;
  background: #fffefb;
}
.studio-theme .setup-inline-report > summary,
.studio-theme .setup-subsection > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}
.studio-theme .setup-inline-report > summary::-webkit-details-marker,
.studio-theme .setup-subsection > summary::-webkit-details-marker { display: none; }
.studio-theme .setup-inline-report summary strong,
.studio-theme .setup-subsection summary strong { display: block; color: #456341; font-size: 12px; }
.studio-theme .setup-inline-report summary small,
.studio-theme .setup-subsection summary small { display: block; margin-top: 2px; color: #53654d; font-size: 12px; }
.studio-theme .setup-inline-report summary > span:last-child,
.studio-theme .setup-subsection summary > span:last-child { flex: 0 0 auto; color: #6f865e; font-size: 12px; font-weight: 650; }
.studio-theme .setup-inline-report[open] > summary,
.studio-theme .setup-subsection[open] > summary { border-bottom: 1px solid #e4e9dd; background: #f6f9ef; }
.studio-theme .setup-inline-report > .table-wrap { margin: 0; border: 0; border-radius: 0; }
.studio-theme .setup-subsection-content { padding: 13px; }
.studio-theme .setup-reports-group { order: 3; }
.studio-theme .management-report-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, .7fr) minmax(130px, .55fr) minmax(130px, .55fr) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid #dfe7d6;
  border-radius: 12px;
  background: linear-gradient(120deg, #f5f8ed, #fffef9);
}
.studio-theme .management-report-toolbar > div strong { display: block; color: #3e5f3a; font-size: 13px; }
.studio-theme .management-report-toolbar > div small { display: block; margin-top: 4px; color: #7c8c73; font-size: 12px; }
.studio-theme .management-report-toolbar label { color: #718368; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.studio-theme .management-report-toolbar :is(input, select) { min-height: 34px; margin-top: 4px; padding: 6px 8px; font-size: 12px; }
.studio-theme .management-report-toolbar button { min-height: 34px; white-space: nowrap; }
.studio-theme .danger-confirmation-dialog { width: min(480px, calc(100vw - 30px)); }
.studio-theme .danger-confirmation-dialog form { display: grid; gap: 14px; padding: 18px; }
.studio-theme .danger-confirmation-dialog label { color: #506449; font-weight: 650; }
.studio-theme .danger-confirmation-dialog input { display: block; width: 100%; margin-top: 6px; }
.studio-theme .danger-confirmation-note { padding: 10px; border-radius: 8px; background: #fff5ed; color: #8b6754; font-size: 12px; }
.studio-theme .setup-accounts-group { order: 4; }
.studio-theme .setup-admin-group { order: 5; border-color: #ecd9ce; }
.studio-theme .setup-admin-group > summary { background: #fff9f4; }
.studio-theme .setup-admin-group > summary::before { background: #bd735c; }
.studio-theme .setup-page .setup-menu-group { margin: 0; border-radius: 12px; box-shadow: none; }
.studio-theme .setup-page .setup-menu-group > summary { min-height: 58px; padding: 12px 15px; background: #f7f9f2; }
.studio-theme .setup-page .setup-menu-group > summary .compact-section-toggle { display: none; }
.studio-theme .setup-page .setup-menu-group > summary::after { color: #748766; font-size: 12px; }
.studio-theme .setup-page .setup-menu-group > .compact-workspace-content { padding: 10px; border-top-color: #e3e8dc; background: #f8faf4; }
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > section,
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .grid-two > section,
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .grid-two > details {
  padding: 12px;
  border-color: #e1e7da;
  border-radius: 12px;
  background: #fffefb;
}
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .grid-two > details.setup-subsection {
  padding: 0;
}
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .setup-subsection + .grid-two,
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .grid-two + .setup-subsection { margin-top: 8px; }
.studio-theme .setup-page .bank-charges-ledger-section { padding: 0; }
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .setup-subsection + .setup-subsection { margin-top: 8px; }
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > section + section,
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .grid-two,
.studio-theme .setup-page .setup-menu-group .compact-workspace-content > .spaced-section { margin-top: 8px; }
.studio-theme .setup-page .table-wrap { max-height: 310px; }
.studio-theme .setup-page .table-wrap.compact { max-height: 230px; }
.studio-theme .setup-page :is(th, td) { padding: 9px 10px; }

@media (max-width: 1080px) {
  .studio-theme .setup-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-theme .backup-center { grid-template-columns: 1fr; }
  .studio-theme .backup-center-actions { justify-content: flex-start; }
  .studio-theme .backup-health-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-theme .management-report-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .studio-theme .setup-page-header { min-height: 0; padding: 20px 18px 15px; }
  .studio-theme .backup-center, .studio-theme .setup-page-content { margin-left: 10px; margin-right: 10px; padding-left: 12px; padding-right: 12px; }
  .studio-theme .setup-page-content { margin: 0; }
  .studio-theme .setup-command-grid { grid-template-columns: 1fr; }
  .studio-theme .backup-center-actions > * { flex: 1 1 140px; text-align: center; }
  .studio-theme .setup-page .operations-report-panel .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-theme .setup-page .operations-report-panel .card:last-child { grid-column: 1 / -1; }
  .studio-theme .setup-page .grid-two, .studio-theme .setup-page .quick-add-grid { grid-template-columns: 1fr; }
  .studio-theme .backup-health-meta, .studio-theme .management-report-toolbar { grid-template-columns: 1fr; }
}

@media print {
  body.print-management-reports * { visibility: hidden !important; }
  body.print-management-reports [data-tab-panel="setup"],
  body.print-management-reports [data-tab-panel="setup"] *,
  body.print-management-reports .setup-reports-group,
  body.print-management-reports .setup-reports-group * { visibility: visible !important; }
  body.print-management-reports [data-tab-panel="setup"] { display: block !important; position: absolute; inset: 0; padding: 0; }
  body.print-management-reports .setup-page > :not(.setup-page-content),
  body.print-management-reports .setup-page-content > :not(.setup-reports-group),
  body.print-management-reports .management-report-toolbar button { display: none !important; }
  body.print-management-reports .setup-reports-group { border: 0; }
  body.print-management-reports .setup-reports-group > .compact-workspace-content { display: block !important; }
  body.print-management-reports .setup-reports-group details { break-inside: avoid; }
  body.print-management-reports .setup-reports-group details > * { display: block !important; }
}

/* ===================== was workspace.css ===================== */
/* Shared control and layout values. Loaded after the legacy screen styles. */
.capacity-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.capacity-selection-row { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.capacity-account-picker .capacity-include-label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-bottom: 8px; }
.capacity-include-label input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; }
.capacity-selection-row.is-excluded { border-style: dashed; background: var(--panel-soft); }
.capacity-picker-heading button, .capacity-remove-account { min-width: 40px; min-height: 40px; font-size: 22px; }
body.studio-theme {
  --ui-label: 12px;
  --ui-copy: 14px;
  --ui-control: 42px;
  --ui-radius: 12px;
  --ui-gap: 16px;
  --ui-muted: #52665c;
}
body.studio-compact { --ui-control: 36px; --ui-gap: 12px; }
/* Launch workspace primitives: one task header, quiet utilities, stable data. */
.launch-workspace .workspace-tools { margin: 0 0 16px; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
.launch-workspace .workspace-tools > summary { cursor: pointer; font-size: 13px; color: #52665c; padding: 8px 0; }
.launch-workspace .workspace-tools .workspace-status-bar { margin: 8px 0; padding: 8px 0; }
.launch-utility-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.launch-workspace:not([data-route="overview"]):not([data-route="workflow"]) #todayActionStrip { display: none; }
.launch-workspace #todayActionStrip { padding: 8px 12px; margin-bottom: 12px; }
.launch-workspace .history-workspace-intro { display: none; }
.launch-workspace .setup-page-header { padding: 16px; }
.launch-workspace .setup-page-header h2 { font: 650 22px/1.2 var(--font-ui); }
.planning-hub header p { color: #52665c; max-width: 72ch; }
.planning-paths { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.planning-paths article { padding: 16px; border: 1px solid #d6e1cc; border-radius: 12px; background: linear-gradient(145deg,#fffefa,#f1f5eb); box-shadow: 0 3px 0 #dbe4d2; }
.planning-paths article button { width: 100%; }
.planning-paths article p { margin-bottom: 0; font-size: 13px; line-height: 1.5; color: #52665c; }
.single-capacity-tools { margin: 16px 0; }
.single-capacity-tools > summary { padding: 16px; cursor: pointer; border: 1px solid #d6e1cc; border-radius: 12px; font-weight: 650; }
.single-capacity-tools[open] > summary { margin-bottom: 12px; }
.launch-workspace .command-center-panel { margin-top: 12px; }
.launch-workspace .application-side-panel { width: min(440px,calc(100vw - 32px)); top: 16px; bottom: 16px; }
.financial-state-summary article { display: grid; gap: 4px; padding: 10px 0; }
.financial-state-summary p { margin: 0; font-size: 14px; line-height: 1.5; }
.financial-state-summary small { display: block; margin: 12px 0; color: #52665c; font-size: 12px; line-height: 1.5; }
.launch-workspace .erp-shell :is(.application-funding-source,.application-lifecycle,.refund-badge,.funding-covered) { font-size: 12px; line-height: 1.4; }
.launch-workspace .erp-shell .applications-table th { white-space: normal; overflow: visible; text-overflow: clip; text-transform: none; letter-spacing: 0; }
.launch-workspace .erp-shell .applications-table th > span { white-space: normal; overflow: visible; text-overflow: clip; }
.launch-workspace .erp-shell .panel-header h2 { color: #213f36; }
.launch-workspace .erp-shell table th { color: #526744; font-size: 12px; }
.launch-workspace :is(.section-note,.field-help) { color: #52665c; line-height: 1.5; }
.launch-workspace :is(button,a,input,summary,textarea):focus-visible { outline: 3px solid #398569; outline-offset: 3px; }
.launch-guide { width: min(650px,calc(100vw - 32px)); padding: 24px; color: #213f36; overflow: auto; }
.launch-guide p,.launch-guide li { line-height: 1.6; }
.launch-guide footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.launch-guide label { display: flex; align-items: flex-start; gap: 10px; }
.launch-guide input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; }
.setup-journey { padding: 0; list-style: none; }
.setup-journey li { border-bottom: 1px solid #d6e1cc; padding: 12px 0; }
.setup-journey p { font-size: 13px; margin: 8px 0 0; }
.getting-started { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.getting-started[hidden],.prerequisite-notice[hidden] { display: none; }
.prerequisite-notice { grid-column: 1 / -1; padding: 14px; background: #fff5df; border: 1px solid #dfc78a; border-radius: 12px; }
.prerequisite-notice p { margin: 0 0 10px; line-height: 1.5; }
.backup-advanced { width: 100%; font-size: 13px; }
.backup-advanced > summary { cursor: pointer; padding: 12px 0; }
#ledgerAccountPicker { display: none; }
@media (min-width: 1450px) {
  .launch-workspace.application-details-open .erp-shell { width: calc(100% - 460px); margin-left: 0; margin-right: 460px; }
}
@media (max-width: 1100px) {
  .launch-workspace #ledgerAccountPicker { display: inline-flex; justify-self: start; }
  .launch-workspace .ledger-page .account-ledger-workspace { grid-template-columns: minmax(0,1fr); }
  .launch-workspace:not(.ledger-picker-open) .account-ledger-account-pane { display: none; }
  .launch-workspace .account-ledger-account-pane { border: 0; padding: 0; }
  .launch-workspace .planning-paths { grid-template-columns: minmax(0,1fr); }
  .launch-workspace .planning-paths article { display: grid; grid-template-columns: minmax(180px,1fr) 1fr; gap: 12px; align-items: center; }
  .launch-workspace .planning-paths article p { margin: 0; }
}
@media (max-width: 650px) {
  .launch-workspace .planning-paths article { grid-template-columns: minmax(0,1fr); }
  .launch-workspace .studio-topbar { margin-bottom: 8px; }
  .launch-workspace .workspace-tools { margin-bottom: 8px; }
  .launch-workspace .getting-started { display: block; }
  .launch-workspace :is(.primary-btn,.secondary-btn,.cool-select-trigger) { min-height: 44px; }
  .launch-workspace .application-side-panel { inset: 8px; width: auto; }
}
.mobile-create-menu { display: none; }
.product-help-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-theme #refundForm .return-copy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-theme #refundForm .return-copy-actions > button { flex: 0 1 auto; width: auto; }
.studio-theme .history-toolbar .history-date-field { display: grid; gap: 4px; flex: 0 1 180px; min-width: 0; }
.studio-theme .history-toolbar .history-date-field input { width: 100%; min-width: 0; }
.funding-progress { display: block; width: 100%; height: 5px; margin: 7px 0; accent-color: #397857; }
@media (min-width: 1100px) {
  .studio-theme #editApplicationDialog { margin: 12px 12px 12px auto; width: min(640px, 48vw); max-height: calc(100dvh - 24px); height: calc(100dvh - 24px); border-radius: 16px; }
}
.studio-theme .product-guide { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 1px solid #cddac8; border-radius: 22px; background: #fffef9; color: #23483a; box-shadow: 0 24px 80px #122d3440; }
.product-guide::backdrop { background: #122d3466; }
.product-guide header, .product-guide footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-guide h2 { font-size: 28px; margin: 20px 0 14px; }
.product-guide-content { font-size: 14px; line-height: 1.65; }
.product-guide-content ul { padding-left: 20px; }
.product-guide-content li { margin-bottom: 12px; }
.product-guide footer { margin-top: 24px; }
.register-filter-disclosure { margin-bottom: 12px; }
.register-filter-disclosure > summary { padding: 10px 14px; cursor: pointer; font-size: 13px; color: #355942; }
.studio-theme.studio-compact .panel { padding: 16px; }
.studio-theme.studio-compact .panel-header { margin-bottom: 12px; padding-bottom: 12px; }
.studio-theme.studio-compact .workspace-status-bar { padding-top: 6px; padding-bottom: 6px; }
.studio-theme .applications-table tr:has(.application-select-checkbox:checked) td { background: #e7f1df; }
.studio-theme .applications-table tr:has(.application-select-checkbox:checked) td:first-child { box-shadow: inset 3px 0 #397857; }
@media (prefers-reduced-motion: reduce) { .product-guide { animation: none; transition: none; } }
.studio-theme :is(.secondary-btn, .primary-btn, .danger-btn) {
  min-height: var(--ui-control); border-radius: var(--ui-radius); font-size: 13px;
  line-height: 1.35; padding: 9px 14px; white-space: normal;
}
.studio-theme .erp-shell :is(.secondary-btn, .primary-btn, .danger-btn) { font-size: 13px; min-height: var(--ui-control); }
.studio-theme :is(.field-help, .section-note, .workspace-status-item span, .workspace-status-item strong, .sidebar-label, .studio-kicker) { font-size: var(--ui-label); color: var(--ui-muted); }
.studio-theme .sidebar-label { color: #aac1b7; }
.studio-theme .erp-shell .nav-tab { font-size: 13px; }
.studio-theme :is(label, .eyebrow), .studio-theme .erp-shell :is(th, .status-pill, .badge) { font-size: var(--ui-label); }
.studio-theme .erp-shell td { font-size: var(--ui-copy); line-height: 1.45; }
.studio-theme .erp-shell .table-wrap { max-width: 100%; overflow-x: auto; }
.studio-theme .erp-shell :is(td small, .funding-row-totals, .account-ledger-summary span) { font-size: 12px; }
.studio-theme .erp-shell :is(.applications-table, .transaction-history-table, .account-ledger-table-wrap table) th {
  font-size: var(--ui-label); line-height: 1.35; letter-spacing: .02em; color: #526744;
}
.studio-theme :is(.summary-card-action, .nav-utility-btn, .setup-command-card small, .management-report-toolbar label, .management-report-toolbar small, .security-form-grid label small) { font-size: var(--ui-label); }
.studio-theme .workflow-action-dialog .simple-form .field-help { font-size: var(--ui-label); letter-spacing: 0; }
.studio-theme .ledger-page .account-ledger-view-switch button { font-size: var(--ui-label); min-height: 36px; }
.studio-theme :is(td, output, .account-ledger-summary strong, .funding-row-totals b) { font-variant-numeric: tabular-nums; }
.studio-theme :is(input, select, textarea, .cool-select-trigger) { scroll-margin: 90px; }
.studio-theme :is(input, textarea)[aria-invalid=true], .studio-theme .cool-select-trigger[aria-invalid=true] { border-color: #aa433c; box-shadow: 0 0 0 2px #aa433c19; }
.studio-theme .field-error { display: block; color: #983b34; font-size: 12px; line-height: 1.4; font-weight: 600; margin-top: 5px; text-transform: none; letter-spacing: 0; }
.studio-theme .credential-visibility { justify-self: end; border: 0; background: transparent; padding: 6px; color: #175844; font-size: 13px; cursor: pointer; }

/* Financial position leads the dashboard; the existing sculpture stays animated. */
.studio-theme .erp-shell #summaryCards .summary-market-card p { font-size: 12px; }
.studio-theme .erp-shell #summaryCards { margin-bottom: 18px; }
.studio-theme .erp-shell .capacity-planner-panel .panel-header { flex-wrap: wrap; align-items: center; }
.studio-theme .erp-shell .capacity-planner-panel .capacity-planner-controls {
  display: flex; flex: 1 1 620px; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%;
}
.studio-theme .capacity-planner-panel .capacity-planner-controls > .cool-select { flex: 1 1 250px; min-width: 0; width: auto; }
.studio-theme .capacity-planner-panel .capacity-planner-controls > button { flex: 0 0 auto; white-space: nowrap; }
.studio-theme .erp-shell .dashboard-market-rail.simple-hero { margin-bottom: 22px; padding: 24px; }
.studio-theme .erp-shell .dashboard-market-rail h1 { font-size: clamp(34px, 4vw, 52px); }
.studio-theme .studio-sculpture { min-height: 250px; }
.studio-theme .backup-status-link { display: flex !important; flex-direction: column; align-items: flex-start; gap: 4px; border: 1px solid var(--line-strong); padding: 9px 12px; border-radius: var(--ui-radius); background: #fffefa; cursor: pointer; }
.studio-theme .backup-status-link:hover { border-color: var(--brand); }
.studio-theme .workspace-status-bar { flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.studio-theme .workspace-status-bar .workspace-status-item {
  display: grid; align-content: center; gap: 4px; min-height: 44px;
  padding: 6px 0; text-align: left;
}
.studio-theme .workspace-status-bar .backup-status-link { padding: 8px 14px; }
.studio-theme .workspace-status-bar .product-help-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-left: auto;
}
.studio-theme .workspace-status-bar .product-help-controls button {
  min-height: 42px; margin: 0; white-space: nowrap;
}
.studio-theme .workspace-status-bar .workspace-request-status { align-self: center; }
.studio-theme .workspace-status-bar .workspace-request-status:empty { display: none; }

/* Account ledger is a route, so dialogs for posting remain the only overlay. */
.studio-theme .erp-shell .ledger-page {
  width: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  overflow: visible; box-shadow: var(--shadow); border-radius: 16px;
}
.studio-theme .ledger-page .account-ledger-workspace-shell { padding: 22px; max-height: none; }
.studio-theme .ledger-page .account-ledger-workspace { display: grid; grid-template-columns: minmax(200px, 24%) minmax(0, 1fr); gap: 20px; }
.studio-theme .ledger-page .account-ledger-detail-pane { min-width: 0; padding-left: 0; }
.studio-theme .ledger-page .account-ledger-detail-header { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.studio-theme .ledger-page .account-ledger-detail-header h3 { font-size: 22px; overflow-wrap: anywhere; }
.studio-theme .ledger-page .account-ledger-detail-actions { flex-wrap: wrap; gap: 8px; }
.studio-theme .ledger-page .account-ledger-account-list { max-height: 65vh; }
.studio-theme .ledger-page .account-ledger-account-row { padding: 12px 9px; display: flex; flex-wrap: wrap; gap: 5px; min-height: 48px; }
.studio-theme .ledger-page .account-ledger-account-row :is(span,b) { font-size: 13px; }
.studio-theme .ledger-page .account-ledger-report-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 14px; }
.studio-theme .ledger-page .account-ledger-period-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.studio-theme .ledger-page .account-ledger-period-fields { display: flex; gap: 12px; }
.studio-theme .ledger-page .account-ledger-view-switch { grid-column: 1 / -1; justify-self: start; }
.studio-theme .ledger-group-label { padding: 0 8px; font-size: 12px; color: var(--ui-muted); }
.studio-theme .ledger-page .account-ledger-report-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 6px; }
.studio-theme .ledger-page .account-ledger-report-actions .cool-select { width: 150px; }
.studio-theme .ledger-page .account-ledger-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 8px; }
.studio-theme .ledger-page .account-ledger-table-wrap { max-height: none; overflow: auto; }
.studio-theme .ledger-page .account-ledger-table-wrap table { width: 100%; min-width: 800px; }
.studio-theme .ledger-page .account-ledger-table-wrap :is(th,td) { padding: 12px; }
.studio-theme .ledger-page .account-ledger-workspace-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-theme .ledger-page .ledger-action-note { max-width: 130px; font-size: 12px; }
.studio-theme .ledger-page .account-ledger-keyboard-hint { font-size: 12px; line-height: 1.65; }

.studio-theme .register-filter-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f4f6ef; }
.studio-theme .register-filter-toolbar label { display: grid; gap: 6px; min-width: 0; font-size: 12px; }
.studio-theme .register-filter-toolbar :is(select, .cool-select) { width: 100%; min-width: 0; }
.studio-theme .application-register-panel .application-category-summary .application-category-tile { min-height: 64px; padding: 10px 14px; grid-template-columns: 1fr auto; gap: 4px 12px; border-radius: 12px; }
.studio-theme .application-register-panel .application-category-summary .application-category-tile strong { font-size: 22px; margin: 0; }
.studio-theme .application-register-panel .application-category-summary .application-category-tile em { display: none; }
@media (max-width: 600px) { .studio-theme .register-filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Scope bulk actions and keep their selection visible. */
.studio-theme .application-selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid #a7c6b5; border-radius: var(--ui-radius); background: #eaf4ec; }
.studio-theme .application-selection-bar strong { flex: 1; }
.studio-theme .register-more { position: relative; }
.studio-theme .register-more summary { cursor: pointer; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--ui-radius); font-size: 13px; }
.studio-theme .register-more > button { position: absolute; right: 0; z-index: 10; width: 240px; margin-top: 6px; background: #fff8f5; box-shadow: var(--shadow); }
.studio-theme .application-register-panel .application-recording-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.studio-theme .application-register-panel .applications-table :is(.status-pill,.funding-done,.funding-covered,.funding-needed) { font-size: 12px; }
.studio-theme .application-lifecycle {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #d4c6b5;
  background: #f3f5ef;
  color: #53604f;
  white-space: normal;
  overflow: visible;
  line-height: 1.35;
  text-transform: none;
}
.studio-theme .application-lifecycle::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .72; }
.studio-theme .application-lifecycle[data-stage="funded"],
.studio-theme .application-lifecycle[data-stage="allotted"],
.studio-theme .application-lifecycle[data-stage="returned"],
.studio-theme .application-lifecycle[data-stage="released"] { border-color: #a7c6b5; background: #eaf4ec; color: #246f4a; }
.studio-theme .application-lifecycle[data-stage="part-funded"],
.studio-theme .application-lifecycle[data-stage="part-allotted"] { border-color: #dfbd7a; background: #fff6df; color: #8a5a18; }
.studio-theme .application-lifecycle[data-stage="cancelled"] { border-color: #e4b7ae; background: #fff0ed; color: #a64236; }
.studio-theme .funding-needed::before { content: '! '; font-weight: 800; }
.studio-theme .funding-done::before { content: '\2713  '; }
.studio-theme .funding-row-totals { display: grid; gap: 4px; margin-top: 8px; line-height: 1.4; }
.studio-theme .application-register-panel .applications-table .application-actions { min-width: 155px; }
.studio-theme .application-register-panel .applications-table .application-actions .secondary-btn { min-height: 36px; font-size: 12px; }

/* Application rows must remain readable even when every workflow status is present. */
.studio-theme .application-register-panel .application-register-wrap {
  overflow: visible;
  overflow-y: visible;
}

.studio-theme .application-register-panel .applications-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
  border-spacing: 0 8px;
}

.studio-theme .application-register-panel .applications-table tbody tr:not(.application-ipo-group) > td {
  height: auto;
  min-height: 56px;
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: middle;
}

.studio-theme .application-register-panel .applications-table th:nth-child(1),
.studio-theme .application-register-panel .applications-table td:nth-child(1) { width: 3%; }
.studio-theme .application-register-panel .applications-table th:nth-child(2),
.studio-theme .application-register-panel .applications-table td:nth-child(2) { width: 13%; }
.studio-theme .application-register-panel .applications-table th:nth-child(3),
.studio-theme .application-register-panel .applications-table td:nth-child(3) { width: 15%; }
.studio-theme .application-register-panel .applications-table th:nth-child(4),
.studio-theme .application-register-panel .applications-table td:nth-child(4) { width: 11%; }
.studio-theme .application-register-panel .applications-table th:nth-child(5),
.studio-theme .application-register-panel .applications-table td:nth-child(5) { width: 7%; }
.studio-theme .application-register-panel .applications-table th:nth-child(6),
.studio-theme .application-register-panel .applications-table td:nth-child(6) { width: 8%; }
.studio-theme .application-register-panel .applications-table th:nth-child(7),
.studio-theme .application-register-panel .applications-table td:nth-child(7) { width: 19%; }
.studio-theme .application-register-panel .applications-table th:nth-child(8),
.studio-theme .application-register-panel .applications-table td:nth-child(8) { width: 14%; }
.studio-theme .application-register-panel .applications-table th:nth-child(9),
.studio-theme .application-register-panel .applications-table td:nth-child(9) { width: 10%; }

.studio-theme .application-register-panel .applications-table td:nth-child(2),
.studio-theme .application-register-panel .applications-table td:nth-child(3),
.studio-theme .application-register-panel .applications-table td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-theme .application-register-panel .applications-table td:last-child {
  overflow: visible;
}

.studio-theme .application-register-panel .funding-status-cell {
  position: relative;
  min-width: 0;
}

.studio-theme .application-register-panel .funding-status-cell > :is(.funding-covered, .funding-done, .funding-needed) {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding-top: 3px;
  padding-bottom: 3px;
  vertical-align: middle;
}

.studio-theme .application-register-panel .funding-needed {
  flex-wrap: wrap;
}

.studio-theme .application-register-panel .funding-needed small {
  flex-basis: 100%;
}

.studio-theme .application-register-panel .funding-row-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.studio-theme .application-register-panel .funding-row-totals span {
  display: grid;
  min-width: 0;
  align-items: start;
  justify-content: center;
  gap: 1px;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.studio-theme .application-register-panel .funding-row-totals b {
  color: var(--ui-text);
  font-size: 12px;
  white-space: nowrap;
}

.studio-theme .application-register-panel .funding-complete-amount {
  display: block;
  margin-top: 2px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.studio-theme .application-register-panel .refund-plan-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  width: 100%;
  align-items: center;
  justify-items: stretch;
  gap: 5px;
}

.studio-theme .application-register-panel .refund-plan-wrap .status-pill {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-theme .application-register-panel .refund-plan-wrap .plan-refund-btn {
  position: static;
  inset: auto;
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  transform: none;
}

.studio-theme .application-register-panel .application-primary-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.studio-theme .application-register-panel .application-primary-actions > .edit-application-btn {
  min-width: 58px;
  min-height: 32px;
  padding: 6px 10px;
  border-color: #8bb99a;
  background: #f4faf1;
  color: #285e3d;
  font-size: 12px;
  font-weight: 800;
}

.studio-theme .application-register-panel .application-actions-menu > summary {
  width: 32px;
  height: 32px;
}

.studio-theme .application-register-panel .application-actions-menu > div {
  z-index: 40;
}

/* The checklist is one compact register: choose an IPO, then complete each applicant across one row. */
.studio-theme .closing-checklist-selector { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.studio-theme .closing-checklist-selector label { flex: 1 1 420px; max-width: 680px; }
.studio-theme .closing-checklist-selector label > span { display: block; margin-bottom: 6px; }
.studio-theme .closing-checklist-selector p { display: grid; gap: 2px; margin: 0; text-align: right; }
.studio-theme .closing-checklist-selector p strong { font-size: 14px; }
.studio-theme .closing-checklist-selector p span { color: var(--ui-muted); font-size: 12px; }
.studio-theme .closing-checklist-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.studio-theme .closing-checklist-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.studio-theme .closing-checklist-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.studio-theme .closing-checklist-table tr:last-child td { border-bottom: 0; }
.studio-theme .closing-checklist-table tr.is-complete { background: #f3f8ec; }
.studio-theme .closing-checklist-table .checklist-applicant { min-width: 150px; }
.studio-theme .closing-checklist-table .checklist-applicant strong { font-size: 14px; }
.studio-theme .checklist-value-label { display: block; margin-bottom: 4px; color: var(--ui-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.studio-theme .closing-checklist-table td > strong { font-size: 13px; white-space: nowrap; }
.studio-theme .checklist-funding-cell { min-width: 210px; }
.studio-theme .checklist-funding-cell small { display: block; margin-top: 3px; color: var(--ui-muted); font-size: 12px; }
.studio-theme .checklist-fund-btn { min-height: 30px; margin-top: 7px; padding: 5px 8px; border: 1px solid var(--brand); border-radius: 8px; background: transparent; color: var(--brand); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.studio-theme .checklist-inline-control { display: flex; align-items: center; gap: 7px; min-width: 125px; margin: 0; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.studio-theme .checklist-inline-control input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand); }

/* Shared dialog chrome without constraining the specialized ledger forms. */
.studio-theme dialog { max-height: calc(100dvh - 32px); }
.studio-theme dialog .dialog-title-row { gap: 16px; align-items: flex-start; }
.studio-theme dialog .dialog-title-row h3 { font-size: 22px; line-height: 1.2; }
.studio-theme dialog :is(.dialog-actions,.workspace-form-footer,.voucher-entry-footer) { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; background: #fffefa; padding: 12px 0; border-top: 1px solid var(--line); }
.studio-theme dialog :is(.simple-form,.security-form-grid) { align-items: start; }
.studio-theme dialog .field-help { font-size: 12px; line-height: 1.4; }
/* Full-width dialog rows must not create implicit second columns. */
.studio-theme #globalSearchDialog .edit-account-form > * { grid-column: 1 / -1; min-width: 0; }
.studio-theme #securitySettingsForm { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.studio-theme #securitySettingsForm > :not(section) { grid-column: 1 / -1; min-width: 0; }
.studio-theme #securitySettingsForm > section { min-width: 0; }
.studio-theme #securitySettingsForm .security-form-grid { align-items: end; }
.studio-theme #securitySettingsForm .security-touch-id-card p { font-size: 12px; }
@media (max-width: 650px) {
  .studio-theme #securitySettingsForm { grid-template-columns: minmax(0, 1fr); }
}
.studio-theme .workspace-message-dialog {
  position: fixed; inset: 0; margin: auto;
  height: fit-content; max-height: calc(100dvh - 24px); overflow-y: auto;
  transform: none;
}
.studio-theme .workspace-message-actions .danger-btn { background: #a23732; color: white; }
.dropdown-option-copy { display: grid; gap: 4px; white-space: normal; }
.dropdown-option-copy strong { font-size: 13px; font-weight: 650; line-height: 1.4; }
.dropdown-option-copy small { font-size: 12px; color: #52665c; line-height: 1.4; }
.dropdown-no-results { font-size: 13px; padding: 12px; color: #52665c; }
.cool-select-option { min-height: 40px; }
.studio-theme .cool-select-panel[popover] { margin: 0; right: auto; bottom: auto; color: var(--ink); }
.studio-theme select.cool-select-native {
  position: absolute; inset: 0 auto auto 0; width: 1px !important; min-width: 0 !important;
  height: 1px !important; padding: 0 !important; margin: 0 !important;
  clip-path: inset(50%); overflow: hidden; pointer-events: none;
}
.studio-theme .setup-page .backup-health-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.studio-theme .setup-page .backup-health-meta :is(span,strong) { font-size: 12px; }

/* A single application can draw from several accounts while retaining one clear total. */
.studio-theme .application-funding-allocation {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfdbc5;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffefa 0%, #f3f7ed 100%);
}
.studio-theme .application-funding-allocation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.studio-theme .application-funding-allocation-head > div { display: grid; gap: 3px; }
.studio-theme .application-funding-allocation-head strong { color: var(--ink); font-size: 14px; }
.studio-theme .application-funding-allocation-head small { color: var(--ui-muted); font-size: 12px; line-height: 1.4; }
.studio-theme .application-funding-source-rows { display: grid; gap: 10px; }
.studio-theme .application-funding-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .48fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d9e2d1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
}
.studio-theme .application-funding-source-row.is-primary { grid-template-columns: minmax(0, 1fr) minmax(180px, .48fr); }
.studio-theme .application-funding-source-row label { min-width: 0; margin: 0; }
.studio-theme .application-remove-funding-source {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8aaa4;
  border-radius: 12px;
  background: #fff8f5;
  color: #993b35;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.studio-theme .application-funding-allocation-summary {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eaf2e2;
  color: #385640;
  font-size: 13px;
  font-weight: 750;
}
.studio-theme .application-funding-allocation-summary.is-complete { background: #e4f5e9; color: #1e6b3d; }
.studio-theme .application-funding-allocation-summary.is-warning { background: #fff0d5; color: #8a5810; }
@media (max-width: 1000px) {
  .studio-theme .ledger-page .account-ledger-workspace { grid-template-columns: 1fr; }
  .studio-theme .ledger-page .account-ledger-account-list { max-height: 190px; }
  .studio-theme .ledger-page .account-ledger-account-pane { border-right: 0; padding-right: 0; }
}
@media (max-width: 650px) {
  /* Reset the horizontal flex basis when the header becomes a column. */
  .studio-theme .erp-shell .capacity-planner-panel .capacity-planner-controls { flex: 0 0 auto; width: 100%; }
  .studio-theme .capacity-planner-panel .capacity-planner-controls > :is(.cool-select, button) { flex: 0 0 auto; width: 100%; }
  .studio-theme .ledger-page .account-ledger-workspace-shell { padding: 14px; }
  .studio-theme .ledger-page .account-ledger-report-bar { grid-template-columns: 1fr; }
  .studio-theme .ledger-page .account-ledger-period-fields { flex-wrap: wrap; }
  .studio-theme .closing-checklist-selector { align-items: stretch; flex-direction: column; }
  .studio-theme .closing-checklist-selector label { flex-basis: auto; max-width: none; }
  .studio-theme .closing-checklist-selector p { text-align: left; }
  .studio-theme .workspace-message-header { grid-template-columns: 40px minmax(0,1fr) 32px; }
  .studio-theme .application-funding-allocation-head { align-items: stretch; flex-direction: column; }
  .studio-theme .application-funding-source-row,
  .studio-theme .application-funding-source-row.is-primary { grid-template-columns: 1fr; }
}

/* Mobile workspaces use readable cards instead of squeezing the desktop register. */
@media (max-width: 720px) {
  .studio-theme .mobile-quick-actions { display: none !important; }
  .studio-theme .mobile-create-menu {
    position: fixed;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 80;
    display: block;
  }
  .studio-theme .mobile-create-menu > summary {
    display: grid;
    min-width: 82px;
    min-height: 50px;
    place-items: center;
    border: 1px solid #34594f;
    border-radius: 16px;
    background: #173438;
    color: #e3f3b6;
    box-shadow: 0 14px 34px rgba(20, 48, 44, .25);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }
  .studio-theme .mobile-create-menu > summary::-webkit-details-marker { display: none; }
  .studio-theme .mobile-create-menu[open] > summary { border-radius: 14px 14px 5px 5px; }
  .studio-theme .mobile-create-menu nav {
    position: absolute;
    right: 0;
    bottom: 58px;
    display: grid;
    width: min(300px, calc(100vw - 28px));
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(255, 254, 249, .98);
    box-shadow: 0 18px 48px rgba(20, 48, 44, .22);
    backdrop-filter: blur(18px);
  }
  .studio-theme .mobile-create-menu nav button {
    display: grid;
    min-height: 54px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    text-align: left;
  }
  .studio-theme .mobile-create-menu nav button strong { font-size: 14px; }
  .studio-theme .mobile-create-menu nav button span { color: var(--muted); font-size: 12px; }
  .studio-theme [data-tab-panel="applications"],
  .studio-theme .application-register-panel,
  .studio-theme .application-register-panel > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .studio-theme [data-tab-panel="applications"].active {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-theme .application-register-panel {
    overflow: visible;
    padding: 14px;
  }
  .studio-theme .application-register-panel .panel-header,
  .studio-theme .application-register-panel .application-recording-actions {
    min-width: 0;
  }
  .studio-theme .application-register-panel .application-recording-actions button {
    min-width: 0;
    white-space: normal;
  }
  .studio-theme .application-register-panel .application-category-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .studio-theme .application-register-panel .application-category-summary .application-category-tile {
    min-height: 88px;
    padding: 12px;
  }
  .studio-theme .application-register-panel .application-category-summary .application-category-tile strong {
    font-size: 22px;
  }
  .studio-theme .application-register-panel .application-register-wrap {
    overflow: visible;
    padding: 0;
    background: transparent;
  }
  .studio-theme .application-register-panel .application-register-picker {
    width: 100%;
    box-sizing: border-box;
  }
  .studio-theme .application-register-panel .application-register-collapsed,
  .studio-theme .application-register-panel .application-register-collapsed > td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .studio-theme .application-register-panel .application-register-collapsed > td {
    padding: 0 !important;
  }
  .studio-theme .application-archive-panel {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }
  .studio-theme .application-archive-panel .table-wrap {
    overflow-x: auto;
  }
  .studio-theme .application-archive-panel .allotted-applications-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .studio-theme .application-archive-panel .allotted-applications-table :is(th, td) {
    padding: 9px 5px;
    overflow-wrap: anywhere;
    font-size: 12px;
  }
  .studio-theme .application-register-panel .applications-table,
  .studio-theme .application-register-panel .erp-shell .applications-table {
    display: block;
    min-width: 0;
  }
  .studio-theme .application-register-panel .applications-table thead,
  .studio-theme .application-register-panel .applications-table tbody {
    display: block;
  }
  .studio-theme .application-register-panel:not(.is-ipo-picker) .applications-table thead tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
  }
  .studio-theme .application-register-panel:not(.is-ipo-picker) .applications-table thead th {
    display: block;
    width: auto;
    padding: 0;
  }
  .studio-theme .application-register-panel:not(.is-ipo-picker) .applications-table thead th:first-child,
  .studio-theme .application-register-panel:not(.is-ipo-picker) .applications-table thead th:last-child {
    display: none;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group):not(.application-register-collapsed) {
    display: grid;
    grid-template-columns: 32px repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    margin-bottom: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(31, 62, 45, .06);
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td {
    display: grid;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    gap: 5px;
    border: 0;
    align-content: start;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(2),
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(3),
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(4) {
    overflow: visible;
    white-space: normal;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:first-child {
    grid-row: 1;
    grid-column: 1;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:first-child::before {
    display: none;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(2) {
    grid-row: 1;
    grid-column: 2 / -1;
  }
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(3),
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(7),
  .studio-theme .application-register-panel .applications-table tbody > tr:not(.application-ipo-group) > td:nth-child(9) {
    grid-column: 1 / -1;
  }
  .studio-theme .application-register-panel .applications-table .application-account-ledger-trigger {
    font-size: 16px;
  }
  .studio-theme .application-register-panel .funding-status-cell,
  .studio-theme .application-register-panel .refund-plan-wrap {
    width: 100%;
  }
  .studio-theme .application-register-panel .funding-row-totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .studio-theme .application-register-panel .funding-row-totals :is(span, b),
  .studio-theme .application-register-panel .funding-complete-amount {
    font-size: 12px;
  }
  .studio-theme .application-register-panel .applications-table .application-actions,
  .studio-theme .application-register-panel .applications-table .application-primary-actions {
    justify-content: stretch;
  }
  .studio-theme .application-register-panel .applications-table .application-primary-actions > .secondary-btn {
    min-height: 44px;
    flex: 1;
    font-size: 13px;
  }
  .studio-theme .application-register-panel .applications-table .application-actions-menu summary {
    width: 44px;
    min-height: 44px;
  }
  .studio-theme .application-register-panel .application-ipo-group {
    display: block;
    margin: 18px 0 9px;
  }
  .studio-theme .application-register-panel .application-ipo-group td {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 10px;
  }
  .studio-theme :is(button, summary, input, select, textarea, .cool-select-trigger) {
    min-height: 44px;
  }
  .studio-theme :is(label, .field-help, td, .section-copy, .empty) {
    font-size: max(12px, 1em);
  }
}
/* Keep applied filters visible independently of the filter disclosure. */
#activeApplicationFilters { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
#activeApplicationFilters[hidden] { display:none; }
#activeApplicationFilters button { max-width:100%; white-space:normal; text-align:left; overflow-wrap:anywhere; font-size:12px; }
/* Keep journal headings, controls and totals on the same column tracks. */
#voucherEntryDialog .voucher-line-head,
#voucherEntryDialog .voucher-line:not(.voucher-swap-line) {
  grid-template-columns: 92px minmax(0, 1fr) minmax(130px, .38fr) minmax(150px, .42fr);
  align-items: center;
}
#voucherEntryDialog .voucher-line-head span { font-size: 12px; letter-spacing: .02em; }
#voucherEntryDialog .voucher-line > label { align-self: stretch; margin: 0; }
#voucherEntryDialog .voucher-line > input {
  align-self: center; width: calc(100% - 20px); margin: 10px;
  min-height: 42px; box-sizing: border-box;
}
#voucherEntryDialog .voucher-line > output { padding: 12px; white-space: nowrap; }
#voucherEntryDialog .voucher-notes { align-items: start; }
#voucherEntryDialog .voucher-notes label { align-content: start; }
#voucherEntryDialog .voucher-notes input,
#voucherEntryDialog .voucher-notes textarea { margin: 0; min-height: 54px; box-sizing: border-box; }
#voucherEntryDialog .voucher-entry-footer {
  padding: 14px 26px; align-items: center; gap: 12px; box-sizing: border-box;
}
#voucherEntryDialog .voucher-entry-footer > div { min-width: 112px; }
#voucherEntryDialog .voucher-entry-footer > button { flex: 0 0 auto; margin: 0; white-space: nowrap; }
@media (max-width: 700px) {
  #voucherEntryDialog .voucher-line-head { display: none; }
  #voucherEntryDialog .voucher-line:not(.voucher-swap-line) {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  #voucherEntryDialog .voucher-line > output { grid-column: 2; justify-content: flex-start; }
  #voucherEntryDialog .voucher-line > input { grid-column: 2; }
  #voucherEntryDialog .voucher-entry-footer { padding: 12px 16px; }
  #voucherEntryDialog .voucher-entry-footer > div { flex: 1 1 35%; }
}
.workspace-request-status { font-size:12px; color:#345c47; }
.workspace-request-status[data-failed="true"] { color:#a4372a; }
/* Raised checklist passes keep all four actions in view, without a wide table. */
.checklist-pass-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:12px; padding:2px 2px 6px; }
.checklist-pass { min-width:0; padding:12px; border:1px solid #d5dfcc; border-radius:12px; background:linear-gradient(145deg,#fffefa,#f1f5e9); box-shadow:0 3px 0 #dce3d3,0 6px 12px #183f3010,inset 0 1px 0 white; }
.checklist-pass-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.checklist-pass .checklist-applicant { display:grid; gap:2px; min-width:0; }
.checklist-pass .checklist-applicant strong { font-size:14px; color:#183c32; overflow-wrap:anywhere; }
.checklist-pass .checklist-applicant span { font-size:13px; color:#586957; }
.checklist-meter { display:flex; align-items:center; justify-content:center; gap:4px; flex-shrink:0; padding:5px 8px; height:30px; border-radius:8px; background:#213f36; color:#eff8d3; box-shadow:inset 0 2px 3px #0003,0 1px 0 white; }
.checklist-meter span { font-size:12px; }
.checklist-pass progress { display:block; width:100%; height:5px; margin:8px 0; accent-color:#39866a; }
.checklist-pass-money { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; }
.checklist-pass-money>div { display:grid; gap:3px; }
.checklist-pass-money span,.checklist-pass-source { font-size:12px; color:#5c6b5c; }
.checklist-pass-money strong { font-size:14px; font-variant-numeric:tabular-nums; }
.checklist-pass-status { margin-left:auto; }
.checklist-pass-source { margin:5px 0 8px; overflow-wrap:anywhere; }
.checklist-step-pad { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.checklist-pass .checklist-inline-control { display:flex; align-items:center; gap:8px; min-width:0; min-height:42px; margin:0; padding:8px; border:1px solid #d7dfd0; border-radius:12px; background:#fffefa; box-shadow:0 3px 0 #d9dfd2; cursor:pointer; white-space:normal; transition:background .15s,transform .15s; }
.checklist-pass .checklist-inline-control:has(:checked) { background:#e4efdf; box-shadow:inset 0 2px 3px #20472a15; border-color:#b9cfb1; }
.checklist-pass .checklist-inline-control:active { transform:translateY(2px); }
.checklist-pass .checklist-inline-control:focus-within { outline:2px solid #39866a; outline-offset:2px; }
.checklist-pass .checklist-inline-control span { font-size:12px; line-height:1.3; }
.checklist-pass .checklist-inline-control input { flex:0 0 18px; width:18px; height:18px; margin:0; accent-color:#337a5c; }
.checklist-pass .checklist-fund-btn { margin-top:12px; width:100%; }
@media(max-width:760px) { .checklist-pass-grid { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .checklist-pass .checklist-inline-control { transition:none; transform:none; } }
.checklist-pass { position:relative; }
.checklist-completion-caption { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 0 6px; font-size:12px; color:#48684f; }
.checklist-pass .checklist-done-all { min-height:30px; padding:4px 10px; margin:0; font-size:12px; }
.checklist-pass progress { height:5px; border:0; border-radius:8px; overflow:hidden; background:#dae3d4; }
.checklist-pass progress::-webkit-progress-bar { background:#dae3d4; border-radius:8px; }
.checklist-pass progress::-webkit-progress-value { background:linear-gradient(90deg,#36866c,#89ae53); border-radius:8px; }
.checklist-pass progress::-moz-progress-bar { background:#39866a; }
.checklist-celebration { position:absolute; inset:0; pointer-events:none; overflow:hidden; border-radius:16px; }
.checklist-celebration i { position:absolute; left:50%; top:40%; width:7px; height:10px; background:#bc963c; animation:checklist-burst 1.1s ease-out forwards; }
.checklist-celebration i:nth-child(even) { background:#3b926d; }
@keyframes checklist-burst { from { opacity:1; transform:rotate(var(--angle)) translateY(0); } to { opacity:0; transform:rotate(var(--angle)) translateY(var(--distance)) rotate(160deg); } }
@media(prefers-reduced-motion:reduce) { .checklist-celebration { display:none; } }
.checklist-overall { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:8px 0 12px; font-size:13px; }
.checklist-overall progress { flex:1; min-width:100px; accent-color:#39866a; }
.checklist-overall label { display:flex; align-items:center; gap:8px; }
.checklist-overall input { width:18px; height:18px; }
.checklist-review-note { display:block; margin-top:6px; color:#5b6a57; font-size:12px; line-height:1.3; }
.checklist-history { margin-top:6px; border-top:1px solid #d5dfcc; padding-top:6px; font-size:13px; }
.checklist-history summary { cursor:pointer; font-weight:600; }
.checklist-history ul { padding:0; list-style:none; }
.checklist-history li { display:grid; gap:4px; padding:9px 0; border-bottom:1px solid #d5dfcc; overflow-wrap:anywhere; }
#todayActionStrip { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 16px; margin-bottom:18px; border:1px solid #d5dfcc; border-radius:12px; background:linear-gradient(120deg,#edf4df,#fffefa); }
#todayActionStrip>strong { color:#254e3e; margin-right:6px; }
.studio-theme .application-register-panel .application-account-cell { display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-width:0; width:100%; }
.studio-theme .application-register-panel .application-account-ledger-trigger { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; line-height:1.3; }
.studio-theme .application-register-panel .applicant-detail-trigger { display:inline-flex; min-height:24px; height:auto; padding:0 2px; margin:0; border:0; background:transparent; box-shadow:none; font-size:12px; color:#52715b; text-decoration:underline; text-underline-offset:3px; border-radius:3px; }
.studio-theme .application-register-panel .applicant-detail-trigger:focus-visible { outline:2px solid #39866a; outline-offset:2px; }
.studio-theme .application-register-panel .application-funding-source,
.studio-theme .application-register-panel .application-lifecycle,
.studio-theme .application-register-panel .funding-covered { background:transparent; box-shadow:none; border-color:transparent; border-radius:4px; }
.studio-theme .application-register-panel .applications-table td[data-label="Refund"] { white-space:normal; font-variant-numeric:tabular-nums; }
.studio-theme .application-register-panel .applications-table td[data-label="Refund"] > * { max-width:100%; }
.studio-theme .application-register-panel .applications-table td[data-label="Select"] { text-overflow:clip; }
.studio-theme .application-register-panel .applications-table tbody tr:not(.application-ipo-group) { box-shadow:none; }
@media(min-width:1000px) {
  #applicationTimelineDialog { width:min(640px,48vw); margin:12px 12px 12px auto; height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); border-radius:16px; }
  #accountLedgerWorkspaceDialog .account-ledger-detail-header { position:sticky; top:0; z-index:5; background:#fffefa; padding:12px; border-bottom:1px solid #d5dfcc; box-shadow:0 4px 8px #254e3e0a; }
}
.account-ledger-transaction-detail-heading { flex-wrap:wrap; }
.account-ledger-transaction-detail-heading .account-ledger-detail-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; flex-wrap:wrap; margin-left:auto; }
.account-ledger-transaction-detail-heading .account-ledger-detail-actions button:not(#closeLedgerTransactionDetailBtn) { width:auto; height:auto; min-height:36px; padding:8px 12px; font-size:13px; line-height:1.2; white-space:nowrap; flex:0 0 auto; border-radius:8px; }
.account-ledger-transaction-detail-heading .account-ledger-detail-actions button[hidden] { display:none !important; }
/* Cloud sync controls stay compact and consistent with the studio dialogs. */
.studio-theme #applicationChecklistDialog { width: min(1200px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; }
.studio-theme #applicationChecklistForm { display: flex; flex-direction: column; gap: 14px; max-height: calc(100dvh - 32px); min-height: 0; box-sizing: border-box; overflow: hidden; }
.studio-theme #applicationChecklistForm > .dialog-title-row { flex: 0 0 auto; margin: 0; }
.studio-theme #applicationChecklistForm > .application-checklist-table-wrap { flex: 1 1 auto; min-height: 0; width: 100%; max-height: none; overflow: auto; }
.studio-theme #applicationChecklistForm > .dialog-actions { flex: 0 0 auto; position: static; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0; padding: 12px 0 0; }
.studio-theme #applicationChecklistForm > .dialog-actions button { flex: 0 0 auto; width: auto; min-height: 42px; height: auto; padding: 10px 20px; white-space: nowrap; }
.studio-theme #applicationChecklistDialog table { min-width: 720px; }
.studio-theme #applicationChecklistDialog th:first-child { width: 7%; }
.studio-theme #applicationChecklistDialog th:nth-child(4) { width: 9%; }
.studio-theme #applicationChecklistDialog th:nth-child(6), .studio-theme #applicationChecklistDialog th:nth-child(7) { width: 15%; }
.studio-theme #applicationChecklistDialog td { overflow-wrap: anywhere; }
.studio-theme #applicationChecklistDialog .cool-select-trigger { min-height: 36px; padding: 6px 8px; font-size: 12px; }
.cloud-sync-dialog { max-width: 720px; }
.cloud-sync-status { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line, #d8e4d2); border-radius: 12px; background: #f4f8ee; color: #315d46; font-weight: 700; }
.cloud-sync-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cloud-sync-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cloud-sync-data-actions { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line, #d8e4d2); }
@media (max-width: 620px) { .cloud-sync-fields { grid-template-columns: 1fr; } }

/* ===================== was workspace-productivity.css ===================== */
.personal-layout-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 0; }
.personal-layout-controls select { width:auto; min-width:180px; }
/* Enhanced selects are wrappers, not the native select styled above. */
.studio-theme div.personal-layout-controls > .cool-select { flex:0 1 260px; width:260px; min-width:180px; }
.studio-theme div.personal-layout-controls > button { flex:0 0 auto; width:auto; }
.studio-theme div.personal-layout-controls > details { padding:8px 0; }
.personal-layout-controls label { display:inline-flex; align-items:center; gap:6px; margin:6px; }
.personal-layout-controls input[type=checkbox] { width:18px; height:18px; }
.personal-layout-controls summary { cursor:pointer; font-weight:650; }
.application-side-panel { position:fixed; z-index:90; right:16px; top:90px; bottom:20px; width:min(440px, calc(100vw - 32px)); padding:22px; overflow:auto; background:#fffffa; border:1px solid #cddbc8; border-radius:22px; box-shadow:0 12px 36px #153b3426; }
.application-side-panel[hidden] { display:none; }
.side-panel-actions { display:flex; justify-content:space-between; gap:12px; position:sticky; top:0; background:#fffffa; padding-bottom:12px; }
.application-side-panel article { padding:14px 0; border-bottom:1px solid #dde5d6; }
.application-side-panel article span { display:block; }
#summaryCards { grid-template-columns:repeat(4,minmax(0,1fr)); }
.applications-table tr, .applications-table td, .account-ledger-table tr { animation:none!important; transition:none!important; transform:none!important; }
@media(max-width:900px) { #summaryCards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }

/* Depth belongs to navigation and actions, never moving financial rows. */
#summaryCards { gap:22px; padding-bottom:12px; perspective:1200px; }
#summaryCards .summary-market-card {
  overflow:hidden;
  min-height:150px;
  border-radius:22px;
  border-bottom:5px solid #b5c9a4;
}
#summaryCards .summary-market-card:nth-child(2) { background:linear-gradient(135deg,#fffdf4,#f8e9c3); border-bottom-color:#d1b66c; }
#summaryCards .summary-market-card:nth-child(3) { background:linear-gradient(135deg,#f1fffa,#cfe9de); border-bottom-color:#8bb8a4; }
#summaryCards .summary-market-card:nth-child(4) { background:linear-gradient(135deg,#f6faff,#dbe7f2); border-bottom-color:#9eb5cb; }
#summaryCards .summary-market-card h3 { position:relative; z-index:1; text-shadow:none; }
#summaryCards .summary-market-card::before {
  content:''; position:absolute; width:110px; height:110px; right:-30px; top:-35px;
  border:18px solid #ffffff66; border-radius:50%; box-shadow:inset 0 3px 12px #153b341a,0 3px 9px #153b3412; pointer-events:none;
}
@keyframes workspace-card-arrive {
  from { opacity:0; transform:perspective(1000px) translateY(22px) rotateX(12deg); }
  to { opacity:1; transform:none; }
}
@keyframes workspace-card-glint {
  0%,70% { translate:-180% 0; opacity:0; }
  76% { opacity:.55; }
  100% { translate:240% 0; opacity:0; }
}
@media(prefers-reduced-motion:no-preference) {
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card { animation:workspace-card-arrive 650ms cubic-bezier(.2,.8,.2,1) both; }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:nth-child(2) { animation-delay:80ms; }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:nth-child(3) { animation-delay:160ms; }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:nth-child(4) { animation-delay:240ms; }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card::after {
    inset:0; height:auto; width:45%; background:linear-gradient(110deg,transparent,#ffffff99,transparent);
    animation:workspace-card-glint 6s ease-in-out 1s 2;
  }
  body:not(.studio-reduced-motion) .depth-tracking:is(.summary-market-card,.command-center-item,.setup-command-card) {
    animation:none!important;
    transform:perspective(900px) translateY(-7px) rotateX(var(--depth-x,0deg)) rotateY(var(--depth-y,0deg))!important;
    background-image:radial-gradient(circle at var(--light-x,50%) var(--light-y,50%),#ffffffc9,transparent 65%),linear-gradient(135deg,#f8fff0,#dce9cc);
    box-shadow:inset 0 2px 0 #fff,0 8px 0 #b9cfa7,0 23px 32px #153b3430;
    transition:transform 100ms ease-out,box-shadow 180ms ease;
  }
}
body {
  --surface-edge: #d6e1cc;
  --surface-shadow: #153b3414;
  --surface-highlight: #ffffffd9;
}
#summaryCards .summary-market-card,
.command-center-item,
.setup-command-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--surface-edge);
  background: radial-gradient(ellipse at 15% 0%, #fff 0%, transparent 65%), linear-gradient(145deg, #fffffa, #edf3e4);
  box-shadow: inset 0 2px 0 var(--surface-highlight), 0 4px 0 #dbe4d2, 0 10px 24px var(--surface-shadow);
  transform-origin: center bottom;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
#summaryCards .summary-market-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 0;
  height: auto;
  width: 45%;
  opacity: 0;
  background: linear-gradient(110deg, transparent, #ffffff99, transparent);
}
#summaryCards .summary-card-action b { transition: transform 180ms ease; }
.primary-btn {
  border: 1px solid #235d49;
  background-image: linear-gradient(155deg, #3b8768, #20563f);
  box-shadow: inset 0 1px 0 #ffffff60, 0 3px 0 #173f31, 0 7px 14px #153b341a;
  transition: box-shadow 140ms ease, filter 140ms ease;
}
.secondary-btn {
  background-image: linear-gradient(160deg, #fffefa, #f0f5e9);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #dce5d4;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}
button:not(:disabled):active.primary-btn,
button:not(:disabled):active.secondary-btn {
  box-shadow: inset 0 2px 4px #153b3426;
}
button:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 3px solid #398569;
  outline-offset: 3px;
}
.application-side-panel {
  background: linear-gradient(120deg, #fffffc, #f4f7ee);
  box-shadow: inset 1px 1px 0 #fff, -10px 0 40px #153b3424, 0 4px 0 #d3deca;
}
dialog.edit-dialog {
  box-shadow: 0 0 0 5px #ffffff32, inset 0 1px 0 #fff, 0 24px 64px #153b343d;
}
@media (prefers-reduced-motion:reduce) {
  #summaryCards .summary-market-card, .command-center-item, .setup-command-card { transform:none!important; }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:hover,
  body:not(.studio-reduced-motion) .command-center-item:hover,
  body:not(.studio-reduced-motion) .setup-command-card:hover {
    transform: perspective(1000px) translateY(-3px) rotateX(2deg);
    border-color: #9bb98b;
    box-shadow: inset 0 2px 0 #fff, 0 6px 0 #dbe4d2, 0 16px 28px #153b3424;
  }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:hover .summary-card-action b { transform: translateX(4px); }
  body:not(.studio-reduced-motion) #summaryCards .summary-market-card:active { transform: translateY(1px); }
}

/* ===================== was capacity-advisor.css ===================== */
body .edit-dialog.capacity-advisor { width:min(1140px,96vw); max-height:92dvh; padding:24px; overflow:auto; color:#214237; background:#fbfcf7; box-sizing:border-box; }
.advisor-ipo-picker { grid-column:1/-1; min-width:0; margin:0; padding:12px; border:1px solid #cbd9c2; border-radius:12px; }
.advisor-ipo-picker legend { font-size:13px; font-weight:650; }
.advisor-ipo-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.advisor-ipo-choices span { overflow-wrap:anywhere; }
.advisor-heading { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.advisor-heading h2 { margin:6px 0 10px; font-size:28px; }
.advisor-heading p { max-width:780px; }
.advisor-controls { display:grid!important; grid-template-columns:1.4fr 1fr 1fr; gap:14px; padding:18px; border:1px solid #d7e1cd; border-radius:16px; background:#eff4e7; }
.advisor-controls label { min-width:0; }
.advisor-controls input,.advisor-controls select { width:100%; min-width:0; }
.capacity-advisor .advisor-check { display:flex; align-items:center; gap:10px; font-size:14px; }
.capacity-advisor input[type=checkbox] { width:20px; height:20px; flex:0 0 20px; margin:0; }
.advisor-notice { padding:12px 15px; border-left:3px solid #b88e36; background:#faf2da; font-size:14px; line-height:1.5; }
.advisor-muted { color:#53675c; font-size:14px; line-height:1.5; }
.advisor-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.advisor-stat { background:white; border:1px solid #d7e1cd; border-radius:12px; padding:14px; }
.advisor-stat span { display:block; font-size:12px; margin-bottom:8px; }
.advisor-stat strong { font-size:22px; font-variant-numeric:tabular-nums; }
.advisor-strategies { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.capacity-advisor .advisor-strategy { display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:16px; white-space:normal; text-align:left; background:white; border:1px solid #cbd9c2; border-radius:12px; color:#264535; }
.advisor-strategy[aria-pressed=true] { outline:2px solid #378065; background:#e8f3e4; }
.advisor-strategy span,.advisor-strategy small { font-size:13px; line-height:1.5; }
.advisor-strategy:disabled { opacity:.65; }
.advisor-table-wrap { overflow:auto; margin:16px 0; }
.capacity-advisor table { width:100%; border-collapse:collapse; table-layout:auto; font-size:14px; }
body .capacity-advisor th,body .capacity-advisor td { padding:12px 10px; border-bottom:1px solid #dde4d4; text-align:left; white-space:normal; font-size:14px; }
body .capacity-advisor th { font-size:12px; }
.capacity-advisor td span { display:block; margin-top:5px; color:#586c60; }
.capacity-advisor details { margin:16px 0; padding:12px; border:1px solid #dbe3d2; border-radius:12px; }
.capacity-advisor summary { cursor:pointer; font-weight:650; }
.advisor-footer { display:flex; gap:16px; justify-content:space-between; align-items:center; position:sticky; bottom:-24px; padding:16px 0; border-top:1px solid #cbd9c2; background:#fbfcf7; }
@media(max-width:760px) { body .edit-dialog.capacity-advisor { padding:16px; } .advisor-controls,.advisor-ipo-choices { grid-template-columns:1fr!important; } .advisor-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .advisor-strategies { grid-template-columns:1fr; } .advisor-footer { flex-wrap:wrap; bottom:-16px; } .advisor-heading h2 { font-size:22px; } }
@media(max-width:760px) {
  .capacity-advisor thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .capacity-advisor table,.capacity-advisor tbody { display:block; }
  body .capacity-advisor tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:12px; padding:10px; border:1px solid #d7e1cd; border-radius:12px; background:white; }
  body .capacity-advisor td { display:block; min-width:0; border:0; padding:8px; overflow-wrap:anywhere; }
  body .capacity-advisor td:first-child,body .capacity-advisor td:last-child { grid-column:1/-1; }
  .capacity-advisor td:not(:first-child)::before { content:attr(data-label); display:block; font-size:12px; color:#53675c; margin-bottom:4px; }
}
.capacity-advisor button:focus-visible,.capacity-advisor input:focus-visible,.capacity-advisor select:focus-visible { outline:3px solid #378065; outline-offset:3px; }
.advisor-category-pick { min-width: 190px; min-height: 44px; width: 100%; }
.capacity-advisor .advisor-table-wrap td { vertical-align: middle; }
.capacity-advisor .advisor-settings { margin:8px 0; padding:10px 14px; background:linear-gradient(135deg,#f3f7e9,#fffef8); box-shadow:0 3px 0 #dce5d3; }
.advisor-settings summary { font-size:14px; line-height:1.5; }
.advisor-settings[open] .advisor-controls { margin-top:12px; }
.advisor-heading p { margin:6px 0 10px; font-size:14px; }
.advisor-heading h2 { font-size:22px; }
.advisor-stats { margin:10px 0; gap:8px; }
.advisor-stat { padding:10px 12px; box-shadow:0 3px 0 #e2e9dc; }
.advisor-stat span { margin-bottom:4px; }
.advisor-stat strong { font-size:18px; }
.capacity-advisor [data-results]>h3 { margin:12px 0 4px; font-size:18px; }
.capacity-advisor [data-results]>p { margin:6px 0; }
.advisor-review-tools { display:grid; grid-template-columns:1fr 1fr auto; align-items:center; gap:10px; margin-top:12px; }
.advisor-review-tools input,.advisor-review-tools select { min-width:0; width:100%; }
.advisor-review-tools span { font-size:12px; color:#53675c; }
.capacity-advisor tbody tr[hidden] { display:none!important; }
.capacity-advisor .advisor-table-wrap { margin:8px 0; }
.capacity-advisor .advisor-footer { z-index:3; padding:10px 0; }
.capacity-advisor .advisor-notice p { margin:4px 0; }
@media(max-width:760px) { .advisor-review-tools { grid-template-columns:1fr; } }
/* Only the applications scroll; totals and review controls stay in view. */
body dialog.edit-dialog.capacity-advisor[open] {
  display:flex; flex-direction:column; height:92dvh; overflow:hidden; padding:18px 22px;
}
.capacity-advisor > .advisor-heading,
.capacity-advisor > .advisor-settings,
.capacity-advisor > [data-status],
.capacity-advisor > .advisor-footer { flex:0 0 auto; }
.capacity-advisor > .advisor-heading .eyebrow { display:none; }
.capacity-advisor > .advisor-heading h2 { font-size:22px; margin:0 0 4px; }
.capacity-advisor > .advisor-heading p { margin:0 0 8px; }
.capacity-advisor > .advisor-settings { overflow:auto; margin:4px 0; }
body dialog.edit-dialog.capacity-advisor.is-configuring[open] { height:fit-content; }
.capacity-advisor.is-configuring > .advisor-settings { flex:0 1 auto; min-height:0; max-height:none; }
.capacity-advisor.is-configuring > [data-results],
.capacity-advisor.is-configuring > .advisor-footer { display:none; }
.capacity-advisor .advisor-bulk-tools { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:6px; }
.capacity-advisor .advisor-bulk-tools span { flex:1 1 220px; font-size:12px; color:#53675c; }
.capacity-advisor .advisor-bulk-tools button { min-height:34px; padding:6px 12px; font-size:13px; }
.capacity-advisor > [data-status] { font-size:12px; margin:5px 0; }
.capacity-advisor > [data-results] { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.capacity-advisor [data-results] > * { flex:0 0 auto; }
.capacity-advisor [data-results] > .advisor-table-wrap { flex:1 1 0; min-height:0; overflow:auto; overscroll-behavior:contain; }
.capacity-advisor .advisor-table-wrap th { position:sticky; top:0; z-index:1; background:#eef4e5; }
.capacity-advisor .advisor-stats { margin:6px 0 10px; }
.capacity-advisor .advisor-stat:last-child { border-color:#91af7b; background:#edf4e3; }
.capacity-advisor .advisor-stats.has-shortfall .advisor-stat:last-child { border-color:#c49a48; background:#fff3d7; color:#704617; }
.advisor-mix-summary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:13px; }
.capacity-advisor .advisor-plan-notes { padding:6px 10px; margin:6px 0 0; max-height:18dvh; overflow:auto; }
.capacity-advisor .advisor-plan-notes summary { font-size:12px; }
.capacity-advisor .advisor-review-tools { margin-top:6px; }
.capacity-advisor > .advisor-footer { position:static; margin:0; padding:10px 0 0; }
@media(max-width:760px) {
  body dialog.edit-dialog.capacity-advisor[open] { height:96dvh; max-height:96dvh; padding:12px; }
  .capacity-advisor > .advisor-heading p { display:none; }
  .capacity-advisor .advisor-review-tools { grid-template-columns:1fr 1fr; gap:6px; }
  .capacity-advisor .advisor-review-tools > span { grid-column:1/-1; }
  .capacity-advisor .advisor-stat { padding:6px 8px; }
  .capacity-advisor .advisor-stat strong { font-size:16px; }
  .capacity-advisor .advisor-stats { gap:6px; }
  .capacity-advisor > .advisor-footer { gap:8px; }
}
.capacity-advisor .advisor-lots { display:flex; align-items:center; gap:8px; margin-top:8px; }
.capacity-advisor .advisor-lots button { flex:0 0 36px; min-width:36px; height:36px; padding:0; }
.capacity-advisor .advisor-lots input { width:76px; min-width:0; height:36px; text-align:center; padding:4px; }
.capacity-advisor .advisor-lots + small { display:block; margin-top:4px; }
.capacity-advisor .advisor-controls > .advisor-check:has([name=shareholder_reviewed]) { grid-column:1 / -1; }

/* ===================== was launch-polish.css ===================== */
/* Launch design pass 2: semantic money colour, legibility floor and small consistency repairs.
   Loaded last; presentation only. */
/* Shared launch surfaces: one spacing, control and focus vocabulary. */
.studio-theme { --launch-radius:14px; --launch-gap:12px; --launch-control-height:44px; }
.studio-theme :is(.daily-command-bar,.backup-protection-actions,.ledger-report-disclosure) button { min-height:var(--launch-control-height); }
.studio-theme :is(.daily-command-bar,.backup-protection-actions,.ledger-report-disclosure) :is(button,a):focus-visible { outline:3px solid #347c60; outline-offset:3px; }
.daily-command-bar { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; padding:10px; border-radius:var(--launch-radius); background:#edf4e3; border:1px solid #d6e2ca; }
.studio-theme .erp-shell .capacity-planner-panel { padding:18px; }
.studio-theme .erp-shell .capacity-planner-panel .capacity-balance-summary > * { min-height:84px; padding:12px; }
.studio-theme .erp-shell .capacity-planner-panel .savings-operations { margin-top:12px; }
.studio-theme .erp-shell .account-ledger-report-bar { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; padding:12px; }
.ledger-date-disclosure { flex:1 1 100%; }
.ledger-date-disclosure summary,.ledger-report-disclosure summary { cursor:pointer; min-height:36px; font-size:13px; font-weight:650; line-height:1.6; }
.ledger-active-dates { font-weight:400; }
.studio-theme .erp-shell .account-ledger-period-controls { margin-top:8px; }
.studio-theme .erp-shell .account-ledger-movement-search { flex:1 1 220px; margin:0; padding:0; border:0; }
.ledger-report-disclosure { flex:0 1 auto; }
.studio-theme .erp-shell .ledger-report-disclosure .account-ledger-view-switch { margin:8px 0; }
.studio-theme .erp-shell .ledger-report-disclosure .account-ledger-report-actions { display:flex; gap:8px; }
.studio-theme .erp-shell .backup-center { display:flex; flex-direction:column; align-items:stretch; gap:14px; }
.backup-protection-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:16px; border:1px solid #cbdcc0; border-radius:var(--launch-radius); background:#fffef9; box-shadow:0 3px 0 #e0e8d6; }
.backup-protection-actions h4 { margin:0; flex:1 1 100%; }
.backup-restore-section { border-top:1px solid #cbdcc0; padding-top:14px; }
.backup-restore-section > summary { cursor:pointer; font-weight:650; min-height:44px; }
.studio-theme .erp-shell .backup-restore-section .backup-center-actions { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:12px; }
.studio-theme .erp-shell .backup-restore-section #restoreBackupHelp { flex-basis:100%; }
body dialog.transaction-review-sheet[open] { margin:12px 12px 12px auto; width:min(760px,calc(100vw - 24px)); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); border-radius:22px; overflow:auto; }
.transaction-review-sheet .workflow-action-dialog-header { position:sticky; top:0; z-index:3; padding:12px 0; background:#fffef9; border-bottom:1px solid #d6e2ca; }
.transaction-review-sheet :is(input,select,button) { min-height:var(--launch-control-height); }
.transaction-review-sheet .prerequisite-notice { font-size:14px; }
.transaction-state-review { grid-column:1/-1; padding:12px; border:1px solid #d6e2ca; border-radius:var(--launch-radius); background:#f3f7ed; }
.transaction-state-review summary { cursor:pointer; font-size:14px; font-weight:650; }
.transaction-state-review .financial-state-summary { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.transaction-state-review .financial-state-summary :is(h3,small) { grid-column:1/-1; }
.transaction-state-review article { border-bottom:1px solid #d6e2ca; padding-bottom:8px; }
.transaction-state-review p { font-size:13px; margin:6px 0; }
#dashboardLayoutSwitch { margin:0 0 12px; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail { padding:20px; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .hero-market-copy h1 { font-size:34px; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail { min-height:0; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .studio-sculpture { min-height:190px; height:190px; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .studio-orbit-scene { scale:.78; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .studio-sculpture-caption { display:none; }
.daily-funds-total { margin-left:auto; align-self:center; font-size:14px; font-variant-numeric:tabular-nums; }
.daily-command-bar { position:sticky; top:8px; z-index:4; box-shadow:0 3px 10px #213f3614; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .studio-hero-footnote { display:none; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .studio-sculpture { max-height:210px; }
.studio-theme.dashboard-work-mode .erp-shell #dashboardMarketRail .market-logo-shelf { padding:8px 0; }
@media(max-width:720px) {
  .daily-command-bar { display:grid; grid-template-columns:1fr 1fr; }
  .daily-command-bar button { white-space:normal; padding:8px; }
  .studio-theme .erp-shell .capacity-planner-panel .capacity-balance-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .studio-theme .erp-shell .capacity-planner-panel .capacity-balance-summary strong { font-size:18px; overflow-wrap:anywhere; }
  .studio-theme .erp-shell .account-ledger-detail-header { gap:12px; padding:12px 0; }
  .ledger-report-disclosure { flex-basis:100%; }
  .transaction-review-sheet .workflow-action-dialog-header { top:-1px; }
}

/* Negative balances must never share the colour of a healthy balance. */
.studio-theme .amount-negative,
.studio-theme .erp-shell .amount-negative { color: var(--danger, #b64042) !important; }

/* A zero figure should not be the most emphasised card on the dashboard. */
.studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) h3 { color: var(--text); }
.studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) p { color: var(--muted); }
.studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) .summary-card-action { color: var(--accent); }
.studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3):hover { border-color: var(--line-strong); }
@media (max-width: 620px) {
  .studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) { grid-column: 1 / -1; grid-row: auto; min-height: 0; order: 3; }
  .studio-theme .erp-shell #summaryCards .summary-market-card.is-zero:nth-child(3) h3 { font-size: 22px; }
}

/* Legibility floor: navigation labels, shortcut hints and profile captions were 9px. */
.studio-theme .erp-shell .sidebar-label { font-size: 12px; letter-spacing: .14em; color: #b9cdc4; }
.studio-search kbd { font-size: 12px; color: #56645a; background: #edf1e8; }
.studio-theme #profileMenuName + small { font-size: 12px; }
.studio-theme .workflow-step-action i,
.studio-theme .daily-workflow-panel .workflow-step-action i { font-size: 14px; font-style: normal; line-height: 1; color: inherit; }

/* Disclosures use the product chevron instead of the browser's default triangle. */
.studio-theme :is(.workspace-tools, .personal-layout-controls, .register-filter-disclosure, .register-more, .transaction-state-review, .ledger-date-disclosure, .ledger-report-disclosure, .backup-restore-section) > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.studio-theme :is(.workspace-tools, .personal-layout-controls, .register-filter-disclosure, .register-more, .transaction-state-review, .ledger-date-disclosure, .ledger-report-disclosure, .backup-restore-section) > summary::-webkit-details-marker { display: none; }
.studio-theme :is(.workspace-tools, .personal-layout-controls, .register-filter-disclosure, .register-more, .transaction-state-review, .ledger-date-disclosure, .ledger-report-disclosure, .backup-restore-section) > summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
  opacity: .7;
}
.studio-theme :is(.workspace-tools, .personal-layout-controls, .register-filter-disclosure, .register-more, .transaction-state-review, .ledger-date-disclosure, .ledger-report-disclosure, .backup-restore-section)[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
  .studio-theme :is(.workspace-tools, .personal-layout-controls, .register-filter-disclosure, .register-more, .transaction-state-review, .ledger-date-disclosure, .ledger-report-disclosure, .backup-restore-section) > summary::before { transition: none; }
}

/* Register cells end with an ellipsis instead of a hard clip ("OD LIMIT (037"). */
.studio-theme .erp-shell .applications-table :is(.application-funding-source, .application-lifecycle) {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Phones: one create action. The thumb-reach button stays; the header copy is removed,
   and content gets room so the floating button never covers the final row. */
@media (max-width: 720px) {
  .studio-theme .studio-create { display: none; }
  .studio-theme .erp-shell { padding-bottom: 88px; }
}

/* One title per route: the top bar already names the page, so in-page headers that repeat it
   ("Setup and reports", "Ledger accounts", "Transaction history") keep only their description. */
.studio-theme .erp-shell [data-tab-panel="setup"] .setup-page-header :is(.eyebrow, h2),
.studio-theme .erp-shell [data-tab-panel="ledger"] .account-ledger-workspace-title :is(.eyebrow, h3),
.studio-theme .erp-shell [data-tab-panel="ledger"] #closeAccountLedgerWorkspaceBtn { display: none; }

/* Secondary text that fell below 4.5:1 on the cream surfaces. Hues are kept; only lightness changes. */
.studio-theme .studio-search > span:not(:first-child) { color: #4f5f56; }
.studio-theme .studio-today { color: #56635a; }
.studio-theme .market-ipo-main small,
.studio-theme .market-logo-card small { color: #586a52; }
.studio-theme .erp-shell .eyebrow { color: #4f6a3e; }
.studio-theme .summary-card-action b { opacity: 1; }

/* Amounts align digit-for-digit in tables, ledgers and KPI cards. */
.studio-theme .erp-shell :is(td, .summary-market-card h3, .account-ledger-account-row b, .account-ledger-summary strong, .data-health-item strong, .workflow-step-copy b) {
  font-variant-numeric: tabular-nums;
}

/* Keynote demo workspace label. */
.studio-theme .demo-workspace-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 14px;
  padding: 9px 14px;
  border: 1px solid #e6d29a;
  border-radius: 12px;
  background: #fbf3dc;
  color: #5b4a1c;
  font-size: 13px;
}
.studio-theme .demo-workspace-ribbon strong { letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }

/* Dashboard status band (A3a): the band states today's position first; the Today chips
   repeat it, so they are kept for other routes only. */
body[data-route="overview"] #todayActionStrip { display: none; }
.studio-theme .erp-shell [data-tab-panel="overview"] > #dashboardMarketRail { margin-bottom: 18px; }
.studio-theme .erp-shell #dashboardMarketRail .hero-market-copy h1 { font-size: clamp(34px, 3.3vw, 48px); line-height: 1.04; }
.studio-theme .erp-shell #dashboardMarketRail .hero-market-copy .subtext { max-width: 560px; color: #3f5149; }

/* Categories (A4): calm, distinct neutrals. Amber and red are reserved for "needs review" and
   negative money, so an sHNI or bHNI application never looks like a warning. */
.studio-theme .application-register-panel .application-category-summary :is(.is-retail, .is-shni, .is-bhni) {
  background: var(--panel);
  border-color: var(--line);
  border-left-width: 4px;
}
.studio-theme .application-register-panel .application-category-summary .is-retail { border-left-color: #7fae8a; }
.studio-theme .application-register-panel .application-category-summary .is-shni { border-left-color: #5f8f8a; }
.studio-theme .application-register-panel .application-category-summary .is-bhni { border-left-color: #3f5f55; }
.studio-theme .application-register-panel .application-category-summary :is(.is-retail, .is-shni, .is-bhni)::after { display: none; }
.studio-theme .application-category-label { background: #eef2ec; color: #3f5149; }

/* Market & live IPOs (A5): one scannable row per issue with the facts used to plan. */
.studio-theme .market-ipo-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2.2fr) minmax(90px, 1fr) minmax(56px, .5fr) minmax(90px, .9fr) minmax(130px, 1.3fr) minmax(90px, .9fr) minmax(130px, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
}
.studio-theme .market-ipo-head span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #4f5f56; }
.studio-theme .market-ipo-table th { padding: 10px 16px; }
.studio-theme .market-ipo-head span:last-child { text-align: right; }
.studio-theme .market-ipo-row.market-ipo-grid { min-height: 64px; padding: 12px 16px; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.studio-theme .market-ipo-row .market-ipo-name { color: var(--text); font-size: 14px; }
.studio-theme .market-ipo-row .market-ipo-meta { justify-items: end; text-align: right; }
.studio-theme .market-ipo-row .market-ipo-meta em { font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-strong); }
@media (max-width: 900px) {
  .studio-theme .market-ipo-head, .studio-theme .market-ipo-table thead { display: none; }
  .studio-theme .market-ipo-row.market-ipo-grid { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .studio-theme .market-ipo-row .market-ipo-main { grid-column: 1 / -1; }
  .studio-theme .market-ipo-row [data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: #586a52; }
  .studio-theme .market-ipo-row .market-ipo-meta { grid-column: 1 / -1; justify-items: start; text-align: left; }
}

/* Audit trail paging (A6). */
.studio-theme .action-history-more td { text-align: center; padding: 14px; }
.studio-theme .action-history-more span { margin-left: 12px; color: #586a52; font-size: 12px; }

/* Transaction history fits laptop and tablet widths (A6): details move under the IPO name
   instead of forcing a sideways-scrolling eighth column. */
.studio-theme .transaction-history-table .history-amount { text-align: right; white-space: nowrap; }
.studio-theme .transaction-history-table th:nth-child(6) { text-align: right; }
.studio-theme .history-details-inline { display: none; }
@media (max-width: 1280px) {
  .studio-theme .transaction-history-table :is(th, td):nth-child(8) { display: none; }
  .studio-theme .history-details-inline:not(:empty) { display: block; margin-top: 4px; color: #586a52; font-size: 12px; line-height: 1.4; }
}

/* Register column balance (A6): Stage reads in full ("Historical", not "Histo…"), and
   Funding source keeps its account suffix. Totals stay at 100%. */
.studio-theme .application-register-panel .applications-table :is(th, td):nth-child(3) { width: 12%; }
.studio-theme .application-register-panel .applications-table :is(th, td):nth-child(4) { width: 12%; }
.studio-theme .application-register-panel .applications-table :is(th, td):nth-child(6) { width: 10%; }
.studio-theme .application-register-panel .applications-table :is(th, td):nth-child(7) { width: 13%; }
.studio-theme .application-register-panel .applications-table :is(th, td):nth-child(8) { width: 19%; }

/* The status band now opens the dashboard, so its micro-labels meet the legibility floor too. */
.studio-theme .erp-shell #dashboardMarketRail .hero-market-copy .eyebrow { font-size: 12px; }
.studio-theme .erp-shell #dashboardMarketRail .studio-floating-note small,
.studio-theme .erp-shell #dashboardMarketRail .market-logo-shelf-head :is(span, small),
.studio-theme .erp-shell #dashboardMarketRail .hero-actions-label,
.studio-theme .erp-shell #dashboardMarketRail .market-logo-card small { font-size: 12px; }
.studio-theme .studio-popover kbd { font-size: 12px; }
/* Guides own their spacing; generic entry dialogs use edge-to-edge forms. */
/* Executive audit: retain the identity while repairing small reading and spacing gaps. */
.studio-theme .erp-shell .capacity-planner-panel .capacity-balance-summary :is(span, small) { font-size:12px; line-height:1.45; letter-spacing:.02em; }
.studio-theme .erp-shell .setup-page-header { min-height:0; padding:12px 16px; }
.studio-theme .erp-shell .setup-page-header p:not(.eyebrow) { margin:0; }
.studio-theme .erp-shell :is(.action-history-table,.allotted-applications-table) th { font-size:12px; }
.studio-theme .erp-shell .application-register-panel.is-ipo-picker .applications-table thead { display:none; }
body dialog.edit-dialog.launch-guide {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 28px;
  overflow: auto;
  color: #213f36;
  background: #fffef9;
}
body .launch-guide > h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.25; }
body .launch-guide > p { margin: 0 0 20px; color: #586d5e; font-size: 14px; line-height: 1.6; }
body .launch-guide .setup-journey { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
body .launch-guide .setup-journey li {
  padding: 14px 16px; border: 1px solid #d9e3ce; border-radius: 12px;
  background: linear-gradient(120deg, #f2f7e9, #fffef9);
  box-shadow: 0 3px 0 #e4eadb;
}
body .launch-guide .setup-journey p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
body .launch-guide .setup-journey button { min-height: 44px; max-width: 100%; white-space: normal; }
body .launch-guide > footer {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  gap: 12px; margin: 22px 0 0; padding: 16px 0 0;
  border-top: 1px solid #d9e3ce;
}
body .launch-guide > footer button { min-height: 44px; max-width: 100%; white-space: normal; flex: 0 1 auto; }
@media (max-width: 600px) {
  body dialog.edit-dialog.launch-guide { padding: 20px; }
  body .launch-guide > h2 { font-size: 22px; }
  body .launch-guide > footer button { flex: 1 1 100%; }
}
body .auth-form .auth-remember { display:flex; align-items:center; gap:10px; font-size:13px; }
#authForm #authRemember { width:18px; height:18px; min-height:0; padding:0; margin:0; flex:0 0 18px; }
#fundingForm .funding-quick-note { grid-column:1 / -1; padding:12px 14px; margin:0; background:#edf4e5; border:1px solid #d5e2cb; border-radius:12px; font-size:13px; line-height:1.5; }
#fundingForm #fundingRoundingHint { font-size:12px; line-height:1.5; }
.funding-source-balance { order:5; margin-top:7px; padding:8px 10px; border:1px solid #d3e1c8; border-radius:8px; background:#eef5e7; color:#31543e; font-size:12px; line-height:1.5; font-weight:600; white-space:normal; overflow-wrap:anywhere; }
.funding-source-balance.is-warning { background:#fff3db; border-color:#d5b268; color:#754917; }
body.studio-theme #fundingForm .workspace-form-footer { grid-template-columns:auto 1fr 1fr; }
body.studio-theme #fundingForm .workspace-form-footer > button { white-space:normal; padding:10px; }
@media(max-width:600px) {
  body.studio-theme #fundingForm .workspace-form-footer { grid-template-columns:1fr 1fr; }
  #fundingForm .workspace-form-footer > button:first-child { grid-column:1 / -1; }
}

/* Design pass 4: money and hero stay still; the artwork stays, its loops and shimmer do not. */
.studio-theme .studio-floating-note,
.studio-theme .erp-shell #summaryCards .summary-market-card { animation: none !important; }
/* Phones: the artwork and its two cards repeat the headline and pushed every KPI below the fold. */
@media (max-width: 620px) {
  .studio-theme .erp-shell #dashboardMarketRail .studio-sculpture { display: none; }
}

/* Secondary greens that sat just under 4.5:1. Same hues, lower lightness. !important is limited to
   colour because these rules compete with several older layers of varying specificity. */
.studio-theme .erp-shell :is(.panel-header p, .section-note) { color: #55664b !important; }
.studio-theme .erp-shell :is(.panel-header .eyebrow, .eyebrow) { color: #4f6a3e !important; }
.studio-theme .studio-floating-note small { color: #5a6a51 !important; }
.studio-theme .summary-card-action b { color: inherit !important; }
.studio-theme .checklist-pass-status { color: #475647 !important; }
.studio-theme :is(.capacity-od-account-card small, .account-ledger-view-switch button, .account-ledger-summary .is-closing span) { color: #4b6040 !important; }
.studio-theme .market-logo-card small { color: #4b5c46 !important; }
.studio-theme .studio-popover > button :is(span, small) { color: #4f5f56 !important; }

/* Return form before a return is chosen: one notice and the picker, not a page of empty fields. */
#refundForm.is-awaiting-selection :is(label:has(#refundSource), label:has(#refundTarget), label:has([name="amount"]), label:has([name="refunded_at"]), #refundDirectionHint, #refundSubmitBtn) { display: none; }
