.stage-note {
  margin: 0;
  color: var(--slate-500);
  overflow-wrap: anywhere;
}

.stage-card .clean-list {
  margin-bottom: auto;
  overflow-wrap: anywhere;
}

.stage-card__footer {
  margin-top: auto;
}

.chip--success {
  color: var(--blue-900);
  background: rgba(219, 234, 254, 0.8);
  border-color: rgba(37, 99, 235, 0.12);
}

.private-access {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.dashboard-grid {
  grid-template-columns: 0.82fr 1.18fr;
}

.case-list,
.message-stream,
.notes-stream {
  display: grid;
  gap: 12px;
}

.case-item,
.message,
.note {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.case-item.active {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(219, 234, 254, 0.6);
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
}

.message--mine {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
}

.message-stream,
.notes-stream {
  max-height: 320px;
  overflow: auto;
  padding-right: 6px;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

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

.drawer-backdrop,
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
}

.drawer,
.auth-card {
  position: relative;
  isolation: isolate;
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  opacity: 1 !important;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.3);
  mix-blend-mode: normal !important;
  filter: none !important;
  backdrop-filter: none !important;
  transform: translateZ(0);
  box-shadow:
    0 28px 90px rgba(15, 23, 42, 0.18),
    0 8px 24px rgba(15, 23, 42, 0.08);
}

.drawer::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #ffffff;
}

.drawer .section-card,
.auth-card .section-card {
  opacity: 1 !important;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.drawer__grid,
.auth-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.05fr 0.95fr;
}

.footer {
  padding: 10px 0 40px;
}

.footer-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 4px;
}

.footer-owner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-500);
}

.footer-owner img {
  width: 110px;
  height: 34px;
  object-fit: contain;
}

.footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(7, 94, 84, 0.12);
  border-radius: 999px;
  color: #064e3b;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(220, 252, 231, 0.9));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.footer-whatsapp:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(220, 252, 231, 1), rgba(187, 247, 208, 0.9));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.whatsapp-icon,
.whatsapp-float__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #25d366;
}

.whatsapp-icon {
  width: 28px;
  height: 28px;
}

.whatsapp-icon svg,
.whatsapp-float__icon svg {
  width: 100%;
  height: 100%;
}

.whatsapp-copy,
.whatsapp-float__copy {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.whatsapp-copy strong {
  font-size: 0.94rem;
}

.whatsapp-copy small {
  color: #047857;
  font-size: 0.82rem;
  font-weight: 700;
}

.whatsapp-float {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(7, 94, 84, 0.14);
  border-radius: 22px;
  color: #064e3b;
  background:
    radial-gradient(circle at top left, rgba(37, 211, 102, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.whatsapp-float__icon {
  width: 40px;
  height: 40px;
}

.whatsapp-float__copy > span {
  color: #128c7e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.whatsapp-float__copy strong {
  font-size: 0.96rem;
}

.whatsapp-float__copy small {
  color: #047857;
  font-size: 0.82rem;
  font-weight: 700;
}

.whatsapp-float:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.17);
}

.footer-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.footer-brand {
  font-size: 1.5rem;
}

.footer-legal {
  display: grid;
  gap: 12px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-800);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-note {
  padding: 16px 18px;
  border: 1px dashed rgba(37, 99, 235, 0.22);
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.8);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  min-width: 220px;
  padding: 14px 16px;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--slate-500);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px dashed rgba(148, 163, 184, 0.32);
}

@media (max-width: 980px) {
  .topbar__row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topbar__identity {
    flex-wrap: wrap;
  }

  .topbar__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .hero__grid,
  .dashboard-grid,
  .drawer__grid,
  .education-grid,
  .case-grid,
  .explain-grid,
  .footer-grid,
  .clarity-grid,
  .detail-grid,
  .detail-grid--legal,
  .stage-roadmap,
  .dashboard-hero__stats {
    grid-template-columns: 1fr;
  }

  .hero__stats,
  .metric-strip,
  .form-grid.two,
  .explain-points,
  .property-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1180px);
  }

  .section-head,
  .dashboard-detail__header,
  .private-access {
    flex-direction: column;
    align-items: stretch;
  }

  .version-pill {
    width: fit-content;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .user-greeting {
    justify-content: center;
  }

  .hero {
    padding-top: 30px;
  }

  .footer-simple {
    flex-direction: column;
    align-items: center;
  }

  .whatsapp-float {
    left: 10px;
    right: 10px;
    bottom: 12px;
    align-items: center;
    text-align: center;
  }

  .privacy-card summary {
    flex-direction: column;
    align-items: stretch;
  }

  .privacy-toggle {
    text-align: center;
  }
}
