:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-soft: #f7f8fc;
  --ink: #171721;
  --muted: #6f7789;
  --line: #e7eaf2;
  --line-strong: #d5dae7;
  --brand: #2d8eb1;
  --brand-strong: #064092;
  --brand-soft: #e8f6fb;
  --accent: #71c6e6;
  --accent-soft: #effaff;
  --gold: #b9e4f4;
  --success: #18a666;
  --warning: #ed9b22;
  --danger: #e55353;
  --shadow: 0 20px 50px rgba(35, 43, 72, 0.1);
  --shadow-soft: 0 10px 26px rgba(35, 43, 72, 0.08);
  --shadow-pop: 0 26px 70px rgba(43, 54, 96, 0.16);
  --dark-card: #152535;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 142, 177, 0.42) rgba(255, 255, 255, 0.72);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.72);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.08), rgba(24, 183, 178, 0.08) 46%, rgba(242, 184, 75, 0.08)),
    linear-gradient(180deg, #ffffff 0%, #f3f5fb 44%, #edf1f8 100%),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
select,
textarea,
.panel,
.metric,
.client-list-card,
.record-row,
.ledger-row,
.event-card,
.task-row,
.document-row,
.tool-card,
.form-section-panel,
.module-hero,
.comparison-command {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background:
    linear-gradient(90deg, #ffffff 0%, #ffffff 32%, rgba(45, 142, 177, 0.08) 32% 100%),
    linear-gradient(135deg, #f7f8ff, #edf7f6);
}

.login-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 42px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.42);
}

.login-showcase {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 22px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.2), rgba(24, 183, 178, 0.16)),
    linear-gradient(120deg, #eaf7fc, #f8fbff);
}

.showcase-heading {
  max-width: 650px;
}

.showcase-heading span,
.showcase-tile span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.showcase-heading h2 {
  max-width: 560px;
  margin: 8px 0 0;
  color: #111827;
  font-size: 36px;
  line-height: 1.08;
}

.showcase-grid {
  max-width: 740px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 14px;
  align-items: stretch;
}

.showcase-tile {
  min-height: 154px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 52px rgba(35, 43, 72, 0.14);
  display: grid;
  align-content: center;
  gap: 8px;
}

.showcase-tile strong {
  font-size: 42px;
  line-height: 1;
}

.showcase-tile small {
  color: var(--muted);
  font-weight: 750;
}

.showcase-tile.dark {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.18), rgba(24, 183, 178, 0.08)),
    var(--dark-card);
  color: #ffffff;
}

.showcase-tile.dark span,
.showcase-tile.dark small {
  color: rgba(255, 255, 255, 0.74);
}

.showcase-tile.chart {
  align-content: stretch;
}

.showcase-bars {
  height: 104px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
}

.showcase-bars i {
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(45, 142, 177, 0.22);
}

.showcase-tile.wide {
  grid-column: span 2;
  min-height: 120px;
}

.showcase-progress {
  height: 12px;
  border-radius: 999px;
  background: #e7eaf2;
  overflow: hidden;
}

.showcase-progress b {
  width: 68%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: min(260px, 100%);
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(6, 64, 146, 0.12));
}

.login-copy .brand-logo {
  width: min(330px, 100%);
  max-height: 92px;
  margin-bottom: 8px;
}

.login-copy h1 {
  margin: 18px 0 10px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 16px;
}

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

.field label {
  font-size: 13px;
  color: #344054;
  font-weight: 700;
}

.field input,
.field select,
.search-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field input:focus,
.field select:focus,
.search-input:focus {
  border-color: var(--brand);
  box-shadow:
    0 0 0 3px rgba(45, 142, 177, 0.14),
    0 10px 24px rgba(45, 142, 177, 0.1);
}

.field:focus-within label {
  color: var(--brand);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.search-input:hover {
  border-color: rgba(45, 142, 177, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(45, 142, 177, 0.07);
}

.primary-btn,
.secondary-btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 750;
  position: relative;
  overflow: hidden;
}

.primary-btn::after,
.secondary-btn::after,
.icon-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.24) 45%, transparent 72%);
  transform: translateX(-130%);
}

.primary-btn:hover::after,
.secondary-btn:hover::after,
.icon-btn:hover::after {
  transform: translateX(130%);
  transition: transform 520ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), #71c6e6);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(45, 142, 177, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(45, 142, 177, 0.28);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: var(--line-strong);
}

.secondary-btn:hover {
  background: #ffffff;
  border-color: rgba(45, 142, 177, 0.38);
  color: var(--brand-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.danger-btn {
  border-color: rgba(220, 38, 38, 0.18);
  color: #b42318;
  background: #fff8f7;
}

.danger-btn:hover {
  border-color: rgba(220, 38, 38, 0.34);
  color: #912018;
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.12);
}

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

.icon-btn {
  width: 38px;
  padding: 0;
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px) rotate(-2deg);
}

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

.sidebar {
  background:
    linear-gradient(180deg, #101820 0%, #12363c 52%, #25231f 100%);
  color: #d9e2ec;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  gap: 22px;
  box-shadow: 14px 0 38px rgba(10, 24, 32, 0.18);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.sidebar-brand .brand-logo {
  width: 150px;
  max-height: 52px;
}

.sidebar-brand .brand-mark {
  width: 36px;
  height: 36px;
  background: #ffffff;
  color: var(--brand-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-title {
  display: grid;
  gap: 2px;
}

.sidebar-title strong {
  color: #ffffff;
}

.sidebar-title span {
  font-size: 12px;
  color: #9fb0c2;
}

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

.nav button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #d8e2e8;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  font-weight: 750;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.nav button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  flex: 0 0 auto;
}

.nav button.active,
.nav button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(45, 142, 177, 0.85), rgba(113, 198, 230, 0.72));
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transform: translateX(3px);
}

.nav button.active::before,
.nav button:hover::before {
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.13);
}

.nav button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 8px 0;
  color: #9fb0c2;
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.content {
  padding: 24px 28px 32px;
  display: grid;
  gap: 20px;
}

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

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

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.metric:hover {
  border-color: rgba(45, 142, 177, 0.32);
  box-shadow: 0 24px 54px rgba(45, 142, 177, 0.14);
  transform: translateY(-3px);
}

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

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.panel:hover {
  border-color: rgba(45, 142, 177, 0.28);
  box-shadow: 0 26px 60px rgba(12, 28, 35, 0.13);
}

.panel-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfcfc);
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.panel-body {
  padding: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

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

.chart-card {
  min-height: 210px;
  padding: 14px;
  border: 1px solid rgba(231, 234, 242, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.chart-card-head h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.chart-bars {
  display: grid;
  gap: 9px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(90px, 1.1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.chart-row span {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef7;
}

.chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-strong), var(--brand), var(--accent));
}

.chart-row strong {
  color: var(--brand-strong);
  font-size: 12px;
}

.storage-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.price-current {
  padding: 18px 18px 8px;
}

.price-current span,
.metric strong,
.module-hero h2,
.comparison-command h2 {
  letter-spacing: 0;
}

.price-current span {
  font-size: 42px;
  font-weight: 850;
  letter-spacing: 0;
}

.price-current strong {
  margin-left: 8px;
  color: var(--brand);
  font-size: 16px;
}

.price-current p {
  margin: 6px 0 0;
  color: var(--muted);
}

.price-chart {
  height: 150px;
  padding: 10px 16px 16px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}

.price-bar-item {
  display: grid;
  gap: 6px;
  align-items: end;
  justify-items: center;
  min-width: 0;
}

.price-bar {
  width: 100%;
  max-width: 22px;
  border-radius: 6px 6px 0 0;
  background: var(--brand);
}

.price-bar-item span {
  color: var(--muted);
  font-size: 10px;
}

.renewal-list {
  padding: 14px;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}

.renewal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.renewal-row.urgente {
  border-left-color: var(--danger);
}

.renewal-row.proxima {
  border-left-color: var(--warning);
}

.renewal-row.aviso {
  border-left-color: #71c6e6;
}

.renewal-row p,
.renewal-row span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.renewal-row span {
  white-space: nowrap;
  font-weight: 800;
}

.dashboard-events {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dashboard-events h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.event-line {
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.4;
}

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

.calendar-title {
  text-align: center;
}

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

.calendar-weekdays {
  padding: 14px 16px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.calendar-weekdays span:nth-last-child(-n + 2) {
  color: var(--danger);
}

.calendar-grid {
  padding: 8px 16px 16px;
}

.calendar-cell {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 7px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 5px;
}

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

.calendar-cell.today {
  border-color: var(--brand);
  background: var(--brand-soft);
}

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

.calendar-markers {
  display: flex;
  align-items: end;
  gap: 3px;
  flex-wrap: wrap;
}

.calendar-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
}

.calendar-marker.meeting,
.event-card.meeting {
  border-left-color: var(--brand);
}

.calendar-marker.reminder,
.event-card.reminder {
  border-left-color: var(--warning);
}

.calendar-marker.work,
.event-card.work {
  border-left-color: #667085;
}

.calendar-marker.meeting {
  background: var(--brand);
}

.calendar-marker.reminder {
  background: var(--warning);
}

.calendar-marker.work {
  background: #667085;
}

.events-body {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.events-body h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.event-create,
.future-tasks,
.task-manage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.event-create summary,
.future-tasks summary,
.task-manage summary {
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
  border-radius: 8px;
}

.event-create:hover,
.future-tasks:hover,
.task-manage:hover {
  border-color: rgba(45, 142, 177, 0.36);
  box-shadow: 0 16px 34px rgba(45, 142, 177, 0.1);
}

.event-form,
.task-edit-form {
  padding: 0 12px 12px;
  display: grid;
  gap: 12px;
}

.event-form-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.check-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: #344054;
}

.email-check {
  align-self: start;
  padding: 12px 14px;
  border: 1px solid rgba(45, 142, 177, 0.18);
  border-radius: 8px;
  background: #eef9fd;
  color: #064092;
}

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

.event-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(12, 28, 35, 0.06);
  position: relative;
  overflow: hidden;
}

.event-card:hover,
.task-row:hover,
.document-row:hover,
.record-row:hover,
.ledger-row:hover,
.tool-card:hover,
.form-section-panel:hover,
.supply-item:hover {
  border-color: rgba(45, 142, 177, 0.38);
  box-shadow: 0 18px 38px rgba(45, 142, 177, 0.13);
  transform: translateY(-2px);
}

.event-card-main {
  display: grid;
  gap: 6px;
}

.event-category {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.event-card strong,
.event-card p {
  margin: 0;
}

.event-card p {
  color: var(--ink);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.event-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.event-note {
  padding: 8px;
  border-left: 3px solid var(--success);
  background: #f0f9f4;
  color: #2d5a3e !important;
  border-radius: 6px;
  font-size: 13px;
}

.ia-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

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

.clients-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

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

.clients-table th {
  color: #526174;
  background: #f4f8f8;
  font-weight: 800;
  position: sticky;
  top: 0;
}

.clients-table tr {
  cursor: pointer;
}

.clients-table tbody tr:hover {
  background: #eef9fd;
}

.clients-table tbody tr.selected {
  background: var(--brand-soft);
}

.client-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr 1fr 110px;
  gap: 12px;
  align-items: end;
}

.client-list-shell {
  padding: 0 14px 14px;
  display: grid;
  gap: 10px;
}

.client-list-head {
  padding: 0 6px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr) 88px;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-card-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 2px 4px 6px;
}

.client-list-card {
  min-height: 88px;
  border: 1px solid rgba(185, 199, 203, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 248, 0.92)),
    #ffffff;
  box-shadow: 0 7px 18px rgba(12, 28, 35, 0.07);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 84px;
  gap: 13px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.client-list-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: 0.45;
}

.client-list-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(45, 142, 177, 0.07) 50%, transparent 82%);
  opacity: 0;
  pointer-events: none;
}

.client-list-card:hover,
.client-list-card.selected {
  border-color: rgba(45, 142, 177, 0.48);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(45, 142, 177, 0.16);
}

.client-list-card:hover::after,
.client-list-card.selected::after {
  opacity: 1;
}

.client-list-card.selected {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.12), rgba(113, 198, 230, 0.08)),
    #ffffff;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 22px rgba(45, 142, 177, 0.22);
}

.client-list-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.client-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.client-list-title strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-subtitle {
  color: #425466;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-list-meta span {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(217, 226, 228, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.client-list-action {
  justify-self: end;
}

.client-list-action span {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 850;
}

.client-list-card:hover .client-list-action span,
.client-list-card.selected .client-list-action span {
  background: var(--brand);
  color: #ffffff;
}

.client-name {
  font-weight: 800;
  color: var(--ink);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.ok {
  background: #e6f4ee;
  color: var(--success);
}

.pill.warn {
  background: #fff2df;
  color: var(--warning);
}

.pill.off {
  background: #f2f4f7;
  color: #667085;
}

.detail-panel {
  position: sticky;
  top: 18px;
}

.detail-body {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.detail-title {
  display: grid;
  gap: 4px;
}

.detail-title strong {
  font-size: 18px;
}

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

.detail-item {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-item:hover {
  background: #ffffff;
  border-color: rgba(45, 142, 177, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.detail-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-item strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.section-divider {
  height: 1px;
  background: var(--line);
}

.active-client-banner {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.09), rgba(113, 198, 230, 0.06)),
    #ffffff;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.active-client-banner:hover {
  border-color: rgba(113, 198, 230, 0.42);
  box-shadow: 0 24px 54px rgba(113, 198, 230, 0.13);
  transform: translateY(-2px);
}

.active-client-banner span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

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

.active-client-banner h2 {
  margin-top: 4px;
  font-size: 22px;
}

.active-client-actions,
.client-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.client-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

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

.client-card-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.client-card-grid div:hover {
  background: #ffffff;
  border-color: rgba(113, 198, 230, 0.34);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.client-card-grid .wide {
  grid-column: span 2;
}

.client-card-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-card-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.edit-client-panel {
  overflow: hidden;
}

.client-edit-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}

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

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

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

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

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

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

.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.text-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #344054;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.quick-note-form {
  display: grid;
  gap: 10px;
}

.history-files-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.history-files-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.supply-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.supply-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.supply-item summary {
  min-height: 46px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.supply-item .text-box {
  margin: 0 12px 12px;
}

.completed-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.completed-list p {
  margin: 0;
}

.comparison-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.comparison-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.comparison-command {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.09), rgba(113, 198, 230, 0.06)),
    #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.comparison-command > div:first-child > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.comparison-command h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.18;
}

.comparison-command p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.comparison-command-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.comparison-command-kpis span {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  align-content: center;
  gap: 2px;
}

.comparison-command-kpis strong {
  font-size: 17px;
  line-height: 1.15;
}

.comparison-command-kpis small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

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

.segmented label {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  font-weight: 750;
}

.comparison-input-section,
.comparison-adjustments {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  display: grid;
  gap: 12px;
}

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

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

.section-title-row h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.25;
}

.section-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.period-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
}

.period-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  display: grid;
  gap: 12px;
}

.period-card-title,
.period-topline,
.period-compare {
  display: grid;
  gap: 8px;
}

.period-card-title {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.period-card-title strong {
  width: 38px;
  height: 32px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
}

.period-card-title span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

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

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

.period-side {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
}

.period-side.current {
  background: #f0fbff;
  border-color: #bfe8f6;
}

.period-side.proposed {
  background: #eef9fd;
  border-color: #bfe8f6;
}

.period-side h3 {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.25;
  text-transform: uppercase;
}

.compact-field {
  display: grid;
  gap: 5px;
}

.compact-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.compact-field input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.compact-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 142, 177, 0.12);
}

.comparison-periods {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.comparison-periods-head,
.comparison-period-row {
  min-width: 920px;
  display: grid;
  grid-template-columns: 70px repeat(6, minmax(110px, 1fr));
  gap: 8px;
  align-items: center;
}

.comparison-periods-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.comparison-period-row {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.comparison-period-row input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 8px;
}

.comparison-period-blocks {
  display: grid;
  gap: 14px;
}

.comparison-period-block {
  overflow-x: auto;
  border: 1px solid rgba(45, 142, 177, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(35, 43, 72, 0.06);
}

.period-block-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.08), rgba(113, 198, 230, 0.08)),
    #ffffff;
}

.period-block-title > span {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  font-weight: 900;
}

.period-block-title h4,
.period-block-title p {
  margin: 0;
}

.period-block-title h4 {
  font-size: 15px;
}

.period-block-title p {
  color: var(--muted);
  font-size: 12px;
}

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

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

.comparison-input-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: #fbfcff;
}

.comparison-input-table input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
}

.comparison-input-table input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 142, 177, 0.12);
}

.comparison-period-row.is-hidden {
  display: none;
}

.comparison-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.comparison-preview {
  display: grid;
  gap: 14px;
}

.comparison-table {
  min-width: 680px;
}

.saving-positive {
  color: var(--success);
  font-weight: 850;
}

.saving-negative {
  color: var(--danger);
  font-weight: 850;
}

.comparison-history {
  padding: 14px;
}

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

.file-input {
  min-height: 42px;
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.document-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.document-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.document-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.document-row span {
  color: var(--muted);
  font-size: 12px;
}

.task-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.task-panel {
  min-height: 220px;
}

.task-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.task-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.task-row.pendientes {
  border-left-color: var(--warning);
}

.task-row.futuras {
  border-left-color: var(--brand);
}

.task-row.completadas {
  border-left-color: var(--success);
  opacity: 0.82;
}

.task-main {
  display: grid;
  gap: 7px;
}

.task-main strong {
  font-size: 14px;
  line-height: 1.35;
}

.task-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.task-note {
  padding: 8px;
  border-left: 3px solid var(--success);
  background: #f0f9f4;
  color: #2d5a3e !important;
  border-radius: 6px;
}

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

.field textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  resize: vertical;
  outline: none;
}

.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 142, 177, 0.12);
}

.metrics.five {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.module-hero {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.1), rgba(113, 198, 230, 0.08)),
    #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.module-hero::after,
.comparison-command::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
  border-radius: 999px 999px 0 0;
}

.module-hero:hover,
.comparison-command:hover {
  border-color: rgba(113, 198, 230, 0.36);
  transform: translateY(-2px);
  box-shadow: 0 28px 64px rgba(45, 142, 177, 0.15);
}

.module-hero > div:first-child > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.module-hero h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.18;
}

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

.module-hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.module-hero-stats span {
  min-width: 118px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  align-content: center;
  gap: 2px;
}

.module-hero-stats strong {
  font-size: 18px;
  line-height: 1.15;
}

.module-hero-stats small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

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

.module-form.compact {
  padding: 0;
}

.form-section-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.form-section-panel.subtle {
  background: #fbfcfe;
}

.precheck-panel {
  border-color: rgba(45, 142, 177, 0.18);
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.06), rgba(255, 255, 255, 0.9)),
    #ffffff;
}

.precheck-panel.ok {
  border-color: rgba(23, 162, 74, 0.28);
}

.precheck-panel.warn {
  border-color: rgba(245, 158, 11, 0.34);
}

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

.precheck-summary div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.precheck-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.precheck-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  word-break: break-word;
}

.action-field {
  align-self: end;
}

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

.status-strip label {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: #344054;
}

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

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

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

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

.record-list,
.ledger-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.record-list.compact {
  padding: 0;
}

.record-row,
.ledger-row {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.record-row strong,
.ledger-row strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.record-row span,
.ledger-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ledger-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  border-left: 4px solid var(--line-strong);
}

.ledger-row.has-doc {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.ledger-row.income {
  border-left-color: var(--success);
}

.ledger-row.expense {
  border-left-color: var(--danger);
}

.ledger-row > strong {
  font-size: 16px;
}

.ledger-row.expense > strong {
  color: var(--danger);
}

.ledger-row.income > strong {
  color: var(--success);
}

.assistant-strip {
  margin: 16px;
  padding: 14px;
  border: 1px solid #c7eaf6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.1), rgba(113, 198, 230, 0.12)),
    #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 12px;
  align-items: center;
}

.assistant-strip > div > span,
.tool-card > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.assistant-strip h3,
.tool-card h3 {
  margin: 3px 0 5px;
  font-size: 17px;
}

.assistant-strip p,
.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.assistant-results {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-results span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

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

.tool-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.tool-card.highlight {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.12), rgba(113, 198, 230, 0.1)),
    #ffffff;
}

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

.tool-form {
  display: grid;
  gap: 9px;
}

.tool-form.compact {
  padding: 10px;
  border: 1px solid rgba(45, 142, 177, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

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

.mini-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

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

.mini-form-grid input,
.mini-form-grid select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
}

.tool-result {
  padding: 12px;
  border: 1px solid rgba(45, 142, 177, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.07), rgba(113, 198, 230, 0.06)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tool-result.muted {
  color: var(--muted);
  font-weight: 750;
}

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

.validation-result p,
.commission-result p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.validation-badge {
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 3px;
}

.validation-badge span,
.commission-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.validation-badge strong,
.commission-result strong {
  color: var(--ink);
  font-size: 20px;
}

.validation-badge small,
.commission-result small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.validation-badge.ok {
  border-color: rgba(23, 162, 74, 0.32);
  background: rgba(23, 162, 74, 0.08);
}

.validation-badge.warn {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.09);
}

.validation-badge.off {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.07);
}

.commission-result {
  display: grid;
  gap: 4px;
}

.power-result,
.dossier-result {
  display: grid;
  gap: 8px;
}

.power-result ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.power-result li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.dossier-result.ok {
  border-color: rgba(22, 114, 74, 0.3);
}

.dossier-result.warn {
  border-color: rgba(185, 104, 9, 0.3);
}

.dossier-result textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

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

.mini-rate-list p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  gap: 2px;
}

.mini-rate-list small,
.coverage-list span {
  color: var(--muted);
  font-size: 12px;
}

.coverage-list {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.coverage-list article {
  min-height: 50px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.coverage-list strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.assistant-thread {
  padding: 12px 12px 0;
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow: auto;
}

.assistant-message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(12, 28, 35, 0.06);
}

.assistant-message.user {
  margin-left: 34px;
  border-color: rgba(45, 142, 177, 0.24);
  background: linear-gradient(135deg, rgba(45, 142, 177, 0.08), #ffffff);
}

.assistant-message.assistant {
  margin-right: 18px;
  border-color: rgba(113, 198, 230, 0.24);
}

.assistant-message strong {
  display: block;
  color: var(--brand-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.assistant-message p {
  margin: 6px 0 8px;
  color: var(--ink);
  line-height: 1.45;
}

.assistant-message ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #344054;
  line-height: 1.45;
}

.assistant-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0;
}

.assistant-mini-metrics span {
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 2px;
}

.assistant-mini-metrics strong {
  font-size: 16px;
  text-transform: none;
  color: var(--ink);
}

.assistant-mini-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.assistant-actions {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(113, 198, 230, 0.22);
}

.assistant-actions span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.assistant-chat-form {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.assistant-chat-form input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.assistant-chat-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 142, 177, 0.13);
}

.assistant-prompts {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-prompts .secondary-btn {
  min-height: 32px;
  font-size: 12px;
}

.sync-apply-strip {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(113, 198, 230, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(113, 198, 230, 0.1), #ffffff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-apply-strip.ok {
  border-color: rgba(22, 114, 74, 0.28);
  background: linear-gradient(135deg, rgba(22, 114, 74, 0.09), #ffffff);
}

.sync-apply-strip strong {
  display: block;
  margin-bottom: 2px;
}

.sync-apply-strip span {
  color: var(--muted);
  font-size: 13px;
}

.empty-state,
.notice {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.45;
}

.notice.error {
  border-color: #f1b4ad;
  background: #fff3f1;
  color: var(--danger);
}

.notice.success {
  border-color: #a9dec2;
  background: #edfff5;
  color: var(--success);
}

.loading-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f6, #dfe6ee, #eef2f6);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
}

.loading-stack {
  padding: 16px;
  display: grid;
  gap: 12px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Modern product-style visual layer */
.app-shell {
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(135deg, rgba(45, 142, 177, 0.035) 0 1px, transparent 1px 18px);
}

.sidebar,
.main,
.topbar-actions,
.metric,
.panel,
.module-hero,
.comparison-command,
.form-section-panel,
.client-list-card,
.tool-card,
.record-row,
.ledger-row,
.event-card,
.task-row,
.renewal-row,
.calendar-cell,
.detail-item {
  border-radius: 8px;
}

.sidebar {
  min-height: calc(100vh - 28px);
  position: sticky;
  top: 14px;
  align-self: start;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 255, 0.94)),
    #ffffff;
  color: var(--ink);
  border: 1px solid rgba(218, 223, 236, 0.9);
  box-shadow: 0 18px 42px rgba(39, 48, 78, 0.12);
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
}

.sidebar-brand {
  padding: 6px 6px 10px;
}

.sidebar-brand .brand-mark,
.brand-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(6, 64, 146, 0.18);
}

.sidebar-title strong {
  color: var(--ink);
  font-size: 15px;
}

.sidebar-title span {
  color: var(--muted);
}

.nav {
  gap: 7px;
}

.nav button {
  min-height: 46px;
  padding: 7px 9px;
  color: #5d6474;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav button::before {
  display: none;
}

.nav-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f3f9;
  color: #7b8292;
  font-size: 10px;
  font-weight: 900;
}

.nav button span:last-child {
  min-width: 0;
}

.nav button.active,
.nav button:hover {
  color: var(--brand-strong);
  background: #e8f6fb;
  border-color: rgba(45, 142, 177, 0.12);
  box-shadow: 0 10px 24px rgba(45, 142, 177, 0.12);
  transform: translateX(2px);
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  background: linear-gradient(135deg, var(--brand), #71c6e6);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(45, 142, 177, 0.25);
}

.sidebar-profile {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(218, 223, 236, 0.9);
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.08), rgba(24, 183, 178, 0.08)),
    #ffffff;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 5px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--dark-card);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(21, 37, 53, 0.22);
}

.sidebar-profile strong {
  margin-top: 4px;
  font-size: 14px;
}

.sidebar-profile small,
.sidebar-profile em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.sidebar-footer {
  margin-top: 0;
  padding: 10px 8px 0;
  color: #808898;
}

.server-status {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(24, 166, 102, 0.12);
}

.main {
  min-height: calc(100vh - 28px);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(218, 223, 236, 0.72);
  box-shadow: 0 20px 60px rgba(35, 43, 72, 0.08);
  overflow: hidden;
}

.topbar {
  min-height: 92px;
  padding: 20px 24px 12px;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.topbar-title > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar h1 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.08;
}

.topbar-actions {
  padding: 7px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(218, 223, 236, 0.86);
  box-shadow: 0 14px 34px rgba(35, 43, 72, 0.1);
}

.search-input {
  width: min(34vw, 360px);
  border-color: transparent;
  background: #f5f7fc;
}

.user-chip {
  min-height: 40px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 8px 18px rgba(35, 43, 72, 0.06);
}

.user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--dark-card), #30485c);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.15;
}

.user-chip strong {
  max-width: 150px;
  color: var(--ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
}

.content {
  padding: 10px 24px 28px;
  gap: 18px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), #71c6e6);
  box-shadow: 0 13px 28px rgba(45, 142, 177, 0.26);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: 0 16px 34px rgba(45, 142, 177, 0.3);
}

.secondary-btn,
.icon-btn {
  background: #ffffff;
  border-color: rgba(213, 218, 231, 0.95);
  box-shadow: 0 7px 17px rgba(35, 43, 72, 0.06);
}

.secondary-btn:hover,
.icon-btn:hover {
  border-color: rgba(45, 142, 177, 0.32);
  color: var(--brand-strong);
  box-shadow: 0 12px 26px rgba(45, 142, 177, 0.12);
}

.field input,
.field select,
.field textarea,
.search-input,
.segmented label,
.status-strip label {
  border-color: rgba(213, 218, 231, 0.95);
  background: #fbfcff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  border-color: rgba(45, 142, 177, 0.62);
  box-shadow:
    0 0 0 4px rgba(45, 142, 177, 0.12),
    0 12px 28px rgba(45, 142, 177, 0.1);
}

.field:focus-within label {
  color: var(--brand);
}

.metrics {
  gap: 12px;
}

.metric {
  min-height: 122px;
  padding: 18px 72px 16px 17px;
  border-color: rgba(231, 234, 242, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.94)),
    #ffffff;
  box-shadow: var(--shadow);
}

.metric::before {
  inset: auto 16px 13px 16px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.metric::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.2), rgba(24, 183, 178, 0.16)),
    #f6f8ff;
  border: 1px solid rgba(45, 142, 177, 0.12);
}

.metrics .metric:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.metrics .metric:nth-child(3)::before {
  background: linear-gradient(90deg, var(--gold), var(--warning));
}

.metrics .metric:nth-child(4)::before,
.metrics .metric:nth-child(5)::before {
  background: linear-gradient(90deg, var(--dark-card), var(--brand));
}

.metric span {
  color: #777f90;
  letter-spacing: 0;
}

.metric strong {
  font-size: 34px;
}

.metric:hover {
  border-color: rgba(45, 142, 177, 0.22);
  box-shadow: var(--shadow-pop);
  transform: translateY(-4px);
}

.panel,
.module-hero,
.comparison-command,
.form-section-panel,
.tool-card,
.client-card,
.active-client-banner {
  border-color: rgba(231, 234, 242, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 251, 255, 0.94)),
    #ffffff;
  box-shadow: var(--shadow);
}

.panel:hover,
.form-section-panel:hover,
.tool-card:hover,
.client-card:hover,
.active-client-banner:hover {
  border-color: rgba(45, 142, 177, 0.24);
  box-shadow: var(--shadow-pop);
  transform: translateY(-2px);
}

.panel-header {
  background:
    linear-gradient(180deg, #ffffff, #fafbff);
  border-bottom-color: rgba(231, 234, 242, 0.95);
}

.panel-header h2,
.module-hero h2,
.comparison-command h2 {
  color: #171721;
}

.module-hero,
.comparison-command,
.active-client-banner {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.1), rgba(24, 183, 178, 0.08) 52%, rgba(242, 184, 75, 0.08)),
    #ffffff;
}

.module-hero::after,
.comparison-command::after {
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
}

.module-hero > div:first-child > span,
.comparison-command > div:first-child > span,
.assistant-strip > div > span,
.tool-card > span {
  color: var(--brand);
}

.module-hero-stats span,
.comparison-command-kpis span,
.precheck-summary div,
.detail-item,
.event-line,
.status-strip label {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(231, 234, 242, 0.96);
  box-shadow: 0 8px 18px rgba(35, 43, 72, 0.05);
}

.price-panel {
  overflow: visible;
}

.price-panel .panel-header {
  border-bottom: 0;
}

.price-current {
  margin: 0 16px 8px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.16), rgba(24, 183, 178, 0.1)),
    var(--dark-card);
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(21, 37, 53, 0.23);
}

.price-current span,
.price-current strong {
  color: #ffffff;
}

.price-current p {
  color: rgba(255, 255, 255, 0.72);
}

.price-chart {
  padding-top: 18px;
  background: linear-gradient(180deg, rgba(245, 247, 252, 0), rgba(245, 247, 252, 0.78));
}

.price-bar {
  max-width: 24px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  box-shadow: 0 10px 20px rgba(45, 142, 177, 0.2);
}

.calendar-cell {
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(35, 43, 72, 0.04);
}

.calendar-cell:hover {
  border-color: rgba(45, 142, 177, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(45, 142, 177, 0.1);
}

.calendar-cell.today {
  border-color: rgba(45, 142, 177, 0.45);
  background: var(--brand-soft);
}

.calendar-marker.meeting {
  background: var(--brand);
}

.calendar-marker.reminder {
  background: var(--warning);
}

.calendar-marker.work {
  background: var(--dark-card);
}

.event-create,
.future-tasks,
.task-manage,
.event-card,
.task-row,
.renewal-row,
.record-row,
.ledger-row,
.document-row,
.client-list-card {
  background: #ffffff;
  border-color: rgba(231, 234, 242, 0.95);
  box-shadow: 0 10px 24px rgba(35, 43, 72, 0.06);
}

.event-card:hover,
.task-row:hover,
.renewal-row:hover,
.record-row:hover,
.ledger-row:hover,
.document-row:hover,
.client-list-card:hover {
  border-color: rgba(45, 142, 177, 0.24);
  box-shadow: 0 16px 34px rgba(45, 142, 177, 0.1);
  transform: translateY(-2px);
}

.event-card.meeting,
.task-row.futuras,
.renewal-row.proxima {
  border-left-color: var(--brand);
}

.event-card.reminder,
.task-row.pendientes,
.renewal-row.urgente {
  border-left-color: var(--warning);
}

.event-card.work,
.task-row.completadas {
  border-left-color: var(--accent);
}

.client-list-card {
  min-height: 94px;
  background:
    linear-gradient(135deg, #ffffff, #fbfcff),
    #ffffff;
}

.client-list-card::before {
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.client-list-card:hover,
.client-list-card.selected {
  background: #ffffff;
  border-color: rgba(45, 142, 177, 0.28);
}

.client-avatar {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(45, 142, 177, 0.2);
}

.active-client-banner {
  border-left-color: var(--brand);
}

.active-client-banner span {
  color: var(--brand);
}

.pill {
  border: 1px solid transparent;
}

.pill.ok {
  background: #eafaf2;
  border-color: rgba(24, 166, 102, 0.16);
}

.pill.warn {
  background: #fff5e5;
  border-color: rgba(237, 155, 34, 0.16);
}

.pill.off {
  background: #f1f3f8;
  border-color: rgba(111, 119, 137, 0.12);
}

.table-wrap {
  padding: 0 12px 14px;
}

.clients-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.clients-table th,
.clients-table td {
  border-bottom: 0;
}

.clients-table th {
  background: transparent;
  color: #7a8292;
  font-size: 11px;
  text-transform: uppercase;
}

.clients-table tbody td {
  background: #ffffff;
  border-top: 1px solid rgba(231, 234, 242, 0.96);
  border-bottom: 1px solid rgba(231, 234, 242, 0.96);
}

.clients-table tbody td:first-child {
  border-left: 1px solid rgba(231, 234, 242, 0.96);
  border-radius: 8px 0 0 8px;
}

.clients-table tbody td:last-child {
  border-right: 1px solid rgba(231, 234, 242, 0.96);
  border-radius: 0 8px 8px 0;
}

.clients-table tbody tr:hover td,
.clients-table tbody tr.selected td {
  background: #eef9fd;
  border-color: rgba(45, 142, 177, 0.18);
}

.tool-card.highlight {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.1), rgba(24, 183, 178, 0.08)),
    #ffffff;
}

.tool-form.compact,
.assistant-strip,
.precheck-panel {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.06), rgba(24, 183, 178, 0.05)),
    #ffffff;
}

.empty-state,
.notice {
  background: #fbfcff;
  border-color: rgba(231, 234, 242, 0.96);
}

.notice.success {
  background: #ecfff5;
}

.notice.error {
  background: #fff1f1;
}

/* Gesterval blue-only polish: overrides older accent fragments */
.nav button.active,
.nav button:hover {
  color: var(--brand-strong);
  background: #e8f6fb;
  border-color: rgba(45, 142, 177, 0.22);
  box-shadow: 0 10px 24px rgba(45, 142, 177, 0.13);
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon,
.client-avatar,
.primary-btn {
  background: linear-gradient(135deg, #064092, #2d8eb1 54%, #71c6e6);
}

.nav-icon {
  background: #eef7fb;
  color: #064092;
}

.client-list-card.selected,
.client-list-card:hover,
.clients-table tbody tr:hover td,
.clients-table tbody tr.selected td {
  background: #eef9fd;
  border-color: rgba(45, 142, 177, 0.32);
}

.client-list-card.selected .client-list-action span,
.client-list-card:hover .client-list-action span {
  background: linear-gradient(135deg, #064092, #2d8eb1);
  color: #ffffff;
}

.metric::after {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.22), rgba(113, 198, 230, 0.28)),
    #eef9fd;
  border-color: rgba(45, 142, 177, 0.16);
}

.module-hero,
.comparison-command,
.active-client-banner,
.tool-card.highlight,
.tool-form.compact,
.assistant-strip,
.precheck-panel {
  background:
    linear-gradient(135deg, rgba(45, 142, 177, 0.1), rgba(113, 198, 230, 0.1)),
    #ffffff;
}

/* Final Gesterval layout cleanup */
.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 10, 20, 0.26), rgba(4, 15, 27, 0.68)),
    radial-gradient(circle at 50% 16%, rgba(113, 198, 230, 0.34), transparent 34%),
    url("./assets/login-bg.png") center / cover no-repeat;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 18, 33, 0.46), transparent 34%, rgba(2, 18, 33, 0.28)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 88px);
  pointer-events: none;
}

.login-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.36));
  pointer-events: none;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100vw - 32px));
  min-height: auto;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 42px 20px 54px;
  background: transparent;
  border: 0;
}

.login-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.login-copy .brand-logo {
  width: min(450px, 82vw);
  max-height: 156px;
  object-position: center;
  margin: 0 0 14px;
  filter:
    drop-shadow(0 18px 38px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(113, 198, 230, 0.36));
}

.login-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
}

.login-copy p {
  margin: 8px 0 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
}

.login-form {
  position: relative;
  width: min(650px, calc(100vw - 34px));
  max-width: 650px;
  display: grid;
  gap: 14px;
  padding: 44px 62px 46px;
  overflow: hidden;
  border: 1px solid rgba(174, 226, 246, 0.45);
  border-radius: 150px 330px 140px 42px / 100px 205px 96px 42px;
  background:
    linear-gradient(135deg, rgba(6, 64, 146, 0.96), rgba(45, 142, 177, 0.9)),
    rgba(6, 64, 146, 0.94);
  box-shadow:
    0 38px 95px rgba(0, 15, 31, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.login-form::before {
  content: "";
  position: absolute;
  inset: -40% -18% auto 15%;
  height: 155px;
  transform: rotate(-7deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.login-form::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 16px;
  width: 52%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(185, 228, 244, 0.72), transparent);
  pointer-events: none;
}

.login-form > * {
  position: relative;
  z-index: 1;
}

.login-form-title {
  display: none;
}

.login-form .field {
  gap: 4px;
}

.login-form .field label {
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.login-form .field input {
  height: 52px;
  border-radius: 5px;
  border-color: rgba(255, 255, 255, 0.82);
  background: #ffffff;
  box-shadow:
    0 10px 22px rgba(1, 18, 41, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-form .field input:focus {
  border-color: #b9e4f4;
  box-shadow:
    0 0 0 4px rgba(185, 228, 244, 0.24),
    0 16px 32px rgba(1, 18, 41, 0.18);
}

.recover-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
}

.recover-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.recover-row input {
  width: 18px;
  height: 18px;
  accent-color: #d9f653;
}

.recover-row button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-form .link-btn {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-form .notice {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.login-form .notice.error {
  color: #fff1f1;
  background: rgba(229, 83, 83, 0.24);
}

.login-form .notice.success {
  color: #f7ffe7;
  background: rgba(24, 166, 102, 0.24);
}

.login-form .primary-btn {
  justify-self: end;
  width: 170px;
  min-height: 52px;
  margin-top: 6px;
  color: #07304f;
  background: linear-gradient(135deg, #ecff76, #bde940);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.2),
    0 0 0 5px rgba(217, 246, 83, 0.11);
}

.login-form .primary-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.26),
    0 0 0 6px rgba(217, 246, 83, 0.16);
}

.login-showcase {
  display: none;
}

.sidebar-brand {
  justify-content: center;
  padding: 10px 4px 20px;
}

.sidebar-brand .brand-logo {
  width: 205px;
  max-height: 74px;
  object-position: center;
}

.nav button {
  padding: 0 14px;
}

.nav-label {
  min-width: 0;
}

.metric {
  min-height: 112px;
  padding: 18px 17px 16px;
}

.metric::after {
  content: none !important;
  display: none !important;
}

.dashboard-grid {
  align-items: start;
}

.topbar {
  min-height: 84px;
}

.topbar-actions {
  flex: 0 0 auto;
}

.price-panel {
  align-self: start;
}

.price-current {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
  row-gap: 5px;
}

.price-current p {
  grid-column: 1 / -1;
}

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

.price-stats div {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(231, 234, 242, 0.96);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(35, 43, 72, 0.05);
}

.price-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.price-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.price-chart {
  height: 216px;
  padding: 18px 16px 18px;
  background:
    linear-gradient(180deg, rgba(245, 247, 252, 0), rgba(245, 247, 252, 0.78)),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(45, 142, 177, 0.08) 39px 40px);
}

.price-bar-item {
  grid-template-rows: 1fr auto auto;
}

.price-bar-item small {
  color: #8190a5;
  font-size: 9px;
}

.assistant-scope {
  margin: 12px 16px 0;
  padding: 9px 11px;
  border: 1px solid rgba(45, 142, 177, 0.18);
  border-radius: 8px;
  background: #eef9fd;
  color: #064092;
  font-size: 12px;
  font-weight: 800;
}

.comparison-client-picker {
  position: relative;
}

.comparison-client-results {
  display: grid;
  gap: 8px;
  max-height: 276px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(45, 142, 177, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 255, 0.84)),
    #ffffff;
  box-shadow: 0 14px 30px rgba(35, 43, 72, 0.08);
}

.comparison-client-option {
  width: 100%;
  min-height: 54px;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 218, 231, 0.9);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.comparison-client-option:hover,
.comparison-client-option.selected {
  border-color: rgba(45, 142, 177, 0.42);
  background: #eef9fd;
  box-shadow: 0 10px 24px rgba(45, 142, 177, 0.12);
}

.comparison-client-option strong {
  font-size: 13px;
}

.comparison-client-option span {
  color: var(--muted);
  font-size: 12px;
}

.renewal-row {
  position: relative;
}

.renewal-row.urgente {
  border-left-color: var(--danger) !important;
  background:
    linear-gradient(90deg, rgba(229, 83, 83, 0.08), transparent 28%),
    #ffffff;
}

.renewal-row.proxima {
  border-left-color: var(--warning) !important;
  background:
    linear-gradient(90deg, rgba(237, 155, 34, 0.1), transparent 28%),
    #ffffff;
}

.renewal-row.aviso {
  border-left-color: #f2c94c !important;
  background:
    linear-gradient(90deg, rgba(242, 201, 76, 0.12), transparent 28%),
    #ffffff;
}

.renewal-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(45, 142, 177, 0.08);
}

.renewal-row.urgente .renewal-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(229, 83, 83, 0.12);
}

.renewal-row.proxima .renewal-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(237, 155, 34, 0.13);
}

.renewal-row.aviso .renewal-dot {
  background: #f2c94c;
  box-shadow: 0 0 0 4px rgba(242, 201, 76, 0.14);
}

.gana-tarifas {
  display: grid;
  gap: 8px;
}

.gana-tarifas p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(45, 142, 177, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.gana-tarifas small,
.danger-aware small {
  color: var(--muted);
  line-height: 1.35;
}

.login-copy .brand-logo {
  padding: 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(45, 142, 177, 0.14) inset;
}

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

.assistant-prompts .secondary-btn {
  justify-content: flex-start;
  min-height: 36px;
}

@media (max-width: 1120px) {
  .workspace,
  .dashboard-charts,
  .dashboard-grid,
  .dashboard-events,
  .events-workspace,
  .client-filters,
  .notes-grid,
  .history-files-grid,
  .comparison-layout,
  .module-split,
  .module-hero,
  .sync-layout,
  .assistant-strip,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .comparison-command {
    grid-template-columns: 1fr;
  }

  .client-card-grid,
  .client-list-head,
  .client-list-card,
  .metrics.five,
  .precheck-summary,
  .status-strip,
  .validation-result,
  .result-grid,
  .assistant-form,
  .form-grid.four,
  .form-grid.three,
  .form-grid.two,
  .form-grid.six,
  .comparison-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-panel {
    position: static;
  }
}

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

  .login-panel {
    min-height: 100vh;
  }

  .login-copy .brand-logo {
    width: min(330px, 82vw);
    max-height: 118px;
  }

  .login-form {
    padding: 32px 24px 34px;
    border-radius: 46px 120px 46px 22px / 38px 84px 38px 22px;
  }

  .login-form .primary-btn {
    justify-self: stretch;
    width: 100%;
  }

  .login-showcase {
    display: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 12px;
    min-height: auto;
  }

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

  .nav button {
    height: auto;
    min-height: 44px;
    justify-content: center;
    padding: 0 8px;
    line-height: 1.2;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-profile {
    display: none;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-input {
    flex: 1;
    width: auto;
  }

  .content {
    padding: 16px;
  }

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

@media (max-width: 560px) {
  .metrics,
  .dashboard-charts,
  .metrics.five,
  .detail-grid,
  .event-form-row,
  .client-card-grid,
  .comparison-command-kpis,
  .module-hero-stats,
  .precheck-summary,
  .status-strip,
  .validation-result,
  .result-grid,
  .assistant-form,
  .comparison-meta-grid,
  .period-card-grid,
  .period-topline,
  .period-compare,
  .form-grid.four,
  .form-grid.three,
  .form-grid.two,
  .form-grid.six {
    grid-template-columns: 1fr;
  }

  .comparison-summary {
    grid-template-columns: 1fr;
  }

  .client-card-grid .wide,
  .form-grid .wide {
    grid-column: auto;
  }

  .client-list-head {
    display: none;
  }

  .client-list-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .client-list-action {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .client-list-action span {
    justify-content: center;
    width: 100%;
  }

  .login-panel {
    padding: 28px 20px;
  }

  .user-chip {
    display: none;
  }
}
