:root {
  --navy: #0a2342;
  --navy-2: #123856;
  --navy-3: #1c4d68;
  --green: #168a5a;
  --green-soft: #e8f5ef;
  --gold: #f2b705;
  --gold-soft: #fff7d6;
  --red: #c63f4c;
  --red-soft: #fdecee;
  --sky: #2d9cdb;
  --ink: #16293d;
  --muted: #617181;
  --line: #dce4eb;
  --surface: #ffffff;
  --surface-2: #f5f8fa;
  --surface-3: #edf2f6;
  --shadow: 0 18px 45px rgba(10, 35, 66, 0.12);
  --sidebar-width: 264px;
  --topbar-height: 76px;
  --radius: 6px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--surface-2);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(45, 156, 219, 0.35);
  outline-offset: 2px;
}

.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  color: var(--navy);
  background: #fff;
  font-weight: 750;
}

.auth-loading img {
  width: 64px;
  height: 64px;
  margin: auto;
  animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
  50% { transform: scale(1.05); opacity: 0.72; }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 0.92fr);
  background: #fff;
}

.login-brand {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 30, 55, 0.96), rgba(7, 38, 60, 0.77)),
    url("../assets/qts-organic-connected-operations-v2.jpg") center / cover no-repeat;
}

.login-brand::before,
.login-brand::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.login-brand::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(103, 179, 211, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 179, 211, 0.09) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 85%, transparent);
}

.login-brand::after {
  width: 420px;
  height: 1px;
  right: -80px;
  top: 37%;
  background: rgba(45, 156, 219, 0.52);
  box-shadow: 0 118px 0 rgba(22, 138, 90, 0.48), 0 236px 0 rgba(242, 183, 5, 0.34);
  transform: rotate(-12deg);
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 5vw, 72px);
}

.login-logo {
  width: min(280px, 68%);
  height: auto;
}

.login-brand-copy {
  width: min(630px, 90%);
  margin: auto 0;
}

.eyebrow,
.secure-label,
.page-kicker,
.section-label,
.login-form > div:first-of-type + span {
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 850;
}

.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: #77dbb0;
}

.login-brand h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.25rem, 4.8vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.72;
}

.login-signal {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 42px;
}

.login-signal span {
  width: 34px;
  height: 10px;
  background: #54c99a;
  animation: signal 2.4s ease-in-out infinite;
}

.login-signal span:nth-child(2) { height: 18px; animation-delay: 0.15s; }
.login-signal span:nth-child(3) { height: 28px; background: #2d9cdb; animation-delay: 0.3s; }
.login-signal span:nth-child(4) { height: 22px; animation-delay: 0.45s; }
.login-signal span:nth-child(5) { height: 36px; background: #f2b705; animation-delay: 0.6s; }

@keyframes signal {
  50% { transform: scaleY(0.72); transform-origin: bottom; opacity: 0.72; }
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background: #fff;
}

.login-form {
  width: min(430px, 100%);
  display: grid;
  gap: 21px;
}

.login-mobile-brand {
  display: none;
}

.secure-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.secure-label svg {
  width: 17px;
  height: 17px;
}

.login-form h2 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 2rem;
}

.login-form p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.erp-field {
  display: grid;
  gap: 7px;
}

.erp-field > span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 780;
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #748493;
  transform: translateY(-50%);
  pointer-events: none;
}

.erp-field input,
.erp-field select,
.erp-field textarea,
.input-with-icon input,
.modal-fields input,
.modal-fields select,
.modal-fields textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd9e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.input-with-icon input {
  padding-left: 44px;
}

.input-with-icon input[type="password"],
.input-with-icon input[data-secret-visible="true"] {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #647888;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--surface-3);
  color: var(--navy);
}

.input-with-icon .password-toggle svg {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
  pointer-events: none;
}

.erp-field textarea,
.modal-fields textarea {
  min-height: 112px;
  resize: vertical;
}

.erp-field input:focus,
.erp-field select:focus,
.erp-field textarea:focus,
.modal-fields input:focus,
.modal-fields select:focus,
.modal-fields textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(45, 156, 219, 0.12);
  outline: none;
}

.erp-button,
.icon-button,
.user-menu-button,
.erp-nav button,
.table-action,
.tab-button {
  border: 0;
}

.erp-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 800;
}

.erp-button svg {
  width: 18px;
  height: 18px;
}

.erp-button.primary {
  background: var(--navy);
  color: #fff;
}

.erp-button.primary:hover {
  background: var(--navy-2);
}

.erp-button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.erp-button.danger {
  background: var(--red-soft);
  color: var(--red);
}

.erp-button.wide {
  width: 100%;
  min-height: 50px;
}

.login-status,
.modal-status {
  min-height: 22px;
  font-size: 0.86rem;
}

.login-status[data-tone="error"],
.modal-status[data-tone="error"] {
  color: var(--red);
}

.login-status[data-tone="pending"],
.modal-status[data-tone="pending"] {
  color: var(--sky);
}

.login-support {
  text-align: center;
  font-size: 0.78rem;
}

.login-text-button {
  width: fit-content;
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 0;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.login-text-button:hover,
.login-text-button:focus-visible {
  color: var(--sky);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-text-button.muted {
  justify-self: center;
  color: var(--muted);
}

.erp-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.erp-sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.workspace-brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.workspace-brand-lockup img {
  display: block;
  width: 204px;
  max-width: 100%;
  height: auto;
  flex: 0 1 auto;
  object-fit: contain;
  object-position: left center;
}

.workspace-brand-lockup img.workspace-logo-mark {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 50%;
  object-fit: contain;
}

.workspace-brand-lockup img.workspace-logo-wordmark {
  width: 204px;
  max-height: 62px;
}

.workspace-brand-monogram {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 1rem;
  font-weight: 850;
}

.workspace-brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workspace-brand-copy strong,
.workspace-brand-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-brand-copy strong {
  color: #fff;
  font-size: 0.9rem;
}

.workspace-brand-copy small {
  max-width: 128px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.66rem;
}

.sidebar-close {
  display: none !important;
}

.workspace-label {
  display: grid;
  gap: 4px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.workspace-label span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace-label strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav {
  display: grid;
  gap: 4px;
  padding: 0 12px 20px;
}

.erp-nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  text-align: left;
  font-weight: 720;
}

.erp-nav button:hover,
.erp-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.erp-nav button.active {
  border-left-color: var(--gold);
}

.erp-nav svg,
.website-link svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.sidebar-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.system-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-state > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4bd09c;
  box-shadow: 0 0 0 5px rgba(75, 208, 156, 0.12);
}

.system-state div {
  display: grid;
  gap: 2px;
}

.system-state strong {
  font-size: 0.78rem;
}

.system-state small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
}

.website-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 720;
}

.platform-credit {
  display: grid;
  gap: 1px;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
}

.platform-credit span {
  font-size: 0.62rem;
  text-transform: uppercase;
}

.platform-credit strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
}

body[data-workspace-template="ngo_programme"] .erp-sidebar {
  background: var(--navy);
}

body[data-workspace-template="ngo_programme"] .erp-nav button.active {
  background: rgba(255, 255, 255, 0.12);
}

.erp-workspace {
  grid-column: 2;
  min-width: 0;
}

.erp-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 2.5vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-start,
.topbar-actions,
.user-menu-button {
  display: flex;
  align-items: center;
}

.topbar-start {
  min-width: 0;
  gap: 12px;
}

.page-kicker {
  display: block;
  color: var(--green);
  font-size: 0.64rem;
}

.erp-topbar h1 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  letter-spacing: 0;
}

.topbar-actions {
  position: relative;
  gap: 9px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.menu-button {
  display: none;
}

.erp-search {
  position: relative;
  width: clamp(170px, 18vw, 260px);
}

.erp-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 17px;
  color: #748493;
  transform: translateY(-50%);
}

.erp-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 8px 36px;
  background: var(--surface-2);
}

.notification-button {
  position: relative;
}

.notification-button span {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 850;
}

.user-menu-button {
  min-width: 190px;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.user-menu-button > svg {
  width: 17px;
  margin-left: auto;
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.user-avatar.has-photo {
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(10, 35, 66, 0.12);
}

.user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-meta strong,
.user-meta small {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  font-size: 0.78rem;
}

.user-meta small {
  color: var(--muted);
  font-size: 0.68rem;
}

.user-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.user-menu > div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.user-menu span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.74rem;
}

.user-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 13px 16px;
  background: #fff;
  color: var(--red);
  text-align: left;
  font-weight: 750;
}

.user-menu .profile-menu-action {
  color: var(--navy);
}

.user-menu .profile-menu-action + button {
  border-top: 1px solid var(--line);
}

.user-menu svg {
  width: 17px;
}

.erp-main {
  min-height: calc(100vh - var(--topbar-height));
  padding: clamp(20px, 2.6vw, 38px);
}

.view-stack {
  display: grid;
  gap: 24px;
  animation: view-in 280ms ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
}

.view-intro,
.section-head,
.toolbar,
.card-head,
.metric-head,
.record-primary,
.record-actions,
.report-row,
.module-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.view-intro {
  align-items: flex-end;
}

.view-intro h2,
.section-head h2,
.card-head h3 {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0;
}

.view-intro h2 {
  font-size: 1.36rem;
}

.view-intro p,
.section-head p,
.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.metric-card,
.erp-card,
.table-card,
.module-banner,
.report-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-card {
  min-height: 138px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(10, 35, 66, 0.045);
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--navy);
  background: var(--surface-3);
}

.metric-icon svg {
  width: 19px;
}

.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.gold { color: #936c00; background: var(--gold-soft); }
.metric-icon.sky { color: #1478ac; background: #e7f5fc; }
.metric-icon.red { color: var(--red); background: var(--red-soft); }

.metric-card strong {
  color: var(--navy);
  font-size: 1.7rem;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 18px;
}

.erp-card,
.report-card {
  padding: 20px;
}

.card-head {
  margin-bottom: 18px;
}

.card-head h3 {
  font-size: 1rem;
}

.card-head span,
.section-head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.workflow-list,
.activity-list,
.module-list,
.notification-list {
  display: grid;
  gap: 10px;
}

.workflow-item,
.activity-item,
.module-row,
.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.workflow-item:last-child,
.activity-item:last-child,
.module-row:last-child,
.notification-item:last-child {
  border-bottom: 0;
}

.record-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--navy);
  background: var(--surface-3);
}

.record-icon svg { width: 18px; }

.record-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.record-copy strong,
.record-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-copy strong { color: var(--ink); font-size: 0.82rem; }
.record-copy span { color: var(--muted); font-size: 0.73rem; }

.status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--surface-3);
  color: #4f6171;
  font-size: 0.65rem;
  font-weight: 820;
  text-transform: capitalize;
  white-space: nowrap;
}

.status.approved,
.status.paid,
.status.sent,
.status.posted,
.status.completed,
.status.published,
.status.done,
.status.active { background: var(--green-soft); color: #126f49; }
.status.submitted,
.status.in_review,
.status.ready,
.status.reviewed,
.status.finance_review,
.status.in_progress { background: #e7f5fc; color: #1478ac; }
.status.rejected,
.status.cancelled,
.status.withdrawn,
.status.blocked,
.status.terminated { background: var(--red-soft); color: var(--red); }
.status.draft,
.status.prospect,
.status.planned,
.status.todo { background: var(--gold-soft); color: #7f6000; }

.module-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
}

.module-banner::after {
  position: absolute;
  content: "";
  width: 180px;
  height: 180px;
  right: -70px;
  top: -90px;
  border: 28px solid rgba(45, 156, 219, 0.08);
  border-radius: 50%;
}

.module-summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
}

.module-summary strong { color: var(--navy); }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 42px;
  border-bottom: 3px solid transparent;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 760;
  white-space: nowrap;
}

.tab-button.active {
  border-bottom-color: var(--green);
  color: var(--navy);
}

.table-card {
  min-width: 0;
  overflow: hidden;
}

.toolbar {
  min-height: 60px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.erp-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.erp-table th,
.erp-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.erp-table th {
  color: #677887;
  background: var(--surface-2);
  font-size: 0.67rem;
  font-weight: 850;
  text-transform: uppercase;
}

.erp-table td {
  color: #334a5f;
  font-size: 0.78rem;
}

.erp-table tr:last-child td { border-bottom: 0; }
.erp-table tbody tr:hover { background: #fbfcfd; }

.cell-title {
  display: grid;
  gap: 3px;
}

.cell-title strong { color: var(--ink); }
.cell-title span { color: var(--muted); font-size: 0.7rem; }

.person-cell,
.profile-banner-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-avatar,
.profile-avatar {
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 850;
}

.staff-avatar { width: 38px; height: 38px; font-size: 0.72rem; }
.profile-avatar { width: 82px; height: 82px; font-size: 1.15rem; }
.staff-avatar img,
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-photo-control {
  position: relative;
  width: 82px;
  height: 82px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.profile-photo-control .profile-avatar { width: 100%; height: 100%; }
.profile-photo-camera {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 34, 65, 0.72);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
}
.profile-photo-camera svg { width: 24px; height: 24px; }
.profile-photo-control:hover .profile-photo-camera,
.profile-photo-control:focus-visible .profile-photo-camera { opacity: 1; transform: scale(1); }
.profile-photo-control:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

@media (hover: none) {
  .profile-photo-camera {
    inset: auto 1px 1px auto;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    background: var(--navy);
    opacity: 1;
    transform: none;
  }
  .profile-photo-camera svg { width: 15px; height: 15px; }
}

.money {
  color: var(--navy);
  font-weight: 820;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.table-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 9px;
  color: var(--navy);
  background: #fff;
  font-size: 0.68rem;
  font-weight: 780;
  white-space: nowrap;
  text-decoration: none;
}

.table-action.approve { color: var(--green); border-color: rgba(22, 138, 90, 0.26); }
.table-action.reject { color: var(--red); border-color: rgba(198, 63, 76, 0.25); }

.progress-track {
  width: 120px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 36px;
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: #8a9aa8;
}

.empty-state h3 { margin: 0; color: var(--navy); }

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-card {
  display: grid;
  gap: 16px;
}

.module-section-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.module-section-nav button {
  min-width: max-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.module-section-nav button:hover,
.module-section-nav button.active {
  border-color: rgba(22, 138, 90, 0.45);
  background: var(--green-soft);
  color: #116c48;
}

.module-section-nav svg {
  width: 17px;
  height: 17px;
}

.finance-summary-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.finance-summary-band > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.finance-summary-band > div:last-child {
  border-right: 0;
}

.finance-summary-band span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
}

.finance-summary-band strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 1rem;
}

.p6-command {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.p6-command > div:first-child {
  min-width: 0;
  max-width: 760px;
}

.p6-command > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.p6-command > div:first-child > span {
  color: var(--green);
  font-size: 0.67rem;
  font-weight: 850;
  text-transform: uppercase;
}

.p6-command h2 {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 1.35rem;
  letter-spacing: 0;
}

.p6-command p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.p6-split {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.p6-split > * { min-width: 0; }

.p6-mini-chart {
  display: grid;
  gap: 15px;
}

.p6-mini-chart > div {
  display: grid;
  grid-template-columns: minmax(118px, 0.8fr) minmax(100px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
}

.p6-mini-chart span,
.p6-mini-chart strong {
  color: var(--muted);
  font-size: 0.71rem;
}

.p6-mini-chart strong {
  color: var(--navy);
  text-align: right;
}

.p6-mini-chart i {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.p6-mini-chart b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #2d9cdb);
}

.p6-alert-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.p6-alert-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.p6-alert-list > div > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--red);
  background: var(--red-soft);
}

.p6-alert-list svg { width: 16px; }
.p6-alert-list p { display: grid; gap: 3px; margin: 0; }
.p6-alert-list strong { color: var(--ink); font-size: 0.76rem; }
.p6-alert-list small { color: var(--muted); font-size: 0.68rem; }

.p6-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 760;
}

.p6-ok svg { width: 17px; }

.p6-balance {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.p6-balance span { color: var(--muted); font-size: 0.7rem; }
.p6-balance strong { color: var(--navy); font-size: 1.15rem; }

.field-trend-card {
  min-width: 0;
  overflow: hidden;
}

.field-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.field-trend-legend span { display: inline-flex; align-items: center; gap: 7px; }
.field-trend-legend i { width: 18px; height: 4px; border-radius: 999px; }
.field-trend-legend i.requests { background: #0d7891; }
.field-trend-legend i.completions { background: #20a464; }

.field-trend-chart {
  display: block;
  width: 100%;
  min-height: 230px;
  overflow: visible;
}

.field-trend-chart line {
  stroke: rgba(15, 45, 61, 0.1);
  stroke-width: 1;
}

.field-trend-chart path {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 5px rgba(2, 32, 52, 0.12));
}

.field-trend-chart path.requests { stroke: #0d7891; }
.field-trend-chart path.completions { stroke: #20a464; }
.field-trend-chart circle { stroke: #fff; stroke-width: 3; }
.field-trend-chart circle.requests { fill: #0d7891; }
.field-trend-chart circle.completions { fill: #20a464; }
.field-trend-chart text { fill: var(--muted); font-size: 12px; font-weight: 720; }

.p6-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.p6-plan-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 35, 66, 0.045);
}

.p6-plan-card header > span {
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.p6-plan-card h3 {
  margin: 5px 0 0;
  color: var(--navy);
  letter-spacing: 0;
}

.p6-plan-card p {
  min-height: 40px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.p6-plan-price { display: flex; align-items: baseline; gap: 5px; }
.p6-plan-price strong { color: var(--navy); font-size: 1.25rem; }
.p6-plan-price span { color: var(--muted); font-size: 0.7rem; }
.p6-plan-card dl { display: grid; gap: 0; margin: 0; }
.p6-plan-card dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.p6-plan-card dt { color: var(--muted); font-size: 0.7rem; }
.p6-plan-card dd { margin: 0; color: var(--ink); font-size: 0.7rem; font-weight: 760; text-align: right; }
.p6-plan-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

.p6-onboarding {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.p6-onboarding .erp-card { min-height: 190px; display: grid; align-content: start; gap: 10px; }
.p6-onboarding h3 { margin: 0; color: var(--navy); font-size: 0.95rem; }
.p6-onboarding p { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.55; }
.p6-step { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: var(--navy); font-size: 0.75rem; font-weight: 850; }
.p6-onboarding-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 7px;
}

.checkbox-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--surface-2);
  font-size: 0.73rem;
  font-weight: 700;
}

.checkbox-grid input { width: 17px; height: 17px; accent-color: var(--green); }

@media (max-width: 1180px) {
  .p6-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p6-split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .p6-command { align-items: stretch; flex-direction: column; }
  .p6-command > div:last-child { justify-content: stretch; }
  .p6-command .erp-button { flex: 1; }
  .p6-plan-grid,
  .p6-onboarding,
  .checkbox-grid { grid-template-columns: 1fr; }
  .p6-mini-chart > div { grid-template-columns: 1fr auto; }
  .p6-mini-chart i { grid-column: 1 / -1; grid-row: 2; }
}

.workflow-detail {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.69rem;
}

.mobile-money-warning {
  border-left: 4px solid var(--red);
  padding: 11px 12px;
  background: var(--red-soft);
  color: #982e39;
  font-size: 0.77rem;
  font-weight: 800;
}

.audit-launcher {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.audit-launcher:hover {
  border-color: rgba(45, 156, 219, 0.55);
}

.audit-launcher > svg:last-child {
  color: var(--muted);
}

.correction-guidance {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #bddfce;
  border-left: 4px solid var(--green);
  padding: 14px 16px;
  background: #eef8f3;
}

.correction-guidance strong {
  color: var(--navy);
  font-size: 0.82rem;
}

.correction-guidance p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.correction-values {
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.correction-values span,
.correction-values strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.correction-values span { color: var(--muted); }
.correction-values svg { width: 14px; height: 14px; flex: none; color: var(--green); }

.report-card > svg {
  width: 26px;
  color: var(--green);
}

.report-card h3 { margin: 0; color: var(--navy); font-size: 0.95rem; }
.report-card p { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.erp-modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.erp-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 24, 43, 0.68);
  backdrop-filter: blur(3px);
}

.erp-modal {
  position: relative;
  width: min(680px, 100%);
  max-height: min(850px, calc(100vh - 40px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  animation: modal-in 180ms ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
}

.erp-modal > header,
.erp-modal footer,
.notification-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.erp-modal > header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.erp-modal > header span,
.notification-panel > header span {
  color: var(--green);
  font-size: 0.67rem;
  font-weight: 850;
  text-transform: uppercase;
}

.erp-modal h2,
.notification-panel h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 1.18rem;
}

.modal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 20px;
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field[hidden] { display: none; }
.modal-field input[readonly] { color: var(--navy); background: #eef3f6; font-weight: 800; }

.modal-field.full { grid-column: 1 / -1; }
.modal-field > span { color: var(--ink); font-size: 0.76rem; font-weight: 780; }

.erp-modal footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  justify-content: flex-end;
}

.modal-status {
  margin: 0;
  padding: 0 20px 16px;
}

.access-scope-note {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid #b9ddcf;
  border-left: 4px solid #168a5a;
  border-radius: 6px;
  background: #f2faf6;
  color: #0a2342;
}

.access-scope-note > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #168a5a;
}

.access-scope-note > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.access-scope-note strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.access-scope-note span {
  display: block;
  color: #536779;
  font-size: 12px;
  line-height: 1.5;
}

.development-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 132px;
  padding: 24px 26px;
  border: 1px solid #d7e1e8;
  border-left: 5px solid #e0b321;
  border-radius: 6px;
  background: #ffffff;
}

.development-hero.compact {
  min-height: 110px;
  padding-block: 18px;
}

.development-hero h2 {
  margin: 5px 0 8px;
  color: #0a2342;
  font-size: 23px;
  line-height: 1.22;
  letter-spacing: 0;
}

.development-hero p {
  max-width: 760px;
  margin: 0;
  color: #5a6c7b;
  font-size: 13px;
  line-height: 1.55;
}

.development-score {
  display: grid;
  min-width: 190px;
  padding-left: 24px;
  border-left: 1px solid #d7e1e8;
  text-align: right;
}

.development-score strong {
  color: #0a2342;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.development-score span {
  margin-top: 8px;
  color: #657788;
  font-size: 11px;
  line-height: 1.4;
}

.onboarding-workspace {
  padding: 0;
  overflow: hidden;
}

.onboarding-workspace .card-head {
  padding: 18px 20px;
  border-bottom: 1px solid #dce5eb;
}

.onboarding-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-item {
  display: grid;
  grid-template-columns: 20px 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 16px 20px;
  border-right: 1px solid #e0e8ed;
  border-bottom: 1px solid #e0e8ed;
  background: #ffffff;
  cursor: pointer;
}

.onboarding-item:nth-child(2n) {
  border-right: 0;
}

.onboarding-item.complete {
  background: #f5fbf8;
}

.onboarding-item input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #168a5a;
}

.onboarding-check-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #8ca0af;
}

.onboarding-item.complete .onboarding-check-icon {
  color: #168a5a;
}

.onboarding-check-icon svg {
  width: 20px;
  height: 20px;
}

.onboarding-item > span:last-child {
  display: grid;
  gap: 4px;
}

.onboarding-item strong {
  color: #0a2342;
  font-size: 13px;
  line-height: 1.35;
}

.onboarding-item small {
  color: #6b7c89;
  font-size: 11px;
  line-height: 1.4;
}

.inline-actions {
  justify-content: flex-end;
  padding: 16px 20px;
  background: #f4f7f9;
}

.selected-row td:first-child {
  box-shadow: inset 3px 0 #168a5a;
}

@media (max-width: 760px) {
  .development-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
  }

  .development-score {
    width: 100%;
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid #d7e1e8;
    border-left: 0;
    text-align: left;
  }

  .development-score strong {
    font-size: 28px;
  }

  .onboarding-list {
    grid-template-columns: 1fr;
  }

  .onboarding-item,
  .onboarding-item:nth-child(2n) {
    border-right: 0;
  }

  .access-scope-note {
    align-items: flex-start;
  }
}

.cv-preview-layer { z-index: 110; }

.cv-preview-modal {
  width: min(1120px, 100%);
  height: min(900px, calc(100vh - 40px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.cv-preview-modal > header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.cv-preview-classification {
  min-height: 40px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #d8e9df;
  color: #126f49;
  background: var(--green-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.cv-preview-classification svg { width: 17px; height: 17px; flex: none; }

.cv-preview-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #dfe6eb;
}

.cv-preview-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.cv-preview-state {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
}

.cv-preview-state svg { width: 32px; height: 32px; color: var(--green); }
.cv-preview-state strong { color: var(--navy); font-size: 0.95rem; }
.cv-preview-state span { max-width: 440px; font-size: 0.76rem; line-height: 1.5; }
.cv-preview-state[data-tone="error"] svg { color: var(--red); }
.cv-preview-state[data-tone="error"] strong { color: var(--red); }

.field-help {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.existing-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}

.existing-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.existing-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.existing-media span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
}

.existing-media input { width: 15px; height: 15px; }

.document-items {
  display: grid;
  gap: 9px;
}

.document-item-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 90px 140px 36px;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background: var(--surface-2);
}

.document-item-row label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.document-item-row label span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.document-item-row input,
.document-item-row select {
  width: 100%;
  min-width: 0;
}

.document-totals-preview {
  display: grid;
  width: min(420px, 100%);
  gap: 7px;
  margin-left: auto;
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
}

.document-totals-preview span,
.forecast-summary span {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.72rem;
}

.document-totals-preview span:last-child { color: var(--navy); font-weight: 850; }
.document-totals-preview strong { color: inherit; }

.forecast-summary {
  display: flex;
  min-width: min(620px, 100%);
  flex-wrap: wrap;
  gap: 10px 22px;
}

.forecast-summary span {
  min-width: 170px;
  border-right: 1px solid var(--line);
  padding-right: 20px;
}

.forecast-summary strong { color: var(--navy); }

.line-item-add {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 6px 0;
  color: var(--green);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.line-item-add svg { width: 15px; height: 15px; }
.line-item-remove { color: var(--red); background: #fff; }

.service-tags {
  display: flex;
  min-width: 180px;
  flex-wrap: wrap;
  gap: 5px;
}

.service-tags span,
.media-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(22, 138, 90, 0.18);
  border-radius: 999px;
  padding: 4px 7px;
  color: #176b4a;
  background: #f2faf6;
  font-size: 0.64rem;
  font-weight: 760;
}

.media-count svg { width: 13px; height: 13px; }

.notification-item.unread {
  border-left: 3px solid var(--green);
  background: #f6fbf8;
}

.notification-item.read { opacity: 0.76; }

.record-highlight {
  animation: record-focus 2.5s ease both;
}

@keyframes record-focus {
  0%, 25% { background: #fff4c9; box-shadow: inset 4px 0 var(--gold); }
  100% { background: transparent; box-shadow: inset 0 0 transparent; }
}

.notification-panel {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  width: min(390px, 100%);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.notification-panel > header {
  position: sticky;
  top: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.notification-panel > div {
  padding: 8px 18px 24px;
}

.notification-item {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.erp-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100vw - 44px));
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 13px 16px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 720;
}

.erp-toast[data-tone="error"] { border-left-color: var(--red); }

.skeleton {
  min-height: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, #edf2f6 25%, #f8fafb 50%, #edf2f6 75%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer { to { background-position: -220% 0; } }

.sidebar-scrim {
  display: none;
}

body[data-access-scope="offer_only"] .notification-button,
body[data-access-scope="offer_accepted"] .notification-button,
body[data-access-scope="contract_only"] .notification-button { display: none; }

body[data-access-scope="offer_only"] .erp-sidebar,
body[data-access-scope="offer_accepted"] .erp-sidebar,
body[data-access-scope="contract_only"] .erp-sidebar { background: #102b47; }

.legal-access-banner {
  min-height: 176px;
  padding: clamp(22px, 4vw, 34px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  border: 1px solid #e4c57d;
  border-left: 5px solid #ad7417;
  background: #fff8e7;
}

.legal-access-banner.accepted { border-color: #acd5c3; border-left-color: var(--green); background: #eef8f3; }
.legal-access-banner.terminated { border-color: #e9b8be; border-left-color: var(--red); background: #fff3f4; }
.legal-access-banner h2 { margin: 6px 0 8px; max-width: 760px; color: var(--navy); font-size: 1.75rem; line-height: 1.2; }
.legal-access-banner p { max-width: 820px; margin: 0; color: #5b6470; font-size: 0.9rem; line-height: 1.65; }

.legal-template-note {
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d7e0e6;
  background: #f6f8f9;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}
.legal-template-note svg { width: 18px; height: 18px; flex: none; color: var(--gold); }

.project-progress-band,
.profile-facts {
  display: grid;
  border: 1px solid var(--line);
  background: #fff;
}
.project-progress-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-progress-band > div,
.profile-facts > div {
  min-height: 88px;
  padding: 17px 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-progress-band > div:last-child { border-right: 0; }
.profile-facts > div:nth-child(3n) { border-right: 0; }
.project-progress-band span:not(.status),
.profile-facts span { color: var(--muted); font-size: 0.67rem; font-weight: 820; text-transform: uppercase; }
.project-progress-band strong,
.profile-facts strong { color: var(--navy); font-size: 0.9rem; overflow-wrap: anywhere; }
.profile-banner { min-height: 138px; }
.profile-banner-person > div { min-width: 0; }
.profile-banner h2 { margin: 4px 0 8px; }
.profile-section-band {
  border: 1px solid var(--line);
  background: #fff;
}
.profile-section-heading {
  padding: 17px 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.profile-section-heading h3 { margin: 4px 0 0; color: var(--navy); font-size: 1rem; }
.profile-section-heading p { max-width: 560px; margin: 0; color: var(--muted); font-size: 0.74rem; line-height: 1.55; }
.leave-balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.leave-balance {
  min-height: 112px;
  padding: 17px 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.leave-balance:nth-child(3n) { border-right: 0; }
.leave-balance span { color: var(--muted); font-size: 0.67rem; font-weight: 820; text-transform: uppercase; }
.leave-balance strong { color: var(--navy); font-size: 1.05rem; }
.leave-balance small { color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.profile-payment-panel {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
}
.profile-payment-copy h3 { margin: 4px 0 6px; color: var(--navy); font-size: 1rem; }
.profile-payment-copy p { max-width: 600px; margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }
.profile-payment-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; }
.profile-payment-summary span { color: var(--muted); font-size: 0.67rem; font-weight: 820; text-transform: uppercase; }
.profile-payment-summary strong { color: var(--ink); font-size: 0.78rem; overflow-wrap: anywhere; }
.integrity-hash { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; }

.checkbox-field { align-content: start; }
.checkbox-control {
  min-height: 48px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #cfd9e1;
  border-radius: var(--radius);
  background: #f8fafb;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
}
.modal-fields .checkbox-control input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--green); }
.modal-notice { padding: 13px 14px; display: flex; gap: 10px; align-items: flex-start; border-left: 4px solid var(--gold); background: var(--gold-soft); color: #675829; }
.notice-field.danger .modal-notice { border-left-color: var(--red); background: var(--red-soft); color: #982e39; }
.modal-notice svg { width: 18px; height: 18px; flex: none; }
.modal-notice p { margin: 0; font-size: 0.76rem; line-height: 1.55; }
.erp-modal { width: min(820px, 100%); }

.status.executed,
.status.accepted_pending_account,
.status.supervisor_approved,
.status.project_approved,
.status.reconciled,
.status.closed,
.status.client_visible { background: var(--green-soft); color: #126f49; }
.status.issued,
.status.offer_pending,
.status.recruit { background: var(--gold-soft); color: #7f6000; }
.status.void,
.status.expired,
.status.internal { background: #edf1f4; color: #596b79; }

.policy-workspace { max-width: 1540px; margin: 0 auto; }
.policy-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fff;
}
.policy-summary-strip > div { min-height: 88px; padding: 16px 18px; display: grid; align-content: center; gap: 5px; border-right: 1px solid var(--line); }
.policy-summary-strip > div:last-child { border-right: 0; }
.policy-summary-strip span { color: var(--muted); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.policy-summary-strip strong { color: var(--navy); font-size: 1.4rem; }
.policy-control-note {
  padding: 15px 17px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-left: 4px solid var(--green);
  background: #edf8f3;
  color: #155f46;
}
.policy-control-note > svg { width: 21px; height: 21px; margin-top: 1px; }
.policy-control-note strong { display: block; color: #0d5940; font-size: 0.82rem; }
.policy-control-note p { margin: 3px 0 0; color: #466b5e; font-size: 0.74rem; line-height: 1.55; }
.policy-register { border: 1px solid var(--line); background: #fff; }
.policy-register > header { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f7f9fa; }
.policy-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.policy-filters button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #ccd7df;
  border-radius: 4px;
  background: #fff;
  color: #516373;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 760;
  cursor: pointer;
}
.policy-filters button.active { border-color: #278766; background: #eaf7f1; color: #126a4c; }
.policy-register-head,
.policy-register-row { display: grid; grid-template-columns: minmax(300px, 1.65fr) minmax(130px, 0.55fr) minmax(160px, 0.7fr) minmax(150px, 0.65fr) minmax(150px, auto); gap: 16px; align-items: center; }
.policy-register-head { padding: 10px 16px; border-bottom: 1px solid var(--line); background: #eef3f6; color: #667787; font-size: 0.64rem; font-weight: 820; text-transform: uppercase; }
.policy-register-row { min-height: 116px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.policy-register-row:last-child { border-bottom: 0; }
.policy-register-row:hover { background: #fbfcfd; }
.policy-register-identity { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; }
.policy-register-identity .record-icon { width: 38px; height: 38px; color: var(--green); }
.policy-register-identity strong { display: block; color: var(--navy); font-size: 0.82rem; line-height: 1.35; }
.policy-register-identity span,
.policy-register-identity small,
.policy-register-version span,
.policy-register-version small,
.policy-register-reading span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.68rem; line-height: 1.4; }
.policy-register-version strong,
.policy-register-reading strong { display: block; margin-top: 3px; color: var(--ink); font-size: 0.8rem; }
.policy-state { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 820; line-height: 1.2; }
.policy-state.required { background: #fff2cc; color: #785c00; }
.policy-state.progress { background: #eaf1f8; color: #315b7d; }
.policy-state.ready,
.policy-state.signed { background: #e7f7ef; color: #116d4b; }
.policy-state.draft { background: #f0edf8; color: #5a4b79; }
.policy-state.superseded,
.policy-state.retired { background: #edf1f4; color: #596b79; }
.policy-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e4ebef; }
.policy-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width 260ms ease; }
.policy-progress.small { width: min(150px, 100%); height: 5px; margin-top: 8px; }
.policy-register-action { display: flex; justify-content: flex-end; }
.policy-register-action .erp-button { min-width: 150px; justify-content: center; white-space: nowrap; font-size: 0.72rem; }
.policy-reader-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.policy-reader-toolbar > div { display: flex; gap: 9px; align-items: center; }
.policy-classification { display: inline-flex; gap: 7px; align-items: center; color: #126f4d; font-size: 0.7rem; font-weight: 820; text-transform: uppercase; }
.policy-classification svg { width: 16px; height: 16px; }
.policy-reader-layout { display: grid; grid-template-columns: 274px minmax(0, 1fr); gap: 18px; align-items: start; }
.policy-reader-sidebar { position: sticky; top: calc(var(--topbar-height) + 18px); display: grid; gap: 12px; }
.policy-reader-control,
.policy-toc { border: 1px solid var(--line); background: #fff; }
.policy-reader-control { padding: 16px; display: grid; gap: 12px; }
.policy-reader-control > strong { color: var(--navy); font-size: 0.94rem; }
.policy-reader-control > strong small { color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.policy-reader-control dl { margin: 0; display: grid; gap: 9px; }
.policy-reader-control dl > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #e7edf1; }
.policy-reader-control dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.policy-reader-control dt { color: var(--muted); font-size: 0.67rem; }
.policy-reader-control dd { margin: 0; color: var(--ink); font-size: 0.7rem; font-weight: 800; text-align: right; }
.policy-reader-control > small { color: var(--muted); font-size: 0.67rem; line-height: 1.4; }
.policy-reading-state { padding: 8px 9px; border-left: 3px solid #96a7b5; background: #f1f4f6; color: #536675; font-size: 0.67rem; font-weight: 780; }
.policy-reading-state[data-tone="active"] { border-color: var(--green); background: #eaf7f1; color: #116a49; }
.policy-reading-state[data-tone="error"] { border-color: var(--red); background: var(--red-soft); color: #9d2e3c; }
.policy-reading-state[data-tone="reference"] { border-color: #6485a0; background: #edf3f8; color: #3d5f79; }
.policy-toc { padding: 9px; max-height: calc(100vh - 390px); overflow: auto; }
.policy-toc > span { display: block; padding: 7px 8px 9px; color: var(--muted); font-size: 0.64rem; font-weight: 820; text-transform: uppercase; }
.policy-toc button { width: 100%; padding: 8px; border: 0; border-left: 2px solid transparent; background: transparent; color: #516575; font: inherit; font-size: 0.68rem; line-height: 1.35; text-align: left; cursor: pointer; }
.policy-toc button:hover { border-left-color: var(--green); background: #f1f7f4; color: var(--navy); }
.policy-document { min-width: 0; border: 1px solid #ccd8df; background: #fff; box-shadow: 0 12px 34px rgba(9, 35, 58, 0.08); }
.policy-document-header { padding: 30px clamp(20px, 4vw, 54px) 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; border-top: 5px solid var(--navy); border-bottom: 1px solid var(--line); }
.policy-document-header > div:first-child > span { color: var(--green); font-size: 0.7rem; font-weight: 850; text-transform: uppercase; }
.policy-document-header h1 { max-width: 850px; margin: 7px 0 9px; color: var(--navy); font-size: 2rem; line-height: 1.15; }
.policy-document-header p { max-width: 820px; margin: 0; color: #536575; font-size: 0.84rem; line-height: 1.65; }
.policy-document-control { min-width: 150px; display: grid; align-content: start; gap: 7px; }
.policy-document-control span { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.67rem; }
.policy-document-control strong { color: var(--ink); }
.policy-document-alert { margin: 18px clamp(20px, 4vw, 54px) 0; padding: 13px 14px; display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 10px; align-items: start; border-left: 4px solid #7690a4; background: #edf3f7; color: #38566d; }
.policy-document-alert.current { border-color: var(--green); background: #eaf7f1; color: #166347; }
.policy-document-alert.draft { border-color: var(--gold); background: var(--gold-soft); color: #705a18; }
.policy-document-alert svg { width: 19px; height: 19px; }
.policy-document-alert strong { display: block; font-size: 0.76rem; }
.policy-document-alert p { margin: 3px 0 0; font-size: 0.69rem; line-height: 1.5; }
.policy-wording { padding: 12px clamp(20px, 4vw, 54px) 26px; }
.policy-clause { padding: 24px 0 8px; scroll-margin-top: calc(var(--topbar-height) + 22px); }
.policy-clause + .policy-clause { border-top: 1px solid #e1e8ec; }
.policy-clause h2,
.policy-controlled-text h2 { margin: 0 0 13px; color: var(--navy); font-size: 1.05rem; line-height: 1.35; }
.policy-clause h3,
.policy-controlled-text h3 { margin: 20px 0 8px; color: #173f5f; font-size: 0.88rem; }
.policy-clause p,
.policy-clause li,
.policy-controlled-text p,
.policy-controlled-text li { color: #293d4e; font-size: 0.82rem; line-height: 1.78; }
.policy-clause p { margin: 0 0 12px; }
.policy-clause ul,
.policy-clause ol { margin: 8px 0 14px; padding-left: 22px; }
.policy-clause li { margin: 0 0 8px; padding-left: 4px; }
.policy-facts { margin: 20px clamp(20px, 4vw, 54px) 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); background: #f8fafb; scroll-margin-top: calc(var(--topbar-height) + 22px); }
.policy-facts > div { min-height: 82px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.policy-facts > div:nth-child(2n) { border-right: 0; }
.policy-facts span { display: block; color: var(--muted); font-size: 0.64rem; font-weight: 820; text-transform: uppercase; }
.policy-facts strong { display: block; margin-top: 6px; color: var(--ink); font-size: 0.75rem; line-height: 1.55; }
.policy-table-scroll { overflow-x: auto; border: 1px solid var(--line); }
.policy-clause table { width: 100%; border-collapse: collapse; }
.policy-clause th { padding: 10px 11px; background: #eaf0f4; color: #496071; font-size: 0.66rem; text-align: left; text-transform: uppercase; }
.policy-clause td { min-width: 130px; padding: 11px; border-top: 1px solid var(--line); color: #304556; font-size: 0.74rem; line-height: 1.5; vertical-align: top; }
.policy-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.policy-evidence-grid article,
.policy-source-list article { padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #f9fbfc; }
.policy-evidence-grid h3 { margin: 0 0 6px; }
.policy-evidence-grid p { color: var(--muted); font-size: 0.74rem; }
.policy-evidence-grid li { font-size: 0.73rem; }
.policy-source-list { display: grid; gap: 8px; }
.policy-source-list strong { color: var(--navy); font-size: 0.78rem; }
.policy-source-list p { margin: 5px 0; color: #506574; font-size: 0.72rem; }
.policy-source-list a { display: inline-flex; gap: 5px; align-items: center; color: #0c6c4b; font-size: 0.69rem; font-weight: 760; }
.policy-source-list a svg { width: 13px; height: 13px; }
.policy-integrity { margin: 0 clamp(20px, 4vw, 54px) 22px; padding: 14px; border: 1px solid #d6e0e6; background: #f4f7f9; }
.policy-integrity > span { display: block; color: var(--muted); font-size: 0.62rem; font-weight: 820; text-transform: uppercase; }
.policy-integrity code { display: block; margin-top: 5px; color: #3c5364; font-size: 0.65rem; overflow-wrap: anywhere; }
.policy-integrity p { margin: 8px 0 0; color: #576b79; font-size: 0.7rem; line-height: 1.45; }
.policy-attestation { margin: 0 clamp(20px, 4vw, 54px) 40px; padding: 20px; border: 1px solid #cfdae1; border-left: 5px solid var(--gold); background: #fffdf5; }
.policy-attestation.signed { border-left-color: var(--green); background: #f1faf6; }
.policy-attestation.draft { border-left-color: #6d5a8d; background: #f6f3fa; }
.policy-attestation.reference { border-left-color: #7890a2; background: #f3f6f8; }
.policy-attestation-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; align-items: start; }
.policy-attestation-heading > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; background: #fff; color: var(--navy); }
.policy-attestation-heading svg { width: 20px; height: 20px; }
.policy-attestation-heading strong { color: var(--navy); font-size: 0.88rem; }
.policy-attestation-heading p { margin: 4px 0 0; color: #586a78; font-size: 0.73rem; line-height: 1.55; }
.policy-signature-evidence { margin-top: 17px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cfe2d9; background: #fff; }
.policy-signature-evidence > div { min-height: 72px; padding: 12px; border-right: 1px solid #dce8e2; border-bottom: 1px solid #dce8e2; }
.policy-signature-evidence > div:nth-child(3n) { border-right: 0; }
.policy-signature-evidence span { display: block; color: var(--muted); font-size: 0.61rem; font-weight: 800; text-transform: uppercase; }
.policy-signature-evidence strong { display: block; margin-top: 5px; color: var(--ink); font-size: 0.73rem; line-height: 1.4; }
.policy-attestation blockquote { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--green); background: #fff; color: #365345; font-size: 0.73rem; line-height: 1.6; }
.policy-signature-field { margin-top: 17px; display: grid; gap: 6px; }
.policy-signature-field > span { color: var(--ink); font-size: 0.72rem; font-weight: 760; }
.policy-signature-field input { min-height: 46px; padding: 10px 12px; border: 1px solid #bdcbd4; border-radius: 4px; color: var(--ink); font: inherit; font-size: 0.8rem; }
.policy-commitment { margin-top: 12px; padding: 12px; display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 10px; align-items: start; border: 1px solid #d4dde3; background: #fff; color: #344b5c; font-size: 0.73rem; font-weight: 650; line-height: 1.55; cursor: pointer; }
.policy-commitment input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); }
.policy-sign-actions { margin-top: 14px; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.policy-sign-actions p { max-width: 650px; margin: 0; color: #657583; font-size: 0.69rem; line-height: 1.45; }
.policy-attestation.draft > .erp-button { margin: 16px 0 0 47px; }
.modal-field[data-field-name="policy_text"] textarea { min-height: 390px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.74rem; line-height: 1.55; }

@media print {
  body.policy-reader-active .erp-shell,
  body.policy-reader-active .erp-modal-layer,
  body.policy-reader-active .notification-panel,
  body.policy-reader-active .erp-toast { display: none !important; }
  body.policy-reader-active::after { content: "Protected Quick-Think Solution policy manuals are available for in-ERP reference only."; display: block; padding: 40px; color: #102f4f; font: 700 18px/1.5 Arial, sans-serif; }
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-summary-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-summary-band > div:nth-child(3) { border-right: 0; }
  .finance-summary-band > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .erp-search { display: none; }
  .policy-register-head,
  .policy-register-row { grid-template-columns: minmax(280px, 1.5fr) minmax(125px, 0.55fr) minmax(145px, 0.65fr) minmax(145px, 0.65fr); }
  .policy-register-head > :last-child,
  .policy-register-action { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 26px; background: var(--surface-2); }
  .login-form { border: 1px solid var(--line); padding: 26px; background: #fff; box-shadow: var(--shadow); }
  .login-mobile-brand { display: block; }
  .login-mobile-brand img { width: 220px; max-width: 80%; }

  .erp-shell { grid-template-columns: 1fr; }
  .erp-workspace { grid-column: 1; }
  .erp-sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }
  .erp-sidebar.open { transform: translateX(0); }
  .sidebar-brand img { width: 168px; }
  .sidebar-close { display: inline-grid !important; border-color: rgba(255, 255, 255, 0.2); color: #fff; background: transparent; }
  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgba(6, 24, 43, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .menu-button { display: inline-grid; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .policy-reader-layout { grid-template-columns: 1fr; }
  .policy-reader-sidebar { position: static; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr); }
  .policy-toc { max-height: 290px; }
}

@media (max-width: 720px) {
  .document-item-row { grid-template-columns: minmax(0, 1fr) minmax(90px, 0.45fr) 36px; }
  .document-item-row label:first-child { grid-column: 1 / -1; }
  .document-item-row .line-item-remove { align-self: end; }
  .existing-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  :root { --topbar-height: 68px; }
  .erp-topbar { padding: 10px 14px; }
  .page-kicker { display: none; }
  .erp-topbar h1 { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 6px; }
  .user-menu-button { min-width: auto; }
  .user-meta,
  .user-menu-button > svg { display: none; }
  .user-menu { right: 0; }
  .notification-button { display: inline-grid; }
  .erp-main { padding: 16px 12px 28px; }
  .view-intro { align-items: flex-start; flex-direction: column; }
  .view-intro .erp-button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 122px; padding: 14px; }
  .metric-card strong { font-size: 1.35rem; }
  .report-grid { grid-template-columns: 1fr; }
  .finance-summary-band { grid-template-columns: 1fr; }
  .finance-summary-band > div { border-right: 0; border-top: 1px solid var(--line); }
  .finance-summary-band > div:first-child { border-top: 0; }
  .module-banner { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar > div { width: 100%; }
  .toolbar .erp-button { flex: 1; }
  .modal-fields { grid-template-columns: 1fr; }
  .modal-field.full { grid-column: auto; }
  .erp-modal-layer { padding: 0; align-items: end; }
  .erp-modal { width: 100%; max-height: 92vh; border-radius: 6px 6px 0 0; }
  .cv-preview-modal { height: 92vh; }
  .legal-access-banner { grid-template-columns: 1fr; }
  .legal-access-banner h2 { font-size: 1.4rem; }
  .project-progress-band,
  .profile-facts { grid-template-columns: 1fr; }
  .project-progress-band > div,
  .profile-facts > div { border-right: 0; }
  .profile-payment-panel { grid-template-columns: 1fr; align-items: stretch; }
  .profile-payment-panel .erp-button { width: 100%; }
  .profile-banner { align-items: stretch; }
  .profile-banner > .erp-button { width: 100%; }
  .profile-section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .leave-balance-grid { grid-template-columns: 1fr; }
  .leave-balance { border-right: 0; }
  .policy-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-summary-strip > div:nth-child(2n) { border-right: 0; }
  .policy-summary-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .policy-register-head { display: none; }
  .policy-register-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .policy-register-identity { grid-column: 1 / -1; }
  .policy-register-action { grid-column: 1 / -1; }
  .policy-register-action .erp-button { width: 100%; }
  .policy-reader-toolbar { align-items: stretch; flex-direction: column; }
  .policy-reader-toolbar > div { justify-content: space-between; flex-wrap: wrap; }
  .policy-reader-sidebar { grid-template-columns: 1fr; }
  .policy-toc { display: none; }
  .policy-document-header { grid-template-columns: 1fr; }
  .policy-document-header h1 { font-size: 1.55rem; }
  .policy-document-control { min-width: 0; }
  .policy-facts { grid-template-columns: 1fr; }
  .policy-facts > div { border-right: 0; }
  .policy-evidence-grid { grid-template-columns: 1fr; }
  .policy-signature-evidence { grid-template-columns: 1fr 1fr; }
  .policy-signature-evidence > div:nth-child(3n) { border-right: 1px solid #dce8e2; }
  .policy-signature-evidence > div:nth-child(2n) { border-right: 0; }
  .policy-sign-actions { align-items: stretch; flex-direction: column; }
  .policy-sign-actions .erp-button { width: 100%; }
}

@media (max-width: 420px) {
  .login-panel { padding: 16px; }
  .login-form { padding: 22px 18px; }
  .metric-grid { grid-template-columns: 1fr; }
  .policy-summary-strip { grid-template-columns: 1fr; }
  .policy-summary-strip > div { border-right: 0; border-top: 1px solid var(--line); }
  .policy-summary-strip > div:first-child { border-top: 0; }
  .policy-register-row { grid-template-columns: 1fr; }
  .policy-register-reading,
  .policy-register-version { grid-column: 1; }
  .policy-signature-evidence { grid-template-columns: 1fr; }
  .policy-signature-evidence > div { border-right: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.demo-mode-banner {
  min-height: 52px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 28px;
  border-bottom: 1px solid #e2c45b;
  background: #fff7d8;
  color: #493b09;
}

.demo-mode-banner[hidden] { display: none; }
.demo-mode-banner > svg { width: 20px; height: 20px; color: #947000; }
.demo-mode-banner div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.demo-mode-banner strong { font-size: 0.82rem; text-transform: uppercase; }
.demo-mode-banner span { font-size: 0.8rem; color: #6f5c18; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-mode-banner a { color: #0a2342; font-size: 0.8rem; font-weight: 800; }

.demo-product-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.demo-product-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.demo-product-tabs button.active {
  border-color: #168a5a;
  background: #eaf7f1;
  color: #0b6a43;
}

.demo-solution-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid #cfe1db;
  background: #f4fbf8;
}

.demo-solution-note > svg { width: 24px; color: #168a5a; }
.demo-solution-note strong { display: block; margin-bottom: 4px; }
.demo-solution-note p { margin: 0; color: var(--muted); line-height: 1.55; }

@media (max-width: 680px) {
  .demo-mode-banner { grid-template-columns: 24px minmax(0, 1fr); padding: 9px 14px; }
  .demo-mode-banner div { display: block; }
  .demo-mode-banner span { display: block; white-space: normal; }
  .demo-mode-banner a { display: none; }
}

.school-workspace .p6-command { border-top: 3px solid #d8a723; }
.school-workspace-tabs { flex-wrap: wrap; }
.school-staging-note { border-left: 3px solid #d8a723; background: #fff8df; }
.school-highlight { min-height: 176px; display: flex; flex-direction: column; justify-content: center; padding: 28px; background: #f4f7f8; border-left: 4px solid #17806d; }
.school-highlight span, .school-highlight small { color: var(--muted); }
.school-highlight strong { margin: 10px 0; color: var(--navy); font-size: 42px; line-height: 1; }
.school-timetable-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.school-timetable-list li { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.school-timetable-list li:last-child { border-bottom: 0; }
.school-timetable-list span, .school-timetable-list small { color: var(--muted); font-size: 12px; }
.school-site-preview { min-height: 280px; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); overflow: hidden; background: #16304a; color: #fff; }
.school-site-preview > div { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.school-site-preview span { color: #d8a723; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.school-site-preview h2 { margin: 10px 0; color: #fff; font-family: Georgia, serif; font-size: 34px; }
.school-site-preview p, .school-site-preview small { color: #d9e1e8; }
.school-site-preview img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }

@media (max-width: 860px) {
  .school-site-preview { grid-template-columns: 1fr; }
  .school-timetable-list li { grid-template-columns: 76px 1fr; }
  .school-timetable-list small { grid-column: 2; }
}

/* School Management vertical v4 */
.school-workspace-v4 { --school-ink: #14324a; --school-green: #14765a; --school-gold: #d3a523; --school-sky: #dcecf2; }
.school-demo-ribbon, .school-confidential-banner { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-left: 3px solid var(--school-gold); background: #fff9e5; color: var(--school-ink); }
.school-confidential-banner { border-left-color: #b23a4a; background: #fff1f2; }
.school-demo-ribbon svg, .school-confidential-banner svg { flex: 0 0 20px; width: 20px; height: 20px; }
.school-demo-ribbon div, .school-confidential-banner div { display: grid; gap: 2px; }
.school-demo-ribbon span, .school-confidential-banner span { color: var(--muted); font-size: 12px; }
.school-command-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 2px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.school-command-tabs button { position: relative; display: inline-flex; flex: 0 0 auto; gap: 8px; align-items: center; min-height: 46px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.school-command-tabs button svg { width: 16px; height: 16px; }
.school-command-tabs button small { min-width: 20px; padding: 2px 5px; border-radius: 8px; background: #e9eff3; color: var(--school-ink); text-align: center; font-size: 10px; }
.school-command-tabs button:hover { color: var(--school-ink); background: #f4f7f8; }
.school-command-tabs button.active { border-bottom-color: var(--school-green); color: var(--school-green); }
.school-command-view { display: grid; gap: 16px; }
.school-dashboard-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 146px; padding: 28px 30px; overflow: hidden; border-left: 5px solid var(--school-gold); background: linear-gradient(110deg, #11324d 0%, #17495d 68%, #176b5e 100%); color: #fff; }
.school-dashboard-hero > div:first-child { max-width: 700px; }
.school-dashboard-hero span { color: #d7e6eb; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.school-dashboard-hero h2 { margin: 7px 0 5px; color: #fff; font-size: clamp(24px, 3vw, 38px); letter-spacing: 0; }
.school-dashboard-hero p { margin: 0; color: #e6eff2; }
.school-live-signal { display: grid; grid-template-columns: 10px auto; gap: 4px 9px; align-items: center; min-width: 210px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.24); background: rgba(3,21,34,.3); }
.school-live-signal i { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: #55d49a; box-shadow: 0 0 0 5px rgba(85,212,154,.15); }
.school-live-signal span { text-transform: none; font-size: 11px; }
.school-live-signal strong { font-size: 13px; }
.school-metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.school-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.school-panel { min-width: 0; }
.school-panel .card-head { border-bottom: 1px solid var(--line); }
.school-agenda, .school-approval-list { display: grid; margin: 0; padding: 0 18px 10px; list-style: none; }
.school-agenda li, .school-approval-list li { display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); }
.school-agenda li:last-child, .school-approval-list li:last-child { border-bottom: 0; }
.school-agenda time { flex: 0 0 76px; color: var(--school-green); font-size: 11px; font-weight: 900; }
.school-agenda div, .school-approval-list span { display: grid; gap: 2px; min-width: 0; }
.school-agenda span, .school-approval-list small { color: var(--muted); font-size: 11px; }
.school-approval-list li > div { display: flex; gap: 10px; align-items: center; }
.school-approval-list svg { width: 18px; color: var(--school-green); }
.school-approval-list time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.school-process-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; }
.school-process-strip span { display: flex; gap: 9px; align-items: center; min-height: 50px; padding: 9px 13px; border-right: 1px solid var(--line); color: var(--school-ink); font-size: 11px; font-weight: 800; }
.school-process-strip span:last-child { border-right: 0; }
.school-process-strip b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--school-sky); color: var(--school-green); font-size: 10px; }
.school-process-strip.compact { background: #f8fafb; }
.school-attendance-callout { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px; border-left: 4px solid var(--school-green); }
.school-attendance-callout > div { display: flex; gap: 12px; align-items: center; }
.school-attendance-callout > div svg { color: var(--school-green); }
.school-attendance-callout span { display: grid; gap: 3px; }
.school-attendance-callout small { max-width: 430px; color: var(--muted); }
.school-finance-statements, .school-channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.school-finance-statements article, .school-channel-grid article { min-width: 0; padding: 17px; border: 1px solid var(--line); background: #fff; }
.school-finance-statements article { display: grid; gap: 5px; border-top: 3px solid var(--school-green); }
.school-finance-statements span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.school-finance-statements strong { color: var(--school-ink); font-size: 20px; }
.school-finance-statements small { color: var(--muted); }
.school-channel-grid article { display: flex; gap: 12px; align-items: center; }
.school-channel-grid svg { color: var(--school-green); }
.school-channel-grid span { display: grid; gap: 2px; }
.school-channel-grid small { color: var(--muted); }
.school-compact-table { overflow: auto; padding: 0 16px 16px; }
.school-compact-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.school-compact-table th, .school-compact-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.school-compact-table th { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.school-configuration-summary { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(360px,1.2fr); gap: 24px; align-items: center; padding: 24px; border-left: 4px solid var(--school-green); background: #eef6f4; }
.school-configuration-summary > div:first-child > span { color: var(--school-green); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.school-configuration-summary h3 { margin: 6px 0; color: var(--school-ink); font-size: 23px; }
.school-configuration-summary p { margin: 0; color: var(--muted); }
.school-module-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.school-module-cloud span { display: inline-flex; gap: 5px; align-items: center; padding: 5px 8px; border: 1px solid #bdd8d0; background: #fff; color: var(--school-ink); font-size: 10px; font-weight: 800; }
.school-module-cloud svg { width: 12px; height: 12px; color: var(--school-green); }
.school-config-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.school-site-canvas { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(420px,1.1fr); min-height: 330px; overflow: hidden; background: var(--school-primary); color: #fff; }
.school-site-canvas > div { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px; }
.school-site-canvas > div > span { color: var(--school-accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.school-site-canvas h2 { margin: 9px 0; color: #fff; font-size: 34px; }
.school-site-canvas p { margin: 0 0 10px; color: #fff; font-size: 18px; }
.school-site-canvas small { color: #d8e2e9; line-height: 1.65; }
.school-site-canvas > div > div { margin-top: 18px; }
.school-site-canvas img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
@media (max-width: 1280px) { .school-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .school-finance-statements, .school-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .school-dashboard-grid, .school-configuration-summary, .school-site-canvas { grid-template-columns: 1fr; } .school-process-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .school-process-strip span:nth-child(3) { border-right: 0; } .school-dashboard-hero { align-items: flex-start; flex-direction: column; } .school-live-signal { width: 100%; } }
@media (max-width: 600px) { .school-metric-grid, .school-finance-statements, .school-channel-grid { grid-template-columns: 1fr; } .school-process-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .school-process-strip span:nth-child(3) { border-right: 1px solid var(--line); } .school-process-strip span:nth-child(2n) { border-right: 0; } .school-attendance-callout { align-items: stretch; flex-direction: column; } .school-site-canvas > div { padding: 28px 22px; } }

/* School Management vertical v5 */
.school-workspace-v4 {
  --school-ink: #17324a;
  --school-green: #177b5d;
  --school-gold: #d7a820;
  --school-blue: #2786ad;
  --school-coral: #c95c57;
  --school-violet: #675d9f;
  --school-paper: #f3f7f8;
}
.school-workspace-v4 .p6-command { border-top: 0; }
.school-demo-ribbon { border: 1px solid #e1d293; border-left: 4px solid var(--school-gold); background: #fffaf0; }
.school-app-shell { min-width: 0; display: grid; grid-template-columns: 218px minmax(0,1fr); border: 1px solid var(--line); background: #fff; }
.school-command-tabs { min-width: 0; display: block; overflow: visible; padding: 0; border-right: 1px solid #cad7de; border-bottom: 0; background: #102d47; }
.school-command-tabs > header { display: grid; gap: 3px; min-height: 72px; align-content: center; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.13); }
.school-command-tabs > header span { color: #89adc1; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.school-command-tabs > header strong { color: #fff; font-size: 13px; }
.school-command-tabs > div { display: grid; gap: 2px; padding: 8px; }
.school-command-tabs button { width: 100%; min-height: 42px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 7px 10px; border: 0; border-left: 3px solid transparent; background: transparent; color: #c5d6e0; text-align: left; }
.school-command-tabs button svg { width: 16px; height: 16px; color: #82adc2; }
.school-command-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school-command-tabs button small { min-width: 21px; border-radius: 8px; background: rgba(255,255,255,.11); color: #fff; }
.school-command-tabs button:hover { background: rgba(255,255,255,.07); color: #fff; }
.school-command-tabs button.active { border-left-color: var(--school-gold); border-bottom-color: transparent; background: #1d4765; color: #fff; }
.school-command-tabs button.active svg { color: var(--school-gold); }
.school-command-view { min-width: 0; align-content: start; gap: 14px; padding: 16px; background: var(--school-paper); }

.school-day-command { min-height: 132px; display: flex; justify-content: space-between; gap: 28px; align-items: center; padding: 24px 26px; border-left: 5px solid var(--school-gold); background: #143954; color: #fff; }
.school-day-command > div:first-child { min-width: 0; }
.school-day-command > div:first-child > span { color: #abd0df; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.school-day-command h2 { margin: 7px 0 3px; color: #fff; font-size: 27px; line-height: 1.1; letter-spacing: 0; }
.school-day-command p { margin: 0; color: #d4e2e9; font-size: 12px; }
.school-day-state { display: grid; grid-template-columns: 10px auto; gap: 3px 9px; align-items: center; min-width: 185px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.2); background: #0d2b42; }
.school-day-state i { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: #4bd39a; box-shadow: 0 0 0 5px rgba(75,211,154,.13); }
.school-day-state span { color: #bcd1dc; font-size: 9px; }
.school-day-state strong { color: #fff; font-size: 11px; }

.school-today-launcher { border: 1px solid #d4e0e6; background: #fff; }
.school-today-launcher > header { min-height: 59px; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 11px 14px; border-bottom: 1px solid #dce5ea; }
.school-today-launcher > header > div { display: grid; gap: 2px; }
.school-today-launcher > header span { color: var(--school-green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.school-today-launcher > header strong { color: var(--school-ink); font-size: 14px; }
.school-today-launcher > header small { max-width: 360px; color: var(--muted); font-size: 10px; text-align: right; }
.school-today-launcher > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.school-task-launch { min-width: 0; min-height: 82px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 13px; border: 0; border-right: 1px solid #dce5ea; border-top: 3px solid var(--school-green); background: #fff; color: var(--school-ink); text-align: left; cursor: pointer; }
.school-task-launch:last-child { border-right: 0; }
.school-task-launch:hover { background: #f2f8f6; }
.school-task-launch.sky { border-top-color: var(--school-blue); }
.school-task-launch.gold { border-top-color: var(--school-gold); }
.school-task-launch.violet { border-top-color: var(--school-violet); }
.school-task-launch.coral { border-top-color: var(--school-coral); }
.school-task-launch > svg:first-child { width: 19px; height: 19px; color: var(--school-green); }
.school-task-launch.sky > svg:first-child { color: var(--school-blue); }
.school-task-launch.gold > svg:first-child { color: #a77b00; }
.school-task-launch.violet > svg:first-child { color: var(--school-violet); }
.school-task-launch.coral > svg:first-child { color: var(--school-coral); }
.school-task-launch > svg:last-child { width: 13px; height: 13px; color: #93a5b1; }
.school-task-launch span { display: grid; gap: 3px; min-width: 0; }
.school-task-launch strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.school-task-launch small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.school-no-quick-task { grid-column: 1 / -1; padding: 18px; color: var(--muted); font-size: 11px; }

.school-pulse-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.school-pulse-grid article { position: relative; min-height: 104px; display: grid; align-content: center; gap: 4px; padding: 15px 42px 15px 15px; overflow: hidden; border: 1px solid #d4e0e6; border-top: 3px solid var(--school-ink); background: #fff; }
.school-pulse-grid article.green { border-top-color: var(--school-green); }
.school-pulse-grid article.sky { border-top-color: var(--school-blue); }
.school-pulse-grid article.gold { border-top-color: var(--school-gold); }
.school-pulse-grid article > svg { position: absolute; right: 14px; top: 17px; width: 20px; color: #839aa8; }
.school-pulse-grid span { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.school-pulse-grid strong { overflow-wrap: anywhere; color: var(--school-ink); font-size: 20px; line-height: 1.15; }
.school-pulse-grid small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.school-command-grid { align-items: start; }
.school-command-grid .school-panel { border-radius: 0; box-shadow: none; }
.school-enrollment-panel { border-top: 3px solid var(--school-blue); }
.school-finance-panel { border-top: 3px solid var(--school-green); }
.school-agenda-panel { border-top: 3px solid var(--school-gold); }
.school-approval-panel { border-top: 3px solid var(--school-coral); }

@media (max-width: 1180px) {
  .school-app-shell { grid-template-columns: 190px minmax(0,1fr); }
  .school-today-launcher > div, .school-pulse-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .school-task-launch:nth-child(2) { border-right: 0; }
  .school-task-launch:nth-child(-n+2) { border-bottom: 1px solid #dce5ea; }
}

@media (max-width: 860px) {
  .school-app-shell { display: block; border-right: 0; border-left: 0; }
  .school-command-tabs { position: sticky; z-index: 4; top: 0; overflow-x: auto; border-right: 0; border-bottom: 1px solid #cad7de; scrollbar-width: thin; }
  .school-command-tabs > header { display: none; }
  .school-command-tabs > div { display: flex; gap: 3px; padding: 7px; }
  .school-command-tabs button { flex: 0 0 auto; width: auto; min-width: 122px; grid-template-columns: 18px minmax(0,1fr) auto; border-left: 0; border-bottom: 3px solid transparent; }
  .school-command-tabs button.active { border-left-color: transparent; border-bottom-color: var(--school-gold); }
  .school-day-command { align-items: flex-start; flex-direction: column; }
  .school-day-state { width: 100%; }
}

@media (max-width: 600px) {
  .school-command-view { padding: 10px; }
  .school-day-command { min-height: 0; padding: 20px 18px; }
  .school-day-command h2 { font-size: 23px; }
  .school-today-launcher > header { align-items: flex-start; flex-direction: column; }
  .school-today-launcher > header small { text-align: left; }
  .school-today-launcher > div, .school-pulse-grid { grid-template-columns: 1fr; }
  .school-task-launch { border-right: 0; border-bottom: 1px solid #dce5ea; }
  .school-task-launch:last-child { border-bottom: 0; }
  .school-pulse-grid article { min-height: 92px; }
}
