:root {
  --green: #59c252;
  --bright: #b4f296;
  --forest: #153e2d;
  --deep: #092e23;
  --ink: #17241e;
  --muted: #697970;
  --line: #e4eae5;
  --wash: #f5f8f4;
  --white: #fff;
  --soft: #eaf6e5;
  --amber: #975f15;
  --red: #b14d41;
  --shadow: 0 16px 48px -24px #143c2938;
  --radius: 18px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--wash);
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button {
  border: 0;
}
input,
textarea,
select {
  color: var(--ink);
  background: white;
  min-width: 0;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #70b767;
  box-shadow: 0 0 0 3px #59c25220;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #4d9d3c;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
::selection {
  background: #c7efb9;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2.1px;
}
.eyebrow.dark {
  color: var(--forest);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 39px;
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 650;
  font-size: 12px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  white-space: nowrap;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px #193c2310;
}
.button.primary {
  background: linear-gradient(130deg, #5dc854, #43af49);
  border-color: transparent;
  color: #103a1c;
  box-shadow: 0 5px 16px #4cba3720;
}
.button.dark {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
}
.button.soft {
  background: var(--soft);
  border-color: transparent;
  color: var(--forest);
}
.button.small {
  min-height: 30px;
  padding: 7px 10px;
  font-size: 11px;
}
.button.link {
  padding: 5px 0;
  min-height: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--forest);
}
.button.danger {
  color: var(--red);
}
.muted {
  color: var(--muted);
}
.brand {
  font-size: 25px;
  letter-spacing: -1.5px;
  font-weight: 850;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid #ffffff45;
  border-radius: 6px;
  padding: 3px 6px;
  color: #b9eda3;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 650;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  background: #edf1ed;
  color: #536357;
}
.pill.green {
  background: #e8f5e1;
  color: #376a2a;
}
.pill.amber {
  background: #fbf1dc;
  color: var(--amber);
}
.pill.red {
  background: #fbedeb;
  color: var(--red);
}
.pill.dark {
  background: #ffffff16;
  color: #d6f5c2;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #59c25215;
}
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #c7dfc0;
  border-top-color: #367d2a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@keyframes glow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-12%, 8%) scale(1.1);
  }
}
/* acceso */
.login-body {
  background: white;
}
.login-layout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.04fr 1fr;
}
.login-story {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 15%, #4b7c3a 0, transparent 42%),
    linear-gradient(155deg, #153a2b, #0e3124 70%, #163c2b);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 42px 9%;
  min-height: 100vh;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #71cb4260, transparent 70%);
  bottom: -210px;
  right: -220px;
  animation: glow 15s ease-in-out infinite;
  pointer-events: none;
}
.login-world-map {
  position: absolute;
  z-index: 1;
  inset: auto 18px 8%;
  aspect-ratio: 2 / 1;
  background: url("/assets/world-map.svg") center / contain no-repeat;
  opacity: 0.42;
  pointer-events: none;
}
.login-story > .brand,
.login-story > .story-copy,
.login-story > .story-stack,
.login-story > .story-footer {
  position: relative;
  z-index: 2;
}
.login-form-side {
  position: relative;
  background: #f8faf6;
}
.login-form-wrap {
  position: relative;
  z-index: 2;
  background: #fffffff5;
  border: 1px solid #e0e9da;
  border-radius: 25px;
  box-shadow: 0 24px 70px -40px #163c293a;
  padding: 34px;
}
.story-copy {
  margin-top: clamp(55px, 10vh, 100px);
  z-index: 1;
}
.story-copy .eyebrow {
  color: #bfd4b7;
}
.story-copy h1 {
  font-size: clamp(42px, 5vw, 74px);
  letter-spacing: -3px;
  line-height: 1.04;
  margin-top: 22px;
  font-weight: 650;
}
.story-copy em {
  font-style: normal;
  background: linear-gradient(100deg, #d3f5b3, #7ce76d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.story-copy p {
  max-width: 370px;
  margin-top: 24px;
  color: #c6d6c4;
  font-size: 15px;
  line-height: 1.8;
}
.story-stack {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 390px;
  z-index: 1;
}
.story-stack > div {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #b9e9a71f;
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(100deg, #ffffff0c, #ffffff02);
  animation: float 8s ease-in-out infinite;
}
.story-stack > div:nth-child(2) {
  margin-left: 15px;
  animation-delay: -2s;
}
.story-stack > div:nth-child(3) {
  margin-left: 30px;
  animation-delay: -4s;
}
.story-stack i {
  font-size: 10px;
  font-style: normal;
  color: #bee8aa;
  border: 1px solid #b4e6a72b;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
}
.story-stack span {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}
.story-stack small {
  display: block;
  color: #a4bca1;
  font-size: 10px;
  font-weight: 400;
  margin-top: 2px;
}
.story-stack b {
  font-size: 22px;
  font-weight: 400;
  color: #99d580;
}
.story-footer {
  font-size: 10px;
  color: #97b28e;
  margin-top: auto;
  padding-top: 36px;
}
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.login-form-wrap {
  width: min(100%, 440px);
  animation: enter 0.5s both;
}
.login-lock {
  width: 48px;
  height: 48px;
  background: #ecf6e7;
  border-radius: 14px;
  color: #407c30;
  display: grid;
  place-items: center;
  font-size: 30px;
  margin-bottom: 26px;
}
.login-form-wrap h2 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-top: 12px;
  font-weight: 650;
}
.login-form-wrap > p {
  color: var(--muted);
  font-size: 13px;
  margin: 15px 0 34px;
}
.login-form-wrap label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-top: 20px;
}
.login-form-wrap input {
  font-size: 16px;
  min-height: 48px;
  border-color: #869981;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 62px;
}
.password-wrap button {
  position: absolute;
  right: 5px;
  top: 10px;
  min-width: 48px;
  min-height: 44px;
  border-radius: 7px;
  background: none;
  color: #58804a;
  font-size: 11px;
  font-weight: 600;
}
.login-submit {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  justify-content: space-between;
  font-size: 13px;
}
.login-foot {
  margin-top: 29px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #586854;
  font-size: 11px;
}
.login-foot small {
  display: block;
  font-size: 10px;
  color: #64705f;
  margin-top: 5px;
}
.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  min-height: 0;
}
.form-error:not(:empty) {
  padding: 10px;
  border-radius: 8px;
  background: #fff4ee;
}
.password-hint {
  color: #82531a;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
}
.login-form-wrap input[aria-invalid="true"] {
  border-color: #b14d41;
  box-shadow: 0 0 0 2px #b14d4114;
}
.password-wrap button:hover {
  background: #edf5e7;
}
.login-submit {
  min-height: 48px;
}
.login-story .story-stack > div {
  animation: none;
}
/* estructura */
.workspace {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  flex-shrink: 0;
  position: fixed;
  inset: 0 auto 0 0;
  background: linear-gradient(173deg, #153c2d, #0b3024);
  color: #ebf3e9;
  display: flex;
  flex-direction: column;
  padding: 29px 18px;
  z-index: 30;
}
.sidebar .brand {
  padding: 0 12px;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #83a58a;
  margin: 42px 12px 14px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 11px;
  font-size: 12px;
  color: #b8ccba;
  background: none;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  transition: 0.2s;
}
.nav-item:hover {
  background: #ffffff0b;
  color: white;
}
.nav-item.active {
  background: linear-gradient(100deg, #d7f5bd, #b9e5a1);
  color: #203e25;
  box-shadow: 0 5px 24px #0a201440;
  font-weight: 700;
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ffffff0e;
}
.nav-item.active .nav-count {
  background: #37632e12;
}
.side-note {
  margin-top: auto;
  padding: 20px 12px 0;
  font-size: 10px;
  color: #b5cbb0;
  border-top: 1px solid #ffffff12;
}
.side-note small {
  display: block;
  font-size: 9px;
  color: #7e9e7d;
  margin-top: 8px;
}
.side-note .live-dot {
  margin-right: 6px;
}
.main-shell {
  margin-left: 224px;
  width: calc(100% - 224px);
  min-width: 0;
}
.app-header {
  min-height: 91px;
  padding: 18px 34px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #ffffffcc;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 25;
}
.header-context {
  flex: 1;
  min-width: 0;
}
.header-context small {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #87917f;
  display: block;
}
.header-context h1 {
  font-size: 18px;
  letter-spacing: -0.6px;
  font-weight: 700;
  margin-top: 4px;
}
.global-search {
  width: 270px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  gap: 7px;
  background: white;
  color: #99a493;
}
.global-search span {
  font-size: 22px;
}
.global-search input {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 0;
  font-size: 11px;
}
.global-search kbd {
  font-size: 11px;
  background: #f6f8f4;
  border-radius: 4px;
  padding: 0 4px;
}
.account {
  position: relative;
  flex-shrink: 0;
}
.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px;
  background: none;
  text-align: left;
}
.account-avatar {
  object-fit: cover;
  object-position: center 20%;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: linear-gradient(150deg, #e2f2d8, #c3e5b2);
  border: 1px solid #d1e4c8;
  font-weight: 750;
  color: #3b6933;
}
.account-label b {
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.account-label small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.account-button > span:last-child {
  font-size: 13px;
  color: #6c7f63;
  margin-left: 4px;
}
.account-menu {
  position: absolute;
  right: 0;
  top: 48px;
  width: 254px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 8px;
  box-shadow: 0 20px 70px #152e2626;
  z-index: 60;
  animation: enter 0.2s;
}
.account-menu > div {
  padding: 10px 9px 13px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.account-menu strong {
  font-size: 12px;
}
.account-menu small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  background: white;
  font-size: 12px;
  padding: 10px;
}
.account-menu button:hover {
  background: var(--wash);
}
#content {
  padding: 27px 34px 45px;
  max-width: 1510px;
  margin: auto;
  min-height: calc(100vh - 155px);
}
.app-footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 15px 34px 25px;
  max-width: 1510px;
  margin: auto;
  font-size: 9px;
  color: #889582;
}
.mobile-nav {
  display: none;
}
.loading-state {
  text-align: center;
  padding: 100px 20px;
}
.loading-state h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
  margin-top: 20px;
}
.loading-state p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.loading-state .spinner {
  width: 32px;
  height: 32px;
}
.page-enter {
  animation: enter 0.4s both;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 25px 0 13px;
}
.section-head h2 {
  font-size: 16px;
  letter-spacing: -0.45px;
}
.section-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.section-head .button {
  flex-shrink: 0;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px #18372203;
}
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(108deg, #214b32, #2f603b 60%, #477d43);
  border: 1px solid #34603b;
  color: white;
  border-radius: 21px;
  padding: 30px 34px;
  box-shadow: 0 12px 35px -20px #10322270;
}
.hero:after {
  content: "";
  position: absolute;
  inset: -130px -150px auto auto;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 65px solid #bdec8e0d;
  box-shadow: 0 0 0 55px #bdec8e06;
  pointer-events: none;
  animation: glow 15s ease-in-out infinite;
}
.hero > div {
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  color: #c1dfb2;
  font-size: 9px;
}
.hero h2 {
  font-size: 31px;
  line-height: 1.13;
  letter-spacing: -1.1px;
  margin: 12px 0 11px;
  font-weight: 650;
}
.hero p {
  font-size: 12px;
  color: #c4dbbe;
  max-width: 520px;
}
.hero .button {
  background: #d4f3b7;
  color: #2a4e2a;
  border-color: transparent;
  margin-top: 19px;
}
.hero-signal {
  min-width: 194px;
  background: #ffffff0a;
  border: 1px solid #d8f3c526;
  border-radius: 16px;
  padding: 18px;
  text-align: left;
  backdrop-filter: blur(8px);
}
.hero-signal small {
  font-size: 10px;
  display: block;
  color: #b6cfad;
}
.hero-signal strong {
  font-size: 37px;
  line-height: 1;
  display: block;
  margin: 12px 0 8px;
  letter-spacing: -2px;
  color: #e0f6c6;
}
.hero-signal span {
  font-size: 10px;
  color: #c9e1be;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 20px;
}
.metric {
  padding: 18px 19px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  animation: enter 0.4s both;
}
.metric:nth-child(2) {
  animation-delay: 0.05s;
}
.metric:nth-child(3) {
  animation-delay: 0.1s;
}
.metric:nth-child(4) {
  animation-delay: 0.15s;
}
.metric:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.metric-icon {
  width: 28px;
  height: 28px;
  background: #eff6eb;
  border-radius: 8px;
  color: #659558;
  display: grid;
  place-items: center;
}
.metric-icon .icon {
  width: 15px;
  height: 15px;
}
.metric strong {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
  margin: 10px 0 5px;
  line-height: 1.2;
}
.metric small {
  font-size: 9px;
  color: #82907b;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr);
  gap: 21px;
}
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 19px;
  border-bottom: 1px solid #eef1ec;
  transition: background 0.2s;
}
.task-row:last-child {
  border: 0;
}
.task-row:hover {
  background: #fcfefb;
}
.task-marker {
  margin-top: 2px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: #edf6e6;
  color: #6b915a;
  border-radius: 8px;
  font-size: 12px;
  flex-shrink: 0;
}
.task-copy {
  min-width: 0;
  flex: 1;
}
.task-copy strong {
  font-size: 12px;
  font-weight: 650;
  display: block;
}
.task-copy p {
  font-size: 10px;
  color: #6f7f66;
  margin-top: 4px;
  line-height: 1.6;
}
.task-copy .client-inline {
  display: block;
  font-size: 10px;
  color: #426238;
  margin-top: 6px;
}
.task-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 2px;
}
.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  display: grid;
  place-items: center;
  color: #6b845b;
  flex-shrink: 0;
}
.icon-button .icon {
  width: 14px;
  height: 14px;
}
.icon-button:hover {
  background: var(--soft);
}
.portfolio-card {
  padding: 21px;
}
.portfolio-card h3 {
  font-size: 12px;
  margin-bottom: 5px;
}
.portfolio-card > p {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 22px;
}
.bar-item {
  margin-top: 17px;
}
.bar-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 7px;
}
.bar-track {
  height: 7px;
  border-radius: 5px;
  background: #f0f4ed;
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #92d675, #5da34d);
  border-radius: 5px;
  transform-origin: left;
  animation: grow 0.8s ease-out;
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.insight-note {
  margin-top: 19px;
  padding: 13px;
  border-radius: 11px;
  background: #f5f9f1;
  display: flex;
  gap: 10px;
  color: #647c55;
  font-size: 10px;
  line-height: 1.7;
}
.insight-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.focus-card {
  background: linear-gradient(125deg, #e9f4e2, #f7faf3);
  border: 1px solid #d9e8cf;
  border-radius: 16px;
  padding: 21px;
  margin-top: 16px;
}
.focus-card > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: #6f895f;
  font-weight: 750;
}
.focus-card h3 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-top: 10px;
}
.focus-card p {
  font-size: 11px;
  color: #6a7d5e;
  margin: 9px 0 15px;
  line-height: 1.7;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  flex-wrap: wrap;
}
.segmented button {
  background: none;
  font-size: 11px;
  color: #74806d;
  padding: 7px 11px;
  border-radius: 7px;
  white-space: nowrap;
}
.segmented button.active {
  background: #edf5e7;
  color: #3b6b2c;
  font-weight: 650;
}
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.view-toolbar input {
  font-size: 12px;
  width: min(330px, 100%);
  background: white;
}
.view-toolbar select {
  font-size: 11px;
}
.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}
.page-heading h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 650;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-wrap {
  overflow: auto;
}
.client-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.client-table th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #86917f;
  background: #fbfcf9;
  font-weight: 650;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.client-table th:first-child {
  border-radius: 18px 0 0;
}
.client-table td {
  font-size: 11px;
  padding: 16px 17px;
  border-bottom: 1px solid #edf1e9;
  vertical-align: middle;
}
.client-table tr:last-child td {
  border: 0;
}
.client-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
.client-table tbody tr:hover {
  background: #f9fcf5;
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}
.person-avatar {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #eff4e8;
  color: #66874f;
  font-weight: 650;
  font-size: 11px;
  flex-shrink: 0;
}
.person-cell strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}
.person-cell small {
  display: block;
  font-size: 9px;
  color: #8a9583;
  margin-top: 4px;
}
.score-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-mini {
  width: 37px;
  height: 5px;
  background: #eef3e9;
  border-radius: 3px;
}
.score-mini span {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: #7dbb5c;
}
.table-bottom {
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #8a9583;
  display: flex;
  justify-content: space-between;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.doc-card {
  padding: 19px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.doc-icon {
  width: 37px;
  height: 42px;
  border-radius: 10px;
  background: #eef6e7;
  color: #689a4c;
  display: grid;
  place-items: center;
}
.doc-card h3 {
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.doc-card p {
  font-size: 10px;
  color: #7a8871;
  line-height: 1.7;
}
.doc-card .button {
  margin-top: auto;
}
.doc-alert {
  padding: 14px 17px;
  border: 1px solid #e5eacc;
  border-radius: 12px;
  background: #fbfbee;
  color: #7d813e;
  font-size: 11px;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.doc-alert strong {
  display: block;
  margin-bottom: 3px;
}
.doc-review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.doc-review-head > div {
  flex: 1;
  min-width: 0;
}
.doc-review-head h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.doc-review-head p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  gap: 18px;
  align-items: start;
}
.source-view {
  padding: 18px;
  position: sticky;
  top: 113px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}
.source-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.source-toolbar select {
  font-size: 11px;
  padding: 7px;
}
.source-toolbar strong {
  font-size: 11px;
}
.source-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.9 ui-monospace,
    SFMono-Regular,
    monospace;
  color: #5f7056;
  margin: 0;
  background: #fbfcf9;
  border: 1px solid #edf1e6;
  border-radius: 10px;
  padding: 16px;
}
.review-form {
  padding: 20px;
}
.review-form > .form-grid {
  margin-bottom: 18px;
}
.field-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 12px;
  overflow: hidden;
}
.field-group > summary {
  padding: 12px 14px;
  font-weight: 650;
  font-size: 12px;
  background: #fafcf7;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
.field-group > summary:after {
  content: "＋";
  font-size: 12px;
  color: #8c9f7e;
}
.field-group[open] > summary:after {
  content: "−";
}
.field-group-body {
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field-group label {
  font-size: 10px;
  font-weight: 650;
  display: block;
  min-width: 0;
}
.field-group input,
.field-group textarea {
  width: 100%;
  display: block;
  margin-top: 6px;
  padding: 9px;
  font-size: 11px;
}
.field-group textarea {
  min-height: 84px;
  resize: vertical;
}
.field-group label.wide {
  grid-column: 1/-1;
}
.field-origin {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 400;
  color: #7a9864;
  margin-top: 6px;
}
.field-origin.manual {
  color: var(--amber);
}
.field-origin button {
  background: none;
  font-size: 9px;
  color: #528b36;
  text-decoration: underline;
  padding: 0;
}
.review-footer {
  position: sticky;
  bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 17px;
  background: #f5faefef;
  backdrop-filter: blur(12px);
  border: 1px solid #d8e7cc;
  border-radius: 12px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.review-footer label {
  font-size: 11px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.review-footer input {
  accent-color: #59a644;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid > label {
  font-size: 11px;
  font-weight: 600;
  display: block;
  min-width: 0;
}
.form-grid > label input,
.form-grid > label select,
.form-grid > label textarea {
  width: 100%;
  margin-top: 7px;
  font-size: 12px;
}
.form-grid > .wide {
  grid-column: 1/-1;
}
.field-help {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 7px;
}
.upload-zone {
  padding: 34px 18px;
  border: 1px dashed #aacb96;
  border-radius: 14px;
  background: #f8fcf3;
  text-align: center;
  display: block;
  cursor: pointer;
  transition: 0.2s;
}
.upload-zone:hover {
  background: #eef7e7;
}
.upload-zone .icon {
  width: 30px;
  height: 30px;
  color: #76a55b;
  margin-bottom: 10px;
}
.upload-zone b {
  display: block;
  font-size: 13px;
}
.upload-zone small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.upload-zone input {
  margin: 15px auto 0;
  font-size: 11px;
  max-width: 100%;
  border: 0;
  background: none;
  display: block;
  padding: 5px;
}
.form-status {
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-line;
  margin: 14px 0;
  color: #5c7850;
}
.form-status.error {
  color: var(--red);
}
.empty-state {
  padding: 50px 25px;
  text-align: center;
}
.empty-state > .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  color: #8daa78;
}
.empty-state h3 {
  font-size: 17px;
  letter-spacing: -0.5px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  max-width: 400px;
  margin: 10px auto 18px;
  line-height: 1.8;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  overflow: auto;
  padding-bottom: 10px;
}
.kanban-col {
  padding: 12px;
  background: #edf2e8;
  border: 1px solid #e3e9db;
  border-radius: 14px;
  min-height: 210px;
}
.kanban-head {
  font-size: 11px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 2px;
}
.kanban-head span {
  font-size: 10px;
  font-weight: 400;
  color: #809170;
}
.lead-card {
  padding: 13px;
  border: 1px solid #e4eadd;
  border-radius: 11px;
  background: white;
  margin-bottom: 9px;
  box-shadow: 0 2px 5px #16381e04;
}
.lead-card strong {
  font-size: 11px;
  display: block;
}
.lead-card p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0;
}
.lead-card small {
  font-size: 8px;
  color: #93a287;
}
.lead-card select {
  font-size: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 7px;
}
.lead-card .button {
  margin-top: 9px;
  width: 100%;
}
.stage-empty {
  font-size: 10px;
  text-align: center;
  padding: 35px 8px;
  color: #98a68c;
}
.task-check {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: #63ad4b;
  flex-shrink: 0;
  cursor: pointer;
}
.task-row.done {
  opacity: 0.55;
}
.task-row.done strong {
  text-decoration: line-through;
}
.plan-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
}
.plan-progress {
  width: 54px;
  height: 54px;
  border: 5px solid #dfedcf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #548d34;
}
.plan-summary strong {
  font-size: 14px;
}
.plan-summary p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
/* paneles y asistente */
.drawer-layer,
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
}
.drawer-layer {
  justify-content: flex-end;
}
.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #10291f60;
  backdrop-filter: blur(3px);
}
.drawer {
  position: relative;
  background: #fff;
  width: min(740px, 94vw);
  height: 100%;
  overflow: auto;
  box-shadow: -15px 0 80px #0c241e20;
  animation: enter 0.3s;
}
.drawer-head {
  padding: 26px;
  background: linear-gradient(135deg, #e5f2dc, #f4faee);
  position: relative;
}
.drawer-close {
  position: absolute;
  right: 19px;
  top: 17px;
  border: 1px solid #d3e0ca;
  background: #ffffffaa;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  font-size: 19px;
  color: #547045;
}
.drawer-head .eyebrow {
  color: #829570;
  font-size: 9px;
}
.drawer-head h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  max-width: 85%;
  margin: 12px 0 8px;
}
.drawer-head > p {
  font-size: 11px;
  color: #7b8b6d;
}
.drawer-head .heading-actions {
  margin-top: 20px;
}
.drawer-tabs {
  padding: 14px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  position: sticky;
  top: 0;
  background: #ffffffed;
  backdrop-filter: blur(12px);
  z-index: 2;
}
.drawer-tabs button {
  background: none;
  font-size: 12px;
  color: #84917a;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
}
.drawer-tabs button.active {
  color: #407531;
  border-color: #73b556;
  font-weight: 650;
}
.drawer-body {
  padding: 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #eaf0e3;
  border: 1px solid #eaf0e3;
  border-radius: 13px;
  overflow: hidden;
}
.detail-item {
  background: white;
  padding: 15px;
  min-width: 0;
}
.detail-item small {
  display: block;
  font-size: 9px;
  color: #8c9881;
  margin-bottom: 6px;
}
.detail-item strong {
  font-size: 12px;
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.detail-item span {
  font-size: 9px;
  color: #829575;
  display: block;
  margin-top: 5px;
}
.detail-section {
  margin: 22px 0;
}
.detail-section h3 {
  font-size: 12px;
  letter-spacing: -0.1px;
  margin-bottom: 12px;
}
.detail-note {
  padding: 13px;
  background: #f5f9f0;
  border: 1px solid #e4eddc;
  border-radius: 10px;
  font-size: 11px;
  color: #6b7e5c;
  line-height: 1.8;
}
.detail-source {
  font-size: 10px;
  color: #8b9b7c;
  margin-top: 13px;
}
.details-sensitive {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  margin-top: 18px;
}
.details-sensitive > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #859274;
}
.details-sensitive pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.8;
  font-family: inherit;
}
.timeline-note {
  border-left: 2px solid #dbe9d0;
  padding: 0 0 22px 16px;
  font-size: 12px;
  line-height: 1.8;
}
.timeline-note small {
  display: block;
  font-size: 9px;
  color: #97a28d;
  margin-top: 6px;
}
.note-form textarea {
  width: 100%;
  min-height: 90px;
  font-size: 12px;
}
.note-form .button {
  margin-top: 10px;
}
.modal-layer {
  align-items: center;
  justify-content: center;
  padding: 25px;
}
.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 27px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 20px 90px #152a2330;
  animation: enter 0.25s;
}
.modal > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 21px;
  gap: 20px;
}
.modal h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
  line-height: 1.25;
}
.modal header p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.modal-close {
  width: 28px;
  height: 28px;
  background: #f4f6ef;
  border-radius: 8px;
  font-size: 18px;
  color: #819471;
  flex-shrink: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}
.modal-info {
  font-size: 11px;
  line-height: 1.8;
  color: #7c8c70;
  background: #f7faf2;
  border-radius: 11px;
  padding: 13px;
  margin-top: 14px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #657f55;
  margin-top: 15px;
}
.consent-label input {
  margin: 3px 0 0;
  accent-color: #6bae50;
}
.import-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.import-summary div {
  padding: 12px;
  background: #f4f8ee;
  border-radius: 9px;
  text-align: center;
}
.import-summary strong {
  display: block;
  font-size: 23px;
}
.import-summary small {
  font-size: 9px;
  color: var(--muted);
}
.assistant-toggle {
  position: fixed;
  bottom: 25px;
  right: 28px;
  border: 1px solid #8bc475;
  background: linear-gradient(130deg, #183b28, #3b6330);
  color: #e7f8d7;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 12px 35px #20382230;
  z-index: 55;
  transition: 0.2s;
}
.assistant-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px #20382240;
}
.assistant-toggle > span {
  font-size: 21px;
  line-height: 1;
  color: #b7e795;
}
.assistant-toggle b {
  font-size: 11px;
  font-weight: 650;
}
.assistant-panel {
  position: fixed;
  bottom: 83px;
  right: 28px;
  width: 410px;
  height: min(650px, calc(100vh - 115px));
  border: 1px solid #d9e6d0;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 24px 90px #1b3a2930;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: enter 0.25s;
}
.assistant-panel > header {
  padding: 17px;
  display: flex;
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid #e1ebd8;
  background: linear-gradient(100deg, #edf6e5, #f9fcf6);
}
.assistant-orb {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #406233;
  color: #d4f5b3;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.assistant-panel > header > div {
  flex: 1;
}
.assistant-panel > header b {
  display: block;
  font-size: 12px;
}
.assistant-panel > header small {
  display: block;
  font-size: 9px;
  color: #859775;
  margin-top: 3px;
}
.assistant-panel > header button {
  background: none;
  font-size: 22px;
  color: #8a9b7b;
  padding: 0;
}
.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(#fff, #fafcf7);
}
.chat-message {
  font-size: 12px;
  line-height: 1.8;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 96%;
}
.chat-message.assistant {
  padding: 13px;
  background: white;
  border: 1px solid #e9efe2;
  align-self: flex-start;
}
.chat-message.assistant > strong {
  font-size: 12px;
  display: block;
  margin-bottom: 6px;
  line-height: 1.6;
}
.chat-message.user {
  background: #eaf4df;
  color: #3c5b2c;
  padding: 10px 13px;
  align-self: flex-end;
  border: 1px solid #e0ecd1;
}
.chat-sources {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #edf2e7;
  white-space: normal;
}
.chat-sources button {
  font-size: 9px;
  text-align: left;
  color: #658950;
  background: #f7faf3;
  border-radius: 6px;
  padding: 6px 8px;
  overflow-wrap: anywhere;
}
.chat-action {
  display: block !important;
  text-align: left !important;
  width: 100%;
  white-space: normal;
  font-size: 10px;
  margin-top: 7px;
  padding: 9px;
  background: #edf6e4;
  border-radius: 8px;
  color: #477835;
  border: 1px solid #dbeacb;
}
.chat-prompts {
  display: flex;
  gap: 5px;
  overflow: auto;
  padding: 10px 14px;
  background: white;
}
.chat-prompts button {
  border: 1px solid #e1e9d9;
  border-radius: 7px;
  background: #fbfdf8;
  font-size: 9px;
  white-space: nowrap;
  padding: 6px 8px;
  color: #678155;
}
.assistant-panel form {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
}
.assistant-panel form textarea {
  flex: 1;
  resize: none;
  max-height: 100px;
  font-size: 11px;
  line-height: 1.6;
  padding: 10px;
  border-radius: 10px;
}
.chat-send {
  height: 36px;
  width: 36px;
  background: var(--forest);
  color: #d9f3c3;
  border-radius: 10px;
  font-size: 20px;
}
.chat-disclaimer {
  font-size: 8px;
  color: #99a58d;
  text-align: center;
  padding: 9px 8px 12px;
}
.app-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #183d29;
  color: white;
  border: 1px solid #568746;
  padding: 12px 19px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 100;
  font-size: 12px;
  max-width: 85vw;
}
.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1550px) {
  .dashboard-grid {
    grid-template-columns: 1.6fr 1fr;
  }
  .hero {
    padding: 35px 39px;
  }
  .hero h2 {
    font-size: 36px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 194px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .main-shell {
    margin-left: 194px;
    width: calc(100% - 194px);
  }
  .app-header {
    padding: 17px 24px;
    gap: 18px;
  }
  #content {
    padding: 24px;
  }
  .global-search {
    width: 205px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 24px;
  }
  .dashboard-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
  }
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding: 27px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .account-label {
    display: none;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .source-view {
    position: relative;
    top: auto;
    max-height: 330px;
  }
  .app-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .client-table th,
  .client-table td {
    padding: 13px;
  }
  .client-table .optional-column {
    display: none;
  }
}
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  .app-header {
    min-height: 77px;
  }
  .global-search {
    width: 230px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffffed;
    backdrop-filter: blur(16px);
    border-top: 1px solid #dfe8d7;
    z-index: 50;
    justify-content: space-around;
    padding: 7px 10px max(9px, env(safe-area-inset-bottom));
  }
  .mobile-nav .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    padding: 7px 2px;
    max-width: 100px;
    color: #8c9a7f;
    font-size: 9px;
    border-radius: 8px;
  }
  .mobile-nav .nav-item.active {
    background: #f0f7e8;
    color: #406e2e;
    box-shadow: none;
  }
  .mobile-nav .nav-count {
    display: none;
  }
  .mobile-nav .icon {
    width: 18px;
    height: 18px;
  }
  .app-footer {
    padding-bottom: 110px;
  }
  .assistant-toggle {
    bottom: 88px;
    right: 18px;
  }
  .assistant-panel {
    bottom: 146px;
    right: 18px;
    height: min(650px, calc(100dvh - 170px));
  }
  .app-toast {
    bottom: 100px;
  }
  .login-story {
    padding: 35px 9%;
  }
  .story-copy h1 {
    font-size: 52px;
  }
  .login-form-side {
    padding: 32px;
  }
  .story-stack > div {
    padding: 11px;
  }
  .login-form-wrap h2 {
    font-size: 25px;
  }
  .story-copy p {
    font-size: 13px;
  }
  .hero-signal {
    min-width: 165px;
  }
  .hero-signal strong {
    font-size: 31px;
  }
  .review-footer {
    bottom: 80px;
  }
}
@media (max-width: 640px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 0;
    padding: 25px 27px 32px;
  }
  .login-story .brand {
    font-size: 22px;
  }
  .story-copy {
    margin-top: 32px;
  }
  .story-copy h1 {
    font-size: 40px;
    letter-spacing: -1.8px;
  }
  .story-copy h1 br:nth-child(2) {
    display: none;
  }
  .story-copy p {
    max-width: 300px;
    margin-top: 16px;
  }
  .story-stack,
  .story-footer {
    display: none;
  }
  .login-form-side {
    padding: 31px 27px 45px;
  }
  .login-lock {
    display: none;
  }
  .login-form-wrap h2 {
    font-size: 23px;
  }
  .login-form-wrap > .eyebrow {
    font-size: 8px;
  }
  .login-form-wrap > p {
    margin-bottom: 21px;
  }
  .login-form-wrap label {
    margin-top: 16px;
  }
  .login-foot {
    margin-top: 22px;
  }
  .app-header {
    padding: 15px 18px;
    gap: 12px;
    min-height: 74px;
  }
  .header-context small {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .header-context h1 {
    font-size: 16px;
    margin-top: 5px;
  }
  .global-search {
    display: none;
  }
  .account-button {
    gap: 6px;
  }
  .account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .account-menu {
    right: 0;
    top: 44px;
  }
  .account-button > span:last-child {
    margin: 0;
  }
  #content {
    padding: 19px 16px 29px;
  }
  .hero {
    padding: 24px 21px;
    display: block;
    border-radius: 17px;
  }
  .hero h2 {
    font-size: 29px;
    max-width: 280px;
    letter-spacing: -1.1px;
  }
  .hero p {
    font-size: 11px;
    line-height: 1.8;
  }
  .hero .eyebrow {
    font-size: 8px;
  }
  .hero-signal {
    display: none;
  }
  .hero .button {
    margin-top: 17px;
    font-size: 11px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
    gap: 9px;
  }
  .metric {
    padding: 14px;
    border-radius: 12px;
  }
  .metric-top {
    font-size: 9px;
  }
  .metric-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }
  .metric-icon .icon {
    width: 13px;
    height: 13px;
  }
  .metric strong {
    font-size: 25px;
    margin: 11px 0 3px;
  }
  .metric small {
    font-size: 8px;
  }
  .dashboard-grid {
    display: block;
  }
  .section-head {
    margin-top: 24px;
  }
  .section-head h2 {
    font-size: 15px;
  }
  .section-head p {
    font-size: 10px;
  }
  .section-head > .button {
    font-size: 10px;
  }
  .task-row {
    padding: 15px 13px;
    gap: 10px;
  }
  .task-marker {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .task-copy strong {
    font-size: 11px;
  }
  .task-copy p {
    font-size: 9px;
  }
  .task-copy .client-inline {
    font-size: 9px;
  }
  .task-actions {
    flex-direction: column;
  }
  .task-actions .button {
    padding: 6px 8px;
    font-size: 9px;
    min-height: 28px;
  }
  .portfolio-card {
    padding: 18px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 17px;
  }
  .page-heading h2 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading .heading-actions {
    width: 100%;
  }
  .view-toolbar {
    gap: 10px;
    margin: 17px 0;
  }
  .view-toolbar > input {
    width: 100%;
    flex: 1 0 100%;
  }
  .view-toolbar .filter-group {
    width: 100%;
  }
  .filter-group select {
    flex: 1;
    max-width: 100%;
    font-size: 10px;
    padding: 8px;
  }
  .segmented {
    width: 100%;
    justify-content: space-between;
  }
  .segmented button {
    font-size: 10px;
    padding: 6px 8px;
  }
  .client-table {
    table-layout: fixed;
  }
  .client-table th,
  .client-table td {
    padding: 13px 11px;
  }
  .client-table th:not(:first-child):not(:last-child),
  .client-table td:not(:first-child):not(:last-child) {
    display: none;
  }
  .client-table th:first-child {
    width: 78%;
  }
  .client-table th:last-child {
    width: 22%;
    text-align: right;
  }
  .client-table td:last-child {
    text-align: right;
  }
  .person-cell {
    gap: 10px;
    min-width: 0;
  }
  .person-cell strong {
    font-size: 10px;
  }
  .person-cell small {
    font-size: 8px;
  }
  .person-avatar {
    width: 31px;
    height: 31px;
    font-size: 9px;
  }
  .doc-grid {
    grid-template-columns: 1fr;
  }
  .doc-card {
    padding: 16px;
    gap: 9px;
  }
  .doc-card h3 {
    font-size: 12px;
  }
  .doc-alert {
    font-size: 10px;
    padding: 12px;
  }
  .review-grid {
    gap: 13px;
  }
  .source-view {
    padding: 13px;
    max-height: 290px;
  }
  .source-text {
    font-size: 10px;
    padding: 11px;
    line-height: 1.8;
  }
  .review-form {
    padding: 13px;
  }
  .field-group-body {
    grid-template-columns: 1fr;
    padding: 13px;
    gap: 13px;
  }
  .field-group label.wide {
    grid-column: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid > .wide {
    grid-column: auto;
  }
  .review-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 13px;
    gap: 12px;
  }
  .review-footer .button {
    width: 100%;
  }
  .doc-review-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .doc-review-head h2 {
    font-size: 15px;
  }
  .doc-review-head .button {
    font-size: 10px;
  }
  .drawer {
    width: 100%;
  }
  .drawer-head {
    padding: 24px 21px;
  }
  .drawer-head h2 {
    font-size: 22px;
  }
  .drawer-body {
    padding: 20px 17px;
  }
  .drawer-tabs {
    padding: 12px 21px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .detail-item {
    padding: 12px;
  }
  .detail-item strong {
    font-size: 11px;
  }
  .modal-layer {
    padding: 12px;
  }
  .modal {
    padding: 21px;
    border-radius: 17px;
    max-height: 92dvh;
  }
  .modal h2 {
    font-size: 21px;
  }
  .modal header p {
    font-size: 10px;
  }
  .modal-footer .button {
    font-size: 11px;
  }
  .upload-zone {
    padding: 25px 12px;
  }
  .assistant-toggle {
    bottom: 86px;
    right: 16px;
    border-radius: 12px;
    padding: 11px 12px;
  }
  .assistant-toggle b {
    font-size: 10px;
  }
  .assistant-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 139px;
    height: calc(100dvh - 170px);
    max-height: 620px;
    border-radius: 16px;
  }
  .assistant-panel > header {
    padding: 13px;
  }
  .chat-messages {
    padding: 13px;
  }
  .chat-message {
    font-size: 11px;
  }
  .chat-prompts {
    padding: 9px 11px;
  }
  .chat-disclaimer {
    font-size: 7px;
  }
  .app-footer {
    display: block;
    padding: 15px 17px 150px;
    font-size: 8px;
  }
  .app-footer span {
    display: block;
    margin-top: 5px;
    max-width: 220px;
  }
  .table-bottom {
    font-size: 9px;
    padding: 11px 13px;
  }
  .plan-summary {
    padding: 16px;
  }
  .plan-summary strong {
    font-size: 12px;
  }
  .plan-summary p {
    font-size: 10px;
  }
  .app-toast {
    font-size: 11px;
    width: max-content;
    max-width: 90vw;
  }
  .kanban {
    grid-template-columns: repeat(5, 220px);
  }
  .empty-state {
    padding: 35px 18px;
  }
}
@media (max-width: 900px) {
  .login-form-wrap {
    padding: 25px;
  }
}
@media (max-width: 640px) {
  .login-world-map {
    inset: auto 14px 10px;
    height: auto;
    background-size: contain;
    opacity: 0.38;
  }
  .login-form-side {
    background: white;
  }
  .login-form-wrap {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.chat-engine {
  font-size: 11px;
  font-weight: 800;
  color: #267a31;
  margin-bottom: 8px;
}
.chat-notice {
  display: block;
  font-size: 11px;
  color: #526157;
  margin-top: 12px;
}

/* Original document and reviewed fields share one workspace. */
.review-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
}
.source-view {
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: min(850px, calc(100dvh - 145px));
  min-height: 460px;
  max-height: none;
  overflow: hidden;
}
.source-toolbar {
  padding: 14px 16px 10px;
  margin: 0;
  flex-shrink: 0;
}
.source-toolbar small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.source-toolbar select {
  width: auto;
  max-width: 145px;
  min-height: 40px;
}
.pdf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}
.pdf-controls > div {
  display: flex;
  gap: 5px;
}
.pdf-controls .button {
  min-width: 42px;
  min-height: 42px;
  padding: 6px 10px;
}
.pdf-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.pdf-controls select {
  width: auto;
  min-height: 40px;
  padding: 7px;
  font-size: 11px;
}
.pdf-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #e9eee8;
  padding: 14px;
}
.pdf-viewport canvas {
  display: block;
  margin-inline: auto;
  background: white;
  box-shadow: 0 3px 16px #173c2b20;
}
.pdf-status {
  color: #53634f;
  font-size: 12px;
  text-align: center;
  padding: 32px 8px;
}
.pdf-status[hidden],
#pdfRetry[hidden] {
  display: none;
}
.source-transcript {
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.source-transcript summary {
  padding: 13px 16px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 650;
}
.source-transcript .source-text {
  margin: 0 10px 10px;
  max-height: 170px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .source-view {
    position: relative;
    top: auto;
    height: min(72dvh, 740px);
    min-height: 410px;
  }
}
@media (max-width: 600px) {
  .source-view {
    height: 68dvh;
    min-height: 380px;
  }
  .source-toolbar {
    padding: 12px 12px 8px;
  }
  .pdf-controls {
    padding: 0 12px 10px;
  }
  .source-transcript summary {
    padding: 12px;
  }
}

.source-view {
  scroll-margin-top: 110px;
}

/* Personal assistant: clear hierarchy, compact actions and voice composer. */
.assistant-panel {
  width: 440px;
  height: min(740px, calc(100dvh - 115px));
  border: 1px solid #cae6cc;
  border-radius: 24px;
  background: linear-gradient(155deg, #f1fbed, #fff 55%);
  box-shadow:
    0 28px 90px #123c2a33,
    0 2px 10px #245d2714;
}
.assistant-panel > header {
  flex-shrink: 0;
  padding: 18px 20px;
  background: linear-gradient(110deg, #e4f8dc, #fff 90%);
  border-bottom-color: #e3eedf;
}
.assistant-orb {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(140deg, #59c252, #1a633d);
  color: white;
  box-shadow:
    inset 0 1px 1px #ffffff70,
    0 4px 12px #59c25230;
}
.assistant-panel > header b {
  font-size: 15px;
  color: #173e2b;
}
.assistant-panel > header small {
  font-size: 11px;
  color: #506958;
  line-height: 1.4;
}
.assistant-panel > header small i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #459c3f;
  margin-right: 3px;
}
.assistant-panel > header button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #335441;
}
.assistant-panel > header button:hover {
  background: #ffffffb3;
}
.chat-messages {
  min-height: 0;
  padding: 18px;
  gap: 14px;
  background: transparent;
}
.chat-welcome {
  flex-shrink: 0;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid #d2edcb;
  background:
    radial-gradient(ellipse at 100% 0%, #9bdf80a6, transparent 62%),
    linear-gradient(140deg, #f4ffef, #fff 75%);
  white-space: normal;
}
.chat-welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#chatGreeting {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: #356443;
  overflow-wrap: anywhere;
}
.welcome-spark {
  color: #287a39;
  font-size: 28px;
  line-height: 1;
}
.chat-welcome h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  max-width: 270px;
  margin: 16px 0 10px;
  color: #123d2a;
}
.chat-welcome p {
  font-size: 12px;
  line-height: 1.5;
  color: #4c6353;
  margin: 0;
}
.chat-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 20px;
}
.chat-context span {
  background: #ffffffbd;
  border: 1px solid #d9ead6;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 11px;
  color: #35533c;
}
.chat-starters {
  display: grid;
  gap: 8px;
}
.chat-starters button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #dfebd9;
  border-radius: 12px;
  background: #ffffffdd;
  color: #224331;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 0.18s,
    transform 0.18s;
}
.chat-starters button > span:first-of-type {
  flex: 1;
}
.chat-starters button > span:last-child {
  color: #568345;
  font-size: 16px;
}
.chat-starters button .icon {
  width: 18px;
  height: 18px;
  color: #43843b;
  flex-shrink: 0;
}
.chat-starters button:hover {
  background: #e7f9de;
  transform: translateX(2px);
}
.chat-message {
  font-size: 13px;
  line-height: 1.65;
  flex-shrink: 0;
}
.chat-message.assistant {
  border-color: #e0eadb;
  padding: 15px;
  box-shadow: 0 3px 10px #1f3d2605;
}
.chat-message.user {
  background: linear-gradient(130deg, #dbf3ce, #eaf9e5);
  color: #244931;
  border-color: #cbe6c0;
}
.chat-prompts {
  flex-shrink: 0;
  padding: 8px 18px;
  gap: 7px;
  background: transparent;
}
.chat-prompts button {
  font-size: 11px;
  min-height: 36px;
  border-radius: 20px;
  color: #45653b;
  padding: 7px 11px;
}
.chat-composer {
  flex-shrink: 0;
  margin: 0 18px;
}
.assistant-panel #chatForm {
  display: block;
  padding: 10px;
  background: #fff;
  border: 1px solid #c9dcc3;
  border-radius: 18px;
  box-shadow: 0 3px 12px #325b2310;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.assistant-panel #chatForm:focus-within {
  border-color: #59c252;
  box-shadow: 0 0 0 3px #59c25218;
}
.assistant-panel #chatInput {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  font-size: 14px;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.chat-composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chat-mic {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #3c6344;
  background: #f2f8ee;
  font-size: 12px;
}
.chat-mic .icon {
  width: 18px;
  height: 18px;
}
.chat-mic:hover {
  background: #e1f4d8;
}
.chat-mic:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chat-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(140deg, #59c252, #29743c);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 3px 8px #43883924;
}
.voice-status {
  font-size: 10px;
  line-height: 1.5;
  color: #536b57;
  margin: 9px 4px 0;
}
.voice-privacy {
  font-size: 10px;
  line-height: 1.5;
  color: #637566;
  margin: 3px 4px 0;
}
.voice-privacy summary {
  cursor: pointer;
  width: fit-content;
}
.voice-privacy p {
  margin: 5px 0 0;
}
.chat-disclaimer {
  flex-shrink: 0;
  font-size: 9px;
  line-height: 1.4;
  color: #697d65;
  padding: 10px 18px 14px;
}
.voice-bars {
  display: none;
  align-items: center;
  gap: 2px;
  height: 20px;
  margin-left: 3px;
}
.voice-bars i {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: #2d7538;
  animation: voice-pulse 0.8s ease-in-out infinite alternate;
}
.voice-bars i:nth-child(2) {
  height: 16px;
  animation-delay: -0.3s;
}
.voice-bars i:nth-child(3) {
  height: 10px;
  animation-delay: -0.5s;
}
.is-listening .voice-bars {
  display: flex;
}
.is-listening .chat-mic {
  background: #d8f3cb;
  color: #245d30;
}
@keyframes voice-pulse {
  to {
    transform: scaleY(0.4);
  }
}
@media (max-width: 600px) {
  .assistant-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 84px;
    height: calc(100dvh - 100px);
    max-height: 780px;
    border-radius: 20px;
  }
  .assistant-panel > header {
    padding: 12px 14px;
  }
  .chat-messages {
    padding: 12px;
  }
  .chat-welcome {
    padding: 18px;
  }
  .chat-welcome h2 {
    font-size: 26px;
  }
  .chat-context {
    margin: 13px 0 16px;
  }
  .chat-composer {
    margin: 0 12px;
  }
  .assistant-panel #chatInput {
    font-size: 16px;
  }
  .chat-prompts {
    padding: 7px 12px;
  }
  .chat-disclaimer {
    font-size: 9px;
    padding: 8px 12px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .voice-bars i {
    animation: none;
  }
  .chat-starters button {
    transition: none;
  }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .assistant-panel {
    bottom: 84px;
    height: min(740px, calc(100dvh - 100px));
  }
}
