:root {
  --bg: #f4f6f2;
  --surface: #ffffff;
  --ink: #19201d;
  --muted: #66716c;
  --line: #dfe5dd;
  --accent: #146c63;
  --accent-2: #8a5a16;
  --danger: #b42318;
  --ok: #1f7a3b;
  --soft: #e8f2ef;
  --soft-warn: #fff2d8;
  --shadow: 0 16px 40px rgba(25, 32, 29, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

body.locked .app-shell {
  display: none;
}

body:not(.locked) .login-screen {
  display: none;
}

.public-site {
  display: none;
}

body.locked .public-site {
  display: block;
}

body:not(.locked) .public-site {
  display: none;
}

.login-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(15, 24, 21, 0.94);
  gap: 18px;
}

body.locked.auth-open .login-screen {
  display: grid;
}

.auth-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.login-panel {
  display: grid;
  width: min(430px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--ink);
}

.login-brand small {
  color: var(--muted);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.register-panel {
  width: min(760px, 100%);
}

.payment-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.payment-note span {
  font-weight: 800;
  color: var(--accent);
}

.public-site {
  background: #f7f9f5;
  color: #17211e;
}

.public-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  width: min(1380px, calc(100% - 64px));
  min-height: 84px;
  margin: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  color: #fff;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.public-brand img {
  width: 42px;
  height: 42px;
}

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

.public-brand strong {
  font-size: 18px;
}

.public-brand small {
  margin-top: 2px;
  color: #b8c8c1;
  font-size: 11px;
}

.public-nav {
  display: flex;
  gap: 28px;
}

.public-nav a {
  color: #dfe9e4;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

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

.public-login-button,
.public-primary-button,
.plan-button,
.footer-login {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}

.public-login-button {
  border-color: rgba(255, 255, 255, 0.38);
  background: transparent;
  color: #fff;
}

.public-primary-button {
  background: #e1b657;
  color: #17211e;
}

.public-primary-button.large {
  min-height: 52px;
  padding-inline: 22px;
}

.public-hero {
  position: relative;
  min-height: 820px;
  overflow: hidden;
  padding: 174px max(32px, calc((100vw - 1380px) / 2)) 88px;
  background-color: #13231e;
  background-image:
    linear-gradient(90deg, rgba(19, 35, 30, 0.98) 0%, rgba(19, 35, 30, 0.9) 38%, rgba(19, 35, 30, 0.25) 70%, rgba(19, 35, 30, 0.08) 100%),
    url("assets/abogados-portada-preview.png");
  background-position: center, center;
  background-size: cover, cover;
  color: #fff;
}

.public-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  height: 9px;
  background: #e1b657;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 54%);
}

.hero-kicker,
.section-kicker {
  margin-bottom: 18px;
  color: #e1b657;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 26px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.3vw, 82px);
  font-weight: 500;
  line-height: 1.02;
}

.hero-intro {
  max-width: 650px;
  margin-bottom: 30px;
  color: #c6d2cd;
  font-size: 19px;
  line-height: 1.6;
}

.hero-actions,
.hero-trust {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-link {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.hero-link span {
  margin-left: 7px;
  color: #e1b657;
}

.hero-trust {
  flex-wrap: wrap;
  margin-top: 36px;
  color: #aebdb7;
  font-size: 12px;
  font-weight: 700;
}

.hero-trust span::before {
  margin-right: 8px;
  color: #e1b657;
  content: "✓";
}

.product-scene {
  display: none;
  position: absolute;
  z-index: 1;
  right: max(-140px, calc((100vw - 1640px) / 2));
  bottom: 68px;
  display: grid;
  grid-template-columns: 72px 1fr;
  width: min(720px, 52vw);
  min-height: 500px;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #f6f7f3;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.34);
  color: #17211e;
}

.scene-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 23px;
  padding: 20px 14px;
  background: #0c1814;
}

.scene-sidebar img {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
}

.scene-nav {
  width: 26px;
  height: 7px;
  border-radius: 2px;
  background: #51605a;
}

.scene-nav.active {
  background: #e1b657;
}

.scene-main {
  padding: 28px;
}

.scene-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 26px;
}

.scene-top span,
.scene-top b {
  display: block;
}

.scene-top span {
  color: #718078;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-top b {
  grid-column: 1;
  margin-top: 4px;
  font-family: Georgia, serif;
  font-size: 24px;
}

.scene-top i {
  grid-row: 1 / 3;
  grid-column: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d7e8e1;
}

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

.scene-metrics article,
.scene-agenda,
.scene-cases {
  border: 1px solid #dce3dd;
  border-radius: 6px;
  background: #fff;
}

.scene-metrics article {
  padding: 14px;
}

.scene-metrics small,
.scene-metrics span {
  display: block;
  color: #718078;
  font-size: 9px;
}

.scene-metrics strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 20px;
}

.scene-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-top: 14px;
}

.scene-agenda,
.scene-cases {
  padding: 16px;
}

.scene-agenda > div,
.scene-cases > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.scene-agenda > div span,
.scene-cases > div span {
  color: #146c63;
  font-size: 9px;
  font-weight: 800;
}

.scene-agenda p,
.scene-cases p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid #edf0ed;
  font-size: 10px;
}

.scene-agenda p b {
  color: #146c63;
}

.scene-agenda p span,
.scene-cases p span {
  flex: 1;
  line-height: 1.45;
}

.scene-agenda small,
.scene-cases small {
  display: block;
  color: #7b8781;
  font-size: 8px;
}

.case-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #146c63;
}

.case-dot.gold { background: #d29d2e; }
.case-dot.blue { background: #527fa2; }

.public-proof {
  padding: 28px 32px;
  border-bottom: 1px solid #dde3dc;
  background: #fff;
  text-align: center;
}

.public-proof p {
  margin-bottom: 17px;
  color: #718078;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-proof div {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px 48px;
  color: #26352f;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.public-section {
  padding: 104px max(32px, calc((100vw - 1240px) / 2));
}

.section-heading {
  max-width: 790px;
  margin-bottom: 48px;
}

.section-heading h2,
.public-cta h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.08;
}

.section-heading > p:last-child {
  max-width: 690px;
  color: #68756f;
  font-size: 17px;
  line-height: 1.65;
}

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

.feature {
  min-height: 270px;
  padding: 28px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
}

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

.feature-dark {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  background: #193029;
  color: #fff;
}

.feature h3 {
  margin: 22px 0 12px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 600;
}

.feature p {
  color: #6b7771;
  line-height: 1.6;
}

.feature-dark h3 {
  margin-top: 0;
}

.feature-dark p {
  color: #b8c7c1;
}

.feature-number {
  color: #d4a94e;
  font-size: 12px;
  font-weight: 900;
}

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #b8d8cd;
  border-radius: 6px;
  background: #eaf4f0;
  color: #146c63;
  font-size: 18px;
  font-weight: 900;
}

.case-preview {
  grid-column: 1 / -1;
  align-self: end;
  padding: 18px;
  border: 1px solid #426058;
  border-radius: 6px;
  background: #10251f;
}

.case-preview small,
.case-preview strong,
.case-preview span {
  display: block;
}

.case-preview small {
  color: #e1b657;
  font-size: 9px;
  font-weight: 900;
}

.case-preview strong {
  margin: 8px 0 5px;
}

.case-preview span {
  color: #9eb0a8;
  font-size: 11px;
}

.case-preview div {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  font-size: 10px;
}

.case-preview i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e1b657;
}

.client-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: span 2;
  overflow: hidden;
  background: #e8f1ed;
}

.client-feature > div:first-child {
  max-width: 52%;
}

.client-phone {
  width: 205px;
  margin: 30px 10px -58px 0;
  padding: 16px;
  border: 5px solid #173029;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 18px 35px rgba(18, 44, 36, 0.18);
}

.client-phone > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.client-phone img {
  width: 25px;
}

.client-phone p {
  margin: 14px 0 0;
  padding: 11px;
  border: 1px solid #dce3dd;
  border-radius: 6px;
  font-size: 9px;
}

.client-phone small,
.client-phone strong,
.client-phone span {
  display: block;
}

.client-phone strong {
  margin: 5px 0;
  color: #17211e;
}

.client-phone span {
  color: #146c63;
  font-weight: 800;
}

.workflow-section {
  background: #172620;
  color: #fff;
}

.section-heading.light {
  margin-inline: auto;
  text-align: center;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid #42524c;
}

.workflow-list article {
  display: flex;
  gap: 18px;
  padding: 34px;
  border-right: 1px solid #42524c;
}

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

.workflow-list article > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #e1b657;
  border-radius: 50%;
  color: #e1b657;
  font-weight: 900;
}

.workflow-list h3 {
  margin: 7px 0 10px;
  font-family: Georgia, serif;
  font-size: 22px;
}

.workflow-list p {
  margin: 0;
  color: #aebdb7;
  line-height: 1.55;
}

.plans-section .section-heading {
  margin-inline: auto;
  text-align: center;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 16px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  padding: 32px;
  border: 1px solid #d8e0d9;
  border-radius: 8px;
  background: #fff;
}

.plan-card.featured {
  border: 2px solid #146c63;
  box-shadow: 0 22px 48px rgba(20, 108, 99, 0.14);
}

.plan-card.plan-disabled {
  opacity: 0.58;
}

.plan-card button:disabled {
  cursor: not-allowed;
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 26px;
  padding: 8px 12px;
  border-radius: 0 0 6px 6px;
  background: #146c63;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card > p {
  color: #146c63;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 12px 0;
  font-family: Georgia, serif;
  font-size: 37px;
}

.plan-card h3 small {
  color: #718078;
  font-family: Inter, sans-serif;
  font-size: 13px;
}

.plan-card > span {
  color: #6b7771;
}

.plan-card ul {
  display: grid;
  gap: 15px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.plan-card li::before {
  margin-right: 10px;
  color: #146c63;
  content: "✓";
  font-weight: 900;
}

.plan-card button {
  width: 100%;
  margin-top: auto;
}

.plan-button {
  border-color: #146c63;
  background: #fff;
  color: #146c63;
}

.plans-note {
  margin: 24px 0 0;
  color: #718078;
  text-align: center;
  font-size: 13px;
}

.public-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 72px max(32px, calc((100vw - 1240px) / 2));
  background: #146c63;
  color: #fff;
}

.public-cta h2 {
  max-width: 760px;
  margin: 0;
}

.light-button {
  flex: 0 0 auto;
  background: #fff;
  color: #146c63;
}

.public-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 38px max(32px, calc((100vw - 1240px) / 2));
  background: #0e1a16;
  color: #fff;
}

.public-footer p {
  margin: 0;
  color: #aebdb7;
  font-size: 13px;
}

.footer-login {
  justify-self: end;
  border-color: #53625c;
  background: transparent;
  color: #fff;
}

.hidden {
  display: none !important;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #17211e;
  color: #f6fbf8;
}

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

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #cde7df;
  color: #103d38;
  font-weight: 800;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

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

.brand small {
  margin-top: 3px;
  color: #b7c5bf;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #eaf3ef;
  text-align: left;
}

.nav-item span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.file-button {
  justify-content: center;
}

.file-button input {
  display: none;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

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

.search {
  width: min(360px, 38vw);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric small,
.metric span {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 5px;
  font-size: 28px;
}

.metric.warning {
  background: var(--soft-warn);
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
}

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

.panel-head h2 {
  margin-bottom: 0;
}

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

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

.check-label {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 9px;
  min-height: 42px;
  color: var(--ink);
}

.check-label input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
}

.table-select {
  min-width: 140px;
  min-height: 36px;
  padding: 7px 9px;
}

.period-input {
  width: 170px;
}

.secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.integration-checklist {
  display: grid;
  gap: 9px;
}

.integration-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.integration-flow {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.integration-flow h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.integration-flow ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

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

.billing-metrics article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.billing-metrics small,
.billing-metrics strong {
  display: block;
}

.billing-metrics small {
  color: var(--muted);
}

.billing-metrics strong {
  margin-top: 8px;
  font-size: 21px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.link-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

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

.secondary-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.link-button {
  min-height: 34px;
  padding: 6px 10px;
  background: var(--soft);
  color: var(--accent);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.group-start td {
  border-top: 3px solid var(--accent);
}

.long-text {
  min-width: 280px;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.danger {
  color: var(--danger);
}

.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.ok {
  background: #e6f5eb;
  color: var(--ok);
}

.status.neutral {
  background: #edf0f2;
  color: #4d5961;
}

.status.low {
  background: #fde7e5;
  color: var(--danger);
}

.list,
.report-list,
.bar-list {
  display: grid;
  gap: 10px;
}

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

.manual-line {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.reminder-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #b8d8cd;
  border-radius: 8px;
  background: #eef6f2;
}

.reminder-time-fields {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) minmax(100px, 1fr);
  gap: 8px;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.field-hint.warning-text {
  color: var(--danger);
}

.draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.draft-row strong,
.draft-row small {
  display: block;
}

.draft-row small {
  color: var(--muted);
}

.totals-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.final-balance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.account-filter {
  max-width: 360px;
  margin-bottom: 14px;
}

.final-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.final-balance small {
  display: block;
  color: var(--muted);
}

.total-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.total-line.grand {
  padding-top: 8px;
  border-top: 1px solid rgba(20, 108, 99, 0.2);
  font-size: 18px;
  font-weight: 900;
}

.list-item,
.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.list-item small,
.report-item small,
.hint {
  color: var(--muted);
}

.hint {
  margin: 0;
  font-size: 13px;
}

.bar {
  display: grid;
  gap: 7px;
}

.bar-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e8ece7;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent-2);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #17211e;
  color: #fff;
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 0.92;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.catalog-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
  padding-top: 4px;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.catalog-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 20, 0.58);
}

.modal.hidden {
  display: none;
}

.modal-panel {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal-head h2 {
  margin: 0;
}

.invoice-preview {
  padding: 24px;
}

.invoice {
  display: grid;
  gap: 18px;
  color: #111;
}

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

.invoice-box {
  border: 1px solid #cfd6d2;
  border-radius: 8px;
  padding: 14px;
}

.invoice-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.invoice-title {
  display: grid;
  place-items: center;
  border: 2px solid #111;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.invoice-title strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.invoice-title span {
  font-weight: 800;
}

.invoice-table {
  min-width: 0;
}

.invoice-table th,
.invoice-table td {
  border: 1px solid #cfd6d2;
}

.invoice-total {
  display: grid;
  gap: 8px;
  align-content: start;
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  .modal,
  .modal * {
    visibility: visible;
  }

  .modal {
    position: static;
    display: block;
    padding: 0;
    background: #fff;
  }

  .modal-panel {
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }

  .no-print {
    display: none;
  }
}

@media (max-width: 980px) {
  .billing-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .public-header {
    grid-template-columns: 1fr auto;
    width: calc(100% - 36px);
  }

  .public-nav {
    display: none;
  }

  .public-hero {
    min-height: 1000px;
    padding-top: 142px;
  }

  .hero-copy {
    width: 100%;
  }

  .product-scene {
    right: 4%;
    bottom: 55px;
    width: 82%;
    opacity: 0.82;
  }

  .feature-grid,
  .plans-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plans-grid .plan-card:last-child {
    grid-column: 1 / -1;
  }

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

  .workflow-list article {
    border-right: 0;
    border-bottom: 1px solid #42524c;
  }

  .public-footer {
    grid-template-columns: 1fr auto;
  }

  .public-footer p {
    grid-row: 2;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .metric-grid,
  .content-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .billing-metrics {
    grid-template-columns: 1fr;
  }
  .public-header {
    min-height: 72px;
  }

  .public-brand small,
  .public-actions .public-primary-button {
    display: none;
  }

  .public-actions {
    gap: 6px;
  }

  .public-login-button {
    min-height: 38px;
    padding: 8px 12px;
  }

  .public-hero {
    min-height: 850px;
    padding: 116px 20px 44px;
    background-image:
      linear-gradient(180deg, rgba(19, 35, 30, 0.96) 0%, rgba(19, 35, 30, 0.82) 58%, rgba(19, 35, 30, 0.48) 100%),
      url("assets/abogados-portada-preview.png");
    background-position: center, 64% center;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-link {
    padding: 8px 0;
  }

  .hero-trust {
    gap: 12px;
  }

  .product-scene {
    right: -30%;
    bottom: 36px;
    width: 128%;
    min-height: 360px;
    transform: scale(0.75);
    transform-origin: bottom center;
  }

  .public-proof {
    padding-inline: 20px;
  }

  .public-proof div {
    gap: 15px 24px;
    font-size: 15px;
  }

  .public-section {
    padding: 72px 20px;
  }

  .section-heading h2,
  .public-cta h2 {
    font-size: 38px;
  }

  .feature-grid,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature-wide,
  .client-feature,
  .plans-grid .plan-card:last-child {
    grid-column: auto;
  }

  .client-feature {
    align-items: flex-start;
    min-height: 430px;
  }

  .client-feature > div:first-child {
    max-width: 60%;
  }

  .client-phone {
    width: 170px;
    margin-right: -100px;
  }

  .workflow-list article {
    padding: 28px 0;
  }

  .public-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 58px 20px;
  }

  .public-footer {
    grid-template-columns: 1fr;
    padding: 32px 20px;
  }

  .public-footer p {
    grid-row: auto;
  }

  .footer-login {
    justify-self: stretch;
  }

  .auth-close {
    top: 10px;
    right: 10px;
  }

  .main,
  .sidebar {
    padding: 18px;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .field-row,
  .form-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}
