:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #d9e1ec;
  --soft-line: #e7ecf3;
  --nav: #101828;
  --nav-soft: #182235;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #168a4a;
  --green-soft: #e9f8ef;
  --yellow: #b7791f;
  --yellow-soft: #fff7e6;
  --red: #c2413b;
  --red-soft: #fdecec;
  --purple: #6941c6;
  --purple-soft: #f1ecff;
  --orange: #c76a12;
  --orange-soft: #fff1e3;
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.environment-badge {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 3000;
  min-width: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

.environment-badge.environment-qa {
  background: #eff6ff;
  color: #1d4ed8;
}

.environment-badge.environment-staging {
  background: #f5f3ff;
  color: #6d28d9;
}

html {
  scroll-behavior: smooth;
}

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

button {
  cursor: pointer;
}

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

button.brand {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    var(--bg);
}

.main {
  position: relative;
}

.page-loading {
  position: fixed;
  inset: 0 0 0 252px;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 248, 251, 0.68);
  backdrop-filter: blur(8px);
}

.page-loading-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  border: 1px solid rgba(217, 225, 236, 0.92);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.page-loading-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.page-loading-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: loading-spin 720ms linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px;
  background: var(--nav);
  color: #fff;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-button {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav-button.active {
  background: var(--nav-soft);
  color: #fff;
}

.nav-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.boundary-card {
  margin-top: 28px;
  border-radius: 8px;
  padding: 14px;
  background: #1d2939;
}

.role-switcher {
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

.role-switcher label {
  color: #cbd5e1;
}

.role-switcher select {
  margin-top: 8px;
  border-color: #344054;
  background: #1d2939;
  color: #fff;
}

.sync-card {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #0b1220;
}

.sync-card strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.sync-card p {
  margin: 5px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}

.auth-card {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #172033;
}

.auth-card strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.auth-card p {
  margin: 5px 0 10px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-action {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #0b1220;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.account-bar div {
  display: grid;
  gap: 2px;
}

.account-bar span,
.account-bar small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-bar strong {
  color: var(--ink);
  font-size: 14px;
}

.boundary-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.boundary-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.main {
  padding: 30px 34px 46px;
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(110deg, rgba(37, 99, 235, 0.11), rgba(22, 138, 74, 0.08)),
    var(--bg);
}

.login-panel {
  width: min(100%, 480px);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel .trust-links {
  margin-top: 18px;
}

.public-page {
  min-height: 100vh;
  padding: 28px;
  background: var(--bg);
}

.marketing-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 38%, #f5f7fb 100%);
}

.public-page-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.public-header {
  position: sticky;
  top: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(217, 225, 236, 0.72);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.trust-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-links button {
  min-height: 32px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(248, 250, 252, 0.8);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.trust-links button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.legal-page {
  display: grid;
  gap: 18px;
}

.legal-hero {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legal-hero h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: 42px;
}

.legal-hero p:last-child {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.legal-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legal-card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin-bottom: 12px;
  font-size: 20px;
}

.legal-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.48;
}

.legal-disclaimer {
  display: flex;
  gap: 10px;
  border: 1px solid var(--yellow-soft);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--yellow-soft);
  color: var(--ink);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.login-modal-backdrop {
  z-index: 30;
}

.login-modal {
  width: min(100%, 560px);
}

.login-modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
}

.login-modal-brand .brand-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.login-modal .modal-header p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.login-assurance span {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(217, 225, 236, 0.76);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1.2;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  justify-items: center;
  min-height: calc(100vh - 118px);
  padding: 64px 0 56px;
  text-align: center;
}

.home-copy {
  display: grid;
  justify-items: center;
}

.home-copy h1 {
  max-width: 940px;
  margin-bottom: 18px;
  font-size: 68px;
  line-height: 0.98;
  letter-spacing: 0;
}

.home-subtitle {
  max-width: 780px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.58;
}

.home-preview {
  width: min(100%, 860px);
  padding: 22px;
}

.product-frame {
  overflow: hidden;
  border: 1px solid rgba(217, 225, 236, 0.92);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)),
    #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.16);
  text-align: left;
}

.product-frame-top {
  display: flex;
  gap: 8px;
  margin: -2px 0 18px;
}

.product-frame-top span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #cbd5e1;
}

.product-frame-top span:nth-child(1) {
  background: #f87171;
}

.product-frame-top span:nth-child(2) {
  background: #facc15;
}

.product-frame-top span:nth-child(3) {
  background: #4ade80;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.preview-top span:first-child {
  color: var(--blue);
  font-weight: 850;
}

.home-preview h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.home-preview p {
  margin-bottom: 18px;
  color: var(--muted);
}

.mini-readiness {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.mini-readiness div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 13px 10px;
  background: #f8fafc;
  text-align: center;
}

.mini-readiness strong {
  display: block;
  font-size: 24px;
}

.mini-readiness span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.readiness-ring {
  display: grid;
  width: 190px;
  height: 190px;
  margin: 20px auto 18px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(var(--blue) 0 81%, #e7ecf3 81% 100%);
  box-shadow: inset 0 0 0 1px rgba(217, 225, 236, 0.8);
  text-align: center;
}

.readiness-ring strong {
  display: block;
  color: var(--ink);
  font-size: 40px;
  line-height: 1;
}

.readiness-ring span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-lanes {
  display: grid;
  gap: 10px;
}

.preview-lanes div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.preview-lanes span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-lanes strong {
  font-size: 13px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 560px);
  margin-top: 28px;
}

.hero-metrics div {
  border: 1px solid rgba(217, 225, 236, 0.82);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.hero-metrics strong {
  display: block;
  font-size: 19px;
  line-height: 1.15;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-section {
  padding: 58px 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading h2,
.split-band h2 {
  margin-bottom: 8px;
  font-size: 38px;
  line-height: 1.08;
}

.section-heading p,
.split-band p {
  color: var(--muted);
  line-height: 1.55;
}

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

.public-footer {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(0, 0.75fr));
  gap: 26px;
  margin: 26px 0 10px;
  border-top: 1px solid rgba(217, 225, 236, 0.9);
  padding: 34px 0 8px;
}

.public-footer h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
}

.public-footer p,
.public-footer span,
.public-footer a,
.public-footer button {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.public-footer button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.public-footer a,
.public-footer button:hover {
  color: var(--blue);
}

.footer-brand p {
  max-width: 420px;
  margin-top: 12px;
}

.footer-note {
  color: var(--ink);
  font-weight: 750;
}

.offer-card {
  min-height: 220px;
  border-radius: 22px;
  padding: 22px;
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.offer-card:hover {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.offer-card h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.offer-card p {
  color: var(--muted);
  line-height: 1.5;
}

.offer-card span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

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

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

.accordion-card,
.step-accordion {
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.accordion-card summary,
.step-accordion summary {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.accordion-card summary::-webkit-details-marker,
.step-accordion summary::-webkit-details-marker {
  display: none;
}

.accordion-card summary::after,
.step-accordion summary::after {
  content: "+";
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--blue);
  font-weight: 900;
}

.accordion-card[open] summary::after,
.step-accordion[open] summary::after {
  content: "-";
}

.accordion-card summary span,
.step-accordion summary strong {
  font-size: 17px;
  font-weight: 850;
}

.accordion-card summary small {
  margin-left: auto;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.accordion-card p,
.step-accordion p {
  margin: -4px 20px 16px;
  color: var(--muted);
  line-height: 1.55;
}

.accordion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 20px 16px;
}

.accordion-card .button,
.step-accordion .button {
  margin: 0 20px 20px;
}

.accordion-list {
  display: grid;
  gap: 12px;
  width: min(100%, 860px);
  margin: 0 auto;
}

.accordion-list.compact {
  width: min(100%, 780px);
}

.step-accordion summary {
  justify-content: flex-start;
}

.step-accordion summary > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.step-accordion summary::after {
  margin-left: auto;
}

.trust-accordion summary {
  min-height: 64px;
}

.feature-detail-card {
  display: grid;
  min-height: 230px;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.feature-detail-card strong {
  font-size: 17px;
}

.feature-detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feature-detail-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

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

.trust-item {
  display: grid;
  min-height: 180px;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.trust-item strong {
  font-size: 16px;
}

.trust-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.flow-step {
  display: grid;
  min-height: 144px;
  align-content: start;
  gap: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.flow-step span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.flow-step small {
  color: var(--muted);
  line-height: 1.4;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 26px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
}

.before-after {
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

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

.compare-card {
  border: 1px solid var(--soft-line);
  border-radius: 22px;
  padding: 24px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.compare-card.before {
  border-color: #f4c7c3;
  background: #fffafa;
}

.compare-card.after {
  border-color: #bfe7cc;
  background: #fbfffc;
}

.compare-card h3 {
  margin-bottom: 12px;
}

.compare-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.cta-box {
  display: grid;
  align-content: start;
  gap: 12px;
}

.cta-box strong {
  color: var(--ink);
  font-size: 18px;
}

.cta-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.role-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.workspace-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.date-cockpit {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  margin: 18px 0;
  border: 1px solid rgba(213, 219, 229, 0.86);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(232, 241, 255, 0.88), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.055);
}

.date-cockpit-lead h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.date-cockpit-lead p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.date-cockpit-grid div {
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid rgba(213, 219, 229, 0.86);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.date-cockpit-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.date-cockpit-grid strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.date-cockpit-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.dol-tracker {
  margin: 18px 0;
  border: 1px solid rgba(213, 219, 229, 0.86);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.9)),
    #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.052);
}

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

.dol-grid div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 112px;
  border: 1px solid rgba(213, 219, 229, 0.86);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.dol-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.dol-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.dol-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.dol-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dol-footnote a {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.dol-editor {
  margin: 14px 0 0;
}

.dol-editor form {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.workspace-action {
  display: grid;
  min-height: 124px;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.workspace-action:hover {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.workspace-action span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.workspace-action small {
  color: var(--muted);
  line-height: 1.4;
}

.case-focusbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.case-focusbar .eyebrow {
  margin-bottom: 8px;
}

.case-focus-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.case-focus-meta > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.role-focus h2 {
  margin: 10px 0 4px;
  font-size: 20px;
}

.role-focus p {
  margin: 0;
  color: var(--muted);
}

.audit-list {
  display: grid;
  gap: 12px;
}

.audit-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}

.audit-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--blue);
}

.audit-item strong {
  display: block;
  margin-bottom: 3px;
}

.audit-item p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.audit-item small {
  color: var(--subtle);
}

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

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 10px;
}

.detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-list span {
  color: var(--muted);
}

.boundary-grid {
  display: grid;
  gap: 10px;
}

.boundary-grid div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.boundary-grid span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.danger {
  border-color: var(--red);
  color: var(--red);
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proof-extraction-note {
  display: block;
  margin-top: 8px;
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.proof-review-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.proof-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.proof-review-head strong {
  color: var(--ink);
  font-size: 13px;
}

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

.proof-review-grid span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}

.proof-review-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.proof-review-meta,
.proof-review-warning {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.proof-review-warning {
  color: var(--red);
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.file-meta {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.evidence-row td {
  transition: background 180ms ease, border-color 180ms ease;
}

.evidence-row td:first-child {
  border-left: 4px solid transparent;
}

.evidence-row.is-missing td {
  background: rgba(191, 29, 29, 0.035);
}

.evidence-row.is-missing td:first-child {
  border-left-color: var(--red);
}

.evidence-row.is-uploaded td {
  background: rgba(10, 102, 194, 0.035);
}

.evidence-row.is-uploaded td:first-child {
  border-left-color: var(--blue);
}

.evidence-row.is-verified td {
  background: rgba(24, 128, 78, 0.05);
}

.evidence-row.is-verified td:first-child {
  border-left-color: var(--green);
}

.evidence-status-cell .pill.green {
  box-shadow: inset 0 0 0 1px rgba(24, 128, 78, 0.22);
}

.evidence-action-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-list,
.workflow-list {
  display: grid;
  gap: 12px;
}

.template-form {
  margin-top: 12px;
  margin-bottom: 0;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.template-card,
.workflow-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.88);
}

.template-card strong,
.workflow-item strong {
  display: block;
  margin-bottom: 5px;
}

.template-card p,
.workflow-item p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.template-card small,
.workflow-item small {
  color: var(--subtle);
}

.template-actions,
.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 150px;
}

.admin-form {
  display: grid;
}

.admin-action-panel .inline-drawer {
  margin-top: 0;
}

.admin-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-role-grid div {
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.admin-role-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 13px;
}

.admin-role-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tenant-provisioning-panel {
  border-color: rgba(17, 24, 39, 0.12);
}

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

.tenant-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tenant-card:hover,
.tenant-card.active {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.tenant-card small,
.tenant-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tenant-meta {
  grid-column: 1 / -1;
}

.tenant-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 800;
  overflow: hidden;
}

.tenant-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tenant-detail {
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.tenant-detail h3 {
  margin: 0;
  font-size: 16px;
}

.onboarding-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.onboarding-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.onboarding-item.done {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.72);
}

.onboarding-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(201, 216, 255, 0.9);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 244, 255, 0.92) 100%);
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.09);
}

.dashboard-hero h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-hero p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-score {
  display: grid;
  min-height: 150px;
  align-content: center;
  justify-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  text-align: center;
}

.dashboard-score span {
  color: var(--blue);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-score strong {
  margin-top: 8px;
}

.dashboard-score small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.focus-callout {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  border: 1px solid #cde7d6;
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--green-soft);
  color: #14532d;
  line-height: 1.45;
}

.focus-callout strong {
  white-space: nowrap;
}

.inline-drawer {
  margin-bottom: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.inline-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.inline-drawer summary::-webkit-details-marker {
  display: none;
}

.inline-drawer summary::after {
  content: "+";
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.inline-drawer[open] summary::after {
  content: "-";
}

.compact-tools {
  margin-top: -4px;
}

.compact-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 16px;
}

.panel {
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.panel.pad {
  padding: 20px;
}

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

.panel-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.stat {
  padding: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 850;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
}

.pill.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.yellow {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.pill.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

td {
  color: var(--muted);
}

td strong {
  color: var(--ink);
}

.table-note {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

tr:last-child td {
  border-bottom: 0;
}

tr.selected-row td {
  background: rgba(10, 102, 194, 0.045);
}

.case-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.case-tracker-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

.case-tracker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.case-tracker-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.case-tracker-header p:last-child {
  margin: 0;
  color: var(--muted);
}

.case-tracker-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.case-tracker-status strong {
  color: var(--ink);
  font-size: 13px;
}

.tracker-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(136px, 1fr));
  align-items: start;
  gap: 10px;
  overflow: visible;
  padding: 2px 0 0;
}

.tracker-arrow-step {
  position: relative;
  min-width: 0;
  margin-right: 0;
}

.tracker-arrow-step[open] {
  grid-column: 1 / -1;
}

.tracker-arrow-step summary {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 4px;
  padding: 16px 22px 16px 24px;
  background: #f8fafc;
  border: 1px solid var(--soft-line);
  border-right: 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 18px 50%);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tracker-arrow-step:first-child summary {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  border-radius: 10px 0 0 10px;
}

.tracker-arrow-step:last-child summary {
  border-radius: 0 10px 10px 0;
}

.tracker-arrow-step[open] summary,
.tracker-arrow-step summary:hover {
  background: #eaf3ff;
  box-shadow: 0 12px 30px rgba(10, 102, 194, 0.12);
  transform: translateY(-1px);
}

.tracker-arrow-step summary::-webkit-details-marker {
  display: none;
}

.tracker-arrow-step summary > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.tracker-arrow-step summary strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.tracker-arrow-step summary small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.tracker-arrow-body {
  position: static;
  display: grid;
  width: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(217, 225, 236, 0.92);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.tracker-arrow-body div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.tracker-arrow-body span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.tracker-arrow-body strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.tracker-arrow-body p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tracker-case-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.tracker-case-list article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.tracker-case-list article strong {
  color: var(--ink);
}

.tracker-case-list article span {
  justify-self: end;
}

.tracker-case-list article small,
.tracker-case-list article em {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

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

  .tracker-arrow-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.deadline-list {
  display: grid;
  gap: 12px;
}

.draft-preview {
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: rgba(246, 248, 251, 0.76);
  padding: 10px 12px;
}

.draft-preview summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.draft-preview summary::-webkit-details-marker {
  display: none;
}

.draft-preview pre {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.document-template-form,
.document-editor-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.document-template-form label,
.document-editor-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.document-template-form textarea,
.document-editor-form textarea {
  width: 100%;
  min-height: 180px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.document-template-form textarea:focus,
.document-editor-form textarea:focus {
  border-color: rgba(68, 96, 173, 0.48);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(68, 96, 173, 0.12);
}

.template-editor textarea {
  min-height: 240px;
}

.document-editor-form .hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.required-documents-panel {
  overflow: hidden;
}

.required-document-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.evidence-completeness,
.selected-methods-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.74);
}

.evidence-completeness {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  align-items: center;
}

.evidence-completeness strong,
.selected-methods-form strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.evidence-completeness span,
.selected-methods-form span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-completeness progress {
  overflow: hidden;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}

.evidence-completeness progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--line);
}

.evidence-completeness progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--teal);
}

.document-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.method-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  padding: 7px 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.method-chip input {
  accent-color: var(--teal);
}

.method-chip span {
  color: var(--ink);
  font-weight: 650;
}

.required-document-group {
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #ffffff;
}

.required-document-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.required-document-group-rows {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--soft-line);
  padding: 8px;
}

.required-document-row {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(170px, auto) minmax(190px, auto) minmax(360px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-left: 3px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.required-document-row.is-missing {
  border-left-color: var(--orange);
}

.required-document-row.is-uploaded {
  border-left-color: var(--green);
}

.required-document-row.needs-replacement {
  border-left-color: var(--red);
}

.required-document-row.is-waived {
  border-left-color: var(--subtle);
  background: rgba(248, 250, 252, 0.78);
}

.required-document-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.required-document-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.required-document-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.required-document-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-self: start;
}

.required-document-source {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}

.required-document-source a {
  overflow: hidden;
  color: var(--teal-deep);
  font-weight: 750;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.required-document-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.required-document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.review-finding-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.review-finding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(246, 248, 251, 0.64);
}

.review-finding strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.review-finding p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-finding small {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 700;
}

.deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.deadline-item div:first-child {
  display: grid;
  gap: 5px;
}

.deadline-item strong,
.deadline-item p {
  margin: 0;
}

.deadline-item p {
  color: var(--muted);
  line-height: 1.4;
}

.pwd-status-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pwd-status-grid div,
.summary-grid div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}

.pwd-status-grid span,
.summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.pwd-status-grid strong,
.summary-grid strong {
  color: var(--ink);
  font-size: 16px;
}

.pwd-status-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.checkbox-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.checkbox-field input {
  width: auto;
  margin: 0;
}

.recruitment-matrix-panel table input,
.recruitment-matrix-panel table select {
  min-width: 150px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 150px 150px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.perm-roadmap-panel {
  margin-top: 18px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    #fff;
}

.perm-roadmap-header {
  align-items: flex-start;
}

.perm-roadmap-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 430px;
}

.perm-roadmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.perm-roadmap-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.perm-roadmap-legend .completed,
.perm-roadmap-bar.completed {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.perm-roadmap-legend .in-progress,
.perm-roadmap-bar.in-progress {
  background: linear-gradient(135deg, #2f80ed, #1d4ed8);
}

.perm-roadmap-legend .upcoming,
.perm-roadmap-bar.upcoming {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.perm-roadmap-legend .risk,
.perm-roadmap-bar.risk {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.perm-roadmap-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  margin-top: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.perm-roadmap-left {
  position: relative;
  z-index: 3;
  border-right: 1px solid var(--soft-line);
  background: #fbfcfe;
}

.perm-roadmap-left-head {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.perm-roadmap-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 10px;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.perm-roadmap-step:hover,
.perm-roadmap-step:focus-visible {
  background: #fff;
  box-shadow: inset 3px 0 0 #2f80ed;
  outline: none;
}

.perm-roadmap-step span {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #172033;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.perm-roadmap-step strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-roadmap-step small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.perm-roadmap-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px) 0 58px / calc(var(--roadmap-day-width, 6px) * 7) 100%,
    #fff;
}

.perm-roadmap-scroll:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.22);
  outline-offset: -3px;
}

.perm-roadmap-canvas {
  position: relative;
  min-width: 100%;
}

.perm-roadmap-months {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 58px;
  border-bottom: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.perm-roadmap-month {
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid var(--soft-line);
  padding: 0 12px;
}

.perm-roadmap-month span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.perm-roadmap-month small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.perm-roadmap-tracks {
  position: relative;
}

.perm-roadmap-track {
  position: relative;
  height: 72px;
  border-bottom: 1px solid var(--soft-line);
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.74) 1px, transparent 1px) 0 0 / calc(var(--roadmap-day-width, 6px) * 7) 100%;
}

.perm-roadmap-bar {
  position: absolute;
  top: 19px;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: calc(100% - 8px);
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.perm-roadmap-bar:hover,
.perm-roadmap-bar:focus-visible {
  filter: saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
  outline: none;
}

.perm-roadmap-bar > span:first-child {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-roadmap-tooltip {
  pointer-events: none;
  position: absolute;
  left: 14px;
  bottom: calc(100% + 10px);
  z-index: 8;
  display: grid;
  gap: 4px;
  width: min(330px, 78vw);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: #111827;
  color: #fff;
  opacity: 0;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.28);
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.perm-roadmap-bar:hover .perm-roadmap-tooltip,
.perm-roadmap-bar:focus-visible .perm-roadmap-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.perm-roadmap-tooltip strong,
.perm-roadmap-tooltip em,
.perm-roadmap-tooltip small {
  color: inherit;
  font-style: normal;
  line-height: 1.35;
}

.perm-roadmap-tooltip em,
.perm-roadmap-tooltip small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.perm-roadmap-today {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 2px;
  background: #f97316;
}

.perm-roadmap-today em {
  position: absolute;
  top: 8px;
  left: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.master-calendar-controls {
  margin-top: 18px;
}

.master-scope-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 4px;
  background: #f8fafc;
}

.master-scope-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.master-scope-toggle button.active,
.master-scope-toggle button:hover,
.master-scope-toggle button:focus-visible {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  outline: none;
}

.master-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.master-filter-grid label {
  margin: 0;
}

.master-filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.master-calendar-panel {
  margin-top: 18px;
}

.master-calendar-shell {
  grid-template-columns: 340px minmax(0, 1fr);
  max-height: 720px;
}

.master-calendar-left,
.master-calendar-scroll {
  max-height: 720px;
}

.master-calendar-left {
  overflow-y: auto;
}

.master-calendar-scroll {
  overflow: auto;
}

.master-calendar-case {
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 92px;
}

.master-calendar-case span {
  width: 38px;
  height: 38px;
  background: #101828;
}

.master-calendar-case small,
.master-calendar-case em {
  overflow: hidden;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-calendar-case em {
  grid-column: 2;
}

.master-calendar-track {
  height: 92px;
}

.master-calendar-bar {
  top: 30px;
  height: 34px;
}

.master-calendar-bar.is-estimated {
  border: 1px dashed rgba(255, 255, 255, 0.88);
}

.master-calendar-legend .ready,
.master-calendar-bar.ready {
  background: linear-gradient(135deg, #16a34a, #047857);
}

.master-calendar-legend .open,
.master-calendar-bar.open {
  background: linear-gradient(135deg, #2f80ed, #1d4ed8);
}

.master-calendar-legend .approaching,
.master-calendar-bar.approaching {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.master-calendar-legend .filed,
.master-calendar-bar.filed {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.master-calendar-legend .delayed,
.master-calendar-bar.delayed,
.master-calendar-legend .issue,
.master-calendar-bar.issue {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.master-calendar-marker {
  position: absolute;
  top: 12px;
  z-index: 3;
  display: grid;
  justify-items: center;
  width: 1px;
  color: var(--muted);
}

.master-calendar-marker i {
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #475467;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.master-calendar-marker small {
  max-width: 76px;
  margin-top: 3px;
  overflow: hidden;
  color: #667085;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-calendar-empty {
  margin-top: 18px;
}

.perm-step-target-highlight {
  animation: permStepTargetPulse 1800ms ease;
  scroll-margin-top: 24px;
}

@keyframes permStepTargetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 128, 237, 0);
    outline: 0 solid rgba(47, 128, 237, 0);
  }

  18% {
    box-shadow: 0 22px 56px rgba(47, 128, 237, 0.15);
    outline: 3px solid rgba(47, 128, 237, 0.24);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(47, 128, 237, 0);
    outline: 0 solid rgba(47, 128, 237, 0);
  }
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.firm-agenda {
  grid-column: 1 / -1;
}

.calendar-month {
  display: grid;
  gap: 14px;
}

.calendar-month-header,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-month-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.calendar-month-header h3 {
  margin: 0;
  font-size: 18px;
}

.calendar-month-header span,
.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.calendar-weekdays span {
  text-align: center;
}

.calendar-day {
  min-height: 104px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.78);
}

.calendar-day.is-empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day.is-today {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calendar-day.has-events {
  background: #fff;
}

.calendar-day strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
}

.calendar-day-events span,
.calendar-day-events small {
  overflow: hidden;
  border-radius: 6px;
  padding: 5px 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-list {
  display: grid;
  gap: 10px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.agenda-list.compact .agenda-item {
  grid-template-columns: 112px minmax(0, 1fr) auto;
}

.agenda-date {
  display: grid;
  gap: 4px;
}

.agenda-date strong {
  color: var(--ink);
  font-size: 14px;
}

.agenda-date span,
.agenda-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agenda-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.date-box {
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 850;
}

.item-title {
  color: var(--ink);
  font-weight: 800;
}

.item-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.readiness-list {
  display: grid;
  gap: 10px;
}

.readiness-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 90px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px 14px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 750;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 900px);
  max-height: min(92vh, 820px);
  overflow: auto;
  border: 1px solid rgba(217, 225, 236, 0.88);
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.25);
}

.document-editor-modal {
  width: min(100%, 1080px);
  max-height: min(94vh, 900px);
  display: grid;
  gap: 16px;
}

.document-editor-header {
  margin-bottom: 0;
}

.document-window-form {
  display: grid;
  gap: 14px;
}

.evidence-viewer-backdrop {
  z-index: 26;
}

.evidence-viewer-modal {
  width: min(1120px, calc(100vw - 36px));
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 20px;
}

.evidence-viewer-header {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0;
}

.evidence-viewer-title {
  min-width: 0;
}

.evidence-viewer-title h2,
.evidence-viewer-title .subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.evidence-preview-shell {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  overflow: hidden;
}

.evidence-preview-frame {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 560px;
  border: 0;
  background: #ffffff;
}

.evidence-preview-image {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: #ffffff;
}

.evidence-preview-loading,
.evidence-preview-fallback {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.evidence-preview-fallback h3 {
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.evidence-preview-fallback p {
  max-width: 560px;
  margin: 0;
}

.same-page-document-viewer {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.same-page-document-viewer .evidence-preview-shell {
  min-height: 420px;
}

.same-page-document-viewer .evidence-preview-frame {
  height: min(58vh, 620px);
  min-height: 420px;
}

.same-page-document-viewer .evidence-preview-image {
  max-height: min(58vh, 620px);
}

.document-page-viewer {
  grid-column: 1 / -1;
}

.upload-progress-inline {
  display: grid;
  min-width: 150px;
  gap: 4px;
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.upload-progress-inline progress {
  overflow: hidden;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}

.upload-progress-inline progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--line);
}

.upload-progress-inline progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--teal);
}

.document-window-form textarea {
  min-height: min(58vh, 560px);
  border-radius: 18px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
}

.document-editor-help {
  display: grid;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(246, 248, 251, 0.78);
}

.document-editor-help strong {
  color: var(--ink);
  font-size: 12px;
}

.document-editor-help span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

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

.modal-header h2 {
  margin-bottom: 6px;
  font-size: 30px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.case-intake-form {
  display: grid;
  gap: 14px;
}

.form-section {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
}

.form-section > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.form-section h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

.form-section-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .page-loading {
    inset: 0;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .grid.two,
  .grid.three,
  .grid.four,
  .workspace-actions,
  .date-cockpit,
  .date-cockpit-grid,
  .dol-grid,
  .case-tracker-header,
  .tracker-arrow-body,
  .calendar-layout,
  .calendar-month-header,
  .admin-role-grid,
  .case-focusbar,
  .home-hero,
  .hero-metrics,
  .offer-grid,
  .feature-detail-grid,
  .accordion-grid,
  .trust-grid,
  .flow-strip,
  .split-band,
  .public-footer,
  .compare-grid,
  .required-document-row,
  .pwd-status-grid,
  .summary-grid,
  .case-summary-grid,
  .workspace-grid,
  .dashboard-hero,
  .field-grid,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .dol-footnote {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-tracker-status {
    justify-content: flex-start;
  }

  .perm-roadmap-header {
    gap: 14px;
  }

  .perm-roadmap-legend {
    justify-content: flex-start;
    max-width: none;
  }

  .perm-roadmap-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .tracker-strip {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .tracker-arrow-step,
  .tracker-arrow-step[open] {
    grid-column: auto;
    min-width: 0;
  }

  .tracker-arrow-body {
    position: static;
    width: auto;
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .tracker-case-list article {
    grid-template-columns: 1fr;
  }

  .tracker-case-list article span,
  .tracker-case-list article small,
  .tracker-case-list article em {
    grid-column: auto;
    justify-self: start;
  }

  .deadline-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
  }

  .account-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-header,
  .public-actions,
  .legal-disclaimer {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-sections {
    grid-template-columns: 1fr;
  }

  .legal-hero h1 {
    font-size: 34px;
  }

  .role-focus {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  .case-focus-meta {
    justify-content: flex-start;
  }

  .timeline-item,
  .readiness-row,
  .agenda-item {
    grid-template-columns: 1fr;
  }

  .calendar-month-header {
    align-items: start;
  }

  .agenda-tags {
    justify-content: flex-start;
  }

  .home-copy h1 {
    font-size: 42px;
  }

  .home-subtitle {
    font-size: 17px;
  }

  .home-hero {
    min-height: auto;
    padding-top: 32px;
  }

  .home-section {
    padding: 40px 0;
  }

  .section-heading h2,
  .split-band h2 {
    font-size: 30px;
  }

  .boundary-grid div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .public-page {
    padding: 16px;
  }

  .public-header {
    top: 8px;
    border-radius: 16px;
  }

  .home-copy h1 {
    font-size: 34px;
  }

  .hero-actions,
  .public-actions,
  .actions {
    width: 100%;
  }

  .button,
  .hero-actions .button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    border-radius: 18px;
    padding: 18px;
  }

  .modal-header,
  .modal-actions {
    flex-direction: column;
  }

  .icon-button {
    position: absolute;
    top: 22px;
    right: 22px;
  }

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

  .calendar-grid,
  .calendar-weekdays {
    gap: 4px;
  }

  .calendar-day {
    min-height: 70px;
    padding: 6px;
  }

  .calendar-day-events span,
  .calendar-day-events small {
    padding: 4px;
    font-size: 10px;
  }

  .mini-readiness,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .product-frame,
  .split-band {
    border-radius: 20px;
  }

  .readiness-ring {
    width: 156px;
    height: 156px;
  }
}

/* Premium UI pass: calmer hierarchy, sharper cards, and clearer focus states. */
:root {
  --bg: #f7f8f6;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #d5dbe5;
  --soft-line: #e8edf3;
  --nav: #0f172a;
  --nav-soft: rgba(255, 255, 255, 0.1);
  --blue: #0a66c2;
  --blue-soft: #e8f1ff;
  --green: #067647;
  --green-soft: #e8f6ee;
  --yellow: #a15c07;
  --yellow-soft: #fff4dc;
  --red: #b42318;
  --red-soft: #fff0ee;
  --purple: #6f42c1;
  --purple-soft: #f1eafa;
  --orange: #b65f0a;
  --orange-soft: #fff0df;
  --shadow: 0 18px 54px rgba(17, 24, 39, 0.08);
}

body {
  background:
    linear-gradient(180deg, #fbfcfb 0%, var(--bg) 44%, #f2f5f8 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a,
summary,
select,
input,
textarea {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(10, 102, 194, 0.22);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(10, 102, 194, 0.08), transparent 38%),
    linear-gradient(180deg, #fafafa, #f4f7fa);
}

.sidebar {
  padding: 22px 16px;
  background:
    linear-gradient(180deg, #111827 0%, #0f172a 58%, #101828 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  gap: 11px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, #ffffff 0%, #d7e8ff 100%);
  color: #0a4f9a;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.sidebar .brand-mark {
  background:
    linear-gradient(145deg, #ffffff 0%, #cbe2ff 100%);
}

.brand-name {
  letter-spacing: 0;
}

.nav-list {
  gap: 5px;
}

.nav-button {
  height: 40px;
  border-radius: 8px;
  padding: 0 10px;
  color: #d0d8e6;
}

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

.nav-button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 #8ec5ff;
}

.nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 10px;
}

.role-switcher,
.sync-card,
.auth-card,
.boundary-card {
  border-radius: 8px;
}

.main {
  padding: 24px 28px 48px;
}

.account-bar,
.topbar,
.role-focus,
.case-focusbar,
.workspace-action,
.dashboard-hero,
.panel,
.offer-card,
.accordion-card,
.step-accordion,
.compare-card,
.product-frame,
.legal-hero,
.legal-card,
.flow-step,
.trust-item,
.modal-card {
  border-radius: 8px;
}

.account-bar,
.topbar,
.role-focus,
.case-focusbar,
.panel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(213, 219, 229, 0.86);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.055);
  backdrop-filter: blur(16px);
}

.topbar {
  align-items: center;
  padding: 18px 20px;
}

h1 {
  font-size: 30px;
  line-height: 1.12;
}

.subtitle {
  max-width: 760px;
}

.button {
  border-color: rgba(213, 219, 229, 0.98);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.button:hover {
  border-color: rgba(10, 102, 194, 0.32);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.button.primary {
  background: linear-gradient(180deg, #1677d2, #0a66c2);
  box-shadow: 0 12px 28px rgba(10, 102, 194, 0.24);
}

.button.primary:hover {
  border-color: #075aa9;
  box-shadow: 0 16px 34px rgba(10, 102, 194, 0.28);
}

.public-page {
  padding: 24px;
}

.marketing-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 246, 0.96)),
    radial-gradient(circle at 80% 8%, rgba(10, 102, 194, 0.12), transparent 34%),
    radial-gradient(circle at 12% 40%, rgba(6, 118, 71, 0.08), transparent 28%);
}

.public-page-inner {
  width: min(100%, 1180px);
}

.public-header {
  top: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.76);
}

.public-actions {
  gap: 8px;
}

.nav-pill,
.trust-links button {
  min-height: 34px;
  border: 1px solid rgba(213, 219, 229, 0.88);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.nav-pill:hover,
.trust-links button:hover {
  border-color: rgba(10, 102, 194, 0.35);
  color: var(--blue);
  background: #fff;
}

.home-hero {
  grid-template-columns: minmax(0, 0.98fr) minmax(390px, 0.82fr);
  min-height: calc(100vh - 100px);
  gap: 44px;
  padding: 76px 0 68px;
  text-align: left;
}

.home-copy {
  justify-items: start;
}

.hero-kicker-row,
.hero-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.home-copy h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 64px;
  line-height: 0.98;
}

.home-subtitle {
  max-width: 710px;
  font-size: 19px;
}

.hero-proof-strip {
  margin-top: 18px;
  margin-bottom: 0;
}

.hero-proof-strip span {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.hero-proof-strip span:first-child {
  border-left: 0;
  padding-left: 0;
}

.hero-metrics {
  justify-content: start;
  width: min(100%, 600px);
  margin-top: 26px;
}

.hero-metrics div,
.mini-readiness div,
.preview-lanes div,
.admin-role-grid div,
.boundary-grid div,
.dashboard-score,
.stat,
.timeline-item,
.agenda-item,
.readiness-row,
.template-card,
.workflow-item,
.form-section,
.empty,
.date-box {
  border-radius: 8px;
}

.hero-metrics div {
  background: rgba(255, 255, 255, 0.78);
}

.home-preview {
  align-self: center;
  width: min(100%, 470px);
}

.product-frame {
  position: relative;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 252, 0.96));
  box-shadow: 0 28px 72px rgba(17, 24, 39, 0.16);
}

.product-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 102, 194, 0.24), rgba(6, 118, 71, 0.13), rgba(111, 66, 193, 0.18));
}

.readiness-ring {
  width: 174px;
  height: 174px;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(var(--green) 0 81%, #e7ecf3 81% 100%);
}

.preview-review-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 1px solid rgba(10, 102, 194, 0.14);
  border-radius: 8px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #f7fbff, #ffffff);
}

.preview-review-note span {
  color: var(--muted);
  font-size: 13px;
}

.home-section {
  padding: 62px 0;
}

.section-heading h2,
.split-band h2 {
  font-size: 40px;
}

.offer-grid,
.accordion-grid,
.flow-strip {
  gap: 14px;
}

.offer-card,
.accordion-card,
.step-accordion,
.compare-card,
.split-band {
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.offer-card {
  min-height: 210px;
  background:
    linear-gradient(180deg, #fff, #fbfcfe);
}

.offer-card:hover,
.workspace-action:hover,
.flow-step:hover {
  transform: translateY(-2px);
}

.accordion-card summary::after,
.step-accordion summary::after,
.inline-drawer summary::after {
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #edf4ff;
}

.split-band {
  border-radius: 8px;
}

.workspace-actions {
  gap: 12px;
}

.workspace-action {
  min-height: 112px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
}

.workspace-action span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 11px;
}

.dashboard-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 255, 0.84)),
    linear-gradient(90deg, rgba(6, 118, 71, 0.08), transparent);
}

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

.stat-value {
  font-size: 27px;
}

th {
  background: #f7f9fb;
}

tr:hover td {
  background: rgba(248, 250, 252, 0.82);
}

td:first-child,
th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

td:last-child,
th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

input,
select,
textarea {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.focus-callout {
  border-color: rgba(6, 118, 71, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #edf9f2, #ffffff);
}

.calendar-day {
  border-radius: 8px;
}

.calendar-day-events span,
.calendar-day-events small {
  border-radius: 6px;
}

.modal-backdrop {
  background: rgba(17, 24, 39, 0.44);
}

.modal-card {
  background: rgba(255, 255, 255, 0.98);
}

.icon-button {
  border-radius: 8px;
}

.toast {
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .home-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-copy {
    justify-items: center;
  }

  .hero-proof-strip {
    justify-content: center;
  }
}

@media (max-width: 980px) {
  .main {
    padding: 20px 18px 42px;
  }

  .sidebar {
    padding: 18px;
  }

  .evidence-viewer-modal {
    width: calc(100vw - 20px);
    max-height: 92vh;
    padding: 14px;
  }

  .evidence-viewer-header {
    display: grid;
  }

  .evidence-viewer-actions {
    justify-content: flex-start;
  }

  .evidence-preview-shell,
  .evidence-preview-frame {
    min-height: 440px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tenant-card-grid {
    grid-template-columns: 1fr;
  }

  .home-copy h1 {
    font-size: 46px;
  }
}

@media (max-width: 560px) {
  .public-page,
  .main {
    padding: 14px;
  }

  .public-header {
    top: 8px;
  }

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

  .home-copy h1 {
    font-size: 36px;
  }

  .perm-roadmap-panel {
    padding: 14px;
  }

  .perm-roadmap-shell {
    grid-template-columns: 190px minmax(0, 1fr);
    border-radius: 16px;
  }

  .perm-roadmap-step {
    min-height: 76px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 10px;
  }

  .perm-roadmap-step span {
    width: 24px;
    height: 24px;
  }

  .perm-roadmap-step strong {
    white-space: normal;
  }

  .hero-proof-strip span {
    width: 100%;
    border-left: 0;
    padding-left: 0;
    text-align: center;
  }

  .home-preview {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .master-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .master-filter-actions {
    justify-content: flex-start;
  }

  .master-calendar-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .master-scope-toggle,
  .master-filter-actions {
    width: 100%;
  }

  .master-scope-toggle button,
  .master-filter-actions .button {
    width: 100%;
  }

  .master-filter-grid {
    grid-template-columns: 1fr;
  }

  .master-calendar-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .master-calendar-case {
    min-height: 104px;
  }

  .master-calendar-case strong,
  .master-calendar-case small,
  .master-calendar-case em {
    white-space: normal;
  }

  .master-calendar-track {
    height: 104px;
  }
}

/* Premium Jira-inspired PERMFlowAI UI refresh */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --soft-line: #edf2f7;
  --nav: #0f172a;
  --nav-soft: #115e59;
  --blue: #0f766e;
  --blue-soft: #ccfbf1;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --yellow: #f59e0b;
  --yellow-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --purple: #115e59;
  --purple-soft: #ccfbf1;
  --orange: #f97316;
  --orange-soft: #ffedd5;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 20px 46px rgba(15, 23, 42, 0.11);
  --radius: 12px;
  --radius-lg: 16px;
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--ink);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.98)),
    var(--bg);
}

.sidebar {
  background:
    linear-gradient(180deg, #0f172a 0%, #10211f 46%, #115e59 100%);
  border-right: 1px solid rgba(204, 251, 241, 0.16);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08);
}

.brand {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(204, 251, 241, 0.15);
  padding-bottom: 18px;
}

.brand-mark,
.sidebar .brand-mark {
  border: 1px solid rgba(204, 251, 241, 0.42);
  background: linear-gradient(145deg, #ccfbf1, #ffffff);
  color: #115e59;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.brand-name {
  color: #f8fafc;
}

.nav-list {
  gap: 7px;
}

.nav-button {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #cbd5e1;
  font-weight: 760;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button:hover {
  border-color: rgba(204, 251, 241, 0.18);
  background: rgba(204, 251, 241, 0.08);
  color: #ffffff;
  transform: translateX(1px);
}

.nav-button.active {
  border-color: rgba(204, 251, 241, 0.32);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(17, 94, 89, 0.9));
  color: #ffffff;
  box-shadow: inset 3px 0 0 #f97316, 0 14px 28px rgba(15, 23, 42, 0.18);
}

.nav-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #ccfbf1;
}

.sync-card,
.auth-card,
.boundary-card {
  border-color: rgba(204, 251, 241, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.32);
}

.sidebar-action {
  border-color: rgba(204, 251, 241, 0.28);
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.82);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-action:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: #0f766e;
  transform: translateY(-1px);
}

.main {
  padding: 26px 32px 52px;
}

.account-bar,
.topbar,
.panel,
.case-tracker-panel,
.case-focusbar,
.role-focus,
.workspace-action,
.date-cockpit,
.dol-tracker,
.modal-card,
.login-panel,
.legal-hero,
.legal-card,
.product-frame,
.compare-card,
.offer-card,
.accordion-card,
.step-accordion,
.template-card,
.workflow-item,
.tenant-detail,
.proof-review-card,
.inline-drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 22px 24px;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #0f766e, #f97316);
}

.eyebrow {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
}

h1 {
  color: var(--ink);
  font-weight: 860;
}

.subtitle {
  color: var(--muted);
}

.button {
  min-height: 40px;
  border-color: var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 820;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(15, 118, 110, 0.38);
  background: #f8fafc;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.button.primary {
  border-color: #0f766e;
  background: linear-gradient(180deg, #0f766e, #115e59);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
}

.button.primary:hover,
.button.primary:focus-visible {
  border-color: #115e59;
  background: linear-gradient(180deg, #12847b, #115e59);
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.3);
}

.button.small {
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

.button.danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
}

.button.danger:hover {
  background: #fef2f2;
}

.panel {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.panel.pad {
  padding: 22px;
}

.panel-header {
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-title {
  color: var(--ink);
  font-weight: 860;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 18px;
}

.stat::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.stat-value {
  position: relative;
  z-index: 1;
  align-items: baseline;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

.pill {
  border: 1px solid transparent;
  min-height: 27px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.pill.blue,
.pill.purple {
  border-color: rgba(15, 118, 110, 0.22);
  background: #ccfbf1;
  color: #115e59;
}

.pill.green {
  border-color: rgba(22, 163, 74, 0.2);
  background: #dcfce7;
  color: #166534;
}

.pill.yellow {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fef3c7;
  color: #92400e;
}

.pill.orange {
  border-color: rgba(249, 115, 22, 0.24);
  background: #ffedd5;
  color: #c2410c;
}

.pill.red {
  border-color: rgba(220, 38, 38, 0.2);
  background: #fee2e2;
  color: #991b1b;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom-color: var(--line);
  padding: 15px 16px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

tbody tr {
  transition: background 150ms ease, box-shadow 150ms ease;
}

tbody tr:hover td {
  background: #f8fafc;
}

tr.selected-row td {
  background: #f0fdfa;
}

.case-link {
  color: #0f766e;
  font-weight: 900;
}

.case-link:hover,
.case-link:focus-visible {
  color: #115e59;
  text-decoration: underline;
  outline: none;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

label {
  color: #475569;
  font-weight: 850;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #99f6e4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.form-section {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: #f8fafc;
}

.form-section > span,
.step-accordion summary > span,
.flow-step span,
.workspace-action span {
  background: #ccfbf1;
  color: #115e59;
}

.checkbox-field {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.checkbox-field:focus-within {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.empty {
  border-color: #cbd5e1;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.94));
  color: var(--muted);
}

.page-loading {
  background: rgba(248, 250, 252, 0.76);
}

.loading-spinner {
  border-color: #ccfbf1;
  border-top-color: #0f766e;
}

.page-loading-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.modal-card {
  border-radius: 18px;
}

.icon-button {
  border-radius: var(--radius);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fef2f2;
  color: #dc2626;
  outline: none;
  transform: translateY(-1px);
}

.focus-callout {
  border-color: rgba(15, 118, 110, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
  color: #115e59;
}

.case-tracker-panel {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.case-tracker-header h2 {
  color: var(--ink);
}

.tracker-arrow-step summary {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.tracker-arrow-step summary > span {
  color: #f97316;
}

.tracker-arrow-step[open] summary,
.tracker-arrow-step summary:hover,
.tracker-arrow-step summary:focus-visible {
  background: #f0fdfa;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
  outline: none;
}

.tracker-arrow-body,
.tracker-case-list article,
.deadline-item,
.detail-list div,
.pwd-status-grid div,
.summary-grid div,
.review-finding,
.date-cockpit-grid div,
.dol-grid div,
.admin-role-grid div,
.tenant-card,
.onboarding-item,
.agenda-item,
.calendar-day {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.deadline-item:hover,
.tracker-case-list article:hover,
.agenda-item:hover,
.template-card:hover,
.workflow-item:hover,
.tenant-card:hover {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.date-cockpit,
.dol-tracker {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
}

.workspace-action,
.template-card,
.workflow-item {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.workspace-action:hover {
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.readiness-row {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.readiness-row:hover {
  background: #f8fafc;
}

.calendar-day.is-today {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.13);
}

.calendar-day-events span,
.calendar-day-events small {
  background: #ccfbf1;
  color: #115e59;
}

.inline-drawer summary::after,
.accordion-card summary::after,
.step-accordion summary::after {
  background: #ccfbf1;
  color: #115e59;
}

.perm-roadmap-panel,
.master-calendar-panel {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.perm-roadmap-shell,
.master-calendar-shell {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.perm-roadmap-left,
.master-calendar-left {
  background: #f8fafc;
}

.perm-roadmap-step:hover,
.perm-roadmap-step:focus-visible {
  background: #ffffff;
  box-shadow: inset 3px 0 0 #0f766e;
}

.perm-roadmap-step span,
.master-calendar-case span {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #ffffff;
}

.perm-roadmap-legend span {
  border-color: var(--line);
  color: #475569;
}

.perm-roadmap-legend .completed,
.perm-roadmap-bar.completed,
.master-calendar-legend .ready,
.master-calendar-bar.ready {
  background: linear-gradient(135deg, #16a34a, #0f766e);
}

.perm-roadmap-legend .in-progress,
.perm-roadmap-bar.in-progress,
.master-calendar-legend .open,
.master-calendar-bar.open {
  background: linear-gradient(135deg, #0f766e, #115e59);
}

.perm-roadmap-legend .risk,
.perm-roadmap-bar.risk,
.master-calendar-legend .approaching,
.master-calendar-bar.approaching {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.master-calendar-legend .upcoming,
.master-calendar-bar.upcoming {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.master-calendar-legend .filed,
.master-calendar-bar.filed {
  background: linear-gradient(135deg, #115e59, #0f172a);
}

.master-calendar-legend .delayed,
.master-calendar-bar.delayed,
.master-calendar-legend .issue,
.master-calendar-bar.issue {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.perm-roadmap-today {
  background: #f97316;
}

.perm-roadmap-today em {
  background: #ffedd5;
  color: #c2410c;
}

.master-scope-toggle {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.master-scope-toggle button {
  border-radius: 10px;
}

.master-scope-toggle button.active,
.master-scope-toggle button:hover,
.master-scope-toggle button:focus-visible {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
}

.master-calendar-marker i {
  background: #f97316;
}

.home-hero,
.marketing-page {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(241, 245, 249, 0.98));
}

.home-copy h1 {
  color: #0f172a;
}

.hero-kicker-row .pill,
.hero-proof-strip span {
  color: #115e59;
}

.readiness-ring {
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(#0f766e 0 81%, #e2e8f0 81% 100%);
}

.offer-card:hover,
.accordion-card:hover,
.step-accordion:hover,
.flow-step:hover {
  border-color: rgba(15, 118, 110, 0.22);
}

.compare-card.before {
  border-color: rgba(249, 115, 22, 0.24);
  background: #fff7ed;
}

.compare-card.after {
  border-color: rgba(15, 118, 110, 0.22);
  background: #f0fdfa;
}

.toast {
  border-color: rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

@media (max-width: 980px) {
  .main {
    padding: 20px 18px 44px;
  }

  .sidebar {
    box-shadow: none;
  }

  .nav-button.active {
    box-shadow: inset 0 -3px 0 #f97316;
  }
}

@media (max-width: 560px) {
  .topbar,
  .panel.pad,
  .case-tracker-panel,
  .modal-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* Minimal law-firm workflow refinement */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --soft-line: #eef2f7;
  --blue: #0f766e;
  --blue-soft: #f0fdfa;
  --green-soft: #f0fdf4;
  --yellow-soft: #fff7ed;
  --red-soft: #fef2f2;
  --purple: #0f766e;
  --purple-soft: #f0fdfa;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 6px 16px rgba(15, 23, 42, 0.07);
  --radius: 10px;
  --radius-lg: 12px;
}

body {
  background: #f8fafc;
  font-size: 14px;
}

.app-shell {
  background: #f8fafc;
}

.main {
  padding: 24px 30px 48px;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

.brand {
  border-bottom-color: var(--line);
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.brand-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
}

.brand-mark,
.sidebar .brand-mark {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #0f766e;
  box-shadow: none;
}

.nav-button {
  min-height: 40px;
  color: #475569;
  font-size: 14px;
  font-weight: 690;
  transform: none;
}

.nav-button:hover {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--ink);
  transform: none;
}

.nav-button.active {
  border-color: rgba(15, 118, 110, 0.18);
  background: #f0fdfa;
  color: #0f766e;
  box-shadow: inset 3px 0 0 #0f766e;
}

.nav-icon {
  background: #f1f5f9;
  color: #64748b;
}

.nav-button.active .nav-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.sync-card,
.auth-card,
.boundary-card {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--ink);
  box-shadow: none;
}

.sync-card strong,
.auth-card strong,
.boundary-card strong {
  color: var(--ink);
}

.sync-card p,
.auth-card p,
.boundary-card p,
.role-switcher label {
  color: var(--muted);
}

.sidebar-action {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
  box-shadow: none;
}

.sidebar-action:hover {
  background: #115e59;
  transform: none;
}

.account-bar,
.topbar,
.panel,
.case-focusbar,
.role-focus,
.workspace-action,
.date-cockpit,
.dol-tracker,
.modal-card,
.login-panel,
.legal-hero,
.legal-card,
.product-frame,
.compare-card,
.offer-card,
.accordion-card,
.step-accordion,
.template-card,
.workflow-item,
.tenant-detail,
.proof-review-card,
.inline-drawer {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.topbar {
  padding: 18px 20px;
}

.topbar::before {
  width: 3px;
  background: #0f766e;
}

h1 {
  font-size: 25px;
  font-weight: 720;
  line-height: 1.2;
}

h2,
.panel-title {
  font-weight: 700;
}

.eyebrow {
  color: #0f766e;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.subtitle,
.table-note,
.item-note,
.form-section-note {
  color: var(--muted);
}

.button {
  border-radius: 9px;
  font-weight: 680;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.button:hover,
.button:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: none;
  transform: none;
}

.button.primary {
  border-color: #0f766e;
  background: #0f766e;
  box-shadow: none;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #115e59;
  box-shadow: none;
  transform: none;
}

.button.small {
  min-height: 31px;
  padding: 5px 9px;
}

.panel {
  background: #ffffff;
}

.panel.pad {
  padding: 18px;
}

.panel-header {
  gap: 16px;
  margin-bottom: 14px;
}

.grid,
.workspace-grid,
.calendar-layout,
.case-summary-grid,
.workspace-actions,
.required-document-list,
.deadline-list,
.template-list,
.workflow-list {
  gap: 14px;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.dashboard-signal {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-signal span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.dashboard-signal strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.dashboard-signal small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.stat {
  min-height: 96px;
  padding: 14px;
}

.stat::after {
  display: none;
}

.stat-label {
  font-size: 11px;
  font-weight: 760;
}

.stat-value {
  gap: 8px;
  font-size: 24px;
}

.pill {
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.pill.blue,
.pill.purple {
  border-color: rgba(15, 118, 110, 0.18);
  background: #f0fdfa;
  color: #0f766e;
}

.pill.green {
  background: #f0fdf4;
  color: #15803d;
}

.pill.yellow,
.pill.orange {
  background: #fff7ed;
  color: #c2410c;
}

.pill.red {
  background: #fef2f2;
  color: #b91c1c;
}

.table-wrap {
  border-radius: var(--radius-lg);
  box-shadow: none;
}

th,
td {
  padding: 14px 16px;
}

th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 760;
}

tbody tr:hover td {
  background: #f8fafc;
}

tr.selected-row td {
  background: #f8fafc;
}

.case-link {
  color: #0f766e;
}

input,
select,
textarea,
.checkbox-field {
  border-radius: 9px;
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.checkbox-field:focus-within {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.form-section {
  background: #ffffff;
}

.form-section > span,
.step-accordion summary > span,
.flow-step span,
.workspace-action span {
  background: #f0fdfa;
  color: #0f766e;
}

.date-cockpit,
.dol-tracker,
.focus-callout {
  background: #ffffff;
}

.focus-callout {
  border-color: rgba(15, 118, 110, 0.18);
  color: #115e59;
}

.deadline-item,
.template-card,
.workflow-item,
.agenda-item,
.review-finding,
.readiness-row {
  box-shadow: none;
}

.deadline-item:hover,
.agenda-item:hover,
.template-card:hover,
.workflow-item:hover,
.tenant-card:hover,
.workspace-action:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
  transform: none;
}

.pwd-status-grid div,
.summary-grid div,
.date-cockpit-grid div,
.dol-grid div,
.admin-role-grid div {
  background: #ffffff;
}

.empty {
  border-style: dashed;
  background: #ffffff;
  padding: 20px;
}

.page-loading-card,
.toast {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.modal-card {
  border-radius: 14px;
}

.modal-header h2 {
  font-size: 24px;
}

.home-copy h1 {
  max-width: 700px;
  font-size: 44px;
  line-height: 1.08;
}

.home-subtitle {
  font-size: 17px;
}

.hero-metrics div,
.mini-readiness div,
.preview-lanes div,
.preview-review-note {
  box-shadow: none;
}

.product-frame::before {
  display: none;
}

.perm-roadmap-panel,
.master-calendar-panel,
.perm-roadmap-shell,
.master-calendar-shell {
  box-shadow: none;
}

.perm-roadmap-scroll {
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.7) 1px, transparent 1px) 0 58px / calc(var(--roadmap-day-width, 6px) * 7) 100%,
    #ffffff;
}

.perm-roadmap-step span,
.master-calendar-case span {
  background: #0f766e;
}

.perm-roadmap-bar,
.master-calendar-bar {
  height: 30px;
  box-shadow: none;
}

.perm-roadmap-bar:hover,
.perm-roadmap-bar:focus-visible {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  transform: none;
}

.perm-roadmap-legend span,
.master-scope-toggle {
  box-shadow: none;
}

.master-scope-toggle button.active,
.master-scope-toggle button:hover,
.master-scope-toggle button:focus-visible {
  background: #0f766e;
  box-shadow: none;
}

.master-calendar-marker small {
  color: #64748b;
}

.perm-roadmap-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}

.perm-roadmap-step {
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  min-height: 98px;
  gap: 2px 10px;
  padding: 11px 14px;
}

.perm-roadmap-track {
  height: 98px;
}

.perm-roadmap-bar {
  top: 33px;
}

.perm-roadmap-step .roadmap-number,
.perm-roadmap-step .case-id-token {
  grid-row: 1 / span 4;
  align-self: start;
  width: 28px;
  height: 28px;
}

.perm-roadmap-step .roadmap-step-title,
.perm-roadmap-step .timeline-case-primary,
.perm-roadmap-step .timeline-case-secondary,
.perm-roadmap-step em {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-roadmap-step .timeline-case-primary {
  color: #0f172a;
  font-size: 13px;
  font-weight: 760;
}

.perm-roadmap-step .timeline-case-secondary {
  color: #64748b;
  font-size: 12px;
  font-weight: 620;
}

.perm-roadmap-step em {
  justify-self: start;
  margin-top: 2px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  padding: 2px 7px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.master-calendar-shell {
  grid-template-columns: 360px minmax(0, 1fr);
}

.master-calendar-case {
  min-height: 96px;
}

.master-calendar-track {
  height: 96px;
}

.master-calendar-bar {
  top: 32px;
}

.master-calendar-case .case-id-token {
  width: 36px;
  height: 36px;
}

.master-calendar-case .timeline-case-primary {
  font-size: 14px;
}

.master-calendar-case .timeline-case-secondary,
.master-calendar-case em,
.master-calendar-case small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-calendar-case em {
  border-color: #e2e8f0;
  background: #ffffff;
  color: #475569;
}

.master-calendar-bar > span:first-child {
  max-width: 100%;
}

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

@media (max-width: 980px) {
  .sidebar {
    background: #ffffff;
  }

  .nav-button.active {
    box-shadow: inset 0 -2px 0 #0f766e;
  }

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

  .perm-roadmap-shell,
  .master-calendar-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .main {
    padding: 14px;
  }

  h1,
  .home-copy h1 {
    font-size: 34px;
  }

  .dashboard-overview {
    grid-template-columns: 1fr;
  }

  .perm-roadmap-shell,
  .master-calendar-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .perm-roadmap-step {
    padding: 10px;
  }
}

/* Homepage SaaS redesign */
html {
  scroll-behavior: smooth;
}

.marketing-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 48%, #ffffff 100%);
}

.public-page-inner {
  width: min(100%, 1200px);
}

.public-header {
  top: 12px;
  margin-bottom: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.marketing-page .public-header {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.76));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  color: #0f172a;
  backdrop-filter: blur(18px);
}

.public-header .brand {
  margin: 0;
  border: 0;
  padding: 0;
  color: #0f172a;
}

.public-header .brand:hover,
.public-header .brand:focus-visible {
  color: #115e59;
}

.public-header .brand-logo-mark {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.public-actions {
  gap: 4px;
}

.public-actions a,
.landing-actions a,
.public-footer a {
  text-decoration: none;
}

.public-actions .nav-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #0f172a;
  font-weight: 720;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.public-actions .nav-pill:hover,
.public-actions .nav-pill:focus-visible {
  border-color: rgba(15, 118, 110, 0.08);
  background: rgba(15, 118, 110, 0.04);
  color: #115e59;
  outline: none;
}

.public-header .button.small {
  min-height: 34px;
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: 9px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #0f172a;
  box-shadow: none;
}

.public-header .button.small:hover,
.public-header .button.small:focus-visible {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.04);
  color: #115e59;
  box-shadow: none;
  outline: none;
}

.public-header .button.primary.small {
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(204, 251, 241, 0.72);
  color: #115e59;
  box-shadow: none;
}

.public-header .button.primary.small:hover,
.public-header .button.primary.small:focus-visible {
  border-color: rgba(15, 118, 110, 0.24);
  background: #ccfbf1;
  color: #0b3b36;
  box-shadow: none;
}

.public-header .trust-links button {
  border-color: transparent;
  background: transparent;
  color: #0f172a;
}

.public-header .trust-links button:hover,
.public-header .trust-links button:focus-visible {
  border-color: rgba(15, 118, 110, 0.08);
  background: rgba(15, 118, 110, 0.04);
  color: #115e59;
}

.brand-logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.08);
  filter: saturate(0.92) contrast(0.98);
}

.landing-logo {
  width: min(210px, 54vw);
  margin-bottom: 0;
}

.landing-logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #ffffff;
  filter: saturate(0.92) contrast(0.98);
  mix-blend-mode: multiply;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(460px, 1fr);
  gap: 52px;
  align-items: center;
  padding: 86px 0 72px;
}

.landing-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.landing-kicker {
  width: max-content;
  margin: 0;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 760;
}

.landing-copy h1 {
  max-width: 680px;
  margin: 0;
  color: #0f172a;
  font-size: 58px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.02;
}

.landing-subtitle {
  max-width: 620px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.62;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 680;
}

.landing-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-proof span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0f766e;
}

.landing-preview.product-frame {
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.landing-preview.product-frame::before {
  display: none;
}

.preview-app-shell {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 438px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.preview-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid #e2e8f0;
  padding: 18px 14px;
  background: #ffffff;
}

.preview-sidebar strong {
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 14px;
}

.preview-sidebar span {
  border-radius: 8px;
  padding: 8px 9px;
  color: #64748b;
  font-size: 12px;
  font-weight: 680;
}

.preview-sidebar .active {
  background: #f0fdfa;
  color: #0f766e;
}

.preview-main {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.preview-toolbar,
.showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-toolbar small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 760;
}

.preview-toolbar strong {
  color: #0f172a;
  font-size: 15px;
}

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

.preview-stat-grid div,
.showcase-card,
.landing-feature-card,
.copilot-card,
.trust-proof-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.preview-stat-grid div {
  padding: 12px;
}

.preview-stat-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.preview-stat-grid strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.preview-roadmap,
.workflow-visual {
  display: grid;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.8) 1px, transparent 1px) 132px 0 / 72px 100%,
    #ffffff;
}

.preview-row,
.workflow-line {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
}

.preview-row > span,
.workflow-line strong {
  color: #475569;
  font-size: 12px;
  font-weight: 720;
}

.preview-row::after,
.workflow-line::after {
  content: "";
  height: 1px;
  background: #e2e8f0;
}

.preview-bar,
.workflow-line i {
  position: absolute;
  left: calc(116px + var(--start));
  width: var(--width);
  max-width: calc(100% - 124px);
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-bar.teal,
.workflow-line .active {
  background: #0f766e;
}

.preview-bar.neutral,
.workflow-line i {
  background: #64748b;
}

.preview-bar.orange,
.workflow-line .window {
  background: #f97316;
}

.workflow-line .done {
  background: #16a34a;
}

.landing-section {
  padding: 58px 0;
}

.landing-section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.landing-section-heading h2,
.ai-copilot-section h2,
.final-cta h2 {
  margin: 0;
  color: #0f172a;
  font-size: 36px;
  font-weight: 720;
  line-height: 1.12;
}

.landing-section-heading p,
.ai-copilot-section p,
.final-cta p {
  margin: 0;
  color: #64748b;
  line-height: 1.58;
}

.product-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.85fr));
  gap: 14px;
}

.showcase-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 210px;
  padding: 18px;
}

.showcase-card.large {
  min-height: 268px;
}

.showcase-head strong {
  color: #0f172a;
  font-size: 15px;
}

.calendar-preview-row {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border-top: 1px solid #eef2f7;
}

.calendar-preview-row span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 720;
}

.calendar-preview-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 620;
}

.calendar-preview-row i {
  position: absolute;
  left: calc(150px + var(--start));
  width: var(--width);
  max-width: calc(100% - 158px);
  overflow: hidden;
  border-radius: 999px;
  padding: 7px 10px;
  background: #0f766e;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-preview-row i.warn {
  background: #f97316;
}

.calendar-preview-row i.done {
  background: #16a34a;
}

.compact-checklist {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.compact-checklist span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0f766e;
}

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

.landing-feature-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 182px;
  padding: 18px;
}

.landing-feature-card > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.landing-feature-card strong {
  color: #0f172a;
  font-size: 16px;
}

.landing-feature-card p,
.showcase-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.workflow-visual {
  gap: 8px;
  padding: 18px;
}

.workflow-axis {
  display: grid;
  grid-template-columns: 132px repeat(6, 1fr);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 760;
}

.workflow-axis::before {
  content: "Stage";
}

.ai-copilot-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
  gap: 32px;
  align-items: center;
}

.ai-copilot-section > div:first-child {
  display: grid;
  gap: 10px;
}

.copilot-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
}

.copilot-message {
  width: fit-content;
  max-width: 92%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
}

.copilot-message.user {
  justify-self: end;
  background: #f8fafc;
}

.copilot-message.assistant {
  display: grid;
  gap: 7px;
  background: #ffffff;
}

.copilot-message.assistant span {
  color: #64748b;
}

.copilot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copilot-actions span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 10px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 720;
}

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

.trust-proof-item {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.trust-proof-item strong {
  color: #0f172a;
}

.trust-proof-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.final-cta {
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 44px 24px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.final-cta p {
  max-width: 620px;
}

.public-footer {
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(0, 0.7fr));
  gap: 22px;
  margin-top: 40px;
  padding-top: 26px;
}

@media (max-width: 1080px) {
  .landing-hero,
  .ai-copilot-section {
    grid-template-columns: 1fr;
  }

  .landing-copy {
    justify-items: center;
    text-align: center;
  }

  .landing-proof,
  .landing-actions {
    justify-content: center;
  }

  .product-showcase,
  .landing-feature-grid,
  .trust-proof-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card.large {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .public-page {
    padding: 14px;
  }

  .public-header {
    align-items: flex-start;
    gap: 12px;
  }

  .public-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .landing-hero {
    padding: 52px 0 44px;
  }

  .landing-copy h1 {
    font-size: 42px;
  }

  .landing-subtitle {
    font-size: 16px;
  }

  .preview-app-shell {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

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

  .preview-stat-grid,
  .product-showcase,
  .landing-feature-grid,
  .trust-proof-section,
  .public-footer {
    grid-template-columns: 1fr;
  }

  .preview-roadmap,
  .workflow-visual {
    overflow-x: auto;
    min-width: 0;
  }

  .showcase-card.large {
    overflow-x: auto;
  }

  .preview-row,
  .workflow-line,
  .workflow-axis,
  .calendar-preview-row {
    min-width: 620px;
  }
}

@media (max-width: 520px) {
  .public-actions .nav-pill[href="#features"],
  .public-actions .nav-pill[href="#ai-copilot"] {
    display: none;
  }

  .landing-copy h1 {
    font-size: 34px;
  }

  .landing-section-heading h2,
  .ai-copilot-section h2,
  .final-cta h2 {
    font-size: 28px;
  }

  .landing-preview.product-frame {
    padding: 10px;
  }

  .preview-main {
    padding: 12px;
  }
}

/* Enterprise workflow surfaces */
.account-bar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.timeline-zoom {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  background: #f8fafc;
}

.timeline-zoom button {
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  padding: 5px 8px;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 720;
}

.timeline-zoom button.active,
.timeline-zoom button:hover,
.timeline-zoom button:focus-visible {
  background: #0f766e;
  color: #ffffff;
  outline: none;
}

.command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 9vh 18px 24px;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(5px);
}

.command-palette {
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.command-input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 16px;
}

.command-input-row span {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 760;
}

.command-input-row input {
  width: 100%;
  border: 0;
  padding: 4px 0;
  color: #0f172a;
  outline: none;
}

.command-results {
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 8px;
}

.command-group {
  margin: 10px 8px 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.command-result {
  display: grid;
  width: 100%;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #0f172a;
  text-align: left;
}

.command-result small {
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result.active,
.command-result:hover,
.command-result:focus-visible {
  border-color: rgba(15, 118, 110, 0.18);
  background: #f0fdfa;
  outline: none;
}

.command-empty {
  margin: 10px;
}

.copilot-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 45;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(440px, 100vw);
  height: 100vh;
  border-left: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: -24px 0 64px rgba(15, 23, 42, 0.14);
}

.copilot-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px;
}

.copilot-panel-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.copilot-thread {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
  background: #f8fafc;
}

.copilot-bubble,
.copilot-insight {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
}

.copilot-bubble.user {
  justify-self: end;
  max-width: 86%;
  background: #0f766e;
  color: #ffffff;
}

.copilot-bubble.assistant {
  display: grid;
  gap: 5px;
}

.copilot-bubble.assistant span,
.copilot-insight p {
  margin: 0;
  color: #64748b;
}

.copilot-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.copilot-prompts span {
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  padding: 5px 8px;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 720;
}

.copilot-insight {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.ai-review-panel {
  scroll-margin-top: 20px;
}

.ai-review-score {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 96px;
}

.ai-review-score strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.ai-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.ai-summary-card p {
  margin: 0;
  color: #0f172a;
  line-height: 1.55;
}

.ai-summary-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
}

.ai-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.ai-review-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.ai-review-grid h3,
.ai-next-step-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.review-finding-list.compact {
  gap: 8px;
}

.ai-risk-list,
.ai-recommendation-list {
  display: grid;
  gap: 10px;
}

.ai-risk-list article,
.ai-recommendation {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.ai-risk-list article {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.ai-risk-list strong,
.ai-recommendation strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}

.ai-risk-list p,
.ai-recommendation p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.ai-next-step-panel {
  margin-top: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.ai-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.ai-recommendation small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
}

.ai-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.risk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.risk-list,
.document-list,
.notification-center-list {
  display: grid;
  gap: 10px;
}

.risk-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  text-align: left;
}

.risk-item:hover,
.risk-item:focus-visible {
  border-color: rgba(15, 118, 110, 0.22);
  background: #f8fafc;
  outline: none;
}

.risk-item > span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

.risk-item.high > span {
  background: #fef2f2;
  color: #b91c1c;
}

.risk-item strong,
.kanban-title strong,
.document-card strong,
.activity-item strong,
.notification-card strong {
  color: #0f172a;
}

.risk-item p,
.document-card p,
.activity-item p,
.notification-card p {
  margin: 4px 0;
  color: #64748b;
  line-height: 1.4;
}

.risk-item small,
.kanban-card small,
.document-card small,
.activity-item small,
.notification-card small {
  color: #64748b;
  font-size: 12px;
}

.kanban-board {
  display: grid;
  grid-auto-columns: minmax(245px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 520px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}

.kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 6px;
}

.kanban-column header strong {
  color: #0f172a;
  font-size: 13px;
}

.kanban-column header span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
}

.kanban-cards {
  display: grid;
  gap: 10px;
}

.kanban-card {
  display: grid;
  gap: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-title {
  display: grid;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.kanban-title span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kanban-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  color: #94a3b8;
  text-align: center;
}

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

.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.document-card.is-missing {
  border-left-color: #dc2626;
}

.document-card.is-uploaded {
  border-left-color: #0f766e;
}

.document-card.is-verified {
  border-left-color: #16a34a;
}

.document-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.activity-feed {
  display: grid;
  gap: 8px;
}

.activity-feed h3 {
  margin: 12px 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.activity-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  text-align: left;
}

.activity-item:hover,
.activity-item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.activity-item > span {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: #0f766e;
}

.activity-item > span.red {
  background: #dc2626;
}

.activity-item > span.yellow {
  background: #f97316;
}

.activity-item > span.green {
  background: #16a34a;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.notification-card.unread {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: inset 3px 0 0 #0f766e;
}

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

.notification-card > button {
  display: grid;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.notification-card > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.settings-sidecar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.perm-roadmap-shell,
.master-calendar-shell,
.perm-roadmap-scroll,
.master-calendar-scroll {
  min-width: 0;
  max-width: 100%;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* PERMFlowAI restrained status color system */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --soft-line: #eef2f7;
  --divider: #cbd5e1;
  --teal: #0f766e;
  --teal-deep: #115e59;
  --teal-soft: #ccfbf1;
  --teal-border: #5eead4;
  --orange: #f97316;
  --orange-soft: #ffedd5;
  --orange-border: #fdba74;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --yellow: #f59e0b;
  --yellow-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --gray: #64748b;
  --gray-soft: #f1f5f9;
  --blue: var(--info);
  --blue-soft: var(--info-soft);
  --purple: var(--teal);
  --purple-soft: var(--teal-soft);
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

body,
.main {
  background: var(--bg);
  color: var(--ink);
}

.app-shell {
  background: var(--bg);
  max-width: 100%;
  overflow-x: clip;
}

.main {
  max-width: 100%;
  overflow-x: clip;
}

.brand-mark,
.button.primary,
.master-scope-toggle button.active,
.master-scope-toggle button:hover,
.master-scope-toggle button:focus-visible,
.timeline-zoom button.active,
.timeline-zoom button:hover,
.timeline-zoom button:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
}

.nav-button.active {
  background: rgba(15, 118, 110, 0.16);
  color: #ffffff;
}

.case-link,
.text-button,
a {
  color: var(--teal);
}

input:focus,
select:focus,
textarea:focus,
.checkbox-field:focus-within,
.command-input:focus,
.perm-roadmap-scroll:focus-visible,
.master-calendar-scroll:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.pill {
  --status-bg: var(--gray-soft);
  --status-fg: var(--gray);
  --status-border: var(--divider);
  border: 1px solid var(--status-border);
  background: var(--status-bg);
  color: var(--status-fg);
}

.pill.gray,
.pill.neutral,
.pill.muted,
.pill.draft,
.pill.archived {
  --status-bg: var(--gray-soft);
  --status-fg: var(--gray);
  --status-border: var(--divider);
}

.pill.blue,
.pill.info,
.pill.informational,
.pill.pending,
.pill.upcoming,
.pill.normal,
.pill.review {
  --status-bg: var(--info-soft);
  --status-fg: var(--info);
  --status-border: #bfdbfe;
}

.pill.teal,
.pill.primary,
.pill.active,
.pill.suggested,
.pill.purple {
  --status-bg: var(--teal-soft);
  --status-fg: var(--teal-deep);
  --status-border: var(--teal-border);
}

.pill.green,
.pill.success,
.pill.ready,
.pill.filed,
.pill.approved,
.pill.completed,
.pill.resolved {
  --status-bg: var(--green-soft);
  --status-fg: #15803d;
  --status-border: #86efac;
}

.pill.orange,
.pill.yellow,
.pill.warning,
.pill.watch,
.pill.open,
.pill.approaching,
.pill.required,
.pill.missing {
  --status-bg: var(--orange-soft);
  --status-fg: #c2410c;
  --status-border: var(--orange-border);
}

.pill.red,
.pill.error,
.pill.risk,
.pill.issue,
.pill.delayed,
.pill.critical,
.pill.denied {
  --status-bg: var(--red-soft);
  --status-fg: #b91c1c;
  --status-border: #fca5a5;
}

.pill.gray,
.pill.neutral,
.pill.muted,
.pill.draft,
.pill.archived,
.pill.blue,
.pill.info,
.pill.informational,
.pill.pending,
.pill.upcoming,
.pill.normal,
.pill.review,
.pill.teal,
.pill.primary,
.pill.active,
.pill.suggested,
.pill.purple,
.pill.green,
.pill.success,
.pill.ready,
.pill.filed,
.pill.approved,
.pill.completed,
.pill.resolved,
.pill.orange,
.pill.yellow,
.pill.warning,
.pill.watch,
.pill.open,
.pill.approaching,
.pill.required,
.pill.missing,
.pill.red,
.pill.error,
.pill.risk,
.pill.issue,
.pill.delayed,
.pill.critical,
.pill.denied {
  border-color: var(--status-border);
  background: var(--status-bg);
  color: var(--status-fg);
}

.panel,
.dashboard-signal,
.table-wrap,
.risk-item,
.document-card,
.notification-card,
.ai-summary-card,
.ai-risk-list article,
.ai-recommendation,
.copilot-insight {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: none;
}

.panel.stat {
  --stat-accent: var(--info);
  position: relative;
  overflow: hidden;
  border-color: var(--line);
}

.panel.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--stat-accent);
}

.panel.stat.tone-teal {
  --stat-accent: var(--teal);
}

.panel.stat.tone-blue {
  --stat-accent: var(--info);
}

.panel.stat.tone-green {
  --stat-accent: var(--green);
}

.panel.stat.tone-orange,
.panel.stat.tone-yellow {
  --stat-accent: var(--orange);
}

.panel.stat.tone-red {
  --stat-accent: var(--red);
}

.panel.stat.tone-gray {
  --stat-accent: var(--gray);
}

.dashboard-signal {
  position: relative;
  overflow: hidden;
}

.dashboard-signal::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
}

.dashboard-signal:nth-of-type(2)::before {
  background: var(--orange);
}

.dashboard-signal:nth-of-type(3)::before {
  background: var(--red);
}

.dashboard-signal:nth-of-type(4)::before {
  background: var(--green);
}

tbody tr:hover td,
tr.selected-row td {
  background: #f8fafc;
}

.perm-roadmap-shell,
.master-calendar-shell {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
}

.perm-roadmap-left,
.master-calendar-left,
.perm-roadmap-months {
  background: #ffffff;
}

.perm-roadmap-step:hover,
.perm-roadmap-step:focus-visible,
.master-calendar-case:hover,
.master-calendar-case:focus-visible {
  background: #f8fafc;
  box-shadow: inset 3px 0 0 var(--teal);
}

.perm-roadmap-step span,
.master-calendar-case span {
  background: var(--teal);
  color: #ffffff;
}

.perm-roadmap-bar,
.master-calendar-bar {
  border: 1px solid transparent;
  box-shadow: none;
}

.perm-roadmap-legend .completed,
.perm-roadmap-bar.completed {
  border-color: var(--teal-border);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.perm-roadmap-legend .in-progress,
.perm-roadmap-bar.in-progress {
  border-color: var(--teal-deep);
  background: var(--teal);
  color: #ffffff;
}

.perm-roadmap-legend .upcoming,
.perm-roadmap-bar.upcoming {
  border-color: var(--divider);
  background: var(--gray-soft);
  color: var(--gray);
}

.perm-roadmap-legend .risk,
.perm-roadmap-bar.risk {
  border-color: #fca5a5;
  background: var(--red-soft);
  color: #b91c1c;
}

.master-calendar-legend .ready,
.master-calendar-bar.ready {
  border-color: #86efac;
  background: var(--green-soft);
  color: #15803d;
}

.master-calendar-legend .open,
.master-calendar-bar.open {
  border-color: var(--orange-border);
  background: var(--orange-soft);
  color: #c2410c;
}

.master-calendar-legend .upcoming,
.master-calendar-bar.upcoming {
  border-color: var(--teal-border);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.master-calendar-legend .approaching,
.master-calendar-bar.approaching {
  border-color: var(--orange);
  background: linear-gradient(90deg, var(--orange-soft), #fff7ed);
  color: #9a3412;
  box-shadow: inset 0 -2px 0 rgba(220, 38, 38, 0.36);
}

.master-calendar-legend .filed,
.master-calendar-bar.filed {
  border-color: #86efac;
  background: var(--green-soft);
  color: #15803d;
}

.master-calendar-legend .delayed,
.master-calendar-bar.delayed,
.master-calendar-legend .issue,
.master-calendar-bar.issue {
  border-color: #fca5a5;
  background: var(--red-soft);
  color: #b91c1c;
}

.master-calendar-bar.is-estimated {
  border-style: dashed;
}

.perm-roadmap-bar > span:first-child,
.master-calendar-bar > span:first-child {
  color: inherit;
}

.perm-roadmap-today {
  background: var(--orange);
}

.master-calendar-marker i {
  background: var(--teal);
}

.risk-item {
  border-left: 3px solid var(--orange);
}

.risk-item.high {
  border-left-color: var(--red);
}

.risk-item.medium {
  border-left-color: var(--orange);
}

.risk-item.low {
  border-left-color: var(--info);
}

.risk-item > span {
  border: 1px solid var(--orange-border);
  background: var(--orange-soft);
  color: #c2410c;
}

.risk-item.high > span {
  border-color: #fca5a5;
  background: var(--red-soft);
  color: #b91c1c;
}

.kanban-column {
  --column-accent: var(--gray);
  border-color: var(--line);
  background: #f8fafc;
  box-shadow: inset 0 3px 0 var(--column-accent);
}

.kanban-column[data-kanban-stage="Intake"] {
  --column-accent: var(--info);
}

.kanban-column[data-kanban-stage="PWD"],
.kanban-column[data-kanban-stage="Pending"] {
  --column-accent: var(--info);
}

.kanban-column[data-kanban-stage="Recruitment"] {
  --column-accent: var(--teal);
}

.kanban-column[data-kanban-stage="Quiet Period"] {
  --column-accent: var(--orange);
}

.kanban-column[data-kanban-stage="Ready to File"],
.kanban-column[data-kanban-stage="Filed"],
.kanban-column[data-kanban-stage="Approved"] {
  --column-accent: var(--green);
}

.kanban-column[data-kanban-stage="Audit"] {
  --column-accent: var(--red);
}

.kanban-card {
  border-color: var(--line);
  border-left: 3px solid var(--column-accent);
  box-shadow: none;
}

.document-card {
  border-left-color: var(--gray);
}

.document-card.is-missing {
  border-left-color: var(--orange);
}

.document-card.is-uploaded,
.document-card.is-verified {
  border-left-color: var(--green);
}

.activity-item > span {
  background: var(--teal);
}

.activity-item > span.yellow {
  background: var(--orange);
}

.notification-card.unread {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: inset 3px 0 0 var(--teal);
}

.ai-recommendation,
.ai-risk-list article,
.copilot-insight {
  --ai-accent: var(--teal);
  border-left: 3px solid var(--ai-accent);
}

.tone-teal {
  --ai-accent: var(--teal);
}

.tone-blue {
  --ai-accent: var(--info);
}

.tone-green {
  --ai-accent: var(--green);
}

.tone-orange,
.tone-yellow {
  --ai-accent: var(--orange);
}

.tone-red {
  --ai-accent: var(--red);
}

.tone-gray {
  --ai-accent: var(--gray);
}

.ai-risk-list article.tone-teal,
.copilot-insight.tone-teal {
  --ai-accent: var(--teal);
}

.ai-risk-list article.tone-blue,
.copilot-insight.tone-blue {
  --ai-accent: var(--info);
}

.ai-risk-list article.tone-green,
.copilot-insight.tone-green {
  --ai-accent: var(--green);
}

.ai-risk-list article.tone-orange,
.ai-risk-list article.tone-yellow,
.copilot-insight.tone-orange,
.copilot-insight.tone-yellow {
  --ai-accent: var(--orange);
}

.ai-risk-list article.tone-red,
.copilot-insight.tone-red {
  --ai-accent: var(--red);
}

.ai-risk-list article.tone-gray,
.copilot-insight.tone-gray {
  --ai-accent: var(--gray);
}

.review-finding {
  border-color: var(--line);
}

.empty {
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.connection-banner {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.24);
  background: #fef2f2;
  color: #7f1d1d;
  padding: 12px 20px;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
}

.connection-banner div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connection-banner strong,
.connection-banner span,
.connection-banner small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-banner span {
  font-size: 13px;
}

.connection-banner small {
  color: #991b1b;
}

.error-fallback {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.error-fallback .panel {
  max-width: 520px;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-stack .toast {
  position: static;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  max-width: none;
  border-radius: 8px;
  padding: 13px 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  font-size: 14px;
  line-height: 1.45;
  pointer-events: auto;
}

.toast-stack .toast.success {
  border-color: rgba(22, 163, 74, 0.26);
  background: #f0fdf4;
  color: #14532d;
}

.toast-stack .toast.error {
  border-color: rgba(220, 38, 38, 0.26);
  background: #fef2f2;
  color: #7f1d1d;
}

.toast-stack .toast.info {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  color: #1e3a8a;
}

.toast-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

[data-saving="true"] {
  cursor: progress;
}

[data-saving="true"] button,
[data-saving="true"] input[type="submit"],
button[data-saving="true"] {
  opacity: 0.72;
}

.toast.success .toast-icon {
  background: #dcfce7;
  color: #16a34a;
}

.toast.error .toast-icon {
  background: #fee2e2;
  color: #dc2626;
}

.toast.info .toast-icon {
  background: #dbeafe;
  color: #2563eb;
}

/* Sidebar theme polish */
.sidebar {
  --sidebar-bg: #134e4a;
  --sidebar-panel: rgba(255, 255, 255, 0.04);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #f8fafc;
  --sidebar-muted: rgba(240, 253, 250, 0.72);
  --sidebar-icon: rgba(204, 251, 241, 0.75);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: rgba(255, 255, 255, 0.12);
  --sidebar-active: #ffffff;
  --sidebar-teal: #0f766e;
  --sidebar-deep-teal: #115e59;
  --sidebar-dark-surface: #0b3b36;
  --sidebar-accent: #5eead4;
  --sidebar-highlight: #ccfbf1;
  --sidebar-orange: #f97316;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px 18px;
  background: linear-gradient(180deg, #134e4a 0%, #115e59 45%, #0b3b36 100%);
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-brand {
  min-height: 58px;
  margin: 0 2px 2px;
  border-bottom: 1px solid var(--sidebar-border);
  padding: 0 4px 16px;
}

.sidebar-brand .brand-logo-mark,
.sidebar .brand-logo-mark,
.sidebar .brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), 0 0 0 4px rgba(94, 234, 212, 0.1);
}

.sidebar .brand-name {
  color: var(--sidebar-text);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.1;
}

.sidebar-brand-kicker,
.sidebar-section-label {
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
}

.sidebar-brand-kicker {
  display: block;
  margin-top: 3px;
}

.sidebar-section-label {
  margin: 2px 8px 0;
  text-transform: uppercase;
}

.sidebar .nav-list {
  display: grid;
  gap: 4px;
}

.sidebar .nav-button {
  position: relative;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 10px 0 11px;
  color: var(--sidebar-muted);
  font-size: 14px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sidebar .nav-button::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 150ms ease;
}

.sidebar .nav-button:hover,
.sidebar .nav-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.07);
  background: var(--sidebar-hover);
  color: #ffffff;
  outline: none;
}

.sidebar .nav-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
}

.sidebar .nav-button.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.18);
}

.sidebar .nav-button.active::before {
  background: var(--sidebar-accent);
}

.sidebar .nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--sidebar-icon);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sidebar .nav-button:hover .nav-icon,
.sidebar .nav-button:focus-visible .nav-icon {
  border-color: rgba(94, 234, 212, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ccfbf1;
}

.sidebar .nav-button.active .nav-icon {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(255, 255, 255, 0.09);
  color: #99f6e4;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.sidebar .sync-card,
.sidebar .auth-card {
  margin-top: 0;
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--sidebar-panel);
  color: var(--sidebar-text);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
}

.sidebar .sync-card {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar .sync-card.is-warning {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.1);
}

.sidebar .sync-card.is-warning strong,
.sidebar .sync-card.is-warning p {
  color: #fde68a;
}

.sidebar .sync-card strong,
.sidebar .auth-card strong {
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 780;
}

.sidebar .sync-card p,
.sidebar .auth-card p {
  margin: 5px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.42;
}

.sidebar .auth-card p {
  margin-bottom: 10px;
}

.sidebar .sidebar-action {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 760;
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sidebar .sidebar-action:hover,
.sidebar .sidebar-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  outline: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 12px;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .sidebar-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2px;
  }

  .risk-layout,
  .document-center,
  .ai-review-grid {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-auto-columns: minmax(230px, 74vw);
  }
}

@media (max-width: 780px) {
  .connection-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .connection-banner strong,
  .connection-banner span,
  .connection-banner small {
    white-space: normal;
  }

  .account-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-bar-actions {
    justify-content: flex-start;
  }

  .risk-item,
  .required-document-row,
  .document-card,
  .notification-card,
  .ai-recommendation {
    grid-template-columns: 1fr;
  }

  .ai-recommendation-actions,
  .ai-review-score {
    justify-content: flex-start;
    justify-items: start;
  }

  .copilot-panel {
    width: 100vw;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .main {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .sidebar-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .master-filter-grid,
  .master-filter-actions {
    min-width: 0;
  }

  .master-filter-actions {
    flex-direction: column;
  }

  .perm-roadmap-legend,
  .required-document-actions,
  .document-card-actions,
  .notification-card > div {
    justify-content: flex-start;
  }
}
