:root {
  color-scheme: light;
  --bg: #f2f5f7;
  --panel: #ffffff;
  --text: #14201c;
  --muted: #52605a;
  --line: #d9e3df;
  --soft: #edf1f4;
  --brand: #0b4a6b;
  --brand-dark: #083a55;
  --brand-light: #dbe8ef;
  --accent: #f7931e;
  --accent-soft: #fdecd5;
  --ok: #287a59;
  --warn: #7a4610;
  --danger: #b43b45;
  --shadow-sm: 0 8px 24px rgba(11, 74, 107, 0.07);
  --shadow-lg: 0 24px 70px rgba(9, 58, 85, 0.14);
}

/* Perfil comportamental na advocacia */
.service-catalog .capability-card.is-featured {
  position: relative;
  border-color: #91b9aa;
  background:
    radial-gradient(circle at 100% 0%, rgba(209, 168, 94, 0.22), transparent 11rem),
    linear-gradient(150deg, #ffffff 0%, #eef8f4 100%);
  box-shadow: 0 16px 34px rgba(13, 73, 58, 0.12);
}

.service-catalog .capability-card.is-featured::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
  content: "";
}

.service-card-actions,
.behavioral-form-actions,
.behavioral-result-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.service-card-actions {
  justify-content: space-between;
  margin-top: auto;
}

.behavioral-assessment {
  border-color: #b8d1c8;
  box-shadow: 0 24px 54px rgba(10, 48, 39, 0.12);
}

.behavioral-hero,
.behavioral-result-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 92% 0%, rgba(209, 168, 94, 0.28), transparent 16rem),
    linear-gradient(135deg, #123f34 0%, #092f27 100%);
  color: #fff;
}

.behavioral-hero h2,
.behavioral-result-hero h2,
.behavioral-hero p,
.behavioral-result-hero p {
  margin: 0;
}

.behavioral-hero h2,
.behavioral-result-hero h2 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.behavioral-hero p:not(.eyebrow),
.behavioral-result-hero p:not(.eyebrow) {
  max-width: 780px;
  margin-top: 12px;
  color: #dcebe6;
  font-size: 14px;
  line-height: 1.65;
}

.behavioral-hero .eyebrow,
.behavioral-result-hero .eyebrow {
  margin-bottom: 8px;
  color: #f0d59f;
}

.behavioral-time {
  display: grid;
  flex: 0 0 148px;
  min-height: 148px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.behavioral-time strong {
  color: #f4dcae;
  font-size: 42px;
  line-height: 1;
}

.behavioral-time span {
  margin-top: 4px;
  font-weight: 850;
}

.behavioral-time small {
  margin-top: 9px;
  color: #bcd2ca;
  line-height: 1.4;
}

.behavioral-primer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px clamp(18px, 3vw, 30px) 0;
}

.behavioral-primer-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7faf9;
  padding: 15px;
}

.behavioral-primer-grid strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.behavioral-primer-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.behavioral-safeguard {
  margin: 16px clamp(18px, 3vw, 30px) 0;
  font-size: 12px;
  line-height: 1.55;
}

.behavioral-form {
  padding: 20px clamp(18px, 3vw, 30px) 30px;
}

.behavioral-progress {
  position: sticky;
  z-index: 6;
  top: 10px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #b8d1c8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(10, 48, 39, 0.1);
  backdrop-filter: blur(10px);
}

.behavioral-progress > div:first-child {
  display: grid;
  gap: 2px;
}

.behavioral-progress strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.behavioral-progress span {
  color: var(--muted);
  font-size: 11px;
}

.behavioral-progress-track,
.behavioral-score-track,
.behavioral-dimension-track {
  overflow: hidden;
  border-radius: 999px;
  background: #dfeae6;
}

.behavioral-progress-track {
  height: 8px;
}

.behavioral-progress-track i,
.behavioral-score-track i,
.behavioral-dimension-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #4a9478);
  transition: width 0.25s ease;
}

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

.behavioral-question {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.behavioral-question legend {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.behavioral-question legend span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 11px;
  place-items: center;
}

.behavioral-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.behavioral-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid #e1e8e5;
  border-radius: 11px;
  background: #f9fbfa;
  padding: 10px 11px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.behavioral-option:hover {
  border-color: #8fb5a7;
  background: #f0f8f5;
  transform: translateY(-1px);
}

.behavioral-option:focus-within {
  outline: 3px solid rgba(11, 107, 203, 0.24);
  outline-offset: 1px;
}

.behavioral-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: inset 3px 0 0 var(--brand);
}

.behavioral-option input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.behavioral-form-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.behavioral-result-seal {
  display: grid;
  flex: 0 0 130px;
  min-height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(209, 168, 94, 0.13);
  color: #f4dcae;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  place-items: center;
}

.behavioral-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  padding: 24px clamp(18px, 3vw, 30px) 0;
}

.behavioral-score-card,
.behavioral-reading-card,
.behavioral-dimension,
.behavioral-profile-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.behavioral-score-card h3,
.behavioral-reading-card h3,
.behavioral-dimension h3,
.behavioral-profile-card h3,
.behavioral-profile-card h4,
.behavioral-score-card p,
.behavioral-reading-card p,
.behavioral-dimension p,
.behavioral-profile-card p {
  margin: 0;
}

.behavioral-score-card > p,
.behavioral-dimension > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.behavioral-score-row {
  display: grid;
  grid-template-columns: 130px minmax(100px, 1fr) 46px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.behavioral-score-row > div:first-child {
  display: grid;
}

.behavioral-score-row span {
  color: var(--muted);
  font-size: 10px;
}

.behavioral-score-row b {
  color: var(--brand-dark);
  text-align: right;
}

.behavioral-score-track {
  height: 10px;
}

.behavioral-score-track i.eagle { background: #9b6a2f; }
.behavioral-score-track i.cat { background: #8a4d72; }
.behavioral-score-track i.wolf { background: #476777; }
.behavioral-score-track i.shark { background: #276f5a; }

.behavioral-reading-card {
  background: linear-gradient(150deg, #f5ead6 0%, #fffaf0 100%);
}

.behavioral-reading-card h3 {
  margin-top: 12px;
  color: var(--brand-dark);
  font-size: 25px;
}

.behavioral-reading-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.behavioral-reading-card > strong {
  display: block;
  margin-top: 18px;
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.behavioral-profile-section,
.behavioral-dimensions {
  padding: 26px clamp(18px, 3vw, 30px) 0;
}

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

.behavioral-profile-card {
  position: relative;
  overflow: hidden;
}

.behavioral-profile-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #7f948d;
  content: "";
}

.behavioral-profile-card.eagle::before { background: #9b6a2f; }
.behavioral-profile-card.cat::before { background: #8a4d72; }
.behavioral-profile-card.wolf::before { background: #476777; }
.behavioral-profile-card.shark::before { background: #276f5a; }

.behavioral-profile-card.is-primary {
  border-color: #c8a96e;
  background: #fffcf5;
  box-shadow: 0 12px 28px rgba(118, 82, 29, 0.1);
}

.behavioral-profile-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.behavioral-profile-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.behavioral-profile-head h3 {
  margin-top: 3px;
  color: var(--brand-dark);
  font-size: 22px;
}

.behavioral-profile-head p {
  color: var(--muted);
  font-size: 11px;
}

.behavioral-profile-head > strong {
  color: var(--brand);
  font-size: 24px;
}

.behavioral-profile-card > p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.behavioral-profile-card h4 {
  margin-top: 16px;
  color: var(--brand-dark);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.behavioral-profile-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.behavioral-advocacy {
  margin-top: 16px;
  border-radius: 11px;
  background: #edf5f2;
  padding: 12px;
}

.behavioral-advocacy strong {
  color: var(--brand-dark);
  font-size: 11px;
}

.behavioral-advocacy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

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

.behavioral-dimension-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.behavioral-dimension-values span {
  display: grid;
  color: var(--muted);
  font-size: 11px;
}

.behavioral-dimension-values span:last-child {
  text-align: right;
}

.behavioral-dimension-values strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.behavioral-dimension-track {
  height: 8px;
  margin-top: 10px;
  background: #d8cbb3;
}

.behavioral-result-actions {
  justify-content: flex-end;
  padding: 22px clamp(18px, 3vw, 30px) 0;
}

.behavioral-result-meta {
  margin: 14px clamp(18px, 3vw, 30px) 26px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

@media (max-width: 900px) {
  .behavioral-question-grid,
  .behavioral-profile-grid,
  .behavioral-dimension-grid,
  .behavioral-result-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .behavioral-primer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .behavioral-hero,
  .behavioral-result-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .behavioral-time,
  .behavioral-result-seal {
    flex-basis: auto;
    width: 100%;
    min-height: auto;
    border-radius: 14px;
  }

  .behavioral-time {
    grid-template-columns: auto auto 1fr;
    gap: 8px;
    align-items: center;
    text-align: left;
  }

  .behavioral-time small {
    margin: 0;
    text-align: right;
  }

  .behavioral-result-seal {
    padding: 12px;
  }

  .behavioral-progress {
    top: 6px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .behavioral-score-row {
    grid-template-columns: 100px minmax(70px, 1fr) 42px;
    gap: 8px;
  }

  .behavioral-form-actions,
  .behavioral-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .behavioral-form-actions .btn,
  .behavioral-result-actions .btn {
    width: 100%;
  }
}

@media print {
  body.behavioral-print * {
    visibility: hidden !important;
  }

  body.behavioral-print #behavioral-assessment,
  body.behavioral-print #behavioral-assessment * {
    visibility: visible !important;
  }

  body.behavioral-print #behavioral-assessment {
    position: absolute;
    inset: 0;
    width: 100%;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  body.behavioral-print .behavioral-result-actions {
    display: none;
  }

  body.behavioral-print .behavioral-profile-card,
  body.behavioral-print .behavioral-dimension,
  body.behavioral-print .behavioral-score-card,
  body.behavioral-print .behavioral-reading-card {
    break-inside: avoid;
  }
}

/* Perfil comportamental: janela compacta em etapas */
body.behavioral-modal-open {
  overflow: hidden;
}

.behavioral-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: grid;
  padding: 24px;
  place-items: center;
}

.behavioral-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(4, 24, 19, 0.72);
  cursor: default;
  backdrop-filter: blur(4px);
}

.behavioral-modal {
  position: relative;
  display: grid;
  width: min(720px, calc(100vw - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(3, 27, 21, 0.38);
}

.behavioral-modal:has(.behavioral-form-actions),
.behavioral-result {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.behavioral-modal-shell.is-result .behavioral-modal {
  width: min(1080px, calc(100vw - 48px));
  height: min(900px, calc(100dvh - 48px));
}

.behavioral-modal-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff, #edf6f2);
  padding: 19px 22px;
}

.behavioral-modal-head h2,
.behavioral-modal-head p {
  margin: 0;
}

.behavioral-modal-head h2 {
  margin-top: 3px;
  color: var(--brand-dark);
  font-size: 1.42rem;
}

.behavioral-modal-head p:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.behavioral-modal-close {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
}

.behavioral-modal-close:hover {
  border-color: #91b9aa;
  background: var(--brand-light);
}

.behavioral-form {
  display: contents;
  padding: 0;
}

.behavioral-modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
}

.behavioral-progress {
  position: static;
  z-index: auto;
  grid-template-columns: minmax(150px, auto) minmax(160px, 1fr);
  margin: 0 0 16px;
  padding: 10px 12px;
  box-shadow: none;
  backdrop-filter: none;
}

.behavioral-about {
  margin-bottom: 16px;
  border: 1px solid #dce6e2;
  border-radius: 12px;
  background: #f7faf9;
}

.behavioral-about summary {
  padding: 11px 13px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.behavioral-about > div {
  display: grid;
  gap: 7px;
  border-top: 1px solid #e4ece9;
  padding: 11px 13px 13px;
}

.behavioral-about p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.behavioral-question-grid {
  grid-template-columns: minmax(0, 1fr);
}

.behavioral-question {
  padding: 17px;
}

.behavioral-question legend {
  font-size: 15px;
}

.behavioral-option {
  padding: 11px 12px;
  font-size: 13px;
}

.behavioral-modal-body > .behavioral-safeguard {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.behavioral-form-actions,
.behavioral-result-actions {
  justify-content: space-between;
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 22px;
}

.behavioral-form-actions .btn {
  min-width: 112px;
}

.behavioral-result-hero {
  padding: 20px 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(209, 168, 94, 0.28), transparent 16rem),
    linear-gradient(135deg, #123f34 0%, #092f27 100%);
  color: #fff;
}

.behavioral-result-hero h2 {
  max-width: 820px;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.behavioral-result-hero p:last-child {
  color: #dcebe6;
}

.behavioral-result-hero .behavioral-modal-close {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.behavioral-result-body {
  padding: 0;
}

.behavioral-result-body > .behavioral-safeguard {
  margin: 20px clamp(18px, 3vw, 30px) 0;
}

.behavioral-result-actions {
  justify-content: flex-end;
  padding: 14px 22px;
}

.behavioral-result-meta {
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .behavioral-modal-shell {
    padding: 10px;
  }

  .behavioral-modal,
  .behavioral-modal-shell.is-result .behavioral-modal {
    width: calc(100vw - 20px);
    height: auto;
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .behavioral-modal-shell.is-result .behavioral-modal {
    height: calc(100dvh - 20px);
  }

  .behavioral-modal-head,
  .behavioral-result-hero {
    align-items: flex-start;
    flex-direction: row;
    padding: 16px;
  }

  .behavioral-modal-head h2 {
    font-size: 1.2rem;
  }

  .behavioral-modal-body {
    padding: 16px;
  }

  .behavioral-progress {
    top: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .behavioral-question {
    padding: 14px;
  }

  .behavioral-form-actions,
  .behavioral-result-actions {
    align-items: stretch;
    flex-direction: row;
    padding: 12px 16px;
  }

  .behavioral-form-actions .btn {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .behavioral-result-actions {
    flex-direction: column;
  }

  .behavioral-result-actions .btn {
    width: 100%;
  }

  .behavioral-result-body {
    padding: 0;
  }
}

@media print {
  body.behavioral-print {
    overflow: visible;
  }

  body.behavioral-print .behavioral-modal-shell {
    position: static;
    display: block;
    padding: 0;
  }

  body.behavioral-print .behavioral-modal-backdrop,
  body.behavioral-print .behavioral-modal-close {
    display: none;
  }

  body.behavioral-print #behavioral-assessment {
    display: block;
    height: auto;
    max-height: none;
    transform: none;
  }

  body.behavioral-print .behavioral-modal-body {
    overflow: visible;
  }
}

.operational-module-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.operational-module-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  align-items: center;
}

.operational-more {
  position: relative;
}

.operational-more summary {
  list-style: none;
  cursor: pointer;
}

.operational-more summary::-webkit-details-marker {
  display: none;
}

.operational-more > div {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.operational-more > div button {
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.operational-more > div button:hover {
  background: var(--soft);
}

.operational-area-tabs,
.operational-actions,
.history-code-search,
.history-pagination,
.history-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.operational-area-tabs {
  padding: 4px;
  border-radius: 12px;
  background: var(--soft);
}

.operational-area-tab {
  min-height: 38px;
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.operational-area-tab.active {
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 2px 8px rgb(26 39 65 / 10%);
}

.operational-actions {
  justify-content: flex-end;
}

/* Duas carteiras do mesmo motor de Processos (Meus Processos / Em Parceria) */
.case-carteira-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-carteira-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.case-carteira-tab strong {
  color: var(--text);
}

.case-carteira-tab.active {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
}

.case-carteira-tab.active strong {
  color: var(--brand-dark);
}

.case-carteira-form {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.case-partner-details {
  grid-column: 1 / -1;
}

.case-partner-details summary {
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-weight: 750;
  cursor: pointer;
}

.history-code-search {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.history-code-search label {
  display: grid;
  grid-template-columns: auto minmax(240px, 440px);
  gap: 10px;
  align-items: center;
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.history-intro,
.history-outside-notice {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #17223b, #293a62);
  color: #fff;
}

.history-intro h2,
.history-intro p,
.history-intro .eyebrow {
  margin: 0;
  color: inherit;
}

.history-intro h2 {
  margin: 3px 0 6px;
}

.history-intro p:last-child {
  color: #dbe4f7;
}

.history-count {
  display: grid;
  min-width: 115px;
  text-align: center;
}

.history-count strong {
  font-size: 34px;
  line-height: 1;
}

.history-count span {
  margin-top: 5px;
  color: #dbe4f7;
  font-size: 12px;
}

.history-filter-bar {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(5, minmax(130px, .75fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.history-filter-bar label,
.history-sort,
.history-page-size label,
.history-pagination label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

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

.history-outside-notice {
  border: 1px solid #e7ba63;
  background: #fff8e8;
  color: #62440b;
}

.history-outside-notice div:first-child {
  display: grid;
  gap: 4px;
}

.history-results .table {
  min-width: 1240px;
}

.history-results .table td:first-child {
  min-width: 142px;
}

.copy-code {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.history-code-highlight {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 7px;
  background: #fff0b7;
  box-shadow: 0 0 0 2px #efb83f;
}

.history-pagination,
.history-page-size {
  justify-content: center;
  margin-top: 18px;
}

.history-pagination label {
  grid-template-columns: auto auto;
  align-items: center;
  margin-left: auto;
}

.history-page-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.history-page-button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.history-loading {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  min-height: 180px;
  color: var(--muted);
  font-weight: 750;
}

.history-loading span {
  width: 18px;
  height: 18px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: history-spin .8s linear infinite;
}

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

.history-modal-shell {
  position: fixed;
  z-index: 95;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.history-draft-shell {
  z-index: 105;
}

.history-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(9 17 34 / 72%);
  cursor: pointer;
}

.history-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1080px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgb(5 12 28 / 35%);
}

.history-draft-modal {
  width: min(760px, 96vw);
}

.history-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.history-modal-head h2,
.history-modal-head p {
  margin: 0;
}

.history-modal-head h2 {
  margin: 3px 0 5px;
}

.history-modal-body {
  display: grid;
  gap: 20px;
  padding: 22px 24px;
  overflow: auto;
}

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

.history-summary-grid > div,
.history-snapshot-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.history-summary-grid span,
.history-snapshot-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.history-summary-grid strong,
.history-snapshot-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  white-space: pre-wrap;
}

.history-origin,
.history-observation,
.history-snapshot,
.history-trail,
.history-draft-link {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.history-origin,
.history-draft-link {
  background: #eef5ff;
  color: #244b83;
}

.history-observation h3,
.history-snapshot h3,
.history-trail h3,
.history-observation p,
.history-snapshot p {
  margin: 0;
}

.history-observation p,
.history-snapshot p {
  margin-top: 6px;
  color: var(--muted);
  white-space: pre-wrap;
}

.history-snapshot-grid {
  margin-top: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.history-document-body {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.history-document-body pre {
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  font: 12px/1.55 ui-monospace, monospace;
}

.history-trail ol {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.history-trail li {
  padding-left: 6px;
}

.history-trail li span,
.history-trail li strong,
.history-trail li small {
  display: block;
}

.history-trail li span,
.history-trail li small {
  color: var(--muted);
}

.history-modal-actions {
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

.history-draft-form {
  padding: 22px 24px;
  overflow: auto;
}

.history-draft-form .history-modal-actions,
.history-draft-form .history-draft-link {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .history-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-general-search {
    grid-column: span 2;
  }

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

@media (max-width: 720px) {
  .operational-module-bar,
  .history-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .operational-actions,
  .operational-actions .btn,
  .history-code-search,
  .history-code-search label,
  .history-general-search {
    grid-column: auto;
    width: 100%;
  }

  .history-code-search label {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-intro,
  .history-outside-notice,
  .history-modal-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .history-modal-shell {
    padding: 0;
  }

  .history-modal {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .settings-section-modal {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
  }

  .settings-section-modal > section {
    min-height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .process-import-modal .history-modal-head {
    flex-direction: row;
  }

  .history-pagination {
    justify-content: flex-start;
  }

  .history-pagination label {
    width: 100%;
    margin-left: 0;
  }
}

.workflow-page {
  --workflow-column: 286px;
}

.section-label {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.workflow-help {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
}

.workflow-exceptions {
  display: grid;
  gap: 8px;
}

.workflow-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(135px, .8fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.universal-filter-bar {
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(130px, .75fr)) auto auto;
}

.workflow-advanced-filters {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.workflow-filter-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.active-filter-chips,
.workflow-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.active-filter-chips > span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.active-filter-chips > span.muted {
  background: var(--soft);
  color: var(--muted);
}

.week-navigation {
  display: grid;
  grid-template-columns: auto auto minmax(250px, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: 12px;
  background: var(--soft);
}

.week-navigation label {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  gap: 2px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.week-navigation label input {
  grid-row: 1 / 3;
  grid-column: 2;
}

.week-navigation label strong {
  color: var(--text);
  font-size: 12px;
}

.week-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 10px;
  padding-bottom: 12px;
  overflow-x: auto;
}

.week-day {
  min-height: 270px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.week-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.week-day > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.week-day > header span,
.week-day > header strong {
  font-size: 11px;
}

.week-day > div {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.week-day > div > p {
  margin: 10px 4px;
  color: var(--muted);
  font-size: 11px;
}

.week-record-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid #d5e0dc;
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.week-record-card span,
.record-origin {
  color: var(--brand);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
}

.week-record-card strong {
  font-size: 12px;
}

.week-record-card small,
.week-record-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.workflow-card.stalled {
  border-color: #e3bd79;
  box-shadow: inset 3px 0 #c98927, 0 5px 16px rgb(12 47 38 / 7%);
}

.process-import-shell {
  z-index: 125;
}

.process-review-shell {
  z-index: 130;
}

.process-review-automation {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.process-review-automation legend {
  padding-inline: 5px;
  font-weight: 850;
}

.process-review-automation label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.process-review-automation p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.process-import-modal {
  width: min(1220px, 97vw);
}

.process-import-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.process-import-progress span {
  padding: 10px 16px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}

.process-import-progress span.active {
  background: var(--brand);
  color: #fff;
}

.process-import-progress span.done {
  color: var(--brand);
  background: var(--brand-light);
}

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

.import-source-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.import-source-card.selected {
  border-color: #9ac9b9;
  background: #f6fbf9;
}

.import-source-card h3 {
  margin: 14px 0 5px;
}

.import-source-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.import-source-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.import-file-button {
  display: inline-flex;
  cursor: pointer;
}

.import-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.process-import-mapping {
  display: grid;
  gap: 18px;
}

.import-mapping-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.import-mapping-head h3,
.import-mapping-head p {
  margin: 0;
}

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

.import-mapping-grid label {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-mapping-grid label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.import-preview {
  min-width: 0;
}

.import-preview h3 {
  margin: 0 0 10px;
}

.import-preview table {
  min-width: 760px;
}

.import-client-option {
  display: flex !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  text-transform: none !important;
}

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

.import-review-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.import-review-summary strong {
  font-size: 25px;
}

.import-review-summary span {
  color: var(--muted);
  font-size: 11px;
}

.import-review-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.import-review-settings label,
.import-review-settings > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.import-review-settings label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-review-settings p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.import-review-table {
  max-height: 46vh;
}

.import-review-table table {
  min-width: 1000px;
}

.import-review-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.process-import-review-form > .history-modal-actions {
  margin: 18px -24px -22px;
}

.import-result {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 20px;
  text-align: center;
}

.import-result-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 34px;
  font-weight: 900;
}

.import-result h3,
.import-result p {
  margin: 0;
}

.import-result .history-modal-actions {
  width: 100%;
  padding-inline: 0;
}

.import-history {
  margin-top: 20px;
}

.workflow-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workflow-indicators {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.workflow-indicators article {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 16px;
  border-right: 1px solid var(--line);
}

.workflow-indicators article:last-child {
  border-right: 0;
}

.workflow-indicators article span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-indicators article strong {
  color: var(--text);
  font-size: 17px;
}

.workflow-indicators article small {
  color: var(--muted);
  font-size: 11px;
}

.workflow-indicators article.danger strong {
  color: var(--danger);
}

.workflow-indicators .workflow-goal {
  margin-left: auto;
  border-right: 0;
}

.workflow-board {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-auto-columns: var(--workflow-column);
  grid-auto-flow: column;
  gap: 14px;
  padding: 3px 3px 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
}

.workflow-column {
  min-height: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #edf3f1;
  scroll-snap-align: start;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.workflow-column.drag-over {
  border-color: var(--accent);
  background: #fff8e8;
  transform: translateY(-2px);
}

.workflow-column.exception {
  border-color: #e8c5c8;
  background: #fff5f6;
}

.workflow-column > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.workflow-column > header h3,
.workflow-column > header small {
  display: block;
  margin: 0;
}

.workflow-column > header h3 {
  font-size: 15px;
}

.workflow-column > header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.workflow-column > header > strong {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--brand);
  background: #fff;
  font-size: 12px;
}

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

.workflow-card {
  padding: 14px;
  border: 1px solid #d5e0dc;
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 5px 16px rgb(12 47 38 / 7%);
}

.workflow-card[draggable="true"] {
  cursor: grab;
}

.workflow-card.dragging {
  opacity: .48;
}

.workflow-card-code,
.workflow-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.workflow-card-code {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.workflow-card-code strong {
  color: var(--brand);
  font-size: 11px;
  letter-spacing: .05em;
}

.workflow-card-code .copy-code {
  display: inline-block;
  margin: 0;
}

.workflow-card h3 {
  margin: 10px 0 5px;
  font-size: 15px;
}

.workflow-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.workflow-card dl {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.workflow-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.workflow-card dt,
.workflow-card dd {
  margin: 0;
  font-size: 11px;
}

.workflow-card dt {
  color: var(--muted);
}

.workflow-card dd {
  text-align: right;
  font-weight: 750;
}

.workflow-card .workflow-next {
  margin: 10px 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
}

.workflow-card-actions {
  align-items: end;
  margin-top: 12px;
}

.workflow-card-actions label {
  display: grid;
  gap: 3px;
  min-width: 130px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-card-actions select {
  min-height: 34px;
  max-width: 150px;
  font-size: 11px;
}

.workflow-empty {
  display: grid;
  min-height: 120px;
  margin: 0;
  place-items: center;
  border: 1px dashed #c7d4cf;
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-exceptions .workflow-board {
  width: 100%;
}

.workflow-lifecycle {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.workflow-lifecycle h3,
.workflow-lifecycle p {
  margin: 0;
}

.workflow-lifecycle ol {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.workflow-lifecycle li span,
.workflow-lifecycle li small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.workflow-transition-shell {
  z-index: 115;
}

@media (max-width: 1400px) {
  .workflow-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .universal-filter-bar,
  .workflow-advanced-filters,
  .import-review-settings,
  .import-mapping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .week-navigation label {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .workflow-page {
    --workflow-column: min(86vw, 310px);
  }

  .workflow-indicators article {
    flex: 1 1 45%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-indicators .workflow-goal {
    margin-left: 0;
  }

  .workflow-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .operational-module-main,
  .workflow-filter-meta {
    align-items: stretch;
    flex-direction: column;
  }

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

  .universal-filter-bar,
  .workflow-advanced-filters,
  .week-navigation,
  .import-source-grid,
  .import-review-settings,
  .import-review-summary,
  .import-mapping-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .week-navigation label {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .week-navigation label input {
    grid-row: auto;
    grid-column: auto;
  }

  .workflow-search {
    grid-column: auto;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 88% 3%, rgba(209, 168, 94, 0.1), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

body.project-modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid #0b6bcb;
  outline-offset: 3px;
}

.app {
  min-height: 100vh;
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.hero,
.card,
.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.hero {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(209, 168, 94, 0.24), transparent 20rem),
    linear-gradient(145deg, #123f34 0%, #092d25 100%);
  color: #fff;
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
}

.hero::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 42px;
}

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

.login-brand strong {
  font-size: 1.05rem;
}

.login-brand small {
  margin-top: 3px;
  color: #bcd1ca;
  font-size: 12px;
}

.login-logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--brand-dark);
  font-weight: 950;
}

.product-pill,
.master-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e7f1ed;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-top: 22px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
}

.hero > .lead {
  position: relative;
  z-index: 1;
  max-width: 650px;
  color: #c8d9d3;
  font-size: 1.02rem;
}

.feature-grid,
.stats-grid,
.form-grid,
.module-grid {
  display: grid;
  gap: 12px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.feature {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
  font-weight: 700;
}

.value-flow {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.value-flow li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.value-flow li > span {
  color: #dfbd7e;
  font-size: 11px;
  font-weight: 900;
}

.value-flow strong,
.value-flow small {
  display: block;
}

.value-flow small {
  margin-top: 2px;
  color: #bcd1ca;
}

.hero-proof {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.hero-proof > div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
  backdrop-filter: blur(10px);
}

.hero-proof strong,
.hero-proof span {
  display: block;
}

.hero-proof strong {
  color: #efd49f;
  font-size: 1.35rem;
}

.hero-proof span {
  margin-top: 4px;
  color: #c3d6d0;
  font-size: 11px;
}

.card {
  padding: 20px;
}

.login-card {
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-lg);
}

.login-card-head h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.login-card-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-primary {
  min-height: 46px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.login-divider::before,
.login-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.btn.master-entry,
.btn.master-compact {
  border-color: #b88b3f;
  background: linear-gradient(135deg, #d8b36f, #bb8c3b);
  color: #1f2a26;
}

.btn.master-entry:hover,
.btn.master-compact:hover {
  border-color: #9e7027;
  background: linear-gradient(135deg, #e2c384, #c79a4c);
}

.btn.google-entry {
  min-height: 48px;
  gap: 10px;
}

.google-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #1a73e8;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(31, 42, 38, 0.2);
}

.btn.google-entry:disabled {
  cursor: wait;
  opacity: 0.72;
}

.btn.signup-entry {
  border-color: #0d6b55;
  background: linear-gradient(135deg, #0d6b55, #0f766e);
  box-shadow: 0 10px 22px rgba(13, 107, 85, 0.18);
}

.btn.signup-entry:hover {
  border-color: #095a47;
  background: linear-gradient(135deg, #095a47, #0d665f);
}

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

.signup-benefits span {
  border: 1px solid #cfe3dc;
  border-radius: 7px;
  background: #f2f8f6;
  color: #31534a;
  padding: 7px 5px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.onboarding-note {
  margin: 0;
  border-left: 3px solid #0f766e;
  background: #f2f8f6;
  color: #475569;
  padding: 9px 10px;
  font-size: 11px;
  line-height: 1.45;
}

.login-footnote {
  margin: 14px 0 0;
  color: #6c7873;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.login-legal {
  margin: 8px 0 0;
  color: #6c7873;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.login-legal a {
  color: #1f6f5c;
  text-decoration: underline;
}

.demo-warning,
.server-ready,
.form-error,
.local-data-notice {
  margin: 12px 0;
  border: 1px solid #d6b36a;
  border-radius: 8px;
  background: #fff8e8;
  color: #5f370c;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.server-ready {
  margin: 12px 0;
  border: 1px solid #9bcdbb;
  border-radius: 8px;
  background: #eaf7f2;
  color: #174f40;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.form-error {
  border-color: #f0a7ae;
  background: #fff1f2;
  color: #8d1f2b;
}

.local-data-notice {
  margin-top: 0;
  border-color: #b8d7cc;
  background: #edf7f3;
  color: #174f40;
}

.server-data-notice {
  border-color: #82c5ad;
  background: #e3f5ee;
}

.form-grid {
  margin-top: 16px;
}

.tribunal-search-form {
  grid-template-columns: minmax(100px, 0.35fr) minmax(180px, 0.65fr) auto;
  align-items: end;
}

.tribunal-search-form .btn {
  min-height: 42px;
}

.tribunal-search-status {
  margin-top: 14px;
  border: 1px solid #9fc9bc;
  border-radius: 8px;
  background: #edf7f3;
  color: #174f40;
  padding: 14px;
  font-weight: 700;
}

.tribunal-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.tribunal-search-summary strong,
.tribunal-search-summary span {
  display: block;
}

.tribunal-search-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.tribunal-results {
  max-height: 660px;
  overflow: auto;
  padding-right: 4px;
}

.movement-status,
.movement-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.movement-status {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.movement-error {
  margin: 12px 0 0;
}

.movement-panel > p,
.movement-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.movement-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.movement-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.movement-list li {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.movement-list time,
.movement-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.movement-list strong {
  font-size: 13px;
}

.movement-content-button {
  display: inline-flex;
  margin-top: 7px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--brand-dark);
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.publication-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

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

.publication-list article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.publication-list article.publication-match {
  border-color: #75ad9b;
  box-shadow: 0 0 0 2px rgba(37, 112, 88, 0.08);
}

.publication-priority {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 13px;
}

.publication-list header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.publication-list header span,
.publication-list a {
  color: var(--muted);
  font-size: 12px;
}

.publication-truncated {
  margin: 0;
  border-top: 1px solid #d6b36a;
  background: #fff8e8;
  color: #5f370c;
  padding: 8px 12px;
  font-size: 12px;
}

.publication-text {
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.publication-list a {
  display: inline-block;
  padding: 0 12px 12px;
  color: var(--brand-dark);
  font-weight: 800;
}

.projects-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #edf6f2);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.projects-command h2,
.projects-command p {
  margin: 0;
}

.projects-command h2 {
  margin-top: 4px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.projects-command p:last-child {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.project-new-button {
  flex: 0 0 auto;
  min-height: 46px;
  padding-inline: 18px;
}

.project-new-button span {
  font-size: 20px;
  line-height: 0;
}

.project-stats {
  margin-bottom: 0;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 14px;
}

.project-card {
  display: grid;
  gap: 14px;
  margin: 0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(12, 47, 38, 0.05);
}

.project-card-head,
.project-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-card-head h3,
.project-card-goal,
.project-card-details p {
  margin: 0;
}

.project-card-kicker {
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-card-goal {
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.project-card-metrics div {
  min-width: 0;
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.project-card-metrics dt,
.project-card-metrics dd {
  margin: 0;
}

.project-card-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card-metrics dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
}

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

.project-card-details p {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
}

.project-card-details span {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.project-card-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.project-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(4, 24, 19, 0.7);
  cursor: default;
  backdrop-filter: blur(3px);
}

.project-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(1440px, calc(100vw - 48px));
  height: min(920px, calc(100dvh - 40px));
  transform: translate(-50%, -50%);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(3, 27, 21, 0.35);
}

.project-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff, #edf6f2);
  padding: 20px 24px;
}

.project-modal-head h2,
.project-modal-head p {
  margin: 0;
}

.project-modal-head h2 {
  margin-top: 3px;
  font-size: 1.45rem;
}

.project-modal-head p:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.project-modal-head-actions,
.project-form-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-modal-close {
  display: inline-grid;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.project-modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 24px;
}

.project-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 0;
}

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

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

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

.project-span-full {
  grid-column: 1 / -1;
}

.project-planning-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-form-section,
.project-form-actions {
  grid-column: 1 / -1;
}

.project-planning-grid .project-form-section {
  grid-column: auto;
}

.project-form-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf9;
}

.project-form-section summary {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--brand-dark);
}

.project-form-section summary span,
.project-placeholder p {
  color: var(--muted);
  font-size: 12px;
}

.project-form-inner,
.project-placeholder p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.project-check {
  position: relative;
  padding-left: 26px;
}

.project-check::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #94a3b8;
  border-radius: 50%;
  color: #94a3b8;
  content: "✓";
  font-size: 11px;
}

.project-check.is-complete::before {
  border-color: #16825d;
  background: #16825d;
  color: white;
}

.project-form input[readonly],
.project-form textarea[readonly] {
  background: #eef3f1;
  color: #31534a;
}

.project-form [hidden] {
  display: none !important;
}

.project-form-actions,
.project-form-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.project-form-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  margin: 2px -24px -24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  padding: 15px 24px;
  box-shadow: 0 -10px 28px rgba(13, 45, 36, 0.08);
}

.project-form-actions > div:first-child {
  display: grid;
  gap: 2px;
}

.project-form-actions span {
  color: var(--muted);
  font-size: 11px;
}

.project-wizard-track {
  position: sticky;
  top: -22px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(10, minmax(108px, 1fr));
  gap: 6px;
  overflow-x: auto;
  margin: -4px 0 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px;
  box-shadow: 0 8px 24px rgba(13, 45, 36, 0.06);
  backdrop-filter: blur(12px);
}

.project-wizard-track a {
  display: flex;
  min-width: 108px;
  gap: 7px;
  align-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand-dark);
  padding: 8px 9px;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.project-wizard-track a:hover,
.project-wizard-track a:focus-visible {
  background: var(--brand-light);
  outline: 2px solid rgba(22, 130, 93, 0.2);
}

.project-wizard-track a span,
.project-stage-number {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 900;
}

.project-stage > summary {
  justify-content: flex-start;
}

.project-stage > summary > span:last-child {
  margin-left: auto;
  text-align: right;
}

.project-stage-grid,
.project-choice-group,
.project-document-summary,
.project-finance-note,
.project-quarter-projection,
.project-market-roadmap,
.project-stage-subtitle,
.project-stage-note {
  grid-column: 1 / -1;
}

.project-stage-subtitle {
  margin: 2px 0 -2px;
  color: var(--brand-dark);
  font-size: 13px;
}

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

.project-choice-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}

.project-choice-group legend {
  color: var(--brand-dark);
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
}

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

.project-choice-group--wide .project-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-choice-grid label {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.project-choice-grid input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.project-choice-grid span {
  overflow-wrap: anywhere;
  color: #3d574f;
  font-size: 11px;
}

.project-document-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-document-summary article,
.project-finance-note,
.project-market-roadmap {
  display: grid;
  gap: 4px;
  border: 1px solid #cde3db;
  border-radius: 9px;
  background: #edf6f2;
  padding: 12px;
}

.project-document-summary span,
.project-finance-note span,
.project-market-roadmap p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.project-finance-note {
  border-color: #ecd7a9;
  background: #fff9eb;
}

.project-quarter-projection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-quarter-projection article,
.project-quarter-projection footer {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 13px;
}

.project-quarter-projection article > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-quarter-projection dl {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.project-quarter-projection dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.project-quarter-projection dt,
.project-quarter-projection dd {
  margin: 0;
  font-size: 11px;
}

.project-quarter-projection dd {
  font-weight: 900;
}

.project-quarter-projection .positive {
  color: #087455;
}

.project-quarter-projection .negative {
  color: #b42318;
}

.project-quarter-projection footer {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  border-color: #9ed0bf;
  background: linear-gradient(135deg, #e8f6f0, #fff);
}

.project-quarter-projection footer strong {
  color: var(--brand-dark);
  font-size: 1.25rem;
}

.project-quarter-projection footer small {
  grid-column: 1 / -1;
  color: var(--muted);
}

label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 78px;
  padding: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  border-color: var(--line);
  background: white;
  color: var(--text);
}

.btn.danger {
  border-color: var(--danger);
  background: var(--danger);
}

.btn.plain {
  border-color: transparent;
  background: transparent;
  color: var(--brand-dark);
}

.btn.compact {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 304px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #102f28;
  color: white;
}

.mobile-nav-toggle,
.sidebar-close,
.nav-backdrop {
  display: none;
}

.sidebar-close {
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #b8cbc4;
  font-size: 11px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #17211e;
  font-weight: 900;
}

.tenant {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5faf8;
}

.tenant small {
  display: block;
  margin-top: 4px;
  color: #b8cbc4;
}

.nav {
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 151px);
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.nav button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #e4efeb;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.nav button.active,
.nav button:hover {
  border-color: rgba(195, 154, 85, 0.45);
  background: rgba(195, 154, 85, 0.15);
  color: #fff;
}

.nav-copy,
.nav-copy strong,
.nav-copy span {
  display: block;
}

.nav-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8b77d;
  font-size: 11px;
  font-weight: 900;
}

.nav-copy span {
  margin-top: 2px;
  color: #aebfb9;
  font-size: 12px;
}

.userbox {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 20px 24px 40px;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px 16px 14px 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.topbar-leading {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.topbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.page-heading h1 {
  margin-bottom: 4px;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

.profile-menu {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profile-avatar,
.client-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 900;
}

.profile-copy {
  display: grid;
  min-width: 170px;
  line-height: 1.25;
}

.profile-copy span {
  color: var(--muted);
  font-size: 11px;
}

.profile-copy .profile-role {
  color: var(--brand);
  font-weight: 800;
}

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

.account-notice {
  margin-bottom: 16px;
  border: 1px solid #a5f3fc;
  border-radius: 8px;
  background: #ecfeff;
  color: var(--brand-dark);
  padding: 12px 14px;
  font-weight: 700;
}

.account-notice.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--warn);
}

.account-notice.danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: var(--danger);
}

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

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
}

.stat small {
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.7rem;
}

.module-grid {
  grid-template-columns: 390px minmax(0, 1fr);
}

.page-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 16px;
}

.dashboard-controls,
.daily-goals,
.roadmap-intro {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 16px;
}

.dashboard-controls select {
  min-width: 280px;
}

.period-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
}

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

.kpi-card {
  --kpi-color: var(--brand);
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--kpi-color);
  border-radius: 14px;
  background: white;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(22, 32, 29, 0.06);
}

.kpi-card.performance-danger {
  --kpi-color: #b43b45;
}

.kpi-card.performance-low {
  --kpi-color: #914425;
}

.kpi-card.performance-medium {
  --kpi-color: #795b1d;
}

.kpi-card.performance-good {
  --kpi-color: #286b55;
}

.kpi-card.performance-excellent {
  --kpi-color: #1f6f50;
}

.kpi-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.kpi-head h2,
.kpi-head p {
  margin: 0;
}

.kpi-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--kpi-color) 14%, white);
  color: var(--kpi-color);
  font-size: 11px;
  font-weight: 900;
}

.kpi-score {
  display: grid;
  justify-items: end;
}

.kpi-score strong {
  color: var(--kpi-color);
  font-size: 12px;
}

.kpi-score span {
  font-size: 1.25rem;
  font-weight: 900;
}

.kpi-gauge {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, white 68%, transparent 69% 100%),
    conic-gradient(var(--kpi-color) calc(var(--progress) * 1%), #e6ece9 0);
}

.kpi-gauge span {
  color: var(--kpi-color);
  font-size: 1.15rem;
  font-weight: 900;
}

.kpi-metrics {
  display: grid;
  gap: 6px;
  margin: 0;
}

.kpi-metrics div {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 5px;
  font-size: 12px;
}

.kpi-metrics dt {
  color: var(--muted);
}

.kpi-metrics dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.kpi-history {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}

.kpi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-card.kpi-clickable {
  appearance: none;
  border: 1px solid var(--line);
  border-top: 4px solid var(--kpi-color);
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.kpi-card.kpi-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(22, 32, 29, 0.12);
}

.kpi-card.kpi-clickable:focus-visible {
  outline: 2px solid var(--kpi-color);
  outline-offset: 2px;
}

.kpi-drill-hint {
  margin-top: -4px;
  color: var(--kpi-color);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.kpi-form-panel {
  margin-bottom: 0;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.capture-form-question-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 12px;
}

.capture-form-question-row legend {
  font-weight: 700;
  padding: 0 4px;
}

.capture-form-import {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  display: grid;
  gap: 10px;
}

.capture-form-import summary {
  cursor: pointer;
  font-weight: 700;
}

.capture-form-import[open] summary {
  margin-bottom: 8px;
}

.capture-form-import textarea {
  width: 100%;
  min-height: 110px;
}

.capture-form-links {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.capture-form-links code {
  word-break: break-all;
}

.account-logo-preview {
  display: block;
  max-width: 160px;
  max-height: 80px;
  object-fit: contain;
  margin: 8px 0;
}

.daily-goals {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 1fr));
}

.daily-goals .stat {
  box-shadow: none;
}

.control-performance {
  border-color: #c9ddd5;
  background: linear-gradient(135deg, #fff, #f2f8f5);
}

.control-flow-board {
  padding: 16px;
}

.control-flow-board .kanban-column {
  min-height: 260px;
}

.control-flow-board .kanban-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--brand);
  color: #fff;
}

.control-flow-board .kanban-head span {
  color: var(--brand-dark);
}

.task-filter-row {
  display: flex;
  gap: 12px;
  align-items: end;
}

.task-filter-row label {
  min-width: 200px;
}

.task-inline-form {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.urgent-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #f4b7bd;
  border-radius: 14px;
  background: #fff0f1;
  color: #70242b;
  padding: 16px;
}

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

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(250px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.task-status-control {
  min-width: 165px;
  text-align: left;
}

.kanban-column {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #edf1ef;
  padding: 10px;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
}

.kanban-head h2 {
  margin: 0;
}

.kanban-head span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-size: 12px;
  font-weight: 900;
}

.kanban-list {
  display: grid;
  gap: 8px;
}

.kanban-list .item,
.urgent-list .item {
  padding: 11px;
}

.kanban-list .item-row,
.urgent-list .item-row {
  display: grid;
}

.prospecting-goals {
  margin-bottom: 0;
}

.panel-head-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.funnel-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.funnel-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.funnel-stage:hover {
  border-color: var(--accent);
  background: #fffaf1;
}

.funnel-stage > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.prospecting-filter-panel .task-filter-row {
  flex-wrap: wrap;
}

.prospecting-filter-panel .btn {
  margin-left: auto;
}

.prospecting-attendance .panel-head {
  background: linear-gradient(135deg, #f7fbfa, #edf6f2);
}

.prospecting-workspace {
  display: grid;
  min-height: 470px;
  grid-template-columns: minmax(210px, 0.72fr) minmax(320px, 1.35fr) minmax(250px, 0.9fr);
  gap: 0;
  padding: 0;
}

.prospecting-contacts {
  max-height: 520px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f8faf9;
  padding: 10px;
}

.prospecting-contact {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  padding: 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.prospecting-contact + .prospecting-contact {
  margin-top: 4px;
}

.prospecting-contact:hover,
.prospecting-contact:focus-visible,
.prospecting-contact.is-active {
  border-color: #aad3c4;
  background: #fff;
  outline: none;
  box-shadow: 0 6px 16px rgba(13, 45, 36, 0.07);
}

.prospecting-contact > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.prospecting-contact strong,
.prospecting-contact small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prospecting-contact small {
  color: var(--muted);
  font-size: 10px;
}

.prospecting-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.prospecting-conversation {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: #f5f1e8;
}

.prospecting-conversation header {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(15, 55, 44, 0.1);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
}

.prospecting-conversation header div {
  display: grid;
  gap: 2px;
}

.prospecting-conversation header small {
  color: var(--muted);
}

.prospecting-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px;
}

.prospecting-bubble {
  width: fit-content;
  max-width: min(86%, 440px);
  margin: 0;
  border-radius: 11px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(33, 42, 38, 0.08);
  font-size: 12px;
  line-height: 1.5;
}

.kanban-head h2 {
  color: inherit;
}

.prospecting-bubble.outgoing {
  align-self: flex-end;
  background: #d9f7e8;
}

.prospecting-next-form {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 14px;
}

.prospecting-next-form textarea {
  min-height: 118px;
}

.prospecting-history .table-scroll {
  max-height: 430px;
}

.funnel-stage strong {
  font-size: 11px;
}

.funnel-stage b {
  color: var(--brand);
}

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

.client-card,
.settings-card,
.roadmap-card,
.audit-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 16px;
}

.client-profile {
  display: flex;
  gap: 12px;
  align-items: center;
}

.client-profile h2,
.client-profile p {
  margin: 0;
}

.client-profile p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.client-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 16px 0;
}

.client-metrics span {
  border-radius: 8px;
  background: var(--soft);
  padding: 8px 5px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.client-metrics b {
  display: block;
  color: var(--brand);
  font-size: 1rem;
}

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

.audit-card {
  --audit-color: var(--brand);
  border-top: 4px solid var(--audit-color);
}

.audit-card.performance-danger {
  --audit-color: #b43b45;
}

.audit-card.performance-low {
  --audit-color: #914425;
}

.audit-card.performance-medium {
  --audit-color: #795b1d;
}

.audit-card.performance-good,
.audit-card.performance-excellent {
  --audit-color: #287a59;
}

.audit-card-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
}

.audit-card-head > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--audit-color);
  font-weight: 900;
}

.audit-card-head h2,
.audit-card-head p {
  margin: 0;
}

.audit-card-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.audit-card-head > strong {
  color: var(--audit-color);
}

.progress-track {
  height: 7px;
  margin: 15px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

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

.audit-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.roadmap-intro h2,
.roadmap-intro p {
  margin-bottom: 5px;
}

.roadmap-card h2 {
  min-height: 46px;
  margin-top: 12px;
}

.rating {
  display: flex;
  gap: 3px;
}

.rating button {
  width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #66736d;
  padding: 4px;
  font-size: 1.5rem;
  cursor: pointer;
}

.rating button.selected,
.rating button:hover {
  border-color: #c9a45f;
  background: #fff7e6;
  color: #765315;
}

.backup-actions {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.backup-file-label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

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

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggestion-list,
.team-list {
  margin-top: 16px;
}

.settings-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.settings-card > span {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 900;
}

.settings-card h2,
.settings-card p {
  margin: 0;
}

.settings-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.settings-section-modal {
  position: relative;
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.settings-section-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.integration-readiness {
  scroll-margin-top: 24px;
  border: 1px solid #cbdcd5;
  border-radius: 18px;
  background:
    radial-gradient(circle at 96% 0, rgba(175, 139, 77, 0.13), transparent 25%),
    linear-gradient(180deg, #f7fbf9 0, #eef5f2 100%);
  padding: 22px;
}

.integration-readiness:focus {
  outline: 3px solid rgba(26, 110, 82, 0.3);
  outline-offset: 3px;
}

.integration-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.integration-hero h2,
.integration-hero p {
  margin: 0;
}

.integration-hero h2 {
  margin-bottom: 8px;
  color: #153c30;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.integration-hero p:not(.eyebrow) {
  max-width: 780px;
  color: #546861;
  line-height: 1.55;
}

.integration-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.integration-summary article {
  border: 1px solid #d4e2dc;
  border-left: 4px solid #61746d;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.integration-summary article.active {
  border-left-color: #267452;
}

.integration-summary article.infrastructure {
  border-left-color: #16758a;
}

.integration-summary article.missing {
  border-left-color: #a26b1a;
}

.integration-summary article.restricted {
  border-left-color: #a03c43;
}

.integration-summary article.roadmap {
  border-left-color: #566b91;
}

.integration-summary span,
.integration-summary small {
  display: block;
  color: #5d6e68;
  font-size: 11px;
}

.integration-summary strong {
  display: block;
  margin: 3px 0;
  color: #153c30;
  font-size: 1.65rem;
}

.integration-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 12px;
  color: #4c6159;
  font-size: 12px;
}

.integration-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.integration-legend i,
.integration-state i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #61746d;
}

.integration-legend i.active,
.integration-card.active .integration-state i {
  background: #267452;
}

.integration-legend i.infrastructure,
.integration-card.infrastructure .integration-state i {
  background: #16758a;
}

.integration-legend i.missing,
.integration-card.missing .integration-state i {
  background: #a26b1a;
}

.integration-legend i.restricted,
.integration-card.restricted .integration-state i {
  background: #a03c43;
}

.integration-legend i.roadmap,
.integration-card.roadmap .integration-state i {
  background: #566b91;
}

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

.integration-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid #d4e2dc;
  border-top: 4px solid #61746d;
  border-radius: 14px;
  background: #fff;
  padding: 15px;
}

.integration-card.active {
  border-top-color: #267452;
}

.integration-card.infrastructure {
  border-top-color: #16758a;
}

.integration-card.missing {
  border-top-color: #a26b1a;
}

.integration-card.restricted {
  border-top-color: #a03c43;
}

.integration-card.roadmap {
  border-top-color: #566b91;
}

.integration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.integration-card h3,
.integration-card h4,
.integration-card p {
  margin: 0;
}

.integration-card h3 {
  margin-top: 3px;
  color: #193f33;
  font-size: 1rem;
}

.integration-card h4 {
  margin-top: 14px;
  color: #2d4d43;
  font-size: 12px;
}

.integration-area {
  color: #657871;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.integration-priority {
  border-radius: 999px;
  background: #edf3f0;
  padding: 4px 7px;
  color: #40564e;
  font-size: 10px;
  font-weight: 900;
}

.integration-state {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  margin-top: 12px;
  color: #465b53;
  font-size: 11px;
  font-weight: 800;
}

.integration-card > p {
  margin-top: 9px;
  color: #586b64;
  font-size: 12px;
  line-height: 1.45;
}

.integration-card ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 15px;
  padding-left: 18px;
  color: #4c6159;
  font-size: 11px;
  line-height: 1.4;
}

.integration-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.integration-docs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid #bfd2ca;
  border-radius: 8px;
  padding: 6px 9px;
  color: #175d48;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.integration-docs a:hover,
.integration-docs a:focus-visible {
  border-color: #175d48;
  background: #eef8f4;
  outline: none;
}

.integration-security-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  border-radius: 12px;
  background: #153c30;
  padding: 13px 15px;
  color: #eaf4f0;
  font-size: 12px;
  line-height: 1.5;
}

.integration-security-note strong {
  color: #f5d79f;
}

.panel {
  overflow: hidden;
}

.panel-head {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-body {
  padding: 16px;
}

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

.files-folders {
  display: grid;
  gap: 10px;
}

.files-folder,
.files-subfolder {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 12px 12px;
  background: var(--soft);
}

.files-subfolder {
  margin: 10px 0 0;
  background: var(--panel);
}

.files-folder summary,
.files-subfolder summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}

.files-folder > summary {
  font-size: 14px;
}

.files-subfolder .list {
  padding-bottom: 6px;
}

.section-title {
  margin: 24px 0 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
}

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

.item p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
}

p.muted {
  color: var(--muted-text, #6b7280);
  font-size: 0.9em;
}

.warn-text {
  color: var(--warn);
}

.case-communications-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.case-communication-item {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px;
}

.case-communication-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.case-communication-head span {
  color: var(--muted-text, #6b7280);
  font-size: 0.85em;
}

.communication-deadline-form {
  margin-top: 10px;
  border-top: 1px dashed var(--border, #e5e7eb);
  padding-top: 10px;
}

.tag.ok {
  background: #d1fae5;
  color: var(--ok);
}

.tag.warn {
  background: #fef3c7;
  color: var(--warn);
}

.tag.danger {
  background: #ffe4e6;
  color: var(--danger);
}

.tag.info {
  background: #cffafe;
  color: var(--brand-dark);
}

.investigation-page {
  --investigation-ink: #14213d;
  --investigation-accent: #9a3412;
}

.investigation-hero,
.investigation-boundary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 12%, rgba(251, 146, 60, 0.2), transparent 32%),
    linear-gradient(135deg, #fff7ed 0%, #ffffff 68%);
  padding: 24px;
}

.investigation-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--investigation-accent);
}

.investigation-hero h2,
.investigation-boundary h2 {
  max-width: 760px;
  margin: 4px 0 8px;
  color: var(--investigation-ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.investigation-hero p,
.investigation-boundary p {
  max-width: 820px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.investigation-status {
  display: flex;
  flex: 0 0 240px;
  gap: 12px;
  align-items: center;
  border: 1px solid #fdba74;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(154, 52, 18, 0.08);
}

.investigation-status .status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: #c2410c;
  box-shadow: 0 0 0 5px #ffedd5;
}

.investigation-status small,
.investigation-status span {
  display: block;
  color: #78716c;
  font-size: 11px;
}

.investigation-status strong {
  display: block;
  margin: 2px 0;
  color: #9a3412;
}

.investigation-stats {
  margin-bottom: 0;
}

.investigation-stats .stat {
  border-top: 3px solid #fdba74;
}

.investigation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
}

.readiness-checks {
  display: grid;
  gap: 9px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.readiness-checks legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.check-row input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.check-row span,
.check-row small {
  display: block;
}

.check-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.readiness-result {
  margin-top: 14px;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  background: #ecfdf5;
  padding: 13px;
}

.readiness-result p {
  margin: 5px 0 0;
  color: #166534;
  line-height: 1.45;
}

.compliance-list {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.compliance-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffaf5;
  padding: 11px;
}

.compliance-item > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #ffedd5;
  color: #c2410c;
  font-weight: 900;
}

.compliance-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.compliance-item b {
  color: #c2410c;
  font-size: 11px;
  text-transform: uppercase;
}

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

.report-field-grid article {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 13px;
}

.report-field-grid article > span {
  color: var(--investigation-accent);
  font-size: 20px;
}

.report-field-grid h3,
.report-field-grid p {
  margin: 0;
}

.report-field-grid p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.investigation-boundary {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 340px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  color: #064e3b;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.toast.error {
  border-color: #f0a7ae;
  background: #fff1f2;
  color: #8d1f2b;
}

.toast.info {
  border-color: #a5d8e6;
  background: #ecfeff;
  color: #164e63;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 0 0, rgba(209, 168, 94, 0.12), transparent 15rem),
    #0c3027;
}

.nav {
  flex: 1;
  max-height: none;
}

.nav-separator {
  height: 1px;
  margin: 5px 8px;
  background: rgba(255, 255, 255, 0.1);
}

.nav button.master-nav {
  border-color: rgba(209, 168, 94, 0.28);
  background: rgba(209, 168, 94, 0.08);
}

.nav button.master-nav .nav-index {
  background: rgba(209, 168, 94, 0.2);
}

.sidebar-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 18px;
}

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

.sidebar-foot strong {
  color: #e9f2ef;
  font-size: 11px;
}

.sidebar-foot small {
  margin-top: 2px;
  color: #9fb6ae;
  font-size: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5bd39b;
  box-shadow: 0 0 0 4px rgba(91, 211, 155, 0.12);
}

.master-mode-notice {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #d8bc84;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff8e9, #fffdf8);
  color: #5f4518;
  padding: 11px 14px;
}

.master-mode-notice > span {
  color: #b38431;
}

.master-mode-notice strong,
.master-mode-notice small {
  display: block;
}

.master-mode-notice small {
  margin-top: 2px;
  color: #77613c;
}

.command-center {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #194e40;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(209, 168, 94, 0.17), transparent 18rem),
    linear-gradient(135deg, #154c3e, #0b352b);
  color: #fff;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.command-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.command-copy h2 {
  margin: 0 0 5px;
  font-size: 1.25rem;
}

.command-copy p {
  margin: 0;
  color: #c5d8d2;
  font-size: 13px;
  line-height: 1.5;
}

.command-copy p strong {
  color: #fff0c9;
}

.command-filters {
  display: flex;
  flex: 1 1 300px;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.command-filters label {
  display: grid;
  gap: 3px;
  color: #aec6be;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.command-filters select {
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 7px 9px;
  font-size: 13px;
}

.command-filters select option {
  color: var(--text);
}

.command-filters .period-chip {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.command-pulse {
  display: grid;
  flex: 1 1 380px;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
}

.command-pulse > div {
  padding: 12px;
}

.command-pulse > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.command-pulse span,
.command-pulse strong {
  display: block;
}

.command-pulse span {
  color: #aec6be;
  font-size: 10px;
}

.command-pulse strong {
  margin-top: 5px;
  color: #fff;
  font-size: 1rem;
  white-space: nowrap;
}

.command-pulse strong.danger {
  color: #ffd1d5;
}

.command-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
}

.command-actions .btn {
  white-space: nowrap;
}

.command-actions .btn:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #1d2a25;
}

.command-actions .btn.secondary {
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
}

.master-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 0, rgba(209, 168, 94, 0.25), transparent 22rem),
    linear-gradient(135deg, #123f34, #082a22);
  color: white;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow-lg);
}

.master-hero h2 {
  margin: 16px 0 7px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
}

.master-hero p {
  max-width: 680px;
  margin: 0;
  color: #c2d5cf;
}

.master-context {
  flex: 0 0 auto;
  min-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  padding: 18px;
}

.master-context small,
.master-context strong,
.master-context span {
  display: block;
}

.master-context small,
.master-context span {
  color: #b9cec7;
}

.master-context strong {
  margin: 7px 0 4px;
  color: #f0d398;
  font-size: 1.35rem;
}

.master-stats {
  margin-bottom: 0;
}

.master-stats .stat {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.master-readiness {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.master-readiness p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.master-readiness ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.master-readiness li {
  display: flex;
  gap: 9px;
  align-items: center;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
}

.master-readiness li.ready {
  background: #eaf6f1;
  color: #1c654f;
}

.master-readiness li.pending {
  background: #fff7e8;
  color: #765519;
}

.master-readiness code {
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 5px;
}

.master-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

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

.master-account {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fbfcfc);
  padding: 16px;
}

.master-account-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.master-account-head h3,
.master-account-head p {
  margin: 0;
}

.master-account-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.master-account-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 900;
}

.master-account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 15px 0 10px;
}

.master-account-metrics > div {
  border-radius: 9px;
  background: var(--soft);
  padding: 9px;
}

.master-account-metrics span,
.master-account-metrics strong {
  display: block;
}

.master-account-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.master-account-metrics strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.master-alert,
.master-ok {
  margin: 0 0 12px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.master-alert {
  background: #fff0f1;
  color: #9c2d38;
}

.master-ok {
  background: #eaf6f1;
  color: #1c654f;
}

.master-account-controls,
.master-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.master-account-actions {
  margin-top: 10px;
}

.master-account form.compact-form,
.master-billing-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.master-billing-result a {
  word-break: break-all;
}

.agenda-page {
  --agenda-blue: #17658d;
  --agenda-blue-soft: #eef8ff;
  --agenda-blue-line: #b7dced;
}

.agenda-filter-panel .panel-body {
  padding-block: 13px;
}

.agenda-filter-panel .task-filter-row {
  justify-content: space-between;
}

.agenda-queue {
  display: grid;
  gap: 14px;
  border: 1px solid var(--agenda-blue-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 4%, rgba(42, 139, 183, 0.12), transparent 26%),
    var(--agenda-blue-soft);
  padding: 18px;
}

.agenda-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.agenda-section-head h2,
.agenda-section-head p,
.meeting-card h3,
.meeting-context h3 {
  margin: 0;
}

.agenda-section-head h2 {
  color: #164e6a;
}

.agenda-section-head p:last-child {
  margin-top: 4px;
  color: #526b78;
  font-size: 13px;
}

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

.meeting-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  border: 1px solid #c5dfeb;
  border-top: 4px solid var(--agenda-blue);
  border-radius: 13px;
  background: #fff;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(23, 101, 141, 0.08);
}

.meeting-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.meeting-card h3 {
  margin-top: 3px;
  color: #173d51;
}

.meeting-time {
  color: var(--agenda-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.meeting-details div {
  border-radius: 8px;
  background: #f5f9fb;
  padding: 8px;
}

.meeting-details dt,
.meeting-details dd {
  margin: 0;
}

.meeting-details dt {
  color: #657984;
  font-size: 10px;
}

.meeting-details dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #263f4b;
  font-size: 12px;
  font-weight: 800;
}

.meeting-description {
  border-top: 1px dashed #c7dbe4;
  border-bottom: 1px dashed #c7dbe4;
  padding: 9px 0;
  color: #526b78;
  font-size: 12px;
  line-height: 1.5;
}

.meeting-description summary,
.meeting-proposal-fields summary {
  cursor: pointer;
  color: #185d7e;
  font-weight: 900;
}

.meeting-description p {
  margin: 8px 0 0;
}

.meeting-actions,
.agenda-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meeting-actions .btn {
  flex: 1 1 110px;
}

.meeting-reschedule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 10px;
  background: #edf6fa;
  padding: 12px;
}

.meeting-reschedule-form .actions {
  grid-column: 1 / -1;
}

.meeting-workspace {
  display: grid;
  gap: 16px;
  border: 1px solid #b8d3c8;
  border-left: 6px solid var(--brand);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(20, 77, 59, 0.1);
  outline: none;
}

.meeting-workspace-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.meeting-context {
  border-radius: 12px;
  background: #eef6f2;
  padding: 15px;
}

.meeting-context p {
  margin: 10px 0 0;
  color: #486058;
  font-size: 13px;
  line-height: 1.5;
}

.meeting-proposal-fields {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.meeting-proposal-fields .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.agenda-create-grid {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
}

.agenda-history-filters {
  margin-bottom: 14px;
}

.weekly-agenda {
  display: grid;
  gap: 14px;
  border: 1px solid var(--agenda-blue-line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  overflow: hidden;
}

.weekly-agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.weekly-day {
  min-width: 0;
  border: 1px solid #d9e8ee;
  border-radius: 11px;
  background: #f7fbfd;
  overflow: hidden;
}

.weekly-day header {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #d9e8ee;
  background: #eaf5fa;
  padding: 10px;
}

.weekly-day header strong {
  color: #164e6a;
  font-size: 12px;
}

.weekly-day header span,
.weekly-day p {
  color: #657984;
  font-size: 10px;
}

.weekly-day > div {
  display: grid;
  gap: 7px;
  min-height: 90px;
  padding: 8px;
}

.weekly-day button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #bddbe7;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  color: #244b5e;
  cursor: pointer;
  text-align: left;
}

.weekly-day button strong {
  color: var(--agenda-blue);
  font-size: 10px;
}

.weekly-day button span {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.agenda-modal-shell,
.contract-modal-shell,
.task-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 125;
}

.agenda-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(4, 24, 19, 0.7);
  cursor: default;
  backdrop-filter: blur(3px);
}

.agenda-modal,
.contract-modal,
.task-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(940px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  transform: translate(-50%, -50%);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(3, 27, 21, 0.35);
}

.contract-modal {
  width: min(1100px, calc(100vw - 40px));
}

.agenda-modal-form,
.contract-modal-form,
.task-modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-y: auto;
  padding: 22px 24px 24px;
}

.agenda-modal-form > label:has(textarea),
.contract-modal-form > label:has(textarea),
.task-modal-form > label:has(textarea),
.contract-clauses,
.agenda-modal-actions {
  grid-column: 1 / -1;
}

.contract-document-form {
  overflow-y: auto;
  padding: 22px 24px 24px;
}

.contract-document-form textarea {
  min-height: 55vh;
  resize: vertical;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

.contract-analysis-form {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.contract-document-print-content {
  display: none;
}

.agenda-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.proposal-calculation {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.proposal-calculation span {
  display: grid;
  gap: 3px;
  border-radius: 9px;
  background: #eef6f2;
  padding: 10px;
  color: var(--muted);
  font-size: 10px;
}

.proposal-calculation strong {
  color: var(--brand-dark);
  font-size: 14px;
}

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

.capability-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 17px;
  box-shadow: var(--shadow);
}

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

.capability-card h2,
.capability-card p {
  margin: 0;
}

.capability-card h2 {
  color: var(--brand-dark);
  font-size: 16px;
}

.capability-card p {
  min-height: 54px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.capability-card .btn {
  justify-self: start;
}

.service-number {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #eaf5f0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  place-items: center;
}

.contract-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(230px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 7px;
}

.contract-column {
  min-width: 0;
  border: 1px solid #dce7e2;
  border-radius: 13px;
  background: #f4f8f6;
  overflow: hidden;
}

.contract-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #dce7e2;
  padding: 12px;
}

.contract-column > header h2 {
  margin: 0;
  font-size: 13px;
}

.contract-column > header span {
  display: grid;
  min-width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
  place-items: center;
}

.contract-column > div {
  display: grid;
  gap: 9px;
  padding: 9px;
}

.contract-flow-card {
  display: grid;
  gap: 9px;
  border: 1px solid #dce7e2;
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}

.contract-flow-card h3,
.contract-flow-card p {
  margin: 0;
}

.contract-flow-card h3 {
  font-size: 13px;
}

.contract-flow-card p,
.contract-flow-card label {
  color: var(--muted);
  font-size: 11px;
}

.contract-flow-card label {
  display: grid;
  gap: 4px;
}

.contract-clauses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
}

.contract-clauses legend {
  padding-inline: 5px;
  font-weight: 900;
}

@media print {
  body.agenda-printing .sidebar,
  body.agenda-printing .topbar,
  body.agenda-printing .local-data-notice,
  body.agenda-printing .account-notice,
  body.agenda-printing .agenda-goals,
  body.agenda-printing .agenda-filter-panel,
  body.agenda-printing .agenda-queue,
  body.agenda-printing .meeting-workspace,
  body.agenda-printing .agenda-create-grid,
  body.agenda-printing .agenda-history-actions,
  body.agenda-printing .toast {
    display: none !important;
  }

  body.agenda-printing .layout,
  body.agenda-printing .main {
    display: block;
    padding: 0;
  }

  body.agenda-printing .agenda-history {
    border: 0;
    box-shadow: none;
  }

  body.contract-printing .sidebar,
  body.contract-printing .topbar,
  body.contract-printing .local-data-notice,
  body.contract-printing .account-notice,
  body.contract-printing .daily-goals,
  body.contract-printing .contract-filter-panel,
  body.contract-printing .contract-flow,
  body.contract-printing .agenda-history-actions,
  body.contract-printing .toast {
    display: none !important;
  }

  body.contract-printing .layout,
  body.contract-printing .main {
    display: block;
    padding: 0;
  }

  body.contract-document-printing > * {
    visibility: hidden !important;
  }

  body.contract-document-printing .contract-document-shell,
  body.contract-document-printing .contract-document-shell * {
    visibility: visible !important;
  }

  body.contract-document-printing .contract-document-shell {
    position: absolute;
    inset: 0;
  }

  body.contract-document-printing .agenda-modal-backdrop,
  body.contract-document-printing .project-modal-head,
  body.contract-document-printing .agenda-modal-actions {
    display: none !important;
  }

  body.contract-document-printing .contract-document-modal,
  body.contract-document-printing .contract-document-form {
    position: static;
    display: block;
    width: auto;
    max-height: none;
    transform: none;
    overflow: visible;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  body.contract-document-printing .contract-document-form label {
    display: none;
  }

  body.contract-document-printing .contract-document-print-content {
    display: block;
    margin: 0;
    color: #000;
    font-size: 12pt;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

@media (max-width: 1500px) {
  .kpi-grid,
  .audit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .daily-goals {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .daily-goals > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .kpi-grid,
  .client-grid,
  .settings-grid,
  .roadmap-grid,
  .audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .funnel-summary {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .command-actions {
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

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

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

@media (max-width: 1000px) {
  .login-page,
  .layout,
  .module-grid,
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-form-inner,
  .project-core-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-choice-grid,
  .project-choice-group--wide .project-choice-grid,
  .project-quarter-projection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prospecting-workspace {
    grid-template-columns: minmax(200px, 0.75fr) minmax(0, 1.25fr);
  }

  .prospecting-next-form {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .prospecting-next-form .project-span-full,
  .prospecting-next-form .btn {
    grid-column: 1 / -1;
  }

  .tribunal-search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .investigation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .agenda-create-grid,
  .meeting-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(88vw, 330px);
    height: 100dvh;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 18px 0 48px rgba(2, 18, 14, 0.28);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    background: rgba(5, 19, 15, 0.55);
    cursor: pointer;
  }

  .mobile-menu-open .nav-backdrop {
    display: block;
  }

  .nav {
    display: grid;
    max-height: calc(100dvh - 200px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .nav button {
    width: 100%;
  }

  .topbar,
  .item-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-leading {
    width: 100%;
  }

  .profile-menu {
    flex-wrap: wrap;
  }

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

  .dashboard-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .master-readiness {
    grid-template-columns: minmax(0, 1fr);
  }

  .command-filters,
  .command-pulse,
  .command-actions {
    flex-basis: 100%;
  }

  .master-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .master-context {
    min-width: 0;
  }

  .tribunal-search-summary {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .signup-benefits {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration-readiness {
    padding: 16px;
  }

  .integration-hero,
  .integration-security-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-hero .tag {
    align-self: flex-start;
  }

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

  .capability-grid,
  .agenda-modal-form,
  .contract-modal-form,
  .contract-clauses,
  .proposal-calculation {
    grid-template-columns: minmax(0, 1fr);
  }

  .agenda-modal,
  .contract-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .agenda-modal-form,
  .contract-modal-form {
    padding: 16px;
  }

  .investigation-hero,
  .investigation-boundary {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .investigation-status {
    flex: auto;
  }

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

  .compliance-item {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .compliance-item b {
    grid-column: 2;
  }

  .login-page,
  .main {
    padding: 14px;
  }

  .feature-grid,
  .hero-proof,
  .kpi-grid,
  .client-grid,
  .settings-grid,
  .roadmap-grid,
  .audit-grid,
  .daily-goals,
  .urgent-list,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .login-page .card {
    order: -1;
  }

  .login-page .hero {
    padding: 20px;
  }

  .login-brand {
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .command-pulse,
  .command-actions,
  .master-account-controls,
  .master-account-actions {
    grid-template-columns: 1fr;
  }

  .command-pulse > div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .master-account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    padding: 14px;
  }

  .tenant {
    padding: 10px 14px;
  }

  .nav { padding: 9px; }

  .topbar,
  .task-filter-row,
  .form-foot,
  .agenda-section-head,
  .meeting-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .meeting-grid,
  .meeting-details,
  .meeting-reschedule-form,
  .meeting-proposal-fields .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .meeting-reschedule-form .actions {
    grid-column: auto;
  }

  .agenda-history-actions .btn {
    flex: 1 1 100%;
  }

  .profile-menu {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
  }

  .profile-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 4px;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-copy {
    min-width: 0;
  }

  .dashboard-controls select,
  .task-filter-row label {
    min-width: 0;
  }

  h1 {
    font-size: 2rem;
  }

  .movement-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movement-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .publication-list header {
    align-items: flex-start;
    flex-direction: column;
  }

  .projects-command,
  .project-card-head,
  .project-card-foot,
  .project-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .project-new-button {
    width: 100%;
    justify-content: center;
  }

  .project-card-metrics,
  .project-card-details,
  .project-form-inner,
  .project-core-grid,
  .project-planning-grid {
    grid-template-columns: 1fr;
  }

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

  .project-modal {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .project-modal-head {
    padding: 16px;
  }

  .project-modal-head-actions .tag {
    display: none;
  }

  .project-modal-body {
    padding: 14px 16px 18px;
  }

  .project-form-section summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-form-actions {
    bottom: -18px;
    margin: 0 -16px -18px;
    padding: 14px 16px;
  }

  .project-form-actions > div:first-child {
    display: none;
  }

  .project-form-buttons {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-form-buttons .btn {
    width: 100%;
  }

  .project-form-buttons .btn:last-child {
    grid-column: 1 / -1;
  }

  .project-wizard-track {
    top: -14px;
    margin-inline: -2px;
  }

  .project-stage > summary > span:last-child {
    margin-left: 0;
    text-align: left;
  }

  .project-choice-grid,
  .project-choice-group--wide .project-choice-grid,
  .project-document-summary,
  .project-quarter-projection,
  .prospecting-workspace,
  .prospecting-next-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .prospecting-filter-panel .btn {
    width: 100%;
    margin-left: 0;
  }

  .prospecting-attendance .panel-head-row {
    align-items: flex-start;
  }

  .prospecting-attendance .panel-head-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .prospecting-contacts {
    display: flex;
    max-height: none;
    gap: 7px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .prospecting-contact {
    min-width: 210px;
  }

  .prospecting-contact + .prospecting-contact {
    margin-top: 0;
  }

  .prospecting-conversation {
    min-height: 330px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .prospecting-next-form,
  .prospecting-next-form .project-span-full,
  .prospecting-next-form .btn {
    grid-column: auto;
  }
}

/* ===================================================================
   GT-Jus — padronizacao de identidade visual (v1)
   Petroleo #0B4A6B + Ambar #F7931E. Sobrescreve verdes/dourados legados
   ainda em hex fixo. Bloco isolado no fim do arquivo, reversivel.
   =================================================================== */

/* selo GT-Jus — login e sidebar: arte original (icone) vetorizada */
.login-logo,
.brand-mark {
  background: url("/logo-gtjus-mark.svg") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

/* wordmark completo na tela de login (marca + "GT-Jus") */
.login-brand {
  gap: 14px;
}
.login-brand .login-logo {
  width: 52px;
  height: 52px;
}

/* navegacao lateral */
.sidebar { background: #08324a; }
.brand small { color: #a9c2d0; }

/* faixas/heros: gradiente verde -> petroleo; brilho dourado -> ambar */
.behavioral-hero,
.behavioral-result-hero,
.hero,
.master-hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(247, 147, 30, 0.20), transparent 20rem),
    linear-gradient(140deg, #0b4a6b 0%, #072e44 100%);
}
.command-center {
  border-color: #1c5c7d;
  background:
    radial-gradient(circle at 88% 10%, rgba(247, 147, 30, 0.15), transparent 18rem),
    linear-gradient(135deg, #0b4a6b, #08344c);
}

/* card de leitura comportamental: bege -> ambar suave */
.behavioral-reading-card {
  background: linear-gradient(150deg, var(--accent-soft) 0%, #fffaf3 100%);
}

/* --- autenticacao / cadastro: verde legado -> petroleo --- */
.btn.signup-entry {
  border-color: var(--brand);
  background: linear-gradient(135deg, #0b4a6b, #0e5f86);
  box-shadow: 0 10px 22px rgba(11, 74, 107, 0.18);
}
.btn.signup-entry:hover {
  border-color: var(--brand-dark);
  background: linear-gradient(135deg, #083a55, #0a4c6d);
}
.signup-benefits span {
  border-color: #cfe0ea;
  background: #eef4f8;
  color: #2f5266;
}
.onboarding-note {
  border-left-color: var(--brand);
  background: #eef4f8;
}
.login-legal a { color: var(--brand); }

/* cards em destaque / faixas comportamentais remanescentes */
.service-catalog .capability-card.is-featured { border-color: #9dc0d2; }
.service-catalog .capability-card.is-featured::before { background: var(--brand); }
.behavioral-assessment { border-color: #b6cede; }
.behavioral-hero,
.behavioral-result-hero {
  box-shadow: 0 24px 54px rgba(9, 58, 85, 0.14);
}

/* --- purga final de verde nas telas de auth/status --- */
.hero,
.login-page .hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(247, 147, 30, 0.20), transparent 20rem),
    linear-gradient(145deg, #0b4a6b 0%, #072b40 100%) !important;
}
.login-brand small { color: #b8ccd8; }
.server-ready {
  border-color: #bcd6e4;
  background: #eef4f8;
  color: #1f4a63;
}
.local-data-notice,
.server-data-notice {
  border-color: #bcd6e4;
  background: #eef4f8;
  color: #1f4a63;
}

/* ===================================================================
   GT-Jus — tela de login v2 (aproximacao do mockup): split navy +
   card claro, CTA ambar, tipografia editorial. Somente CSS.
   =================================================================== */
.login-page { gap: 0; max-width: none; padding: 0; align-items: stretch; }

/* --- painel esquerdo: navy + camadas --- */
.login-page .hero {
  position: relative;
  border-radius: 0 !important;
  padding: clamp(40px, 5vw, 72px) clamp(32px, 5vw, 84px);
  background:
    url("/login-bg.svg") center / cover no-repeat,
    linear-gradient(158deg, #0b2438 0%, #0d2f4a 46%, #06182a 100%) !important;
  box-shadow: none;
}
.login-page .hero::before {
  content: "PESSOAS\A PROCESSOS\A ESTRATÉGIA\A RESULTADOS\A SEMPRE EM\A MOVIMENTO";
  white-space: pre; text-align: right;
  position: absolute; top: clamp(36px,5vw,64px); right: clamp(20px,3vw,40px);
  font-size: 10px; font-weight: 800; line-height: 2.1; letter-spacing: .34em;
  color: rgba(255,255,255,.30);
}
.login-page .hero::after {
  content: "— TECNOLOGIA A SERVIÇO DA JUSTIÇA";
  position: absolute; left: clamp(32px,5vw,84px); bottom: clamp(22px,3vw,34px);
  font-size: 10px; font-weight: 800; letter-spacing: .32em; color: rgba(255,255,255,.42);
  border: 0; width: auto; height: auto; box-shadow: none; border-radius: 0;
}
.login-page .hero > * { position: relative; z-index: 1; }

.login-brand { gap: 16px; margin-bottom: 30px; }
.login-brand .login-logo {
  width: 60px; height: 60px; border-radius: 16px;
  background: url("/logo-gtjus-mark.svg") center / cover no-repeat;
}
.login-brand strong { font-size: 1.15rem; letter-spacing: .01em; }
.login-brand small { color: #a9c4d8; }

.hero .product-pill {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  color: #dbe8f2; letter-spacing: .06em; text-transform: uppercase; font-size: 10px;
}
.hero h1 {
  text-transform: uppercase; letter-spacing: .045em;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.12; max-width: 15ch;
}
.hero .lead { color: #c3d4e2; max-width: 46ch; }

.hero .value-flow { gap: 20px; }
.hero .value-flow li { align-items: flex-start; gap: 16px; }
.hero .value-flow li > span {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: .95rem; font-weight: 800;
  color: #8fc0e4; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 6px rgba(23,101,141,.12), 0 10px 26px rgba(0,0,0,.28);
}
.hero .value-flow strong { color: #fff; }
.hero .value-flow small { color: #a9c1d2; }
.hero .hero-proof { border-top: 1px solid rgba(255,255,255,.10); padding-top: 18px; }
.hero .hero-proof strong { color: #fff; }
.hero .hero-proof span { color: #9fb8c8; }

/* --- painel direito: card claro --- */
.login-page > .login-card {
  align-self: center; justify-self: center;
  width: min(460px, 92%); margin: clamp(24px,5vw,64px) auto;
  border: 0; border-radius: 22px;
  box-shadow: 0 30px 80px rgba(9,40,63,.16), 0 2px 8px rgba(9,40,63,.06);
  padding: clamp(28px,3.5vw,40px);
}
.login-card .login-card-head { text-align: center; margin-bottom: 6px; }
.login-card .login-card-head .eyebrow {
  color: #8aa0af; font-size: 10px; letter-spacing: .16em; margin-bottom: 10px;
}
.login-card .login-card-head::before {
  content: ""; display: block; width: 176px; height: 52px; margin: 0 auto 18px;
  background: url("/logo-gtjus-mark.svg") center / contain no-repeat;
}
.login-card .login-card-head h2 { font-size: 1.6rem; margin-bottom: 6px; }
.login-card .login-card-head p { color: var(--muted); font-size: .95rem; }
.login-card .server-ready {                          /* disclosure obrigatoria: manter visivel, so discreto */
  margin-top: 14px; border-color: #d6e2ea; background: #f2f6f9;
  color: #3f5a6b; font-size: 12px; line-height: 1.5;
}

.login-card .btn.signup-entry,
.login-card .btn.login-primary[type="submit"] {
  background: linear-gradient(135deg, #f7931e, #ef7f0d) !important;
  border-color: #ef7f0d !important;
  box-shadow: 0 12px 26px rgba(239,127,13,.28);
  color: #fff; font-weight: 700; letter-spacing: .02em;
  min-height: 52px; border-radius: 12px;
}
.login-card .btn.signup-entry:hover,
.login-card .btn.login-primary[type="submit"]:hover {
  background: linear-gradient(135deg, #ef8912, #e0730a) !important;
}
.login-card .signup-benefits span { border-radius: 8px; }
.login-card .login-divider { margin: 6px 0; }
.login-card .btn.secondary { border-radius: 12px; min-height: 48px; }
.login-card .login-footnote { text-align: center; }

/* citacao no rodape do card */
.login-page > .login-card::after {
  content: "“Mais que gestão. Resultados que impulsionam a justiça.”";
  display: block; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-style: italic; font-size: 12px; color: var(--muted); text-align: center;
}

@media (max-width: 900px) {
  .login-page { display: block; }
  .login-page .hero { padding: 44px 24px 60px; }
  .login-page .hero::before { display: none; }
  .login-page > .login-card { width: min(460px, 92%); margin: -28px auto 32px; }
}

/* login por e-mail e senha */
.login-card .email-pass-form { margin-top: 2px; }
.login-card .email-pass-form .login-divider { margin: 10px 0 4px; }
.login-card .email-pass-actions {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 2px;
}
.login-card .email-pass-actions .btn.plain {
  padding: 4px 2px; min-height: 0; font-size: 12px; font-weight: 600; color: var(--brand);
}

/* score interno de pagamento do cliente (Clientes) */
.client-pay{ display:flex; flex-direction:column; gap:2px; margin:8px 0 4px; padding:8px 10px; border-radius:8px; border:1px solid var(--line); background:#f6f9fb; font-size:12px; }
.client-pay-label b{ color:var(--brand-dark); }
.client-pay-detail{ color:var(--muted); font-size:11px; }
.client-pay.success{ border-color:#9dd3bf; background:#eef8f3; }
.client-pay.ok{ border-color:#bcd6e4; background:#eef4f8; }
.client-pay.warn{ border-color:#e6c48a; background:#fdf3e3; }
.client-pay.warn .client-pay-label b{ color:#8a5a10; }
.client-pay.danger{ border-color:#e6a9af; background:#fdeef0; }
.client-pay.danger .client-pay-label b{ color:#b43b45; }
.client-pay.neutral{ color:var(--muted); }

/* ===== Agenda: modo calendario (opcional, alterna com a lista) ===== */
.agenda-mode-toggle{ display:inline-flex; gap:2px; margin-left:8px; }
.agenda-mode-toggle .btn{ border-radius:8px; }
.calendar-panel .panel-body{ padding:14px 16px; }
.calendar-toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:10px; }
.calendar-nav{ display:inline-flex; gap:4px; }
.calendar-range{ color:var(--brand-dark); text-transform:capitalize; font-size:.95rem; }
.calendar-donetoggle{ margin-left:auto; font-size:12px; color:var(--muted); display:inline-flex; align-items:center; gap:6px; }
.calendar-legend{ display:flex; flex-wrap:wrap; gap:6px 12px; margin-bottom:10px; font-size:11px; color:var(--muted); }
.calendar-legend .cal-key{ display:inline-flex; align-items:center; gap:5px; }
.calendar-legend .cal-key::before{ content:""; width:10px; height:10px; border-radius:3px; background:currentColor; }
.calendar-scroll{ overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.calendar-grid{ border-collapse:collapse; width:100%; min-width:760px; table-layout:fixed; }
.calendar-grid th, .calendar-grid td{ border:1px solid var(--line); vertical-align:top; }
.calendar-grid thead th{ background:var(--soft); color:var(--brand-dark); font-size:12px; padding:6px 4px; text-align:center; }
.calendar-grid thead th.cal-today{ background:var(--brand); color:#fff; }
.calendar-grid .cal-hour{ width:64px; background:#fafcfd; color:var(--muted); font-size:11px; font-weight:600; text-align:right; padding:4px 6px; white-space:nowrap; }
.calendar-grid .cal-cell{ height:44px; padding:3px; }
.calendar-grid .cal-allday-cell{ height:auto; min-height:30px; background:#fbfdfe; }
.cal-block{ display:block; width:100%; text-align:left; border:0; border-left:3px solid var(--petrol,#0b4a6b); border-radius:4px;
  background:#eef4f8; color:var(--ink); padding:3px 6px; margin-bottom:3px; font-size:11px; line-height:1.25; cursor:pointer; }
.cal-block b{ font-weight:700; }
.cal-block small{ display:block; color:var(--muted); font-size:10px; }
.cal-block.is-done{ opacity:.55; text-decoration:line-through; }
.cal-block:hover{ filter:brightness(.97); }
.cal-reuniao{ color:#0b4a6b; }   .cal-block.cal-reuniao{ background:#e7f0f6; border-left-color:#0b4a6b; }
.cal-reuniao-avulsa{ color:#0b4a6b; } .cal-block.cal-reuniao-avulsa{ background:#e7f0f6; border-left-color:#0b4a6b; }
.cal-audiencia{ color:#3f3d8c; }  .cal-block.cal-audiencia{ background:#ecebf6; border-left-color:#3f3d8c; }
.cal-prazo{ color:#8a5a10; }      .cal-block.cal-prazo{ background:#fdf2e2; border-left-color:#f7931e; }
.cal-follow-up{ color:#8a5a10; }  .cal-block.cal-follow-up{ background:#fdf2e2; border-left-color:#f7931e; }
.cal-compromisso{ color:#4a5f6b; } .cal-block.cal-compromisso{ background:#eef1f3; border-left-color:#4a5f6b; }
.cal-tarefa{ color:#1f6f50; }     .cal-block.cal-tarefa{ background:#e8f4ee; border-left-color:#1f6f50; }
.cal-vencimento{ color:#b43b45; } .cal-block.cal-vencimento{ background:#fdeef0; border-left-color:#b43b45; }
.calendar-empty{ color:var(--muted); font-size:13px; margin:10px 2px 0; }
@media (max-width:640px){ .calendar-donetoggle{ margin-left:0; } }

/* log de contato tipado na pasta do cliente */
.client-contactlog{ margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
.client-contactlog-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.client-contactlog-head strong{ font-size:12px; color:var(--brand-dark); text-transform:uppercase; letter-spacing:.04em; }
.client-contact-form{ margin:6px 0 8px; }
.client-contactlog-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.client-contactlog-list li{ display:flex; gap:8px; align-items:flex-start; font-size:12px; }
.client-contactlog-list p{ margin:0; }
.client-contactlog-list small{ color:var(--muted); font-size:11px; }
.client-contactlog-more{ display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.client-contactlog-empty{ color:var(--muted); font-size:12px; margin:2px 0 0; }
.ct-type{ flex:0 0 auto; border-radius:6px; padding:1px 7px; font-size:10px; font-weight:700; background:var(--soft); color:var(--brand-dark); border:1px solid var(--line); }
.ct-type.ct-whatsapp{ background:#e8f4ee; color:#1f6f50; border-color:#bfe0cd; }
.ct-type.ct-ligacao{ background:#e7f0f6; color:#0b4a6b; border-color:#bcd6e4; }
.ct-type.ct-e-mail{ background:#ecebf6; color:#3f3d8c; border-color:#cfceec; }
.ct-type.ct-reuniao{ background:#fdf2e2; color:#8a5a10; border-color:#e6c48a; }

/* apontamento de horas na tarefa */
.task-timelog{ margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
.task-timelog-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.task-timelog-head strong{ font-size:12px; color:var(--brand-dark); text-transform:uppercase; letter-spacing:.04em; }
.task-time-form{ margin:6px 0 8px; }
.task-timelog-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.task-timelog-list li{ display:flex; gap:8px; align-items:flex-start; font-size:12px; }
.task-timelog-list p{ margin:0; }
.task-timelog-list small{ color:var(--muted); font-size:11px; }
.task-timelog-more{ display:block; margin-top:4px; color:var(--muted); font-size:11px; }

.whatsapp-link{ color:#1f6f50; font-weight:600; text-decoration:none; font-size:12px; }
.whatsapp-link:hover, .whatsapp-link:focus-visible{ text-decoration:underline; }

/* comprovante obrigatorio para dar baixa (Financeiro) */
.finance-receipt-form{ margin-top:8px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#f6f9fb; }
.finance-receipt-form .actions{ display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; }
.finance-receipt-form .form-note{ margin:0 0 4px; font-size:12px; color:var(--muted); }

/* ===================================================================
   Tela de entrada mobile-first (v0.44.0) — escopo .landing, nao afeta o app.
   Identidade oficial (docs/identidade-visual-gtjus-v0.19.0.md): petroleo/marinho +
   ambar do logo como unico destaque. Ambar nunca em texto sobre fundo claro.
   =================================================================== */
.landing {
  --lp-navy: #071e2e;
  --lp-navy-2: #092638;
  --lp-petrol: #0c3448;
  --lp-bg: #f6f8fa;
  --lp-ink: #0f1f2b;
  --lp-muted: #5b6672;
  --lp-line: #e1e7ec;
  --lp-accent: #f7931e;
  --lp-accent-hover: #ffa53d;
  --lp-teal: #087e8b;
  --lp-radius: 16px;
  --lp-gutter: 20px;
  --lp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: block;
  min-height: 100vh;
  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: var(--lp-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.landing *, .landing *::before, .landing *::after { box-sizing: border-box; }
.landing h1, .landing h2, .landing h3 { color: inherit; letter-spacing: -0.02em; text-transform: none; }
.landing .lp-icon { width: 22px; height: 22px; flex: none; }
.landing :focus-visible { outline: 3px solid var(--lp-accent); outline-offset: 3px; border-radius: 8px; }
.landing button { font-family: inherit; }

/* --- header: compacto, sticky, marinho translucido com blur --- */
.lp-header {
  position: sticky; top: 0; z-index: 40;
  height: 64px; padding: 0 var(--lp-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(7, 30, 46, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}
.lp-logo { display: inline-flex; align-items: center; min-height: 44px; }
.lp-logo img { display: block; width: 104px; height: auto; }
.lp-menu-toggle {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); color: #fff; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.lp-menu-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.32); }
.lp-nav-desktop { display: none; }

/* --- drawer mobile --- */
.lp-drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 14, 22, 0.5);
  opacity: 0; transition: opacity .25s ease;
}
.lp-drawer.is-open { opacity: 1; }
.lp-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(340px, 88vw);
  display: flex; flex-direction: column; gap: 20px;
  padding: 12px var(--lp-gutter) 28px;
  background: linear-gradient(170deg, var(--lp-navy) 0%, var(--lp-petrol) 100%);
  color: #fff; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
}
.lp-drawer.is-open .lp-drawer-panel { transform: translateX(0); }
.lp-drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.lp-drawer-head img { width: 96px; height: auto; }
.lp-drawer-nav { display: flex; flex-direction: column; }
.lp-drawer-nav > * {
  display: flex; align-items: center; min-height: 52px; padding: 0 4px;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: none; color: #eaf2f7; font-size: 1.05rem; font-weight: 600;
  text-align: left; text-decoration: none; cursor: pointer;
}
.lp-drawer-nav > *:hover { color: #fff; }
.lp-drawer-legal { margin-top: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.lp-drawer-legal a { color: #a9bfcd; font-size: .88rem; min-height: 44px; display: inline-flex; align-items: center; }
body.lp-drawer-open { overflow: hidden; }

/* --- botoes --- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 0 22px;
  border-radius: 14px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 700; letter-spacing: .005em;
  cursor: pointer; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lp-btn .lp-icon { width: 18px; height: 18px; transition: transform .2s ease; }
.lp-btn:active { transform: scale(.98); }
.lp-btn-primary {
  background: var(--lp-accent); color: var(--lp-navy);
  box-shadow: 0 10px 24px rgba(247, 147, 30, 0.22);
}
.lp-btn-primary:hover { background: var(--lp-accent-hover); }
.lp-btn-primary:hover .lp-icon { transform: translateX(3px); }
.lp-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.34); }
.lp-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.55); }

/* --- hero --- */
.lp-hero {
  position: relative;
  margin-top: -64px; padding: 104px var(--lp-gutter) 56px;
  color: #fff;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(8, 126, 139, 0.18), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(247, 147, 30, 0.07), transparent 60%),
    linear-gradient(160deg, #061a28 0%, #0a3447 100%);
  overflow: hidden;
}
.lp-hero-copy { grid-area: copy; animation: lp-fade-up .5s ease both; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #9fc9d3;
}
.lp-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--lp-accent); }
.lp-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 8.6vw, 3.4rem); line-height: 1.08; font-weight: 800;
  max-width: 16ch; color: #fff;
}
.lp-lead { margin: 0 0 28px; font-size: 1.05rem; line-height: 1.6; color: #c5d5e0; max-width: 46ch; }
.lp-cta-row { display: grid; gap: 12px; }
.lp-hero-note { margin: 14px 0 0; font-size: .85rem; color: #93aebf; }

/* mockup do dashboard (HTML/CSS) */
.lp-mock { grid-area: mock; margin: 44px auto 0; max-width: 340px; animation: lp-fade-up .6s .1s ease both; }
.lp-phone {
  border-radius: 28px; padding: 10px;
  background: linear-gradient(160deg, #13384d, #0a2433);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lp-phone-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 20px 20px 0 0; background: var(--lp-navy-2); color: #fff; font-size: .9rem;
}
.lp-phone-mark { width: 22px; height: 22px; border-radius: 6px; background: url("/logo-gtjus-mark.svg") center / cover no-repeat; }
.lp-phone-body { background: var(--lp-bg); border-radius: 0 0 20px 20px; padding: 12px; display: grid; gap: 10px; }
.lp-mock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-mock-tile { background: #fff; border: 1px solid var(--lp-line); border-radius: 12px; padding: 10px; display: grid; gap: 3px; }
.lp-mock-tile small { font-size: .62rem; color: var(--lp-muted); line-height: 1.3; }
.lp-mock-tile strong { font-size: .8rem; color: var(--lp-ink); }
.lp-mock-bar { display: block; height: 5px; border-radius: 5px; background: #e6edf2; margin-top: 4px; overflow: hidden; }
.lp-mock-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--lp-teal), #0b4a6b); }
.lp-mock-list { background: #fff; border: 1px solid var(--lp-line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.lp-mock-list > small { font-size: .66rem; font-weight: 700; color: var(--lp-muted); text-transform: uppercase; letter-spacing: .08em; }
.lp-mock-row { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--lp-ink); }
.lp-mock-row em { margin-left: auto; font-style: normal; font-size: .62rem; color: var(--lp-muted); background: #eef3f6; border-radius: 999px; padding: 2px 8px; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-accent); flex: none; }
.lp-dot.is-mid { background: var(--lp-teal); }
.lp-dot.is-ok { background: #287a59; }
.lp-mock figcaption, .lp-demo-note { margin-top: 12px; font-size: .75rem; color: #8ea8b8; text-align: center; }
.lp-demo-note { color: var(--lp-muted); text-align: left; }

/* --- acesso (cartao de login existente) --- */
.lp-access { margin: 40px -4px 0; position: relative; z-index: 2; scroll-margin-top: 76px; color: var(--lp-ink); }
.landing .lp-access .login-card {
  width: 100%; max-width: 460px; margin: 0 auto;
  border: 1px solid var(--lp-line); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(7, 30, 46, 0.14), 0 2px 6px rgba(7, 30, 46, 0.05);
  padding: 26px 20px;
  background: #fff;
}
.landing .login-card .login-card-head::before { display: none; }
.landing .login-card .login-card-head h2 { font-size: 1.4rem; }
.landing .login-card .btn { min-height: 52px; border-radius: 14px; }
.landing .login-card .email-pass-actions .btn.plain { min-height: 44px; padding: 0 4px; font-size: .85rem; }
.landing .login-card input { min-height: 48px; font-size: 16px; } /* 16px evita zoom automatico no iOS */
.landing.is-onboarding .lp-access { margin: 0; padding: 32px 16px 56px; }

/* --- secoes --- */
.lp-section { padding: 80px var(--lp-gutter) 0; max-width: 1180px; margin: 0 auto; scroll-margin-top: 64px; }
.lp-kicker { margin: 0 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lp-teal); }
.lp-section h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 6.4vw, 2.4rem); line-height: 1.15; font-weight: 800; color: var(--lp-navy); }
.lp-section-lead { margin: 0 0 28px; color: var(--lp-muted); font-size: 1rem; line-height: 1.6; max-width: 60ch; }

.lp-feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-feature {
  background: #fff; border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  padding: 18px; box-shadow: 0 1px 2px rgba(7, 30, 46, 0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lp-feature:hover { transform: translateY(-2px); border-color: #cfdbe3; box-shadow: 0 10px 24px rgba(7, 30, 46, 0.07); }
.lp-feature .lp-icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 12px;
  color: var(--lp-teal); background: rgba(8, 126, 139, 0.09);
}
.lp-feature h3 { margin: 14px 0 6px; font-size: 1rem; font-weight: 700; color: var(--lp-navy); }
.lp-feature p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--lp-muted); }
.lp-pwa {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 14px 16px;
  border-radius: var(--lp-radius); background: rgba(8, 126, 139, 0.07); color: var(--lp-petrol); font-size: .92rem;
}
.lp-pwa .lp-icon { color: var(--lp-teal); }

/* kanban com scroll horizontal */
.lp-kanban {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(var(--lp-gutter) * -1); padding: 4px var(--lp-gutter) 14px;
  scroll-padding: 0 var(--lp-gutter);
  -webkit-overflow-scrolling: touch;
}
.lp-kcol { scroll-snap-align: start; background: #eaf0f4; border-radius: var(--lp-radius); padding: 12px; display: grid; gap: 10px; align-content: start; }
.lp-kcol-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .88rem; color: var(--lp-navy); }
.lp-kcol-head small { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: var(--lp-muted); font-size: .75rem; }
.lp-kcard { background: #fff; border: 1px solid var(--lp-line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgba(7, 30, 46, 0.05); }
.lp-kcard strong { font-size: .9rem; color: var(--lp-ink); font-weight: 600; }
.lp-kmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-kmeta span { font-size: .72rem; color: var(--lp-muted); background: #f1f5f8; border-radius: 999px; padding: 3px 9px; }
.lp-kmeta .lp-prio-alta { background: #fdecd5; color: #7a4610; }
.lp-kmeta .lp-prio-media { background: #e3f1f3; color: #0b5560; }
.lp-kmeta .lp-prio-baixa { background: #eef3f6; color: #4c5a66; }

/* seguranca */
.lp-security { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lp-security li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--lp-line); border-radius: var(--lp-radius); padding: 16px; }
.lp-security .lp-icon { width: 38px; height: 38px; padding: 8px; border-radius: 10px; color: #fff; background: var(--lp-petrol); }
.lp-security h3 { margin: 2px 0 4px; font-size: .98rem; font-weight: 700; color: var(--lp-navy); }
.lp-security p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--lp-muted); }

/* CTA final */
.lp-final {
  margin: 88px 0 0; padding: 64px var(--lp-gutter);
  color: #fff; text-align: left;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(8, 126, 139, 0.2), transparent 60%),
    linear-gradient(160deg, var(--lp-navy) 0%, var(--lp-petrol) 100%);
}
.lp-final h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 6.4vw, 2.4rem); font-weight: 800; color: #fff; }
.lp-final p { margin: 0 0 26px; color: #c5d5e0; line-height: 1.6; max-width: 52ch; }

/* footer */
.lp-footer { padding: 40px var(--lp-gutter) 48px; background: var(--lp-navy); color: #9fb4c2; display: grid; gap: 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.lp-footer img { width: 96px; height: auto; }
.lp-footer p { margin: 0; font-size: .9rem; }
.lp-footer nav { display: flex; flex-direction: column; }
.lp-footer nav a { color: #d5e2ea; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; font-size: .92rem; }
.lp-footer nav a:hover { text-decoration: underline; }
.lp-footer small { font-size: .8rem; color: #7f97a7; }

@keyframes lp-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 360px+: duas colunas nos recursos */
@media (min-width: 360px) {
  .lp-feature-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lp-feature { padding: 16px 14px; }
  .lp-feature p { font-size: .85rem; }
}
@media (min-width: 430px) {
  .lp-cta-row { grid-template-columns: 1fr; }
  .lp-kanban { grid-auto-columns: 62%; }
}
/* 768px+: tablet */
@media (min-width: 768px) {
  .landing { --lp-gutter: 40px; }
  .lp-header { height: 72px; }
  .lp-logo img { width: 120px; }
  .lp-hero { margin-top: -72px; padding: 136px var(--lp-gutter) 72px; }
  .lp-access { margin: 48px auto 0; max-width: 480px; }
  .lp-cta-row { grid-template-columns: auto auto; justify-content: start; }
  .lp-btn { width: auto; }
  .lp-feature-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .lp-feature { padding: 20px; }
  .lp-kanban { grid-auto-columns: 280px; }
  .lp-security { grid-template-columns: 1fr 1fr; }
  .lp-footer { grid-template-columns: auto 1fr; align-items: start; column-gap: 48px; }
  .lp-footer nav { flex-direction: row; gap: 24px; grid-column: 2; }
  .lp-footer p { grid-column: 2; grid-row: 1; }
  .lp-footer small { grid-column: 2; }
  .lp-footer img { grid-row: 1 / span 3; }
  .lp-final { text-align: center; }
  .lp-final p { margin-left: auto; margin-right: auto; }
  .lp-final .lp-cta-row { justify-content: center; }
}
/* 1024px+: header com navegacao, hero em duas colunas com o acesso ao lado */
@media (min-width: 1024px) {
  .lp-menu-toggle { display: none; }
  .lp-nav-desktop { display: flex; align-items: center; gap: 4px; }
  .lp-nav-desktop > button, .lp-nav-desktop > a {
    min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
    background: none; color: #d5e2ea; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer;
    display: inline-flex; align-items: center;
    transition: background-color .2s ease, color .2s ease;
  }
  .lp-nav-desktop > button:hover, .lp-nav-desktop > a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .lp-nav-desktop .lp-nav-cta { margin-left: 8px; background: var(--lp-accent); color: var(--lp-navy); }
  .lp-nav-desktop .lp-nav-cta:hover { background: var(--lp-accent-hover); color: var(--lp-navy); }
  .lp-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 460px);
    grid-template-areas: "copy access" "mock access"; align-items: start; column-gap: 64px;
    padding: 128px max(40px, calc((100vw - 1180px) / 2)) 96px;
  }
  .lp-hero h1 { max-width: 18ch; }
  .lp-mock { margin: 40px 0 0; justify-self: start; }
  .lp-access { grid-area: access; margin: 0; }
  .lp-hero .lp-cta-row [data-landing-scroll] { display: none; }
  .landing .lp-access .login-card { max-width: 480px; padding: 32px; }
  .lp-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-kanban { grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; margin: 0; padding: 4px 0 14px; }
  .lp-security { grid-template-columns: repeat(3, 1fr); }
  .lp-final { padding: 88px 40px; }
}
@media (min-width: 1440px) {
  .lp-hero h1 { font-size: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after,
  .lp-drawer, .lp-drawer-panel { animation: none !important; transition: none !important; }
}

/* ===================================================================
   Dashboard moderno (v0.45.0): chips de grupo, Resumo/Detalhado,
   grade compacta e carrossel no celular. Escopo: .dash-*, .kpi-grid.is-*.
   =================================================================== */
.dash-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 4px 0 12px; min-width: 0;
}
.dash-chips {
  display: flex; gap: 8px; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 2px;
}
.dash-chips::-webkit-scrollbar { display: none; }
.dash-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.dash-chip span {
  min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px;
}
.dash-chip:hover { border-color: #b9ccd8; }
.dash-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dash-chip.active span { background: rgba(255, 255, 255, .18); color: #fff; }
.dash-density {
  flex: none; display: inline-flex; padding: 3px; border-radius: 12px;
  background: var(--soft); border: 1px solid var(--line);
}
.dash-density button {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.dash-density button.active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(9, 58, 85, .14); }
.dash-chip:focus-visible, .dash-density button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- modo Resumo: cartao compacto --- */
.kpi-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kpi-grid.is-compact .kpi-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "icon rating" "title title" "pct gauge" "meta meta" "actions actions";
  align-items: center; gap: 8px 10px;
  padding: 14px; border-top-width: 3px; border-radius: 16px;
  box-shadow: 0 4px 14px rgba(9, 58, 85, 0.05);
}
.kpi-grid.is-compact .kpi-head,
.kpi-grid.is-compact .kpi-score { display: contents; }
.kpi-grid.is-compact .kpi-icon { grid-area: icon; width: 32px; height: 32px; border-radius: 9px; font-size: 10px; }
.kpi-grid.is-compact .kpi-head > div:not(.kpi-score) { grid-area: title; min-width: 0; }
.kpi-grid.is-compact .kpi-head h2 { font-size: 14.5px; line-height: 1.25; }
.kpi-grid.is-compact .kpi-head p { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-grid.is-compact .kpi-score strong {
  grid-area: rating; justify-self: end;
  padding: 3px 9px; border-radius: 999px; font-size: 11px;
  background: color-mix(in srgb, var(--kpi-color) 12%, white);
}
.kpi-grid.is-compact .kpi-score span { grid-area: pct; font-size: 1.75rem; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.kpi-grid.is-compact .kpi-gauge {
  grid-area: gauge; width: 46px; height: 46px; margin: 0;
  background: radial-gradient(circle closest-side, white 62%, transparent 63% 100%),
    conic-gradient(var(--kpi-color) calc(var(--progress) * 1%), #e6ece9 0);
}
.kpi-grid.is-compact .kpi-gauge span { display: none; }
.kpi-grid.is-compact .kpi-metrics { grid-area: meta; }
.kpi-grid.is-compact .kpi-metrics div { display: none; }
.kpi-grid.is-compact .kpi-metrics div:first-child {
  display: grid; gap: 1px; border: 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 11.5px;
}
.kpi-grid.is-compact .kpi-metrics div:first-child dd { text-align: left; }
.kpi-grid.is-compact .kpi-drill-hint { display: none; }
.kpi-grid.is-compact .kpi-actions { grid-area: actions; }

@media (max-width: 760px) {
  /* topo mais enxuto no celular (vale para todos os modulos) */
  .topbar .page-heading > p:not(.eyebrow),
  .topbar .profile-copy span:not(.profile-role) { display: none; }

  .dash-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .dash-density { align-self: flex-start; }
  .dash-chips { margin: 0 -14px; padding: 2px 14px; }

  .kpi-grid.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-grid.is-compact .kpi-card { padding: 12px; }
  .kpi-grid.is-compact .kpi-score span { font-size: 1.5rem; }
  .kpi-grid.is-compact .kpi-gauge { width: 40px; height: 40px; }

  /* modo Detalhado no celular: carrossel com encaixe em vez de coluna */
  .kpi-grid.is-detailed {
    display: grid; grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none;
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -14px; padding: 2px 14px 12px; scroll-padding: 0 14px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .kpi-grid.is-detailed .kpi-card { scroll-snap-align: start; }

  /* command center: resumo 2x2, filtros lado a lado */
  .command-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .command-filters label, .command-filters select { min-width: 0; width: 100%; }
  .command-filters .period-chip { grid-column: 1 / -1; justify-self: start; }
  .command-pulse { grid-template-columns: 1fr 1fr; }
  .command-pulse > div + div { border-top: 0; border-left: 0; }
  .command-pulse > div:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.1); }
  .command-pulse > div:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .command-actions { grid-template-columns: 1fr 1fr; }
  .command-actions .btn:first-child { grid-column: 1 / -1; }
}
@media (max-width: 340px) {
  .kpi-grid.is-compact { gap: 8px; }
  .kpi-grid.is-compact .kpi-card { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-chip, .dash-density button { transition: none; }
}

/* v0.45.1: filtros do Dashboard recolhidos no celular */
.command-filters-toggle { display: none; }
@media (max-width: 760px) {
  .command-filters-toggle {
    display: inline-flex; align-items: center; gap: 8px; justify-self: start;
    min-height: 44px; padding: 0 14px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06);
    color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
  }
  .command-filters-toggle:hover { background: rgba(255, 255, 255, 0.12); }
  .command-filters-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .command-filters-toggle b {
    min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
    border-radius: 999px; background: var(--accent); color: #071e2e; font-size: 11px;
  }
  .command-filters-chevron { transition: transform .2s ease; opacity: .8; }
  .command-filters-toggle.is-open .command-filters-chevron { transform: rotate(180deg); }
  .command-center .command-filters:not(.is-open) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .command-filters-toggle, .command-filters-chevron { transition: none; }
}

/* v0.45.2: linha de alertas no topo do Dashboard (so celular) */
.command-alerts { display: none; }
@media (max-width: 760px) {
  .command-copy .command-title-generic,
  .command-copy .command-copy-text { display: none; }
  .command-alerts { display: flex; flex-wrap: wrap; gap: 6px; }
  .command-alert {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 40px; padding: 0 11px; border-radius: 999px; white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.07);
    color: #eaf2f7; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: background-color .2s ease;
  }
  .command-alert:hover { background: rgba(255, 255, 255, 0.13); }
  .command-alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8fc0e4; flex: none; }
  .command-alert.is-danger { border-color: rgba(255, 138, 148, 0.45); background: rgba(180, 59, 69, 0.22); color: #ffe3e6; }
  .command-alert.is-danger::before { background: #ff8a94; }
  .command-alert.is-ok::before { background: #6fd3a5; }
  .command-alert:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .command-copy h2:not(.command-title-generic) { margin-bottom: 10px; }
}

/* v0.47.0 — aba Assinatura */
.subscription-status { border-left: 6px solid var(--line); }
.subscription-status.tone-success { border-left-color: var(--ok); }
.subscription-status.tone-warn { border-left-color: var(--accent); }
.subscription-status.tone-danger { border-left-color: var(--danger); }
.subscription-status.tone-info { border-left-color: var(--brand); }
.subscription-status-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.subscription-status-head h2 { margin: 2px 0 4px; font-size: 1.45rem; }
.subscription-status-head p { margin: 0; color: var(--muted); }
.subscription-badge { border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 0.82rem; background: var(--soft); color: var(--text); white-space: nowrap; }
.subscription-badge.tone-success { background: #e3f3eb; color: var(--ok); }
.subscription-badge.tone-warn { background: var(--accent-soft); color: var(--warn); }
.subscription-badge.tone-danger { background: #f8e3e5; color: var(--danger); }
.subscription-badge.tone-info { background: var(--brand-light); color: var(--brand-dark); }
.subscription-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 0; }
.subscription-facts div { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.subscription-facts dt { font-size: 0.78rem; color: var(--muted); }
.subscription-facts dd { margin: 2px 0 0; font-weight: 700; }
.subscription-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.subscription-note.info { background: var(--brand-light); }
.subscription-note.warn { background: var(--accent-soft); color: var(--warn); }
.subscription-options, .subscription-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.subscription-option, .subscription-plan { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.subscription-option h3, .subscription-plan h3 { margin: 0; }
.subscription-option p { margin: 0; color: var(--muted); flex: 1; }
.subscription-option.is-current, .subscription-plan.is-current { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.subscription-plan-price { font-size: 1.5rem; font-weight: 800; margin: 0; }
.subscription-plan-price small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.subscription-plan ul { margin: 0; padding-left: 18px; color: var(--muted); flex: 1; }
.subscription-quote { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--brand); background: var(--brand-light); }
.subscription-quote.warn { border-color: var(--accent); background: var(--accent-soft); }
.subscription-quote p { margin: 0 0 8px; }
.subscription-history-wrap { overflow-x: auto; }
.subscription-history { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.subscription-history th, .subscription-history td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.subscription-history th { color: var(--muted); font-weight: 600; }
.subscription-history td.is-negative { color: var(--danger); }

/* Parcelamento (v0.50.0): valor original + corrigido e linha do tempo das parcelas */
.finance-values { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.finance-values small { color: var(--muted); }
.finance-corrected { color: var(--danger); font-weight: 600; }
.installment-fields { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); grid-column: 1 / -1; }
.installment-fields legend { font-weight: 700; padding: 0 4px; }
.installment-fields .form-help { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.installment-plans .installment-plan { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.installment-plans .installment-plan:first-of-type { border-top: 0; padding-top: 0; }
.installment-plans .installment-summary { margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.installment-plans .installment-summary b { color: var(--text); }
.installment-plans ol.installment-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.installment-plans .installment-step { border: 1px solid var(--line); border-top-width: 4px; border-radius: 8px; padding: 7px 9px; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.installment-plans .installment-step span { margin-top: 0; }
.installment-plans .installment-step small { margin-top: 2px; font-size: 11px; }
.installment-plans .installment-step .finance-corrected { color: var(--danger); font-weight: 700; }
.installment-step.is-paid { border-top-color: var(--ok); }
.installment-step.is-next { border-top-color: var(--brand); background: var(--brand-light); }
.installment-step.is-late { border-top-color: var(--danger); }
.installment-step.is-future { border-top-color: var(--line); }
.installment-plans .actions { margin-top: 8px; }
.reparcel-form { margin-top: 10px; }
@media (max-width: 640px) {
  .installment-fields { grid-template-columns: 1fr; }
}
.fee-item-field select { max-width: 100%; }
.fee-item-hint { grid-column: 1 / -1; margin: -4px 0 0; }

/* v0.51.0: linha da Equipe (cinza = cargo vago, verde = cargo ocupado). */
.team-track {
  --track-off: #b9c3bf;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}

.team-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding-top: 26px;
  text-align: center;
  font-size: 0.82rem;
}

.team-step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -50%;
  width: 100%;
  height: 4px;
  background: var(--track-off);
}

.team-step:first-child::before {
  display: none;
}

.team-dot {
  position: absolute;
  top: 0;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--track-off);
  box-shadow: 0 0 0 1px var(--track-off);
}

.team-step.is-filled::before,
.team-step.is-filled .team-dot {
  background: var(--ok);
}

.team-step.is-filled .team-dot {
  box-shadow: 0 0 0 1px var(--ok);
}

.team-step > span {
  font-weight: 700;
}

.team-step > strong {
  min-height: 2.5em;
}

.team-step small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .team-track {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .team-step {
    grid-template-columns: auto auto;
    justify-content: start;
    justify-items: start;
    column-gap: 10px;
    padding: 4px 0 14px 34px;
    text-align: left;
  }

  .team-step small {
    grid-column: 1 / -1;
  }

  .team-step > strong {
    min-height: 0;
  }

  .team-step::before,
  .team-step::after {
    left: 8px;
    width: 4px;
  }

  .team-step::before {
    top: 0;
    height: 16px;
  }

  .team-step::after {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 0;
    background: var(--track-off);
  }

  .team-step:last-child::after {
    display: none;
  }

  .team-step:has(+ .is-filled)::after {
    background: var(--ok);
  }

  .team-dot {
    top: 4px;
    left: 0;
  }
}

/* v0.54.0: convites pendentes em grade (ate 4 por linha) e popup "Enviar convite". */
.team-invite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.team-invite-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.team-invite-card h3,
.team-invite-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.team-invite-card .tag {
  align-self: flex-start;
}

.team-invite-card .actions {
  margin-top: auto;
}

.team-invite-modal textarea {
  min-height: 180px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .team-invite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .team-invite-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   Landing v0.55.0 — cabecalho branco, hero petroleo com destaques ambar,
   modulos, previa desktop e cartao de login limpo. Fontes do sistema (custo zero).
   =================================================================== */
.landing .lp-header {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--lp-line);
  box-shadow: 0 1px 10px rgba(7, 30, 46, 0.06);
}
.landing .lp-logo img { width: 118px; }
.landing .lp-header .lp-menu-toggle { color: var(--lp-navy); border-color: var(--lp-line); background: #fff; }
.landing .lp-header .lp-menu-toggle:hover { background: #f1f5f8; border-color: #cfdbe3; }
.landing .lp-hero {
  margin-top: 0;
  padding: 40px var(--lp-gutter) 48px;
  background:
    radial-gradient(70% 55% at 100% 0%, rgba(247, 147, 30, 0.08), transparent 60%),
    linear-gradient(135deg, #06263b 0%, #0b4a6b 52%, #0a3b56 100%);
}
.landing .lp-hero h1 {
  max-width: 20ch;
  font-size: clamp(2rem, 8vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #f7fbff;
}
.landing .lp-hl { color: var(--lp-accent); }
.landing .lp-lead { color: rgba(247, 251, 255, 0.88); font-size: clamp(1.02rem, 1.3vw, 1.3rem); line-height: 1.5; max-width: 40ch; }
.lp-modules {
  list-style: none; margin: 0 0 24px; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.lp-modules li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f7fbff; font-size: .9rem; font-weight: 700;
}
.lp-modules .lp-icon { width: 22px; height: 22px; color: var(--lp-accent); }

/* previa desktop em janela */
.lp-window { max-width: none; margin: 32px 0 0; }
.lp-window-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #e7edf2; border-radius: 14px 14px 0 0; border: 1px solid #d5dee7; border-bottom: 0;
}
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c6d2dc; }
.lp-window-bar span { margin-left: 10px; font-size: .72rem; color: #5f6f7f; background: #fff; border-radius: 6px; padding: 3px 10px; }
.lp-window-body {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  background: var(--lp-bg); border: 1px solid #d5dee7; border-radius: 0 0 14px 14px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}
.lp-window-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; background: #0b4a6b; }
.lp-window-brand { width: 30px; height: 30px; margin: 0 0 10px 4px; border-radius: 8px; background: url("/logo-gtjus-mark.svg") center / contain no-repeat; }
.lp-window-nav span:not(.lp-window-brand) { padding: 6px 8px; border-radius: 7px; color: #cfe0ea; font-size: .72rem; font-weight: 600; }
.lp-window-nav span.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; }
.lp-window-main { padding: 14px; display: grid; gap: 10px; align-content: start; }
.lp-window-title { color: var(--lp-ink); font-size: 1rem; }
.lp-window-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp-window figcaption { color: #a9c3d2; }
.lp-mobile-only { margin-top: 4px; }

/* cartao de login limpo */
.landing .login-clean .login-card-head { margin-bottom: 14px; }
.landing .login-clean .login-card-head h2 { margin: 0; font-size: 1.35rem; color: var(--lp-ink); }
.landing .login-clean .form-grid { gap: 12px; }
.landing .login-clean label { font-weight: 600; color: var(--lp-ink); }
.password-wrap { position: relative; display: block; margin-top: 6px; }
.password-wrap input { width: 100%; padding-right: 88px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: #0b4a6b; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.password-toggle:hover { background: #eef3f6; }
.login-forgot { display: flex; justify-content: flex-end; margin-top: -4px; }
.link-btn {
  min-height: 32px; padding: 0 2px; border: 0; background: none; cursor: pointer;
  color: #0b4a6b; font: inherit; font-size: .88rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: #083a55; }
.landing .login-clean .btn {
  width: 100%; min-height: 50px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1rem; font-weight: 700;
  background: #fff; color: var(--lp-ink); border: 1px solid #ccd7e2; box-shadow: none;
}
.landing .login-clean .btn:hover:not(:disabled) { background: #f6f9fb; border-color: #b5c4d2; }
.landing .login-clean .btn:disabled { opacity: .6; cursor: progress; }
.landing .login-clean .login-google {
  min-height: 54px; border: 2px solid #1a73e8; color: #163a69;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}
.landing .login-clean .login-google:hover:not(:disabled) { background: #f3f8ff; border-color: #1a73e8; }
.login-create { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.landing .login-clean .login-create .btn { min-height: 46px; font-size: .9rem; font-weight: 600; border-color: #d5dee7; padding: 0 8px; }
.google-g { flex: none; }
.landing .login-clean .login-legal { margin: 14px 0 0; font-size: .78rem; color: var(--lp-muted); text-align: center; }

@media (max-width: 380px) {
  .login-create { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .landing .lp-hero { padding: 56px var(--lp-gutter) 64px; }
  .lp-modules { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .landing .lp-nav-desktop > button, .landing .lp-nav-desktop > a { color: var(--lp-ink); font-size: 1rem; }
  .landing .lp-nav-desktop > button:hover, .landing .lp-nav-desktop > a:hover { background: #f1f5f8; color: var(--lp-navy); }
  .landing .lp-header { height: 76px; }
  .landing .lp-hero {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 440px);
    column-gap: 56px;
    padding: 48px max(40px, calc((100vw - 1240px) / 2)) 56px;
    min-height: calc(100vh - 76px);
  }
  .landing .lp-hero h1 { font-size: clamp(2.6rem, 3.5vw, 4rem); max-width: 19ch; margin-bottom: 14px; }
  .lp-modules { margin-bottom: 0; }
  .lp-mobile-only { display: none; }
  .landing .lp-access .login-card { padding: 30px; border-radius: 22px; }
}
@media (max-width: 1023px) {
  .lp-window { display: none; }
}
@media (min-width: 1440px) {
  .landing .lp-hero h1 { font-size: 4.2rem; }
}
.landing .login-clean .login-create { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.landing .login-clean .login-create .btn.login-signup-google { background: #fff; color: #163a69; border: 1px solid #b9cdf0; box-shadow: none; white-space: nowrap; }
.landing .login-clean .login-create .btn.login-signup-google:hover:not(:disabled) { background: #f3f8ff; border-color: #1a73e8; }
.landing .login-clean .login-create .google-g { width: 18px; height: 18px; }
@media (min-width: 1024px) {
  .landing .lp-hero h1 { font-size: clamp(2.4rem, 3.05vw, 3.7rem); max-width: 22ch; }
}
@media (min-width: 1440px) {
  .landing .lp-hero h1 { font-size: 3.9rem; }
}

/* v0.57.0: Fale Conosco (popup da tela de entrada) */
.lp-contact-shell { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.lp-contact-backdrop { position: absolute; inset: 0; border: 0; background: rgba(6, 26, 40, 0.62); cursor: pointer; }
.lp-contact {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 24px; border-radius: 20px; background: #fff; color: var(--lp-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.lp-contact header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lp-contact h2 { margin: 0; font-size: 1.4rem; }
.lp-contact-x { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--lp-line); border-radius: 12px; background: #fff; color: var(--lp-ink); cursor: pointer; }
.lp-contact-form { display: grid; gap: 12px; }
.lp-contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.lp-contact-form input, .lp-contact-form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #ccd7e2; border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--lp-ink); background: #fff;
}
.lp-contact-form textarea { min-height: 120px; resize: vertical; }
.lp-optional { font-weight: 400; color: var(--lp-muted); }
.lp-contact-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-contact-consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: .9rem !important; color: var(--lp-muted); }
.lp-contact-consent input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; }
.lp-contact-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.lp-contact-actions .lp-btn { width: auto; min-height: 48px; }
.lp-btn-ghost-dark { background: #fff; color: var(--lp-ink); border-color: #ccd7e2; }
.lp-btn-ghost-dark:hover { background: #f1f5f8; }
.lp-contact-done { display: grid; gap: 10px; }
.lp-contact-done h3 { margin: 0; font-size: 1.15rem; }
.lp-contact-done p { margin: 0 0 6px; color: var(--lp-muted); }

/* v0.59.0: rede de parceiros e indicacoes */
.referral-card { display: grid; gap: 8px; }
.referral-summary { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.referral-oab-notice { padding: 12px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f0c674; }
.referral-oab-notice p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; }
.checkbox-line { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-line input { width: auto; min-height: 0; }

/* v0.60.0: fim de assinatura */
.lapse-shell { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(6, 26, 40, 0.66); }
.lapse-modal { width: 100%; max-width: 560px; padding: 24px; border-radius: 18px; background: var(--panel, #fff); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); display: grid; gap: 14px; }
.lapse-modal h2 { margin: 0; }
.lapse-modal p { margin: 0; line-height: 1.55; }
.blocked-main { max-width: 1040px; margin: 0 auto; padding: 24px 16px; }
.blocked-panel h1 { margin: 0; font-size: 1.5rem; }
