:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --ink: #17211c;
  --muted: #65736d;
  --line: #d9e0dc;
  --accent: #186b54;
  --accent-dark: #0f4c3b;
  --accent-cyan: #05d4e8;
  --blue: #245c8f;
  --amber: #a76217;
  --danger: #a53838;
  --shadow: 0 12px 34px rgba(30, 41, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 24px;
}

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

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-logo {
  width: 118px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.public-home-shell,
.auth-gate,
.password-change-shell {
  min-height: 100vh;
  display: grid;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(0, 217, 232, 0.08), rgba(18, 105, 255, 0.06)),
    var(--bg);
}

.public-home-shell {
  grid-template-rows: auto 1fr auto;
  gap: 0;
}

.auth-gate,
.password-change-shell {
  place-items: center;
}

.public-home-topbar {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(22px, 4vw, 46px);
  border-bottom: 1px solid rgba(207, 229, 232, 0.92);
  padding: 12px clamp(20px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(20, 33, 27, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}

.public-home-brand {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.public-home-brand img {
  width: 136px;
  height: 58px;
  object-fit: contain;
}

.public-home-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.public-home-nav button {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 8px 22px 9px;
  background: transparent;
  color: #1a2a25;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.public-home-nav button:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 16px;
  background: #1a2a25;
  transform: translateY(-50%);
  opacity: 0.75;
}

.public-home-nav button:hover,
.public-home-nav button.active {
  background: transparent;
  color: #005c50;
  box-shadow: none;
}

.public-home-nav button.active::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 3px;
  background: #1a2a25;
  border-radius: 999px;
}

.public-home-login {
  margin-left: auto;
  min-height: 42px;
  text-decoration: none;
  text-transform: none;
}

.public-market-ticker {
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid rgba(207, 229, 232, 0.92);
  background:
    linear-gradient(90deg, rgba(18, 105, 255, 0.08), rgba(5, 212, 232, 0.11)),
    #ffffff;
}

.public-market-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 100%;
  gap: 18px;
  padding: 10px 0;
  animation: publicMarketTickerScroll 34s linear infinite;
}

.public-market-ticker:hover .public-market-track {
  animation-play-state: paused;
}

.public-market-item,
.public-market-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5e7e4;
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #123e5c;
  box-shadow: 0 10px 24px rgba(20, 33, 27, 0.06);
}

.public-market-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d7e8e6;
  border-radius: 999px;
  background: #ffffff;
  color: #123e5c;
  font-size: 0.66rem;
  font-weight: 900;
  overflow: hidden;
}

.public-market-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.public-market-item b {
  color: #0a2232;
  font-size: 0.82rem;
  font-weight: 900;
}

.public-market-item strong {
  color: #123e5c;
  font-size: 0.9rem;
  font-weight: 900;
}

.public-market-item em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

.public-market-item em.up {
  color: #07964a;
}

.public-market-item em.down {
  color: #b32636;
}

.public-market-loading {
  margin-left: 18px;
  color: var(--muted);
  font-weight: 900;
}

@keyframes publicMarketTickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.public-home-main {
  width: 100%;
  margin: 0;
  display: grid;
}

.public-home-view {
  display: grid;
  min-height: calc(100vh - 145px);
}

.public-home-view[hidden] {
  display: none;
}

.public-home-view.public-section {
  min-height: calc(100vh - 145px);
  border: 0;
  border-radius: 0;
  padding: clamp(30px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 253, 255, 0.94)),
    repeating-linear-gradient(90deg, rgba(18, 105, 255, 0.045) 0 1px, transparent 1px 96px);
  box-shadow: none;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  gap: 2cm;
  align-items: start;
  align-content: start;
  min-height: calc(100vh - 245px);
  border: 0;
  border-radius: 0;
  padding: clamp(24px, 4vw, 56px) 0.5cm clamp(24px, 4vw, 56px) 1.5cm;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 253, 255, 0.92)),
    repeating-linear-gradient(90deg, rgba(18, 105, 255, 0.06) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(5, 212, 232, 0.05) 0 1px, transparent 1px 72px);
  box-shadow: none;
  overflow: visible;
}

.public-hero-copy {
  display: grid;
  gap: 15px;
  align-self: start;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.public-hero .public-hero-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  width: 100%;
  max-width: 100%;
  margin: 0 0 4px;
  color: var(--ink);
  font-family: "Bahnschrift", "Aptos Display", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2.35rem, 3.35vw, 3.95rem);
  font-weight: 900;
  line-height: 0.88;
  text-transform: uppercase;
  white-space: nowrap;
  perspective: 900px;
}

.public-hero .public-hero-typewriter {
  display: inline-block;
  width: max-content;
  max-width: 0;
  overflow: hidden;
  border-right: 0.055em solid #10d4e0;
  white-space: nowrap;
  animation:
    publicHeroTypewriter 1.85s steps(20, end) 180ms forwards,
    publicHeroCaret 680ms step-end 180ms 4 forwards;
}

.public-hero .public-hero-eyebrow .public-hero-coin {
  width: 0.74em;
  height: 0.74em;
  object-fit: contain;
  opacity: 0;
  transform: translateY(0.015em) rotateY(0deg);
  transform-origin: center;
  backface-visibility: visible;
  filter: drop-shadow(0 8px 14px rgba(0, 91, 72, 0.16));
  animation:
    publicHeroCoinReveal 420ms ease 2.05s forwards,
    publicHeroCoinSpin 2.4s linear 2.55s infinite;
}

@keyframes publicHeroTypewriter {
  to {
    max-width: calc(100% - 0.95em);
  }
}

@keyframes publicHeroCaret {
  0%,
  100% {
    border-right-color: transparent;
  }

  50% {
    border-right-color: #10d4e0;
  }
}

@keyframes publicHeroCoinReveal {
  to {
    opacity: 1;
  }
}

@keyframes publicHeroCoinSpin {
  from {
    transform: translateY(0.015em) rotateY(0deg);
  }

  to {
    transform: translateY(0.015em) rotateY(360deg);
  }
}

@media (max-width: 1120px) {
  .public-hero .public-hero-eyebrow {
    font-size: 2.35rem;
  }
}

@media (max-width: 760px) {
  .public-hero .public-hero-eyebrow {
    font-size: 2.35rem;
  }
}

@media (max-width: 460px) {
  .public-hero .public-hero-eyebrow {
    font-size: 1.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-hero .public-hero-typewriter {
    max-width: calc(100% - 0.95em);
    border-right: 0;
    animation: none;
  }

  .public-hero .public-hero-eyebrow .public-hero-coin {
    opacity: 1;
    animation: none;
  }
}

.public-hero h1 {
  width: min(100%, 51rem);
  max-width: 51rem;
  margin: 0;
  color: #005b48;
  font-size: clamp(1.06rem, 1.42vw, 1.5rem);
  line-height: 1.14;
  letter-spacing: 0;
  white-space: nowrap;
}

.public-hero p:not(.eyebrow) {
  width: min(100%, 51rem);
  max-width: 51rem;
  margin: 0;
  color: #52615d;
  font-size: clamp(0.96rem, 1.28vw, 1.08rem);
  font-weight: 800;
  line-height: 1.55;
  text-align: justify;
}

.public-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.public-home-demo {
  font: inherit;
  text-decoration: none;
}

.public-hero-client-path {
  width: min(100%, 51rem);
  max-width: 51rem;
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.public-hero-client-pitch {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #005b48;
  font-size: clamp(0.95rem, 1.1vw, 1.04rem);
  font-weight: 900;
  line-height: 1.42;
  text-align: left;
}

.public-hero-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-hero-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(0, 91, 72, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(18, 105, 255, 0.06);
  transform: translateY(0) scale(1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-hero-steps li:hover {
  border-color: rgba(5, 212, 232, 0.6);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 34px rgba(18, 105, 255, 0.16);
  transform: translateY(-5px) scale(1.025);
}

.public-hero-step-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #005b48;
  background: linear-gradient(135deg, rgba(5, 212, 232, 0.22), rgba(18, 105, 255, 0.12));
}

.public-hero-step-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-hero-steps strong {
  display: block;
  color: var(--ink);
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.18;
}

@media (max-width: 980px) {
  .public-hero-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .public-hero-steps {
    grid-template-columns: 1fr;
  }
}

.public-hero-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  justify-self: stretch;
  width: 100%;
  margin-right: 0;
  min-height: 380px;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-shadow: 0 22px 55px rgba(18, 105, 255, 0.11);
}

.public-hero-media-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 8px;
}

.public-hero-media-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  opacity: 0;
  transform: scale(1.018);
  transition: opacity 720ms ease, transform 900ms ease;
  pointer-events: none;
}

.public-hero-media-slide.active {
  opacity: 1;
  transform: scale(1);
}

.public-hero-media-slide img,
.public-hero-media-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.public-hero-image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100%;
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 20%, rgba(5, 212, 232, 0.2), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(18, 105, 255, 0.15), transparent 32%),
    linear-gradient(135deg, #f6ffff 0%, #ffffff 58%, #f2f8ff 100%);
}

.public-hero-image-placeholder img {
  width: min(210px, 58%);
  height: auto;
  object-fit: contain;
}

.public-hero-media-dots {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
}

.public-hero-media-dots button {
  width: 9px;
  height: 9px;
  min-height: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(0, 91, 72, 0.28);
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}

.public-hero-media-dots button.active {
  width: 24px;
  background: linear-gradient(90deg, #1269ff, #05d4e8);
}

.public-product-preview {
  display: grid;
  gap: 14px;
  border: 1px solid #bfe2e7;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(18, 105, 255, 0.13);
}

.public-preview-top {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.public-preview-top img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.public-preview-top span,
.public-preview-top b {
  color: var(--ink);
  font-weight: 900;
}

.public-preview-top b {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.public-preview-metrics article {
  display: grid;
  gap: 5px;
  border: 1px solid #d5e7e4;
  border-radius: 8px;
  padding: 12px;
  background: #f8fcfb;
}

.public-preview-metrics span,
.public-preview-table b {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-preview-metrics strong {
  color: #005c50;
  font-size: 1.1rem;
}

.public-preview-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.public-preview-table div {
  display: grid;
  grid-template-columns: 1.4fr 0.75fr 0.55fr;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.public-preview-table div:last-child {
  border-bottom: 0;
}

.public-preview-table span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.public-trust-strip,
.public-module-grid,
.public-plan-grid,
.public-contact-grid {
  display: grid;
  gap: 12px;
}

.public-trust-strip {
  width: calc(100% - clamp(36px, 8vw, 112px));
  margin: 0 auto clamp(22px, 3vw, 38px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-trust-strip article,
.public-module-grid article,
.public-plan-grid article,
.public-contact-grid article,
.public-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 33, 27, 0.05);
}

.public-trust-strip article {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.public-trust-strip strong,
.public-module-grid b,
.public-contact-grid b,
.public-plan-grid h3,
.public-plan-grid b {
  color: var(--ink);
}

.public-trust-strip span,
.public-module-grid span,
.public-contact-grid span,
.public-plan-grid p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.public-section {
  display: grid;
  gap: 16px;
  padding: 28px 0 8px;
}

.public-section-heading {
  display: grid;
  gap: 8px;
  max-width: 860px;
}

.public-section-heading p:not(.eyebrow) {
  margin: 0;
  color: #52615d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
}

.public-section-heading h2,
.public-cta h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
}

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

.public-module-grid article {
  display: grid;
  gap: 9px;
  border-left: 4px solid #05d4e8;
  padding: 18px;
}

.public-plans-section {
  padding-top: 22px;
}

.public-plans-hero {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.public-plans-hero .public-section-heading {
  max-width: 760px;
  justify-items: center;
}

.public-billing-toggle {
  justify-self: center;
  width: min(300px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(0, 91, 72, 0.16);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(20, 33, 27, 0.05);
}

.public-billing-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.public-billing-toggle button.active {
  background: #ffffff;
  color: #005b48;
  box-shadow: 0 8px 18px rgba(20, 33, 27, 0.08);
}

.public-billing-toggle button[data-public-cycle="annual"].active {
  background: linear-gradient(135deg, #1269ff, #17cdd6);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 105, 255, 0.14);
}

.public-billing-toggle span {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.66rem;
  font-weight: 900;
}

.public-plan-grid {
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(16px, 2.2vw, 30px);
  margin-top: 16px;
  padding: 24px clamp(18px, 2.6vw, 34px) 16px;
  overflow: visible;
}

.public-plan-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 1.4%;
  right: 1.4%;
  top: 54%;
  height: 32%;
  border-radius: 8px;
  background: linear-gradient(90deg, #05d4e8 0%, #062940 52%, #1269ff 100%);
  box-shadow: 0 24px 62px rgba(6, 41, 64, 0.14);
  opacity: 0.18;
  transform: translateY(-50%);
}

.public-plan-grid article {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 11px;
  align-content: start;
  min-height: 100%;
  overflow: visible;
  border: 1px solid rgba(5, 74, 92, 0.1);
  border-radius: 8px;
  padding: clamp(22px, 2.4vw, 32px) clamp(18px, 2vw, 28px) 24px;
  background: #ffffff;
  color: #12223a;
  text-align: center;
  box-shadow: 0 20px 50px rgba(20, 33, 27, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.public-plan-grid article::before {
  display: none;
}

.public-plan-grid article::after {
  display: none;
}

.public-plan-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 62px rgba(20, 33, 27, 0.14);
}

.public-plan-grid article.featured {
  background: linear-gradient(180deg, #0c3755, #062940);
  color: #ffffff;
  box-shadow: 0 34px 82px rgba(6, 41, 64, 0.24);
  transform: none;
}

.public-plan-grid article.featured:hover {
  transform: translateY(-7px);
}

.public-plan-grid article.featured::before {
  background: linear-gradient(180deg, #05d4e8, #092235);
}

.public-plan-grid article.featured::after {
  background: linear-gradient(180deg, #1269ff, #05d4e8);
}

.public-plan-grid article:nth-child(3)::after {
  background: linear-gradient(180deg, #ef4d75, #1269ff);
}

.public-plan-badge {
  justify-self: center;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: #2dde58;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.public-plan-grid article.featured .public-plan-badge {
  color: #ffffff;
}

.public-plan-badge.light {
  color: #05a638;
}

.public-plan-card-head {
  display: grid;
  gap: 6px;
}

.public-plan-grid span {
  color: #52615d;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.public-plan-grid article.featured span {
  color: #e6ecff;
}

.public-plan-grid h3 {
  margin: 0;
  color: #0b3b5c;
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.04;
}

.public-plan-grid article.featured h3 {
  color: #ffffff;
}

.public-plan-grid p {
  margin: 0;
  color: #52615d;
  font-size: 0.9rem;
  font-weight: 800;
}

.public-plan-grid article.featured p {
  color: #ffffff;
}

.public-plan-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 0;
}

.public-plan-grid strong {
  color: #123e5c;
  font-size: clamp(2.55rem, 4vw, 3.35rem);
  line-height: 1;
}

.public-plan-grid article.featured strong {
  color: #ffffff;
}

.public-plan-price-row em {
  color: #123e5c;
  font-style: normal;
  font-size: 0.92rem;
  font-weight: 900;
  padding-bottom: 6px;
}

.public-plan-grid article.featured .public-plan-price-row em {
  color: #ffffff;
}

.public-plan-note {
  min-height: 16px;
  color: #1269ff;
  font-size: 0.72rem;
  font-weight: 900;
}

.public-plan-grid article.featured .public-plan-note {
  color: #2dde58;
}

.public-plan-features {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-plan-features li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 23px;
  padding-left: 0;
  color: #1e2f4d;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
}

.public-plan-features li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  color: #159100;
  font-size: 0.96rem;
  font-weight: 900;
}

.public-plan-features li.available::after {
  content: "";
}

.public-plan-features li.unavailable {
  opacity: 0.7;
  text-decoration: line-through;
}

.public-plan-features li.unavailable::before {
  content: "×";
  color: #9c2937;
  font-size: 1.18rem;
  font-weight: 900;
  text-decoration: none;
}

.public-plan-grid article.featured .public-plan-features li {
  color: #ffffff;
}

.public-plan-grid article.featured .public-plan-features li::before {
  color: #ffffff;
}

.public-plan-grid article.featured .public-plan-features li.available::after {
  color: transparent;
}

.public-plan-grid article.featured .public-plan-features li.unavailable::before {
  color: #ffb3b3;
}

.public-pricing-grid .primary-button {
  width: min(170px, 100%);
  min-height: 42px;
  justify-self: center;
  margin-top: 12px;
  font: inherit;
  font-weight: 900;
  background: #157a5f;
  box-shadow: 0 16px 30px rgba(21, 122, 95, 0.18);
}

.public-plan-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.public-plan-contact-button span {
  color: inherit;
  font-size: inherit;
  text-transform: none;
}

.public-plan-whatsapp-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: 0 0 auto;
}

.public-plan-grid article.featured .primary-button {
  background: #05d4e8;
  color: #061d2c;
  box-shadow: 0 18px 38px rgba(5, 212, 232, 0.18);
}

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

.public-contact-grid article {
  display: grid;
  gap: 9px;
  border-left: 4px solid #1269ff;
  padding: 18px;
}

.public-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 24px;
  border-top: 4px solid #17cdd6;
}

.public-home-footer {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 16px;
  color: #d6dce7;
  padding: 28px clamp(22px, 7vw, 120px) 0;
  background: #20242f;
}

.public-footer-grid {
  display: grid;
  grid-template-columns: 0.85fr 0.95fr 0.95fr minmax(260px, 1.45fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: start;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.public-footer-grid section {
  display: grid;
  gap: 7px;
}

.public-footer-grid h3 {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: 1rem;
}

.public-footer-grid a,
.public-footer-grid button,
.public-footer-grid span {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: #c8d2e0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.public-footer-grid a:hover,
.public-footer-grid button:hover {
  color: #05d4e8;
}

.public-footer-about {
  border-top: 1px solid rgba(214, 220, 231, 0.35);
  padding-top: 14px;
}

.public-footer-language {
  color: #f8fbff;
  font-weight: 900;
}

.public-footer-about p {
  margin: 10px 0 2px;
  color: #d6dce7;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.public-footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.public-footer-socials .public-social-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.public-footer-socials .public-social-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.public-footer-socials .public-social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.28);
}

.social-facebook {
  background: #1877f2;
}

.social-instagram {
  background: radial-gradient(circle at 30% 105%, #fdf497 0 14%, #fd5949 38%, #d6249f 60%, #285aeb 100%);
}

.social-youtube {
  background: #ff0000;
}

.social-whatsapp {
  background: #25d366;
}

.social-tiktok,
.social-x {
  background: #050505;
}

.social-tiktok .tt-cyan {
  fill: #25f4ee;
  transform: translate(-1px, 1px);
}

.social-tiktok .tt-red {
  fill: #fe2c55;
  transform: translate(1px, -1px);
}

.public-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px calc(-1 * clamp(22px, 7vw, 120px)) 0;
  padding: 10px clamp(22px, 7vw, 120px);
  background: #171b24;
  color: #c8d2e0;
  font-size: 0.8rem;
  font-weight: 800;
}

.public-whatsapp-modal {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 0;
  border-right: 6px solid #17cdd6;
  border-radius: 0;
  padding: 42px 54px;
  position: relative;
}

.public-whatsapp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.public-whatsapp-modal h3 {
  margin: 0 0 22px;
  color: #1269ff;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  text-align: center;
}

.public-whatsapp-modal h4 {
  margin: 0 0 28px;
  color: #3a423f;
  font-size: 1.2rem;
  text-align: center;
}

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

.public-whatsapp-form label {
  display: grid;
  gap: 8px;
  color: #3a423f;
  font-size: 1rem;
  font-weight: 900;
}

.public-whatsapp-form label span {
  color: #d9234e;
}

.public-whatsapp-form input,
.public-whatsapp-form select {
  min-height: 52px;
  border: 1px solid #3a423f;
  border-radius: 0;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.public-whatsapp-submit {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  margin-top: 4px;
  background: #25d366;
  color: #fff;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 900;
  cursor: pointer;
}

.auth-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 0.92fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid #17cdd6;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(16, 32, 48, 0.12);
}

.password-change-card {
  width: min(860px, 100%);
}

.auth-brand {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 44px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(29, 110, 220, 0.1), rgba(23, 205, 214, 0.12)),
    #f9fbfb;
}

.auth-brand img {
  width: min(260px, 80%);
  height: auto;
  object-fit: contain;
}

.auth-form {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 44px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.auth-status {
  min-height: 20px;
  color: var(--muted);
  font-weight: 800;
}

.auth-status.error-text {
  color: var(--danger);
}

.auth-helper {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.auth-switch-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.session-bar > span {
  color: var(--muted);
  font-weight: 900;
}

.header-notification-button {
  position: relative;
  width: 36px;
  height: 42px;
  margin-right: 38px;
  border: 0;
  background: transparent;
  color: #109beb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.16s ease, color 0.16s ease;
}

.header-notification-button:hover {
  color: #1162f2;
  transform: translateY(-1px);
}

.header-notification-button svg {
  width: 30px;
  height: 30px;
  display: block;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: -7px;
  min-width: 19px;
  height: 19px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ef1d26;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.notification-badge[hidden] {
  display: none;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-trigger {
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.16s ease;
}

.user-menu-trigger:hover,
.user-menu[open] > .user-menu-trigger {
  transform: translateY(-1px);
}

.header-company-logo {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-company-logo-image {
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
  display: block;
}

.header-company-logo-image.doc-logo-placeholder {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #eaf9f7;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.user-menu-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.user-menu-panel .user-menu-item {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.user-menu-panel .user-menu-item:hover,
.user-menu-panel .user-menu-item.active {
  border-color: transparent;
  background: #eaf9f7;
  color: var(--accent-dark);
}

.user-menu-panel .user-menu-item:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #f5f8f7;
  opacity: 0.72;
}

.user-menu-panel .user-menu-logout {
  color: var(--danger);
}

.platform-admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.platform-admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid #cfe5e8;
  border-top: 4px solid #05d4e8;
  border-radius: 8px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f4feff 0%, #ffffff 55%, #f3f8ff 100%);
  box-shadow: var(--shadow);
}

.platform-admin-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.platform-admin-brand img {
  width: 132px;
  height: 64px;
  object-fit: contain;
}

.platform-admin-brand div {
  display: grid;
  gap: 4px;
}

.platform-admin-brand span {
  color: #005c50;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.platform-admin-brand strong {
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.05;
}

.platform-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-admin-nav-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.platform-admin-nav-button:hover,
.platform-admin-nav-button.active {
  border-color: rgba(5, 212, 232, 0.38);
  background: linear-gradient(135deg, rgba(18, 105, 255, 0.1), rgba(5, 212, 232, 0.14));
  color: #005c50;
}

.platform-admin-user-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.platform-admin-user-button:hover strong {
  color: #007a68;
}

.platform-admin-user-button img,
.platform-admin-user-button span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.platform-admin-user-button span {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #1269ff, #05d4e8);
  color: #fff;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.platform-admin-user-button strong {
  color: var(--muted);
}

.platform-admin-main,
.platform-admin-card {
  display: grid;
  gap: 16px;
}

.platform-admin-card {
  border: 1px solid var(--line);
  border-top: 4px solid #17cdd6;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.platform-admin-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #cfe5e8;
  border-left: 4px solid #1269ff;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f4fbff;
}

.platform-admin-intro div {
  display: grid;
  gap: 4px;
}

.platform-admin-intro strong {
  color: var(--ink);
}

.platform-admin-intro span {
  color: var(--muted);
  font-weight: 800;
}

.platform-admin-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(5, 212, 232, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: #f8fdfd;
}

.platform-admin-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-admin-filters input,
.platform-admin-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.platform-client-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfefd;
}

.platform-client-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-client-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-transform: none;
}

.platform-client-form .primary-button {
  min-height: 44px;
  white-space: nowrap;
}

.platform-client-create-status {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.platform-client-create-status.error-text {
  color: var(--danger);
}

.platform-public-settings {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #1269ff;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #fbfefd 0%, #ffffff 54%, #f4fbff 100%);
}

.platform-public-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.platform-public-status.error-text {
  color: var(--danger);
}

.platform-public-hero-form {
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.platform-public-hero-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 88px;
  border: 1px dashed #9bd9de;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 105, 255, 0.07), rgba(5, 212, 232, 0.12)),
    #ffffff;
  color: #005c50;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.platform-public-hero-preview:hover {
  border-color: #05d4e8;
  background: #f3feff;
}

.platform-public-hero-preview:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.platform-public-hero-copy {
  display: grid;
  gap: 6px;
}

.platform-public-hero-copy strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.platform-public-hero-copy span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.platform-public-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-public-hero-actions .primary-button,
.platform-public-hero-actions .ghost-button {
  min-height: 42px;
  padding: 0 16px;
}

.platform-public-hero-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.platform-public-social-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.platform-public-plan-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(5, 212, 232, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(231, 251, 255, 0.46);
}

.platform-public-plan-settings label {
  margin: 0;
}

.platform-public-social-form .platform-public-hero-copy {
  grid-column: 1 / -1;
}

.platform-public-plan-settings .primary-button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.platform-public-social-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-public-social-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.platform-public-social-form .primary-button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.platform-public-hero-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.platform-public-hero-thumb {
  overflow: hidden;
  width: 92px;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  background: #f4fbff;
}

.platform-public-hero-thumb img,
.platform-public-hero-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.platform-public-hero-item strong,
.platform-public-hero-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-public-hero-item strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.platform-public-hero-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.platform-profile-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border-top: 4px solid #05d4e8;
}

.platform-profile-header {
  background: linear-gradient(135deg, #f5feff 0%, #ffffff 54%, #edf7ff 100%);
}

.platform-profile-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.28rem;
}

.platform-profile-header span {
  color: #005c50;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-profile-content {
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 16px;
  background: #f7fbfa;
}

.platform-profile-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.platform-profile-side {
  position: sticky;
  top: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 1px solid #cfe5e8;
  border-radius: 8px;
  padding: 18px 14px;
  background: #ffffff;
}

.platform-profile-side strong {
  color: var(--ink);
  font-size: 1rem;
}

.platform-profile-side > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.platform-profile-security {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.platform-profile-security b {
  color: #005c50;
  font-size: 0.82rem;
}

.platform-profile-security small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.platform-profile-main {
  display: grid;
  gap: 12px;
}

.platform-profile-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #17cdd6;
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.platform-profile-photo {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border: 1px solid #bfe8ea;
  border-radius: 50%;
  background: linear-gradient(135deg, #1269ff, #05d4e8);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 105, 255, 0.14);
}

.platform-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platform-profile-photo #platformAdminProfilePhotoPreview {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.platform-profile-form h4,
.platform-password-form h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.platform-auth-code-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

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

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

.platform-profile-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.platform-profile-grid .wide-field {
  grid-column: 1 / -1;
}

.platform-profile-grid input,
.platform-auth-code-card input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.platform-auth-code-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px;
  gap: 8px;
  align-items: center;
  border: 1px solid #d8e8e6;
  border-radius: 8px;
  padding: 10px;
  background: #f4fbff;
}

.platform-auth-code-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.platform-auth-code-card span {
  grid-column: 1 / -1;
}

.platform-auth-code-card input:disabled {
  background: #eef5f3;
  color: var(--muted);
}

.platform-profile-form .modal-form-actions {
  padding-top: 0;
}

.platform-profile-form .primary-button {
  min-height: 40px;
  padding: 0 18px;
}

.platform-admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.platform-admin-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfd 100%);
}

.platform-admin-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-admin-metrics strong {
  font-size: 1.5rem;
}

.platform-tenants-table-wrap table {
  min-width: 980px;
}

.platform-tenants-table-wrap th,
.platform-tenants-table-wrap td {
  vertical-align: middle;
}

.platform-tenant-name {
  display: grid;
  gap: 3px;
}

.platform-tenant-name span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.platform-inline-select,
.platform-inline-date {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.platform-inline-date {
  min-width: 140px;
}

.platform-subscription-controls {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) minmax(96px, 1fr);
  gap: 8px;
}

.platform-payment-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef5f4;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.platform-payment-chip.ok {
  background: #e9f8ef;
  color: #006d43;
}

.platform-payment-chip.warning {
  background: #fff1cf;
  color: #946100;
}

.platform-payment-chip.danger {
  background: #ffe5e7;
  color: var(--danger);
}

.platform-payment-chip.neutral {
  background: #eef5f4;
  color: var(--muted);
}

.platform-profile-view {
  width: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.platform-profile-view .platform-profile-content {
  max-height: none;
  overflow: visible;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover {
  background: #effbff;
  border-color: #9ddce8;
}

.platform-delete-modal {
  width: min(620px, calc(100vw - 24px));
}

.platform-delete-form {
  padding: 16px;
}

.platform-delete-warning {
  border: 1px solid #f0caca;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff7f7;
  color: var(--danger);
  font-weight: 850;
  line-height: 1.35;
}

.onboarding-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 26px 16px 36px;
  background: var(--bg);
}

.onboarding-card {
  width: min(1040px, 100%);
  border: 1px solid var(--line);
  border-top: 5px solid #17cdd6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 32, 48, 0.12);
  overflow: hidden;
}

.onboarding-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(23, 205, 214, 0.08), rgba(29, 110, 220, 0.06)), #fff;
}

.onboarding-header img {
  width: 118px;
  height: 64px;
  object-fit: contain;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.onboarding-steps button,
.onboarding-entity-switch button {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 14px;
  background: #f8fbf9;
  color: var(--muted);
  font-weight: 900;
}

.onboarding-steps button.active,
.onboarding-entity-switch button.active {
  background: linear-gradient(135deg, #1d6edc, #17cdd6);
  color: #fff;
}

.onboarding-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: grid;
  gap: 16px;
}

.onboarding-entity-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.onboarding-p2p-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.onboarding-p2p-settings[hidden] {
  display: none;
}

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.onboarding-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.onboarding-footer span {
  color: var(--muted);
  font-weight: 900;
}

.onboarding-footer span.error-text {
  color: var(--danger);
}

@media (max-width: 820px) {
  .public-home-shell {
    gap: 0;
    padding: 0;
  }

  .public-home-topbar {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .public-home-brand img {
    width: 116px;
    height: 50px;
  }

  .public-home-nav {
    order: 3;
    width: 100%;
    justify-content: stretch;
    overflow-x: auto;
  }

  .public-home-nav button {
    flex: 1 0 auto;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .public-plans-hero {
    grid-template-columns: 1fr;
  }

  .public-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 18px 18px;
  }

  .public-hero h1 {
    white-space: normal;
  }

  .public-hero-media,
  .public-product-preview {
    order: 2;
  }

  .public-hero-media {
    justify-self: stretch;
    width: 100%;
    margin-right: 0;
    min-height: 260px;
  }

  .public-trust-strip,
  .public-module-grid,
  .public-plan-grid,
  .public-contact-grid {
    grid-template-columns: 1fr;
  }

  .public-home-view.public-section {
    min-height: auto;
    padding: 28px 18px;
  }

  .public-plan-grid article.featured {
    transform: none;
  }

  .public-preview-metrics {
    grid-template-columns: 1fr;
  }

  .public-preview-table div {
    grid-template-columns: 1fr;
  }

  .public-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-home-footer {
    padding: 38px 22px 0;
  }

  .public-footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .public-footer-bottom {
    align-items: flex-start;
    justify-content: flex-start;
    margin: 8px -22px 0;
    padding: 14px 22px;
  }

  .public-whatsapp-modal {
    padding: 42px 26px 28px;
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-brand img {
    width: 190px;
  }

  .auth-form {
    padding: 30px 22px;
  }

  .platform-client-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-admin-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-profile-layout,
  .compact-password-grid,
  .platform-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-profile-side {
    position: static;
  }

  .platform-public-hero-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-public-social-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-public-plan-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-public-plan-settings .primary-button {
    width: 100%;
  }

  .platform-public-hero-actions {
    justify-content: flex-start;
  }

  .topbar {
    align-items: flex-start;
  }

  .platform-admin-topbar,
  .platform-admin-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .platform-admin-metrics {
    grid-template-columns: 1fr;
  }

  .onboarding-header,
  .onboarding-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .onboarding-steps,
  .onboarding-entity-switch,
  .onboarding-p2p-settings {
    grid-template-columns: 1fr;
  }
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.top-actions,
.form-actions,
.table-toolbar,
.toolbar-actions,
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.server-sync-actions {
  margin-top: 12px;
}

.backup-modal {
  width: min(640px, calc(100vw - 24px));
}

.backup-modal-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.backup-modal .backup-actions {
  justify-content: flex-start;
}

.backup-modal .server-sync-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.users-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 128px;
  border: 1px solid var(--line);
  border-top: 4px solid #17cdd6;
  border-radius: 8px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(23, 205, 214, 0.08), rgba(29, 110, 220, 0.06)), #fff;
}

.users-hero-logo img {
  width: 150px;
  height: 78px;
  object-fit: contain;
}

.users-hero-copy {
  text-align: right;
}

.users-hero-copy h2 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.users-create-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.users-table-wrap table {
  table-layout: fixed;
}

.user-role-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-role-control select {
  min-width: 150px;
}

.user-self-badge {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8f6f2;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 900;
}

tr.is-dirty td {
  background: #f8fbf9;
}

.muted-status {
  color: var(--muted);
  font-weight: 700;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.primary-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.secondary-button {
  background: #e8b047;
  border-color: #d8a33f;
  color: #1b211f;
}

.secondary-button:hover {
  background: #d99f36;
  border-color: #c89331;
}

.square-button {
  width: 38px;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.square-button.active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.ghost-button:hover,
.tab:hover {
  border-color: #b7c3bd;
  background: #f9fbfa;
}

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

.danger-button:hover {
  border-color: #d9b3b3;
  background: #fff7f7;
}

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

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.hidden-file-input {
  display: none;
}

.toolbar-actions {
  flex-wrap: wrap;
}

.operation-exchange-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.exchange-load-button {
  min-height: 42px;
  padding: 0 11px 0 9px;
}

.exchange-load-button:disabled {
  opacity: 0.76;
}

.operation-exchange-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.operation-exchange-logo .account-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.operations-panel {
  display: grid;
  gap: 14px;
}

.tab-panel.operations-panel.active {
  display: grid;
}

.operations-import-board {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.operations-import-copy {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 88px;
}

.operations-company-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.operations-company-logo {
  max-width: min(260px, 100%);
  max-height: 78px;
  object-fit: contain;
}

.operations-company-logo.doc-logo-placeholder {
  width: 140px;
  height: 72px;
  border-radius: 8px;
  font-size: 1.2rem;
}

.section-kicker {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.operations-import-copy h2,
.operations-history-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
}

.operations-import-copy strong {
  color: var(--muted);
  font-size: 0.84rem;
}

.operations-panel .operation-exchange-buttons {
  justify-content: flex-end;
}

.operations-panel .exchange-load-button {
  background: #ffffff;
  border-color: #cfd9d4;
  box-shadow: 0 1px 0 rgba(23, 33, 28, 0.03);
}

.operations-panel .exchange-load-button:not(:disabled):hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.1);
}

.operations-history-board {
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.operations-history-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.operations-history-wrap {
  border-radius: 8px;
  border-color: #dce5e1;
  box-shadow: 0 8px 24px rgba(15, 28, 22, 0.04);
}

.operations-history-table {
  min-width: 780px;
}

.operations-history-table th,
.operations-history-table td {
  font-size: 0.82rem;
  padding: 12px 14px;
  vertical-align: middle;
}

.operations-history-table th {
  text-align: center;
}

.operations-history-table td:first-child,
.operations-history-table td:nth-child(2),
.operations-history-table td:nth-child(4) {
  text-align: left;
}

.operations-history-table th:nth-child(1),
.operations-history-table td:nth-child(1) {
  width: 12%;
}

.operations-history-table th:nth-child(2),
.operations-history-table td:nth-child(2) {
  width: 12%;
}

.operations-history-table th:nth-child(3),
.operations-history-table td:nth-child(3) {
  width: 15%;
  text-align: center;
}

.operations-history-table th:nth-child(4),
.operations-history-table td:nth-child(4) {
  width: 36%;
}

.operations-history-table th:nth-child(5),
.operations-history-table td:nth-child(5),
.operations-history-table th:nth-child(6),
.operations-history-table td:nth-child(6) {
  width: 11%;
}

.operations-history-table th:nth-child(7),
.operations-history-table td:nth-child(7) {
  width: 3%;
  text-align: center;
}

.operation-history-row td {
  border-bottom-color: #e3ebe7;
}

.operation-history-row:hover td {
  background: #f4fbfb;
}

.operation-history-type {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.operation-history-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.operation-history-icons .account-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.operation-history-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.operation-history-detail strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.operation-history-detail span,
.operation-history-detail small,
.operation-module-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.operation-document-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 180px;
  padding: 0 9px;
  border: 1px solid #cfd9d4;
  border-radius: 999px;
  background: #f8fbfa;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-document-chip.muted-chip {
  color: #7b8a84;
  background: #f4f7f6;
}

.operation-document-action {
  min-width: 42px;
  color: var(--accent-dark);
  font-size: 0.7rem;
  letter-spacing: 0;
  border-color: #cfe4dd;
  background: #f5fbf9;
}

.operation-document-action:hover {
  border-color: var(--accent);
  background: #e8f8f4;
}

.operation-delete-action {
  color: var(--danger);
}

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

.metric {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1;
}

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

.dashboard-balance-column {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0, 78, 69, 0.06);
}

.dashboard-total-card {
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid rgba(0, 78, 69, 0.12);
  border-radius: 0;
  background: transparent;
  padding: 6px 2px 14px;
}

.dashboard-total-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-total-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-sales-panel {
  position: relative;
  width: calc((100% - 18px) / 2);
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  box-shadow: 0 14px 34px rgba(0, 78, 69, 0.06);
}

.dashboard-sales-range-button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  padding: 8px 12px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
}

.dashboard-sales-range-button span,
.dashboard-sales-total span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-sales-range-button strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-sales-total {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 18px;
  text-align: right;
}

.dashboard-sales-total strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-exchange-sales-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 78, 69, 0.12);
}

.dashboard-exchange-sales-item {
  display: grid;
  grid-template-columns: 38px repeat(2, minmax(92px, 1fr));
  gap: 12px;
  align-items: center;
  padding: 8px 2px;
}

.dashboard-exchange-sales-item + .dashboard-exchange-sales-item {
  border-top: 1px solid rgba(0, 78, 69, 0.08);
}

.dashboard-exchange-sales-item .account-logo {
  width: 34px;
  height: 34px;
}

.dashboard-exchange-sales-item div {
  display: grid;
  gap: 2px;
}

.dashboard-exchange-sales-item span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-exchange-sales-item strong {
  color: var(--accent-dark);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.dashboard-exchange-sales-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-monthly-close-panel {
  width: calc((100% - 18px) / 2);
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.dashboard-monthly-close-panel .primary-button {
  min-width: 190px;
}

.monthly-close-module {
  border: 1px solid rgba(0, 78, 69, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 18px 45px rgba(0, 78, 69, 0.07);
}

.monthly-close-body {
  display: grid;
  gap: 14px;
  padding: 0;
}

.monthly-close-entry-row {
  display: grid;
  grid-template-columns:
    90px
    150px
    105px
    minmax(270px, 1fr)
    minmax(360px, 1.3fr)
    128px;
  grid-template-areas:
    "year month income origin destination commissions"
    ". . . . exchange action";
  align-items: end;
  column-gap: 8px;
  row-gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 78, 69, 0.12);
}

.monthly-close-entry-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.monthly-close-entry-row select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding-inline: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
}

.monthly-close-card {
  display: contents;
}

.monthly-close-year-field {
  grid-area: year;
}

.monthly-close-month-field {
  grid-area: month;
}

.monthly-close-card-head {
  display: grid;
  align-content: start;
  align-self: stretch;
  gap: 7px;
  min-width: 0;
}

.monthly-close-card-head span {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.monthly-close-income-head {
  grid-area: income;
}

.monthly-close-origin-line {
  grid-area: origin;
}

.monthly-close-destination-line {
  grid-area: destination;
}

.monthly-close-commission-head {
  grid-area: commissions;
}

.monthly-close-exchange-line {
  grid-area: exchange;
}

.monthly-close-card-head strong {
  color: var(--ink);
  font-size: clamp(1.22rem, 1.6vw, 1.55rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.monthly-close-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: stretch;
  min-width: 0;
}

.monthly-close-logo {
  min-height: 46px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.monthly-close-logo .account-logo {
  width: 28px;
  height: 28px;
}

.monthly-close-register-button {
  grid-area: action;
  justify-self: end;
  align-self: end;
  min-width: 128px;
  width: 128px;
  min-height: 46px;
  padding-inline: 12px;
  font-size: 0.84rem;
}

.monthly-close-history {
  border: 1px solid rgba(0, 78, 69, 0.14);
  border-radius: 8px;
  overflow: auto;
  background: #ffffff;
}

.monthly-close-history table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

.monthly-close-history th,
.monthly-close-history td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 78, 69, 0.12);
  text-align: left;
}

.monthly-close-history th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.monthly-close-history p {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.monthly-close-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.monthly-close-download-button {
  min-width: 46px;
  padding: 8px 10px;
}

@media (max-width: 1180px) {
  .monthly-close-entry-row {
    grid-template-columns: 90px 150px minmax(240px, 1fr) minmax(240px, 1fr);
    grid-template-areas:
      "year month income commissions"
      "origin origin destination destination"
      "exchange exchange action action";
  }

  .monthly-close-card {
    display: contents;
  }

  .monthly-close-register-button {
    grid-area: action;
  }
}

@media (max-width: 980px) {
  .monthly-close-entry-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "year"
      "month"
      "income"
      "origin"
      "destination"
      "commissions"
      "exchange"
      "action";
  }

  .monthly-close-register-button {
    width: auto;
    justify-self: end;
  }
}

.date-range-popover.dashboard-sales-calendar {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3000;
  width: min(620px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-color: rgba(16, 201, 215, 0.38);
  box-shadow: 0 24px 70px rgba(0, 38, 35, 0.22);
}

.dashboard-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-content: start;
}

.dashboard-balance-card {
  min-height: 66px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 2px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
}

.dashboard-balance-card .account-logo {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
}

.dashboard-balance-card span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-card-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.dashboard-balance-card strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

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

.side-nav {
  position: sticky;
  top: 10px;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.side-nav-section,
.side-nav-options {
  display: grid;
  gap: 6px;
}

.side-nav-menu {
  display: grid;
  gap: 6px;
}

.side-nav-menu summary {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fbf9;
  color: var(--accent-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-nav-menu summary::-webkit-details-marker {
  display: none;
}

.side-nav-menu summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.side-nav-menu[open] summary::after {
  content: "-";
}

.side-nav-menu.plan-locked summary {
  color: #7b8a84;
  background: #f4f7f6;
}

.side-nav-menu.plan-locked summary::after {
  content: "\1F512";
  color: #7b8a84;
  font-size: 0.9rem;
}

.side-nav-options {
  padding-top: 6px;
}

.side-nav .tab {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  padding: 0 10px;
  text-align: left;
  white-space: normal;
}

.side-nav .tab.subtab {
  padding-left: 18px;
  font-weight: 760;
}

.tab.plan-locked,
.tab.plan-locked:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  background: #f4f7f6;
  color: #7b8a84;
}

.tab.plan-locked::after {
  content: " \1F512";
  margin-left: auto;
  font-size: 0.82rem;
}

.operation-panel {
  padding: 18px;
}

.tab-panel > .operation-panel {
  margin-bottom: 16px;
}

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

.panel-heading span {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.operation-form {
  display: grid;
  gap: 13px;
}

.ledger-journal-panel {
  margin-bottom: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
}

.ledger-journal-panel[hidden] {
  display: none;
}

.journal-entry-form .panel-heading {
  margin-bottom: 4px;
}

.journal-header-grid {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 12px;
}

.journal-lines-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.journal-lines-table {
  min-width: 720px;
}

.journal-lines-table th:first-child {
  width: 55%;
}

.journal-lines-table input {
  min-height: 36px;
}

.journal-account-input {
  min-width: 320px;
}

.journal-amount-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.journal-action-cell {
  width: 46px;
  text-align: center;
}

.journal-form-footer {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px);
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.journal-balance-status.balanced {
  border-color: #91c9a0;
  background: #effaf1;
}

.journal-balance-status.balanced .calc-line:last-child,
.journal-balance-status.balanced .calc-line:last-child strong {
  color: var(--accent-dark);
}

.journal-balance-status.unbalanced {
  border-color: #e5aaaa;
  background: #fff5f5;
}

.journal-balance-status.unbalanced .calc-line:last-child,
.journal-balance-status.unbalanced .calc-line:last-child strong {
  color: var(--danger);
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.12);
}

.inline-select {
  min-width: 190px;
}

.inline-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.purchase-retention-action {
  align-items: flex-start;
  flex-direction: column;
  min-width: 220px;
}

.purchase-retention-action .inline-select {
  min-width: 220px;
  max-width: 260px;
}

.account-logo {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  vertical-align: middle;
}

.account-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.account-logo-fallback {
  background: #eef5f1;
}

.logo-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.logo-upload-icon input {
  display: none;
}

.logo-upload-icon .account-logo {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.logo-upload-icon:hover .account-logo {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 113, 86, 0.12);
  transform: translateY(-1px);
}

.exchange-management-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.entity-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.entity-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.entity-switch span {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #dfe6e2;
  border: 1px solid var(--line);
  transition: background 160ms ease, border-color 160ms ease;
}

.entity-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  transition: transform 160ms ease;
}

.entity-switch input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
}

.entity-switch input:checked + span::after {
  transform: translateX(20px);
}

.verified-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  vertical-align: middle;
}

.dashboard-verified-badge,
.kardex-tab-verified-badge {
  width: 16px;
  height: 16px;
}

.kardex-title-verified-badge {
  width: 20px;
  height: 20px;
}

.finance-link-button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.finance-link-button:hover {
  text-decoration: underline;
}

.exchange-management-actions .row-action {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 0.88rem;
}

.headless-table thead {
  display: none;
}

.bank-account-modal,
.exchange-account-modal,
.cash-account-modal,
.cash-audit-modal {
  width: min(1000px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(88vh, 820px);
}

.bank-account-modal .settings-form,
.exchange-account-modal .settings-form,
.cash-account-modal .settings-form {
  padding: 16px;
}

.cash-audit-header {
  align-items: center;
}

.cash-audit-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cash-audit-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.1;
}

.cash-audit-title #cashAuditAccountDisplay {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.cash-audit-title #cashAuditAccountDisplay[hidden] {
  display: none;
}

.cash-audit-title .account-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.cash-audit-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.cash-audit-config-form {
  display: grid;
  grid-template-columns: minmax(220px, 520px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.cash-audit-config-form .compact-button {
  grid-column: 3;
  min-height: 34px;
  min-width: 86px;
  padding: 0 14px;
  justify-self: end;
}

.cash-audit-config-form[hidden] {
  display: none;
}

.cash-audit-config-form label,
.cash-audit-tools label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.cash-audit-config-form input,
.cash-audit-tools input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 6px 10px;
}

.cash-audit-tools {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  position: relative;
}

.cash-audit-tools[hidden] {
  display: none;
}

.cash-audit-export-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  grid-column: 3;
}

.cash-audit-export-actions .compact-button {
  min-height: 34px;
  min-width: 72px;
  padding: 0 14px;
}

.cash-audit-body thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
}

.bank-statement-modal {
  width: min(1100px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(88vh, 820px);
}

.bank-config-modal {
  width: min(460px, calc(100vw - 24px));
}

.bank-movement-modal {
  width: min(760px, calc(100vw - 24px));
}

.bank-config-modal .settings-form,
.bank-movement-modal .settings-form {
  padding: 16px;
}

.bank-movement-form {
  display: grid;
  gap: 14px;
  max-height: calc(min(82vh, 760px) - 76px);
  overflow: auto;
}

.bank-movement-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bank-movement-title h2 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.1;
}

.bank-movement-title span {
  margin-top: 5px;
}

.bank-movement-title #bankStatementMovementBankLabel {
  display: grid;
  gap: 2px;
}

.bank-movement-title #bankStatementMovementBankLabel strong {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.bank-movement-logo .account-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.bank-movement-top-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.bank-movement-date-field {
  width: 100%;
}

.bank-statement-body {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.bank-statement-body thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
}

.bank-statement-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.bank-account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-account-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  display: inline-grid;
  gap: 2px;
  padding: 7px 12px;
  text-align: left;
  cursor: pointer;
}

.bank-account-tab span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.bank-account-tab strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.bank-account-tab.active {
  border-color: var(--accent);
  background: var(--accent);
}

.bank-account-tab.active span,
.bank-account-tab.active strong {
  color: #ffffff;
}

.bank-account-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.bank-statement-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.bank-statement-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bank-account-delete-button {
  min-width: 38px;
  min-height: 38px;
}

.bank-statement-title .entity-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.bank-statement-title .account-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.bank-statement-title .entity-title > span:not(.account-logo) {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.bank-statement-header {
  margin-bottom: 0;
  align-items: center;
}

.bank-statement-header.reconciliation-mode {
  display: flex;
}

.bank-statement-header.reconciliation-mode .bank-reconciliation-bar {
  width: 100%;
  grid-template-columns: 180px 180px minmax(160px, 1fr) auto auto;
}

.bank-statement-header.reconciliation-mode #saveBankReconciliationButton {
  justify-self: end;
}

.bank-statement-filter-bar {
  display: grid;
  grid-template-columns: 190px 150px auto auto;
  gap: 8px;
  align-items: end;
  position: relative;
}

.bank-statement-filter-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.bank-statement-filter-bar select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 0 9px;
}

.bank-reconciliation-bar {
  display: grid;
  grid-template-columns: 140px 140px minmax(150px, auto) auto auto;
  gap: 8px;
  align-items: end;
}

.bank-statement-filter-bar[hidden],
.bank-reconciliation-bar[hidden],
.date-range-popover[hidden] {
  display: none;
}

.bank-reconciliation-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.bank-reconciliation-bar input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 0 9px;
}

.bank-reconciliation-status {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  padding: 0 12px;
  white-space: nowrap;
}

.bank-reconciliation-status.ok {
  border-color: #a8d5be;
  background: #effaf4;
  color: var(--accent-dark);
}

.bank-reconciliation-status.difference {
  border-color: #e7b4b4;
  background: #fff3f3;
  color: #a73535;
}

.bank-reconcile-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bank-reconcile-all input {
  width: 16px;
  height: 16px;
}

.bank-history-modal {
  width: min(780px, calc(100vw - 24px));
}

.bank-history-excel {
  color: var(--accent-dark);
  font-weight: 900;
}

.date-range-trigger {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0 9px;
  text-align: left;
  width: 100%;
}

.date-range-icon {
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  width: min(560px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 12px;
}

.date-range-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.date-range-calendar-header button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--accent-dark);
  font-size: 1.2rem;
  font-weight: 900;
  height: 32px;
  width: 38px;
}

.date-range-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.date-range-month h3 {
  font-size: 0.84rem;
  margin: 0 0 8px;
  text-align: center;
}

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

.date-range-weekdays span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.date-range-day,
.date-range-empty {
  min-height: 30px;
}

.date-range-day {
  border: 1px solid transparent;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
}

.date-range-day.today {
  border-color: var(--accent);
}

.date-range-day.in-range {
  background: #e7f3ee;
  color: var(--accent-dark);
}

.date-range-day.range-edge {
  background: var(--accent);
  color: #ffffff;
}

.bank-movement-type-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bank-movement-direction-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bank-transfer-fields {
  display: grid;
  gap: 12px;
}

.bank-movement-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.bank-movement-entry-row .settings-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.bank-movement-amount-row {
  display: grid;
  grid-template-columns: 180px 120px;
  gap: 10px;
  align-items: end;
}

.bank-movement-form:not(.transfer-mode) .bank-movement-amount-row {
  grid-template-columns: 180px;
}

.bank-movement-form.transfer-mode .bank-movement-entry-row {
  grid-template-columns: auto;
  justify-content: start;
}

.bank-movement-form:not(.transfer-mode) .bank-movement-fee-field {
  display: none;
}

.bank-movement-fee-field input[readonly] {
  background: #f1f5f4;
  color: var(--accent-dark);
  font-weight: 850;
}

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

.transit-bank-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 8px;
  text-align: left;
  font-weight: 850;
  cursor: pointer;
}

.transit-bank-choice .account-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.transit-bank-choice-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.transit-bank-choice-name {
  font-size: 0.78rem;
  line-height: 1.1;
}

.transit-bank-choice-detail,
.transit-bank-choice-balance {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.15;
}

.transit-bank-choice-balance {
  color: var(--accent-dark);
}

.transit-bank-choice.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.transit-bank-choice.active .account-logo {
  border-color: rgba(255, 255, 255, 0.42);
}

.bank-movement-counterparty-divider {
  grid-column: 1 / -1;
  display: grid;
  align-items: center;
  min-height: 14px;
  padding: 2px 0;
}

.bank-movement-counterparty-divider span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 95, 88, 0), rgba(21, 125, 91, 0.72), rgba(232, 176, 71, 0.72), rgba(0, 95, 88, 0));
}

.transit-bank-choice.active .transit-bank-choice-detail,
.transit-bank-choice.active .transit-bank-choice-balance {
  color: rgba(255, 255, 255, 0.86);
}

.bank-movement-status {
  border: 1px solid #e7b4b4;
  border-radius: 8px;
  background: #fff3f3;
  color: #a73535;
  font-weight: 850;
  padding: 10px 12px;
}

@media (max-width: 920px) {
  .transit-bank-choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .transit-bank-choice-list {
    grid-template-columns: 1fr;
  }

  .date-range-months {
    grid-template-columns: 1fr;
  }
}

.inline-check-field {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
}

.inline-check-field input {
  width: auto;
  height: auto;
}

.entity-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.financial-header .entity-title,
.kardex-exchange-header .entity-title {
  color: var(--ink);
  font-size: inherit;
  font-weight: 850;
}

.financial-header .entity-title > span:not(.account-logo),
.kardex-exchange-header .entity-title > span:not(.account-logo) {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.financial-header .account-logo,
.kardex-exchange-header .account-logo {
  flex: 0 0 auto;
}

.compact-file-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
}

.calculation-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.calc-line strong {
  color: var(--ink);
}

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

.data-panel {
  min-width: 0;
  overflow: hidden;
}

.tabs {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  overflow-x: auto;
}

.tab {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.table-toolbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.banks-toolbar,
.exchanges-toolbar,
.cash-toolbar {
  justify-content: flex-end;
}

.supercias-toolbar {
  justify-content: flex-end;
}

.secondary-toolbar {
  margin-top: 18px;
}

.table-toolbar span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.document-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.document-bulk-retry-button {
  color: #9a5f00;
  border-color: #efd38c;
  background: #fff8e6;
}

.document-bulk-retry-button:hover {
  border-color: #f0b429;
  background: #fff2c7;
  color: #7a4b00;
}

.accounting-book-header {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.accounting-book-header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.accounting-book-header span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.accounting-book-header strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.accounts-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.accounts-brand-logo {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 92px;
}

.accounts-company-logo {
  max-width: min(340px, 50vw);
  max-height: 96px;
  object-fit: contain;
}

.accounts-company-logo.doc-logo-placeholder {
  width: 112px;
  height: 86px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.accounts-supercias-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.accounts-hero h2 {
  margin: 0;
}

.accounts-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.accounts-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.accounts-switch button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 850;
  cursor: pointer;
}

.accounts-switch button:last-child {
  border-right: 0;
}

.accounts-switch button.active {
  background: var(--accent);
  color: #ffffff;
}

.accounts-layout {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.account-aux-modal {
  width: min(760px, calc(100vw - 24px));
}

.account-aux-modal .settings-form {
  padding: 16px;
  overflow: auto;
}

.account-aux-modal input[readonly] {
  background: #f1f5f4;
  color: var(--accent-dark);
  font-weight: 850;
}

.accounts-status-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.accounts-status-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.account-base-row td {
  background: #f8fbfa;
  color: var(--muted);
  font-weight: 800;
}

.account-auxiliary-row td {
  background: #ffffff;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-backdrop.bybit-review-panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(23, 33, 28, 0.5);
  padding: 8px;
}

.modal-card.operations-review-modal {
  width: min(1580px, calc(100vw - 16px));
  max-height: min(94vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.operations-review-header {
  align-items: center;
  background: #ffffff;
}

.operations-review-brand {
  min-height: 54px;
  display: flex;
  align-items: center;
}

.operations-review-text {
  display: none !important;
}

.operations-review-exchange-logo {
  display: flex;
  align-items: center;
}

.operations-review-exchange-logo .account-logo {
  width: 76px;
  height: 54px;
  border: 0;
  background: transparent;
  border-radius: 8px;
}

.operations-review-exchange-logo .account-logo img {
  padding: 2px;
}

.operations-review-header .modal-header-actions {
  flex-wrap: wrap;
}

.operations-review-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #f7faf8;
}

.operations-review-body .table-wrap {
  max-height: calc(min(94vh, 900px) - 112px);
  background: #ffffff;
}

.bybit-bank-cell {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 32px minmax(66px, 0.46fr) minmax(66px, 0.46fr);
  gap: 6px;
  align-items: center;
}

.bybit-bank-cell input,
.bybit-bank-cell select {
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.bybit-bank-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bybit-bank-logo .account-logo {
  width: 30px;
  height: 30px;
}

.operation-side-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.operation-side-sale {
  color: #08704f;
}

.operation-side-purchase {
  color: #b23535;
}

.empty-bank-logo {
  color: var(--muted);
  font-size: 0.68rem;
}

.bybit-bank-selected td {
  background: #e6f2ff;
}

.bybit-missing-client td {
  background: #ffe6e6;
}

.bybit-registered-order td {
  background: #ffecec;
}

.missing-client-label {
  color: var(--danger);
  font-weight: 900;
}

.registered-order-label {
  color: var(--danger);
  font-weight: 900;
  text-transform: uppercase;
}

.bybit-registered-order select,
.bybit-registered-order input {
  background: #eef3f1;
  color: var(--muted);
  cursor: not-allowed;
}

.operation-client-search {
  display: grid;
  gap: 4px;
}

.operation-client-search input {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.add-client-button {
  color: var(--accent-dark);
}

.bybit-client-detail-row td {
  background: #fffafa;
}

.bybit-client-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.bybit-consumer-final-toggle {
  min-height: 50px;
  border: 1px solid #cfd9d4;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  font-weight: 900;
}

.bybit-consumer-final-toggle:has(input:checked) {
  border-color: var(--accent);
  background: #e9f5f0;
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.1);
}

.bybit-consumer-final-toggle input {
  width: 16px;
  height: 16px;
}

.bybit-client-form input.locked-import-field {
  background: #eef3f0;
  color: var(--accent-dark);
  font-weight: 850;
  cursor: not-allowed;
}

.bybit-review-panel table {
  min-width: 0;
  table-layout: fixed;
}

.bybit-review-panel th,
.bybit-review-panel td {
  padding: 9px 8px;
  font-size: 0.78rem;
}

.bybit-review-panel th {
  font-size: 0.68rem;
  text-align: center;
}

.bybit-review-panel th.number {
  text-align: center;
}

.bybit-review-panel .account-code {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.bybit-review-panel .doc-meta {
  font-size: 0.74rem;
}

.bybit-review-panel .pill {
  padding: 4px 8px;
  font-size: 0.7rem;
}

.bybit-review-panel .row-action {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.bybit-review-panel th:nth-child(1),
.bybit-review-panel td:nth-child(1) {
  width: 6%;
}

.bybit-review-panel th:nth-child(2),
.bybit-review-panel td:nth-child(2) {
  width: 12%;
  overflow-wrap: anywhere;
}

.bybit-review-panel th:nth-child(3),
.bybit-review-panel td:nth-child(3) {
  width: 9%;
  overflow-wrap: anywhere;
}

.bybit-review-panel th:nth-child(4),
.bybit-review-panel td:nth-child(4) {
  width: 26%;
}

.bybit-review-panel th:nth-child(5),
.bybit-review-panel td:nth-child(5) {
  width: 8%;
}

.bybit-review-panel th:nth-child(6),
.bybit-review-panel td:nth-child(6) {
  width: 7%;
}

.bybit-review-panel th:nth-child(7),
.bybit-review-panel td:nth-child(7) {
  width: 8%;
}

.bybit-review-panel th:nth-child(8),
.bybit-review-panel td:nth-child(8) {
  width: 20%;
  overflow-wrap: anywhere;
}

.bybit-review-panel th:nth-child(9),
.bybit-review-panel td:nth-child(9) {
  width: 4%;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #ffffff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 0.86rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.pill.sale {
  background: #edf5ff;
  color: var(--blue);
}

.pill.purchase {
  background: #fff3df;
  color: var(--amber);
}

.pill.expensePurchase {
  background: #eef8ef;
  color: var(--accent-dark);
}

.pill.manualExpense {
  background: #fff7ed;
  color: var(--amber);
}

.pill.internalTransfer {
  background: #eef7f8;
  color: #23606a;
}

.pill.exchangeTransfer {
  background: #eef8ef;
  color: var(--accent-dark);
}

.pill.loanPayment,
.pill.journal {
  background: #f2f1fb;
  color: #4b4b86;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.row-action {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--danger);
  font-weight: 800;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(14, 44, 54, 0.045);
}

.pagination-nav-button,
.pagination-page-button,
.pagination-ellipsis {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #ffffff;
  color: #0f67c8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 750;
}

.pagination-nav-button:first-child {
  border-left: 0;
}

.pagination-nav-button {
  min-width: 82px;
}

.pagination-page-button {
  cursor: pointer;
}

.pagination-page-button.is-active {
  background: linear-gradient(135deg, #2378dc 0%, #18c1cf 100%);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.pagination-page-button:not(.is-active):hover,
.pagination-nav-button:not(:disabled):hover {
  background: #effbff;
  color: #005cb8;
}

.pagination-nav-button:disabled,
.pagination-page-button:disabled:not(.is-active) {
  color: #9da9a5;
  background: #f6f8f7;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--muted);
  cursor: default;
}

.document-layout {
  display: block;
}

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

.financial-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(120px, 1fr) minmax(160px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

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

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

.settings-wide {
  grid-column: span 3;
}

.tax-sections,
.service-form {
  display: grid;
  gap: 12px;
}

.taxes-settings-form {
  gap: 12px;
}

.tax-rates-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

#taxesPanel .settings-submodule {
  border-color: #cdded8;
  box-shadow: 0 10px 24px rgba(14, 44, 54, 0.045);
}

#taxesPanel .settings-submodule summary {
  min-height: 44px;
  padding: 0 14px;
  background: linear-gradient(90deg, #f3fbff 0%, #f7fffd 100%);
}

#taxesPanel .tax-rate-card .settings-grid {
  padding: 10px 12px 12px;
}

.tax-iva-grid {
  grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.tax-ice-grid {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

#taxesPanel .form-actions {
  margin-top: 0;
}

.service-form {
  margin-bottom: 14px;
}

.settings-submodule {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.settings-submodule summary {
  min-height: 42px;
  padding: 0 12px;
  background: #f8fbf9;
  color: var(--accent-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-submodule summary::-webkit-details-marker {
  display: none;
}

.settings-submodule summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.05rem;
}

.settings-submodule[open] summary::after {
  content: "-";
}

.settings-submodule-locked {
  opacity: 0.64;
}

.settings-submodule-locked summary {
  cursor: not-allowed;
  pointer-events: none;
}

.settings-submodule-locked summary::after,
.settings-submodule-locked[open] summary::after {
  content: "Bloqueado";
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-submodule .settings-grid {
  padding: 12px;
}

.profile-settings-form {
  gap: 14px;
}

.profile-accordion {
  display: grid;
  gap: 12px;
}

.profile-section {
  border-color: #cdded8;
  box-shadow: 0 8px 22px rgba(14, 44, 54, 0.04);
}

.profile-section[open] {
  box-shadow: 0 12px 30px rgba(14, 44, 54, 0.07);
}

.profile-section summary {
  min-height: 46px;
  padding: 0 16px;
  background: linear-gradient(90deg, #f5fbff 0%, #f8fffd 100%);
  color: var(--accent-dark);
}

.profile-section summary span {
  color: var(--accent-dark);
  letter-spacing: 0;
}

.profile-section .settings-grid {
  padding: 12px 16px 14px;
}

.profile-company-grid,
.profile-regime-settings-grid,
.profile-billing-grid {
  align-items: end;
}

.profile-company-grid .settings-wide,
.profile-regime-settings-grid .settings-wide,
.profile-billing-grid .settings-wide {
  grid-column: 1 / -1;
}

.profile-company-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(260px, 1fr);
}

.profile-field-stack {
  display: grid;
  gap: 10px;
}

.profile-regime-settings-grid {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr) minmax(150px, 0.85fr);
}

.profile-billing-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.profile-invoicing-toggle .inline-check-field {
  min-height: 50px;
  justify-content: flex-start;
  gap: 10px;
}

.profile-invoicing-toggle input:disabled + span {
  color: #7b8a84;
}

.profile-section .option-group {
  background: #f8fbfa;
}

.profile-section .inline-check-field {
  width: 100%;
  min-height: 50px;
}

.profile-logo-tools {
  display: grid;
  gap: 8px;
  align-self: stretch;
}

.profile-logo-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-file-upload,
.profile-signature-upload {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  cursor: pointer;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  gap: 8px;
  grid-template-columns: auto auto;
  padding: 8px 12px;
  font-weight: 900;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.profile-file-upload:hover,
.profile-signature-upload:hover {
  border-color: var(--accent);
  background: #f8fbfa;
  box-shadow: 0 0 0 3px rgba(29, 113, 86, 0.1);
}

.profile-file-upload-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--accent-cyan));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.profile-signature-upload {
  justify-content: start;
  grid-template-columns: auto auto minmax(0, 1fr);
}

.profile-signature-upload .field-hint {
  grid-column: 1 / -1;
  line-height: 1.2;
}

.profile-logo-tools .ghost-button {
  min-height: 46px;
}

.profile-signature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.profile-signature-actions {
  display: grid;
  align-content: end;
  gap: 6px;
}

.profile-signature-actions .primary-button {
  min-height: 48px;
}

.subscription-panel {
  display: none;
}

.subscription-panel.active {
  display: block;
}

.subscription-hero,
.subscription-current-card,
.subscription-plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.subscription-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  margin-bottom: 14px;
  border-top: 5px solid var(--accent-cyan);
  background: linear-gradient(135deg, #f8fffe 0%, #eefaff 100%);
}

.subscription-hero h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
}

.subscription-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.subscription-support-box {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 190px;
}

.subscription-support-box span {
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 950;
}

.subscription-current-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 18px;
  margin-bottom: 14px;
}

.subscription-current-main h3 {
  margin: 8px 0 4px;
  font-size: 2rem;
}

.subscription-current-main p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.subscription-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  background: #eaf9f7;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.subscription-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.subscription-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfa;
}

.subscription-facts span,
.subscription-plan-top span,
.subscription-annual-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-facts strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.subscription-plan-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.subscription-plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--blue));
}

.subscription-plan-card.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f4fffb 0%, #ffffff 72%);
}

.subscription-plan-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.subscription-plan-top strong {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.68rem;
}

.subscription-plan-card h3 {
  margin: 0;
  font-size: 1.7rem;
}

.subscription-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.subscription-price strong {
  font-size: 2.3rem;
  color: var(--accent-dark);
}

.subscription-price span {
  color: var(--muted);
  font-weight: 900;
}

.subscription-annual-note {
  margin: 0;
  text-transform: none;
}

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

.subscription-plan-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}

.subscription-plan-card li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 7px 0 0 var(--blue);
}

.subscription-update-button {
  margin-top: 4px;
  justify-content: center;
}

.subscription-wa-mark {
  min-width: 26px;
  min-height: 26px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 950;
}

@media (max-width: 980px) {
  .subscription-current-card,
  .subscription-plans-grid {
    grid-template-columns: 1fr;
  }

  .subscription-facts {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

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

  .subscription-support-box {
    justify-items: stretch;
  }
}

.profile-regime-group {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
}

.profile-regime-group .regime-code-field {
  display: grid;
  align-items: stretch;
  gap: 4px;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.profile-regime-group .regime-code-field input {
  width: 100%;
  height: auto;
  min-height: 34px;
}

.profile-regime-group .profile-taxpayer-card {
  min-height: 46px;
  border: 1px solid #e4ebe7;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.profile-regime-group .profile-taxpayer-card-with-code {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 180px);
  gap: 10px;
}

.profile-regime-group .profile-taxpayer-check {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.profile-rimpe-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-regime-group .profile-taxpayer-card input[type="checkbox"],
.profile-regime-group .profile-taxpayer-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.password-toggle {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.retention-search-grid {
  grid-template-columns: repeat(2, minmax(160px, 260px));
}

.retention-search-grid-wide {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.submodule-toolbar {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.submodule-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.tax-retention-table-wrap {
  margin: 0 12px 12px;
}

.tax-retention-table-wrap table {
  table-layout: fixed;
  min-width: 820px;
}

.vat-retention-table-wrap table {
  min-width: 1040px;
}

.retention-col-detail {
  width: 62%;
}

.retention-col-rate {
  width: 14%;
}

.retention-col-form,
.retention-col-annex {
  width: 12%;
}

.vat-retention-col-buyer {
  width: 28%;
}

.vat-retention-col-seller {
  width: 42%;
}

.vat-retention-col-concept {
  width: 18%;
}

.vat-retention-col-rate {
  width: 12%;
}

.tax-retention-table-wrap textarea,
.tax-retention-table-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 9px;
  font-size: 0.82rem;
}

.tax-retention-table-wrap textarea {
  min-height: 56px;
  resize: vertical;
  line-height: 1.35;
}

.retention-rate-input,
.retention-code-input {
  min-width: 0;
}

.service-logo-preview {
  min-height: 52px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.service-logo-upload {
  position: relative;
  display: block;
  cursor: pointer;
  align-self: end;
}

.service-logo-upload input {
  display: none;
}

.service-logo-upload:hover .service-logo-preview {
  border-color: var(--accent);
  background: #f8fbfa;
  box-shadow: 0 0 0 3px rgba(29, 113, 86, 0.1);
}

.service-logo-preview img {
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
}

.services-panel .service-toolbar {
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

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

.service-catalog-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, auto) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.service-catalog-card.base-service {
  border-color: rgba(29, 113, 86, 0.32);
  background: #fbfefd;
}

.service-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.service-card-main strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.service-card-main .account-code {
  margin-top: 4px;
}

.service-card-tax {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.service-card-tax span {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.service-card-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
}

.service-card-actions .row-action {
  color: var(--accent-dark);
}

.service-card-actions .service-delete-button {
  color: var(--danger);
}

.service-modal {
  width: min(860px, calc(100vw - 24px));
}

.service-modal .service-form {
  max-height: min(72vh, 660px);
  overflow: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 16px;
}

.service-modal input[readonly] {
  background: #f1f5f3;
  color: var(--muted);
  cursor: not-allowed;
}

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

.option-group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.option-group legend {
  padding: 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.option-group label {
  min-height: 34px;
  border: 1px solid #e4ebe7;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fbfcfb;
  font-weight: 760;
}

.option-group input {
  width: 16px;
  height: 16px;
}

.service-tax-layout .option-group {
  background: #f8fbfa;
  padding: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.service-tax-layout .option-group label {
  min-height: 36px;
  padding: 0 12px;
  background: #ffffff;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.service-tax-layout .option-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-tax-layout .option-group label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 113, 86, 0.14);
}

.service-tax-layout .option-group label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.72;
}

.service-tax-layout .option-group label:has(input:disabled:checked) {
  background: #e8f1ed;
  color: var(--accent-dark);
  border-color: #c9ddd4;
  box-shadow: none;
}

.service-table-logo {
  width: 44px;
  height: 44px;
  border-radius: 7px;
}

.profile-logo-preview {
  min-height: 84px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-logo-preview img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.ats-filters {
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr);
  max-width: 420px;
}

.bank-filters {
  grid-template-columns: minmax(240px, 420px);
}

.bank-account-form,
.balance-account-form,
.transfer-form {
  margin-bottom: 14px;
}

.transfers-panel.active {
  display: grid;
  gap: 14px;
}

#transfersPanel.transfers-panel.active,
#exchangeTransfersPanel.transfers-panel.active {
  gap: 12px;
}

#transfersPanel .transfer-module-header,
#exchangeTransfersPanel .transfer-module-header {
  display: none;
}

.transfer-module-header {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.transfer-company-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.transfer-company-logo {
  max-width: min(360px, 72vw);
  max-height: 92px;
  object-fit: contain;
}

.transfer-company-logo.doc-logo-placeholder {
  width: 180px;
  height: 86px;
  border-radius: 8px;
  font-size: 1.2rem;
}

.transfer-entry-card {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

#transfersPanel .transfer-entry-card,
#exchangeTransfersPanel .transfer-entry-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 4px 0 14px;
}

.transfer-form-grid {
  display: grid;
  grid-template-columns: minmax(118px, 145px) minmax(220px, 1.18fr) minmax(220px, 1.18fr) minmax(125px, 0.62fr) minmax(105px, 0.48fr) auto;
  gap: 12px;
  align-items: end;
}

#transfersPanel .transfer-form-grid,
#exchangeTransfersPanel .transfer-form-grid {
  grid-template-columns: minmax(118px, 145px) minmax(260px, 1.2fr) minmax(260px, 1.2fr) minmax(130px, 0.55fr) minmax(110px, 0.45fr) auto;
}

#transfersPanel .transfer-form-grid label,
#exchangeTransfersPanel .transfer-form-grid label {
  text-transform: uppercase;
}

.transfer-fee-field {
  display: grid;
  gap: 6px;
}

.transfer-fee-field > label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.transfer-fee-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.transfer-fee-control input[type="number"].is-auto-fee {
  background: #f4f8f6;
}

.transfer-fee-auto-check {
  width: 38px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.transfer-fee-auto-check:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 107, 84, 0.45);
}

.transfer-fee-auto-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.transfer-fee-auto-check span {
  width: 20px;
  height: 20px;
  border: 2px solid #b9c7c1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.transfer-fee-auto-check span::before {
  content: "✓";
}

.transfer-fee-auto-check input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.transfer-form-actions {
  align-self: end;
  justify-content: flex-end;
  margin-top: 0;
}

.transfer-form-actions .compact-button {
  min-width: 132px;
  min-height: 42px;
}

.transfer-bank-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: end;
}

.transfer-bank-preview {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#transfersPanel .transfer-bank-preview,
#exchangeTransfersPanel .transfer-bank-preview {
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
}

.transfer-bank-preview .account-logo {
  width: 30px;
  height: 30px;
}

.transfer-export-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

#transfersPanel .transfer-export-bar,
#exchangeTransfersPanel .transfer-export-bar {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 4px 0 14px;
}

.transfer-export-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.transfer-export-actions {
  grid-column: 3;
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
}

.transfer-export-actions .compact-button {
  min-height: 34px;
  min-width: 72px;
  padding: 0 14px;
}

.transfer-date-range-calendar {
  position: fixed;
  top: 50%;
  right: auto;
  left: 50%;
  z-index: 60;
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.transfer-date-range-calendar .date-range-months {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.transfer-records-wrap table {
  min-width: 900px;
}

#transfersPanel.transfer-records-wrap,
#transfersPanel .transfer-records-wrap,
#exchangeTransfersPanel .transfer-records-wrap {
  border: 0;
  border-radius: 0;
}

#transfersPanel .transfer-records-table,
#exchangeTransfersPanel .transfer-records-table {
  min-width: 860px;
}

.transfer-records-table th,
.transfer-records-table td {
  font-size: 0.88rem;
}

#transfersPanel .transfer-records-table th,
#transfersPanel .transfer-records-table td,
#exchangeTransfersPanel .transfer-records-table th,
#exchangeTransfersPanel .transfer-records-table td {
  padding: 10px 14px;
}

.transfer-bank-record {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 850;
}

.transfer-bank-record .account-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: 0 0 auto;
}

.transfer-bank-record > span:not(.account-logo) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.major-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
}

.major-hero h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.major-hero .toolbar-actions {
  align-items: center;
}

.major-filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(110px, 0.75fr) minmax(140px, 0.9fr) minmax(140px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

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

.major-logo-panel {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.major-company-logo {
  max-width: min(460px, 82vw);
  max-height: 118px;
  object-fit: contain;
}

.major-company-logo.doc-logo-placeholder {
  width: 220px;
  height: 102px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.major-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 8px 4px 12px;
}

.major-balance-card[hidden] {
  display: none;
}

.major-balance-card div {
  display: grid;
  gap: 4px;
}

.major-balance-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.major-balance-card strong {
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.major-balance-card p {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

#majorPanel.active {
  display: grid;
  gap: 10px;
}

#majorPanel .table-wrap {
  border: 0;
  border-radius: 0;
}

#majorPanel table {
  background: transparent;
}

#majorPanel th,
#majorPanel td {
  border-bottom-color: #edf3f1;
  padding: 9px 12px;
}

#majorPanel th {
  background: transparent;
  border-bottom: 1px solid #cbd9d4;
}

#majorPanel tbody tr:hover td {
  background: #f8fcfb;
}

.trial-balance-filters {
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(140px, 1fr) auto;
}

.trial-balance-table {
  min-width: 1080px;
  table-layout: fixed;
}

#trialBalancePanel.active {
  display: grid;
  gap: 10px;
}

#trialBalancePanel .table-wrap {
  border: 0;
  border-radius: 0;
}

#trialBalancePanel table {
  background: transparent;
}

.trial-balance-table th,
.trial-balance-table td {
  padding: 8px 10px;
  border-bottom-color: #edf3f1;
  vertical-align: middle;
}

.trial-balance-table th {
  background: transparent;
  border-bottom: 1px solid #cbd9d4;
  text-align: center;
  vertical-align: middle;
}

.trial-balance-table th:first-child {
  width: 135px;
}

.trial-balance-table th:nth-child(2) {
  width: 34%;
}

.trial-balance-table th:first-child,
.trial-balance-table td:first-child,
.trial-balance-table th:nth-child(2),
.trial-balance-table td:nth-child(2) {
  text-align: left;
}

.trial-balance-code-cell {
  color: var(--accent-dark);
  font-weight: 850;
  white-space: nowrap;
}

.trial-balance-account-cell {
  color: var(--ink);
  font-weight: 760;
  line-height: 1.25;
}

.trial-balance-group-row td {
  background: #f8fbfa;
  color: var(--accent-dark);
  font-weight: 900;
}

.trial-balance-group-row .trial-balance-account-cell {
  color: var(--accent-dark);
  font-weight: 900;
  text-transform: uppercase;
}

.trial-balance-total-row td {
  border-top: 1px solid #c9d5cf;
  background: #fbfdfc;
  color: var(--accent-dark);
  font-weight: 900;
}

.ledger-toolbar .toolbar-actions {
  width: 100%;
  justify-content: flex-end;
}

.ledger-toolbar .compact-button {
  min-width: 82px;
}

.ledger-logo-panel {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

#ledgerPanel.active {
  display: grid;
  gap: 10px;
}

#ledgerPanel .table-toolbar {
  margin-bottom: 0;
}

#ledgerPanel .financial-filters {
  margin-bottom: 6px;
}

#ledgerPanel .ledger-book-wrap {
  border: 0;
  border-radius: 0;
}

.ledger-company-logo {
  max-width: min(460px, 82vw);
  max-height: 118px;
  object-fit: contain;
}

.ledger-company-logo.doc-logo-placeholder {
  width: 220px;
  height: 102px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.ledger-book-table {
  min-width: 920px;
  table-layout: fixed;
}

.ledger-book-table th,
.ledger-book-table td {
  border-right: 0;
  padding-top: 9px;
  padding-bottom: 9px;
}

.ledger-book-table tbody td {
  border-bottom: 0;
}

.ledger-book-table th:last-child,
.ledger-book-table td:last-child {
  border-right: 0;
}

.ledger-book-table th:nth-child(1) {
  width: 116px;
}

.ledger-book-table th:nth-child(3) {
  width: 120px;
}

.ledger-book-table th:nth-child(4),
.ledger-book-table th:nth-child(5) {
  width: 140px;
}

.ledger-entry-start td {
  border-top: 1px solid #cddbd6;
  background: #ffffff;
}

.ledger-entry-spacer td {
  height: 10px;
  border: 0;
  background: transparent;
  padding: 0;
}

.ledger-date-cell {
  border-left: 1px solid #cddbd6;
  border-bottom: 1px solid #cddbd6 !important;
  color: var(--ink);
  font-weight: 750;
  vertical-align: middle;
  white-space: nowrap;
}

.ledger-entry-start td:last-child,
.ledger-account-row td:last-child,
.ledger-glosa-row td:last-child,
.ledger-total-row td:last-child {
  border-right: 1px solid #cddbd6;
}

.ledger-entry-number {
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.ledger-entry-title-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.ledger-entry-title-line > span {
  min-width: 0;
  text-align: center;
}

.ledger-action-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 0.9rem;
}

.ledger-entry-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ledger-edit-button {
  color: #8a6510;
}

.ledger-view-button {
  color: var(--accent-dark);
}

.ledger-description-cell {
  color: var(--ink);
}

.ledger-account-name {
  display: block;
  font-weight: 720;
}

.ledger-credit-account {
  padding-left: 28px;
}

.ledger-line-detail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.ledger-ref-cell {
  color: var(--accent-dark);
  font-weight: 850;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ledger-book-table th:nth-child(3) {
  text-align: left;
}

.ledger-glosa-row td {
  background: #ffffff;
}

.ledger-glosa-row .ledger-description-cell {
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.35;
}

.ledger-glosa-title {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.ledger-total-row td {
  border-top: 0;
  border-bottom: 1px solid #cddbd6;
  background: #ffffff;
  font-weight: 850;
}

.major-opening-row td {
  background: #fbfdfc;
  color: var(--muted);
  font-weight: 800;
}

.kardex-exchange-sections {
  display: grid;
  gap: 14px;
}

.kardex-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
}

.kardex-hero-title {
  display: grid;
  gap: 3px;
}

.kardex-hero-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.module-kicker {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
}

.kardex-exchange-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.kardex-exchange-tab {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  padding: 10px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.kardex-exchange-tab .account-logo {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  align-self: start;
  margin-top: 0;
}

.kardex-exchange-tab span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

.kardex-tab-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.kardex-exchange-tab.active .account-logo {
  border-color: rgba(255, 255, 255, 0.42);
}

.kardex-exchange-tab:hover {
  border-color: #b7c3bd;
  background: #f9fbfa;
}

.kardex-exchange-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.kardex-exchange-tab strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.kardex-exchange-tab.active strong {
  color: rgba(255, 255, 255, 0.82);
}

.kardex-exchange-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.kardex-exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: #fbfcfb;
  border-bottom: 1px solid var(--line);
}

.kardex-exchange-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.kardex-verification-control {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
  margin-top: 8px;
}

.kardex-verified-toggle,
.kardex-freeze-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kardex-freeze-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kardex-verified-toggle > span:first-child,
.kardex-freeze-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.kardex-freeze-field input {
  width: 82px;
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.84rem;
  text-align: right;
}

.kardex-freeze-field input[readonly] {
  background: #f1f5f4;
  color: var(--accent-dark);
  font-weight: 850;
}

.kardex-freeze-lock {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  cursor: pointer;
}

.kardex-freeze-lock input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.kardex-freeze-lock span {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: transparent;
  font-size: 0.9rem;
  font-weight: 900;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.kardex-freeze-lock input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.kardex-exchange-header span,
.kardex-balance span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.kardex-balance {
  display: grid;
  justify-items: end;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.kardex-balance strong {
  font-size: 1.18rem;
}

.kardex-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kardex-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.kardex-metric-strip div {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.kardex-metric-strip div:last-child {
  border-right: 0;
}

.kardex-metric-strip span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.kardex-metric-strip strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.kardex-counterparty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.kardex-counterparty .account-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: 0 0 auto;
}

.kardex-counterparty > span:not(.account-logo) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.kardex-opening-modal,
.kardex-export-modal {
  width: min(720px, calc(100vw - 24px));
}

.kardex-opening-modal .settings-form,
.kardex-export-modal .settings-form {
  padding: 16px;
}

.kardex-period-control {
  display: grid;
  gap: 8px;
}

.kardex-period-control > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

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

.kardex-period-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.kardex-period-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.kardex-opening-modal input[readonly] {
  background: #f1f5f4;
  color: var(--accent-dark);
  font-weight: 850;
}

.form104-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px 18px;
}

.sri-lockup,
.form104-document-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.sri-logo {
  flex: 0 0 auto;
  width: 156px;
  height: 72px;
  overflow: visible;
}

.sri-logo-text {
  fill: #0806a8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 112px;
  font-weight: 900;
}

.sri-logo-accent {
  fill: #e61f31;
}

.sri-logo-compact {
  width: 112px;
  height: 52px;
}

.form104-hero h2 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.form104-period-pill span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

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

.form104-control-bar {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(130px, 170px) minmax(170px, 220px) minmax(190px, 1fr);
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.form104-payable-card {
  justify-self: end;
  display: grid;
  gap: 4px;
  min-width: 190px;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  text-align: right;
}

.form104-payable-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form104-payable-card strong {
  color: #1215a8;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.ats-control-bar {
  grid-template-columns: minmax(150px, 190px) minmax(130px, 170px) repeat(3, minmax(150px, 1fr));
}

.form104-layout {
  display: grid;
  gap: 14px;
}

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

.form104-section h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.form104-document {
  overflow: hidden;
}

.form104-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.form104-header h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.form104-header span,
.form104-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.form104-header strong {
  font-size: 1rem;
  white-space: nowrap;
}

.form104-period-pill {
  display: grid;
  gap: 4px;
  min-width: 170px;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  text-align: right;
}

.form104-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.form104-meta div {
  display: grid;
  gap: 4px;
  background: #ffffff;
  padding: 11px 12px;
}

.form104-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.form104-metric {
  display: grid;
  gap: 5px;
  min-height: 74px;
  background: #ffffff;
  padding: 12px;
}

.form104-metric span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form104-metric strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.form104-metric.emphasis strong {
  color: #1215a8;
  font-size: 1.2rem;
}

.form104-section {
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.form104-section:last-child {
  border-bottom: 0;
}

.form104-code {
  color: #1215a8;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.form104-total-row td {
  background: #f4f7fb;
  font-weight: 850;
}

.form104-declare-modal,
.form104-history-modal {
  width: min(920px, 94vw);
}

.form104-declare-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.form104-declare-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.form104-declare-summary div {
  display: grid;
  gap: 5px;
  background: #ffffff;
  padding: 12px;
}

.form104-declare-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.form104-declare-summary strong {
  color: var(--ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.form104-declare-bank-row {
  display: grid;
  grid-template-columns: minmax(260px, 410px) minmax(90px, 120px);
  gap: 10px;
  align-items: end;
}

.form104-declare-payment-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.form104-declare-payment-line > .primary-button {
  min-height: 50px;
  padding-inline: 18px;
  white-space: nowrap;
}

.form104-declare-bank-row .select-with-logo {
  display: grid;
  grid-template-columns: 42px minmax(210px, 360px);
  gap: 8px;
  align-items: center;
}

.form104-declare-bank-row .inline-logo-slot {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.form104-declare-bank-row .logo-square,
.form104-declare-bank-row .logo-placeholder {
  width: 38px;
  height: 38px;
}

.form104-declare-bank-row select {
  min-width: 0;
}

.form104-declare-fee input {
  min-width: 0;
}

.form104-history-modal .table-wrap {
  padding: 18px;
}

.financial-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.financial-header h2 {
  margin: 0 0 4px;
}

.financial-header span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.financial-header strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.financial-report-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 12px;
  padding: 18px;
  text-align: center;
}

.financial-report-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.financial-report-heading strong {
  color: var(--ink);
  font-size: 1rem;
  text-transform: uppercase;
}

.financial-report-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.financial-report-heading span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.financial-auxiliary-row td {
  background: #fbfcfd;
}

.financial-result-summary-row td {
  background: #eafaf6;
  border-top: 2px solid var(--brand);
  font-weight: 900;
}

.financial-result-summary-row .account-code {
  color: transparent;
}

#financialsPanel .table-wrap th,
#financialsPanel .table-wrap td {
  padding: 8px 12px;
  line-height: 1.25;
}

#financialsPanel .table-wrap th {
  font-size: 0.72rem;
}

#financialsPanel .table-wrap td {
  font-size: 0.82rem;
  vertical-align: middle;
}

.financial-module-logo-wrap {
  display: inline-grid;
  align-items: center;
  min-height: 92px;
}

.financial-module-logo {
  max-width: min(340px, 58vw);
  max-height: 96px;
  object-fit: contain;
}

.financial-module-logo.doc-logo-placeholder {
  width: 112px;
  height: 86px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.modal-card.financial-history-modal {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.financial-history-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffffff;
  flex: 0 0 auto;
}

.financial-history-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 8px;
}

.financial-history-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 180px) auto auto minmax(160px, 1fr);
  gap: 10px;
  align-items: end;
}

.financial-history-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.financial-history-toolbar select {
  min-height: 40px;
}

.financial-history-toolbar .compact-button {
  min-width: 92px;
}

.financial-history-save-button {
  min-width: 112px;
}

.financial-history-save-status {
  align-self: center;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.financial-history-save-status.is-error {
  color: var(--danger);
}

.financial-history-table-wrap {
  height: 100%;
  min-height: 420px;
  max-height: none;
  overflow: auto;
}

.financial-history-table-wrap table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.financial-history-table-wrap th,
.financial-history-table-wrap td {
  padding: 4px 3px;
  vertical-align: middle;
}

.financial-history-table-wrap th {
  text-align: center;
  font-size: 0.62rem;
}

.financial-history-table-wrap th:first-child,
.financial-history-table-wrap td:first-child {
  width: 180px;
  text-align: left;
}

.financial-history-table-wrap th:nth-child(2),
.financial-history-table-wrap td:nth-child(2) {
  width: 42px;
  text-align: center;
}

.financial-history-table-wrap th:last-child,
.financial-history-table-wrap td:last-child {
  width: 38px;
  text-align: center;
}

.financial-history-table-wrap th:nth-last-child(2),
.financial-history-table-wrap td:nth-last-child(2) {
  width: 58px;
}

.financial-history-table-wrap th:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)):not(:last-child),
.financial-history-table-wrap td:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)):not(:last-child) {
  width: auto;
}

.financial-history-month-input {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 3px 3px;
  text-align: right;
  font-size: 0.58rem;
}

.financial-history-account-input {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.72rem;
}

.financial-history-row-error td {
  background: #fff4f4;
}

.financial-history-account-input.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(165, 56, 56, 0.12);
}

.financial-history-delete-icon {
  display: block;
  width: 17px;
  height: 17px;
  margin: auto;
  fill: currentColor;
}

.historical-account-suggestions {
  max-width: min(720px, calc(100vw - 24px));
}

#financialHistoryModal {
  padding: 0;
}

@media (max-width: 900px) {
  .financial-history-toolbar {
    grid-template-columns: 1fr;
  }

  .financial-history-table-wrap {
    min-height: 360px;
  }
}

.client-tools {
  max-width: none;
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.client-tools label {
  width: min(460px, 100%);
}

.clients-panel .table-toolbar {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 10px;
  justify-content: flex-end;
}

.clients-panel .table-toolbar h2,
.clients-panel #clientsImportStatus {
  display: none;
}

.client-manual-form {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.client-manual-modal {
  width: min(820px, 100%);
  position: relative;
}

.client-manual-modal .client-manual-form {
  max-height: min(76vh, 704px);
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  padding: 8px 16px 16px;
}

.client-modal-close-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
}

.client-modal-close-button {
  color: var(--danger);
  font-size: 1.25rem;
  line-height: 1;
}

.client-manual-modal input[readonly] {
  background: #f1f5f3;
  color: var(--muted);
  cursor: not-allowed;
}

.manual-client-document-field {
  position: relative;
  z-index: 4;
}

.client-document-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.client-document-suggestion {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.client-document-suggestion:hover,
.client-document-suggestion:focus-visible {
  background: #eef7f3;
  outline: none;
}

.client-document-suggestion strong {
  color: var(--accent-dark);
  font-size: 0.88rem;
}

.client-document-suggestion span,
.client-document-suggestion small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-document-suggestion small {
  color: var(--muted);
  font-size: 0.76rem;
}

.clients-panel .settings-grid {
  align-items: end;
}

.clients-panel .form-actions {
  margin: 0;
}

.client-save-action {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.client-save-action .primary-button {
  min-width: 118px;
}

.manual-client-exchanges {
  display: grid;
  gap: 6px;
}

.manual-client-exchanges > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.client-exchange-row td {
  padding-top: 0;
  background: #fbfcfb;
}

.client-exchange-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.client-exchange-badge {
  display: inline-flex;
  cursor: help;
}

.client-exchange-badge .account-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.58rem;
}

.client-exchange-badge .account-logo img {
  padding: 3px;
}

.clients-table-wrap {
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 28, 22, 0.05);
}

.clients-table-wrap table {
  min-width: 860px;
  table-layout: fixed;
}

.clients-table th {
  background: #f7fbfa;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: left;
  border-bottom: 1px solid #dfe8e4;
}

.clients-table th,
.clients-table td {
  padding: 13px 16px;
}

.clients-table th:nth-child(1),
.clients-table td:nth-child(1) {
  width: 16%;
}

.clients-table th:nth-child(2),
.clients-table td:nth-child(2) {
  width: 34%;
}

.clients-table th:nth-child(3),
.clients-table td:nth-child(3) {
  width: 16%;
}

.clients-table th:nth-child(4),
.clients-table td:nth-child(4) {
  width: 26%;
}

.clients-table th:nth-child(5),
.clients-table td:nth-child(5) {
  width: 8%;
  text-align: right;
}

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

.client-row td {
  vertical-align: middle;
  border-bottom: 1px solid #edf3f1;
}

.client-row:last-child td {
  border-bottom: 0;
}

.client-name-cell strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.client-exchanges-cell .doc-meta {
  font-size: 0.78rem;
}

.client-actions-cell {
  white-space: nowrap;
}

.client-actions-cell .row-action {
  min-width: 34px;
  min-height: 34px;
  margin-left: 3px;
  border-color: transparent;
  background: #f6faf8;
  color: var(--accent-dark);
  font-size: 0.95rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.client-actions-cell .row-action:hover {
  transform: translateY(-1px);
  border-color: #cfe4dd;
  background: #eaf8f3;
}

.client-delete-button {
  color: var(--danger);
  background: #fff7f7 !important;
}

.client-delete-button:hover {
  border-color: #f0c7c7 !important;
  background: #ffecec !important;
}

.client-edit-exchange-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(82px, max-content));
  gap: 12px;
  align-items: start;
}

.client-exchange-selector-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 82px;
}

.client-exchange-logo-button {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.client-exchange-logo-button:hover {
  border-color: #b7c3bd;
  background: #f8fbfa;
}

.client-exchange-logo-button:disabled {
  cursor: default;
}

.client-exchange-selector-item.selected .client-exchange-logo-button {
  border-color: var(--accent-dark);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.2);
  transform: translateY(-1px);
}

.client-exchange-selector-item.locked .client-exchange-logo-button {
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.28);
}

.client-exchange-selector-item.selected .account-logo {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.client-exchange-logo-button .account-logo {
  width: 38px;
  height: 38px;
}

.client-exchange-selector-item input {
  width: 120px;
  min-height: 34px;
  padding: 6px 8px;
  text-align: center;
}

.client-exchange-selector-item input[readonly] {
  background: #eef4f1;
  color: var(--muted);
  cursor: not-allowed;
}

.purchases-panel {
  display: none;
  gap: 14px;
}

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

.purchase-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 12px;
}

.purchase-company-logo-panel {
  display: none;
  align-items: center;
  min-height: 74px;
}

.purchase-company-logo {
  max-width: min(280px, 52vw);
  max-height: 82px;
  object-fit: contain;
}

.purchase-company-logo.doc-logo-placeholder {
  width: 150px;
  height: 74px;
  border-radius: 8px;
  font-size: 1.15rem;
}

.purchase-import-actions {
  justify-content: flex-end;
  width: 100%;
}

.purchase-query-panel {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 280px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  justify-content: start;
  position: relative;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
  overflow: visible;
}

.purchase-query-panel .compact-button {
  min-height: 44px;
  grid-column: 4;
}

.purchase-date-range-calendar {
  position: fixed;
  top: 50%;
  right: auto;
  left: 50%;
  z-index: 60;
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.purchase-date-range-calendar .date-range-months {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.purchase-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.purchase-bank-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.purchase-bank-display .account-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: 0 0 auto;
}

.purchase-records-wrap table {
  min-width: 0;
}

.purchase-records-wrap {
  border: 0;
  border-radius: 0;
}

.purchase-records-table {
  table-layout: fixed;
}

.purchase-records-table th,
.purchase-records-table td {
  padding: 10px 8px;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-records-table td {
  border-bottom-color: rgba(193, 211, 205, 0.65);
}

.purchase-records-table th {
  font-size: 0.66rem;
}

.purchase-records-table .doc-meta {
  font-size: 0.74rem;
}

.purchase-access-key {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.purchase-records-table .purchase-bank-display {
  gap: 6px;
  font-size: 0.76rem;
  line-height: 1.15;
}

.purchase-records-table .purchase-bank-display .account-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.purchase-col-date {
  width: 7%;
}

.purchase-col-doc {
  width: 12%;
}

.purchase-col-provider {
  width: 16%;
}

.purchase-col-access {
  width: 18%;
}

.purchase-col-retention {
  width: 10%;
}

.purchase-col-bank {
  width: 14%;
}

.purchase-col-money {
  width: 6%;
}

.purchase-col-money-small {
  width: 5%;
}

.purchase-col-action {
  width: 4%;
}

.purchase-delete-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pending {
  background: #fff7ed;
  color: var(--amber);
}

.status-locked {
  background: #fff1f2;
  color: var(--danger);
}

.purchase-import-modal {
  width: min(1180px, calc(100vw - 24px));
}

.purchase-import-form {
  padding: 16px;
  max-height: calc(min(82vh, 760px) - 76px);
  overflow: auto;
}

.purchase-import-table-wrap {
  margin: 0;
}

.purchase-import-duplicate-row {
  background: #fff8f8;
}

.purchase-import-bank-field {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 250px;
}

.purchase-import-expense-select {
  min-width: 260px;
}

.purchase-import-bank-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4faf7;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.purchase-import-bank-logo .account-logo {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.purchase-import-footer {
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.purchase-import-footer span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.purchase-form,
.loan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.purchase-layout > .purchase-form:only-child {
  grid-column: 1 / -1;
}

.expense-module-header {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  margin-bottom: 14px;
  min-height: 110px;
}

.expense-company-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  width: 100%;
}

#expensesPanel.active {
  display: grid;
  gap: 12px;
}

.expense-layout {
  margin-bottom: 0;
  position: relative;
  z-index: 8;
}

.expense-entry-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
  border-top: 0;
  overflow: visible;
}

.expense-form-grid {
  display: grid;
  grid-template-columns: 190px minmax(280px, 1.3fr) minmax(240px, 0.95fr) 150px;
  gap: 10px;
  align-items: end;
}

.expense-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.expense-account-field {
  position: relative;
  z-index: 40;
}

.expense-account-suggestions {
  top: calc(100% + 4px);
  max-height: min(360px, calc(100vh - 250px));
  z-index: 80;
}

.expense-account-suggestions.floating-suggestions {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 10000;
}

.damger-autocomplete-suggestions {
  max-height: min(360px, calc(100vh - 96px));
  overflow: auto;
}

.expense-account-suggestion strong {
  font-size: 0.82rem;
}

.expense-account-suggestion span {
  font-size: 0.8rem;
}

.expense-reference-field {
  grid-column: 1 / -1;
}

.expense-form-grid input,
.expense-form-grid select {
  min-height: 38px;
  font-size: 0.86rem;
}

.expense-bank-control {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.expense-bank-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 0;
  font-weight: 900;
}

.expense-bank-logo .account-logo {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.expense-form-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.expense-summary-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 8px 20px;
  border-left: 3px solid #05d4e8;
  background: transparent;
  padding: 10px 12px;
}

.expense-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.expense-summary-line span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-summary-line strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.expense-records-wrap table {
  min-width: 0;
}

.expense-records-wrap {
  border: 0;
  border-radius: 0;
}

.expense-records-table {
  table-layout: fixed;
}

.expense-records-table th,
.expense-records-table td {
  padding: 10px 9px;
  font-size: 0.82rem;
  line-height: 1.25;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.expense-records-table td {
  border-bottom-color: rgba(193, 211, 205, 0.65);
}

.expense-records-table th {
  font-size: 0.68rem;
}

.expense-records-table td strong {
  color: var(--ink);
}

.expense-bank-display {
  gap: 7px;
  font-size: 0.78rem;
}

.expense-bank-display .account-logo {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
}

.expense-col-date {
  width: 10%;
}

.expense-col-account {
  width: 28%;
}

.expense-col-reference {
  width: 24%;
}

.expense-col-bank {
  width: 23%;
}

.expense-col-amount {
  width: 11%;
}

.expense-col-action {
  width: 4%;
}

@media (max-width: 980px) {
  .expense-form-grid,
  .expense-form-footer,
  .expense-summary-box {
    grid-template-columns: minmax(0, 1fr);
  }
}

.purchase-form h3,
.loan-card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.loan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.loan-card-header span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.loan-card-header strong {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.opening-input {
  min-width: 120px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.helper-text,
.warning-box {
  color: var(--muted);
  font-size: 0.88rem;
}

.helper-text {
  margin: 12px 0 0;
}

.warning-box {
  display: none;
  border: 1px solid #e2c48b;
  border-radius: 8px;
  background: #fff8e8;
  color: #69470c;
  margin-bottom: 12px;
  padding: 11px 12px;
}

.warning-box.active {
  display: block;
}

.supercias-brand-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  margin-bottom: 14px;
  border: 1px solid #cddde9;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 18px;
}

.supercias-brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 86px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #0b64a7;
  color: #ffffff;
  box-shadow: inset 0 -5px 0 #0aa1bd;
}

.supercias-brand-mark::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -13px;
  width: 120px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  transform: rotate(-7deg);
  opacity: 0.95;
}

.supercias-brand-mark span {
  position: absolute;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.15rem;
  font-weight: 400;
  line-height: 1;
}

.supercias-letter-s {
  left: 8px;
  top: 3px;
}

.supercias-letter-c {
  left: 32px;
  top: 7px;
}

.supercias-brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: #005696;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.supercias-brand-copy strong {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 400;
}

.supercias-brand-copy span {
  font-size: clamp(0.78rem, 1.4vw, 1rem);
  font-weight: 700;
  text-transform: uppercase;
}

.supercias-preview-wrap,
[data-pagination="supercias-preview"] {
  display: none !important;
}

.supercias-preview-wrap {
  margin-bottom: 12px;
}

.supercias-row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(23, 33, 28, 0.46);
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(900px, 100%);
  max-height: min(82vh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.modal-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.modal-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.supercias-txt-modal pre {
  max-height: calc(min(82vh, 760px) - 74px);
  margin: 0;
  overflow: auto;
  background: #f7faf8;
  color: #14211b;
  padding: 16px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre;
}

.document-list {
  display: block;
  min-width: 0;
}

.manual-invoice-modal {
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100vh - 12px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.manual-invoice-header {
  border-top: 4px solid #05d4e8;
  background: linear-gradient(90deg, #f7fcff 0%, #ffffff 72%);
}

.manual-invoice-header h3 {
  margin: 0;
  letter-spacing: 0;
  font-size: 1.15rem;
}

.manual-invoice-header span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: #eefcff;
  color: #1269ff;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.manual-invoice-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.manual-invoice-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  align-items: start;
}

.manual-invoice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  align-items: end;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 12px;
}

.manual-invoice-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.manual-invoice-grid label:nth-child(1) {
  grid-column: span 1;
}

.manual-invoice-client-field {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
}

.manual-invoice-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.manual-invoice-grid label:nth-child(4) {
  grid-column: span 1;
}

.manual-invoice-grid label:nth-child(5) {
  grid-column: span 1;
}

.manual-invoice-grid label:nth-child(6),
.manual-invoice-grid label:nth-child(7),
.manual-invoice-grid label:nth-child(8) {
  grid-column: 1 / -1;
}

.manual-invoice-exchange-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
  gap: 12px;
  align-items: end;
}

.manual-invoice-exchange-row label {
  min-width: 0;
}

.manual-invoice-client-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.manual-invoice-grid input,
.manual-invoice-grid select {
  min-height: 38px;
  font-size: 0.88rem;
}

.manual-invoice-client-control .square-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  background: transparent;
  color: #1269ff;
  font-size: 1.35rem;
  font-weight: 1000;
  box-shadow: none;
}

.manual-invoice-client-control .square-button:hover {
  background: #eafcff;
  color: #05d4e8;
}

.manual-invoice-client-suggestions {
  top: calc(100% - 14px);
}

.manual-invoice-select-control {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.manual-invoice-select-logo {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  font-weight: 900;
}

.manual-invoice-select-logo .account-logo {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.manual-invoice-select-logo .account-logo img {
  padding: 2px;
}

.manual-invoice-exchange-user {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-invoice-exchange-user.is-empty {
  color: var(--muted);
}

.manual-invoice-client-field small {
  min-height: 16px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.manual-invoice-client-field small.manual-invoice-client-selected {
  color: var(--accent-dark);
}

.manual-invoice-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-left: 3px solid #05d4e8;
  background: #fbfdfd;
  padding: 10px 12px;
  align-self: start;
}

.manual-invoice-summary > div,
.manual-invoice-summary > span,
.manual-invoice-summary-row,
.manual-invoice-summary-empty {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.manual-invoice-summary h4 {
  margin: 0 0 8px;
  color: #1269ff;
  font-size: 0.78rem;
  font-weight: 1000;
}

.manual-invoice-summary span,
.manual-invoice-summary-empty {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
}

.manual-invoice-summary strong {
  color: var(--ink);
  font-size: 1rem;
  text-align: right;
}

.manual-invoice-summary strong.ok {
  color: var(--accent-dark);
}

.manual-invoice-summary strong.warning {
  color: var(--danger);
}

.modal-form-actions {
  display: flex;
  justify-content: flex-end;
}

.manual-invoice-actions {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  z-index: 3;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(11, 27, 32, 0.06);
}

.nested-client-modal {
  z-index: 42;
}

@media (max-width: 760px) {
  .manual-invoice-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .manual-invoice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-invoice-grid label,
  .manual-invoice-client-field,
  .manual-invoice-exchange-row,
  .manual-invoice-grid label:nth-child(1),
  .manual-invoice-grid label:nth-child(3),
  .manual-invoice-grid label:nth-child(4),
  .manual-invoice-grid label:nth-child(5),
  .manual-invoice-grid label:nth-child(6),
  .manual-invoice-grid label:nth-child(7),
  .manual-invoice-grid label:nth-child(8) {
    grid-column: 1 / -1;
  }

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

  .manual-invoice-exchange-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.document-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.document-button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.document-button strong,
.document-button span {
  display: block;
}

.document-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.document-filters {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) minmax(0, 180px);
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow);
}

.document-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.document-filters label[hidden] {
  display: none;
}

.document-filters:has(label[hidden]) {
  grid-template-columns: 180px minmax(240px, 520px);
}

.document-filters input,
.document-filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
}

.document-register-wrap {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.document-register-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.document-register-table th,
.document-register-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  vertical-align: middle;
}

.document-register-table th {
  background: #f6faf8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: left;
}

.document-register-table tr:last-child td {
  border-bottom: 0;
}

.document-register-row {
  background: #ffffff;
}

.document-register-row.selected {
  background: #eff8f4;
  box-shadow: inset 4px 0 0 var(--accent);
}

.document-register-row.voided {
  background: #fff7f7;
  box-shadow: inset 4px 0 0 #b13a3a;
}

.document-register-row.voided.selected {
  background: #fff1f1;
  box-shadow: inset 4px 0 0 #b13a3a;
}

.document-register-row.voided td strong {
  color: #7d2929;
}

.document-register-row.voided .document-action-button {
  background: #fffafa;
  border-color: #f0c7c7;
}

.document-register-table td strong,
.document-register-table td span {
  display: block;
}

.document-register-table td strong {
  color: var(--ink);
  font-weight: 900;
}

.document-register-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.document-register-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.document-register-table th:nth-child(1),
.document-register-table td:nth-child(1),
.document-register-table th:nth-child(2),
.document-register-table td:nth-child(2),
.document-register-table th:nth-child(3),
.document-register-table td:nth-child(3) {
  white-space: nowrap;
}

.document-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

@media (max-width: 780px) {
  .document-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.document-action-button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.document-action-button.has-status {
  width: 42px;
  height: 48px;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
}

.document-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
}

.document-action-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-action-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 1000;
  line-height: 1;
}

.document-action-check.pending {
  visibility: hidden;
}

.document-action-check.ready {
  background: #ddf8ea;
  color: #08743e;
  box-shadow: inset 0 0 0 1px #9bdcb8;
}

.document-action-button:hover {
  border-color: #05d4e8;
  background: #eefcff;
  color: #1269ff;
}

.document-action-button.danger {
  color: var(--danger);
}

.document-action-button.warning {
  color: #b57900;
}

.document-action-button.warning:hover {
  border-color: #f0b429;
  background: #fff8e6;
  color: #9a5f00;
}

.document-action-button.danger:hover {
  border-color: var(--danger);
  background: #fff3f3;
}

.invoice-annul-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(94vh, 860px);
  overflow: auto;
}

.invoice-annul-guide {
  margin: 16px 20px 18px;
  border: 1px solid #bdeef2;
  border-top: 4px solid #05d4e8;
  border-radius: 8px;
  background: linear-gradient(180deg, #f5fdff 0%, #ffffff 100%);
  color: var(--ink);
  padding: 14px;
}

.invoice-annul-guide > strong {
  display: block;
  margin-bottom: 12px;
  color: #0f3057;
  font-size: 0.95rem;
}

.invoice-annul-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.invoice-annul-steps span {
  display: grid;
  align-content: center;
  min-height: 58px;
  border: 1px solid #d6e2e3;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.invoice-annul-steps b {
  display: block;
  margin-bottom: 3px;
  color: #1269ff;
  font-size: 0.68rem;
  letter-spacing: 0;
}

.invoice-annul-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  padding: 0 20px;
}

.invoice-annul-grid label {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.invoice-annul-grid label > span:first-child {
  min-width: 0;
}

.invoice-annul-grid input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
  font-size: 0.88rem;
}

.invoice-annul-grid label > input {
  grid-column: 2;
}

.invoice-annul-copy-row {
  grid-column: auto;
}

.copy-field {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.copy-field .document-action-button {
  width: 42px;
  min-width: 42px;
  height: 36px;
  padding: 0;
  color: #1269ff;
  border-radius: 4px;
}

.invoice-annul-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 16px 20px 0;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.invoice-annul-footer span {
  min-width: 90px;
  color: #1269ff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

@media (max-width: 920px) {
  .invoice-annul-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .invoice-annul-steps {
    grid-template-columns: 1fr;
  }

  .invoice-annul-grid label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .invoice-annul-grid label > input,
  .copy-field {
    grid-column: auto;
  }
}

.document-status {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.document-status.draft {
  background: #fff4df;
  color: var(--amber);
}

.document-status.internal {
  background: #edf2f7;
  color: var(--blue);
}

.document-status.pending {
  background: #eef3f0;
  color: var(--muted);
}

.document-status.authorized {
  background: #e5f6ee;
  color: var(--accent-dark);
}

.document-status.voided {
  background: #fff0f0;
  color: var(--danger);
}

.document-preview {
  min-height: 580px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
}

#documentRideModal {
  padding: 18px;
}

.document-ride-modal {
  width: min(980px, calc(100vw - 36px));
  max-height: min(92vh, 940px);
}

.document-ride-body {
  max-height: calc(min(92vh, 940px) - 74px);
  overflow: auto;
  background: #f5f6f4;
  padding: 14px;
  text-align: center;
}

.document-ride-body .invoice-sheet,
.document-ride-body .doc-header,
.document-ride-body .doc-grid,
.document-ride-body .totals-box {
  background: #ffffff;
}

.document-ride-body .invoice-sheet {
  display: inline-grid;
  width: min(900px, 100%);
  text-align: left;
  margin: 0 auto;
}

.ride-pdf-export-source {
  position: fixed;
  left: -12000px;
  top: 0;
  width: 920px;
  background: #ffffff;
  pointer-events: none;
  z-index: 1;
}

.ride-pdf-export-source .invoice-sheet {
  width: 900px;
  max-width: none;
  margin: 0;
  box-shadow: none;
}

.ride-pdf-export-source .invoice-items {
  overflow: visible;
}

.ride-pdf-export-source .liquidation-items {
  overflow: visible;
}

.ride-pdf-export-source .invoice-items table {
  min-width: 0;
}

.ride-pdf-export-source .liquidation-items table {
  min-width: 0;
}

.doc-logo {
  display: block;
  width: 128px;
  min-height: 58px;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.doc-logo-placeholder {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.doc-title {
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.doc-grid div,
.totals-box div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
}

.doc-grid span,
.totals-box span {
  color: var(--muted);
}

.totals-box {
  width: min(360px, 100%);
  margin-left: auto;
  display: grid;
  gap: 8px;
}

.totals-box .grand-total {
  border-bottom: 0;
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
}

.invoice-sheet {
  --accent: #1269ff;
  --accent-cyan: #05d4e8;
  --accent-dark: #073fbd;
  --line: #c8e7f2;
  --muted: #526a78;
  --ink: #17212b;
  display: grid;
  width: min(900px, 100%);
  margin: 0 auto;
  gap: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c7e8f2;
  border-top: 6px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(18, 105, 255, 0.1);
}

.liquidation-sheet {
  border-top-color: var(--accent-cyan);
  gap: 13px;
  box-shadow: 0 12px 30px rgba(5, 212, 232, 0.12);
}

.liquidation-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.liquidation-brand,
.liquidation-document-card,
.liquidation-party,
.liquidation-flow,
.liquidation-note,
.liquidation-totals {
  border: 1px solid #d5e3df;
  border-radius: 7px;
  background: #ffffff;
}

.liquidation-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  justify-items: stretch;
  padding: 14px;
}

.liquidation-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #d8eef5;
  padding-bottom: 11px;
}

.liquidation-logo {
  width: 136px;
  max-width: 136px;
  min-height: 54px;
  height: auto;
  object-fit: contain;
}

.liquidation-company-data h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.12;
  text-align: center;
}

.liquidation-company-data p,
.liquidation-party div,
.liquidation-doc-grid p,
.liquidation-doc-list p,
.liquidation-flow-card p,
.liquidation-totals div {
  margin: 0;
}

.liquidation-company-data p,
.liquidation-party div,
.liquidation-doc-list p {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 4px 0;
  font-size: 0.82rem;
}

.liquidation-company-data span,
.liquidation-party span,
.liquidation-doc-grid span,
.liquidation-doc-list span,
.liquidation-flow-card span,
.liquidation-totals span,
.liquidation-note h3 {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.liquidation-company-data strong,
.liquidation-party strong,
.liquidation-doc-grid strong,
.liquidation-doc-list strong,
.liquidation-flow-card strong,
.liquidation-totals strong {
  color: var(--ink);
  font-weight: 1000;
  overflow-wrap: anywhere;
  min-width: 0;
}

.liquidation-document-card {
  padding: 12px;
}

.liquidation-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, #1269ff 0%, #05d4e8 100%);
  color: #ffffff;
  padding: 12px 14px;
}

.liquidation-doc-head span,
.liquidation-doc-head strong {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 1000;
}

.liquidation-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.liquidation-doc-grid p {
  border: 1px solid #d8eef5;
  border-radius: 7px;
  background: #f7fcfd;
  padding: 9px 10px;
}

.liquidation-doc-grid span,
.liquidation-doc-grid strong {
  display: block;
}

.liquidation-doc-grid strong {
  margin-top: 4px;
  font-size: 0.88rem;
}

.liquidation-doc-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.liquidation-doc-list p {
  border-bottom: 1px solid #d8eef5;
  padding: 7px 2px;
  font-size: 0.84rem;
}

.liquidation-doc-list p:last-child {
  border-bottom: 0;
}

.liquidation-party {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  column-gap: 18px;
  padding: 10px 14px;
}

.liquidation-party div {
  border-bottom: 1px solid #e1ece9;
}

.liquidation-party div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.liquidation-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #d8eef5;
  border-radius: 7px;
  background: #fbfdfe;
  padding: 9px 10px;
}

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

.liquidation-flow-card .account-logo {
  width: 38px;
  height: 38px;
}

.liquidation-flow-card strong {
  display: block;
}

.liquidation-flow-card strong {
  font-size: 0.94rem;
}

.liquidation-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1269ff;
  font-size: 1.4rem;
  font-weight: 1000;
}

.liquidation-items {
  overflow-x: auto;
}

.liquidation-items table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.liquidation-items th,
.liquidation-items td {
  border: 1px solid #d5e3df;
  padding: 9px 10px;
  vertical-align: top;
}

.liquidation-items th {
  background: #eef7f8;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 1000;
  text-align: left;
  text-transform: uppercase;
}

.liquidation-items .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.liquidation-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: start;
}

.liquidation-note {
  padding: 13px 14px;
}

.liquidation-note h3 {
  margin: 0 0 7px;
}

.liquidation-note p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.liquidation-totals {
  display: grid;
  gap: 0;
  padding: 8px 12px;
}

.liquidation-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1ece9;
  padding: 8px 0;
}

.liquidation-totals div:last-child {
  border-bottom: 0;
}

.liquidation-totals .liquidation-grand-total {
  margin-top: 4px;
  border-radius: 7px;
  border-bottom: 0;
  background: linear-gradient(90deg, rgba(18, 105, 255, 0.1), rgba(5, 212, 232, 0.14));
  padding: 10px;
}

.liquidation-totals .liquidation-grand-total strong {
  color: #073fbd;
  font-size: 1.05rem;
}

@media (max-width: 820px) {
  .liquidation-top,
  .liquidation-party,
  .liquidation-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .liquidation-party div:nth-last-child(-n + 2) {
    border-bottom: 1px solid #e1ece9;
  }

  .liquidation-party div:last-child {
    border-bottom: 0;
  }

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

  .liquidation-flow-arrow {
    transform: rotate(90deg);
  }
}

.invoice-top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: 14px;
}

.invoice-emitter,
.invoice-auth,
.invoice-customer,
.invoice-extra,
.invoice-totals {
  border: 1px solid #d5e3df;
  border-radius: 7px;
  background: #ffffff;
}

.invoice-emitter,
.invoice-auth,
.invoice-extra,
.invoice-totals {
  padding: 14px;
}

.invoice-emitter-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.invoice-logo {
  width: 118px;
  max-width: 118px;
  min-height: 58px;
  height: auto;
  object-fit: contain;
}

.invoice-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 5px;
  border-radius: 999px;
  background: #e4f7f2;
  color: var(--accent-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 4px 8px;
}

.invoice-emitter h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.invoice-muted-line {
  margin: 5px 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.76rem !important;
  font-weight: 850;
}

.invoice-info-list {
  display: grid;
  gap: 7px;
}

.invoice-info-list p {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.invoice-info-list .invoice-emitter-name-row strong {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 0.73rem;
}

.invoice-info-list .invoice-accounting-row {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 4px;
}

.invoice-info-list .invoice-accounting-row span {
  white-space: nowrap;
}

.invoice-info-list span {
  color: var(--muted);
  font-weight: 850;
}

.invoice-info-list strong {
  color: var(--ink);
  font-weight: 760;
}

.invoice-emitter-logo-only {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 82px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d7f3fb;
}

.invoice-emitter-logo-only .invoice-logo {
  width: 158px;
  max-width: 100%;
  min-height: 66px;
}

.invoice-auth {
  border-color: #98ddf1;
  background: linear-gradient(180deg, #ffffff 0%, #f6fcff 100%);
}

.invoice-auth-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--accent-dark) 0%, var(--accent) 58%, var(--accent-cyan) 100%);
  color: #ffffff;
  padding: 11px 12px;
}

.invoice-auth-head span {
  font-size: 1rem;
  font-weight: 950;
}

.invoice-auth-head strong {
  justify-self: end;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

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

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

.invoice-auth-list > div:not(.invoice-auth-pair),
.invoice-auth-pair p,
.invoice-access-panel {
  border: 1px solid #c8e7f2;
  border-radius: 7px;
  background: #f6fcff;
  padding: 9px 10px;
  min-width: 0;
}

.invoice-auth-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.invoice-auth-pair p {
  margin: 0;
}

.invoice-auth-list span,
.invoice-access-panel > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-auth-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.invoice-access-panel {
  margin-top: 9px;
  background: #ffffff;
}

.invoice-access-key {
  display: block;
  max-width: 100%;
  color: #25312b !important;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.72rem !important;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invoice-barcode-block {
  display: grid;
  gap: 0;
  margin-top: 6px;
}

.invoice-access-barcode {
  display: block;
  width: 100%;
  height: 38px;
  background: #ffffff;
}

.invoice-access-barcode rect {
  fill: #111111;
}

.invoice-barcode-block span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.invoice-regime {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px !important;
  border-radius: 999px;
  background: #e5fbff;
  color: var(--accent-dark) !important;
  font-weight: 900;
  padding: 6px 9px;
  font-size: 0.76rem !important;
}

.invoice-number {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.invoice-customer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #c8e7f2;
}

.invoice-customer div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  min-height: 46px;
  background: #ffffff;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}

.invoice-customer span,
.invoice-extra-row span,
.invoice-payment-row span,
.invoice-totals span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-customer strong,
.invoice-extra-row strong,
.invoice-payment-row strong {
  font-size: 0.82rem;
  line-height: 1.3;
}

.invoice-items.table-wrap {
  border-color: #c8e7f2;
  border-radius: 7px;
  overflow: hidden;
}

.invoice-items table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border: 0;
  font-size: 0.76rem;
}

.invoice-items thead th {
  background: #e7f8ff;
  color: var(--accent-dark);
  border-bottom: 1px solid #bee5f2;
  font-size: 0.68rem;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
}

.invoice-items tbody td {
  border-bottom: 0;
}

.invoice-items th,
.invoice-items td {
  padding: 9px 8px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.invoice-items .invoice-code-cell {
  width: 74px;
}

.invoice-items .invoice-qty-cell {
  width: 74px;
}

.invoice-items .invoice-desc-cell {
  width: 31%;
}

.invoice-items .invoice-unit-price-cell {
  width: 76px;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 14px;
  align-items: start;
}

.invoice-extra h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.invoice-extra-row,
.invoice-payment-row,
.invoice-totals div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid #dce8e4;
  padding: 8px 0;
  overflow-wrap: anywhere;
}

.invoice-extra-row {
  grid-template-columns: 130px minmax(0, 1fr);
  margin-bottom: 14px;
}

.invoice-payment-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.invoice-payment-row small {
  color: var(--muted);
  font-weight: 800;
}

.invoice-totals {
  display: grid;
  gap: 0;
  font-variant-numeric: tabular-nums;
  background: #fbfefd;
}

.invoice-totals div:last-child {
  border-bottom: 0;
}

.invoice-grand-total {
  margin-top: 5px;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 12px !important;
  font-size: 1rem;
  font-weight: 900;
}

.invoice-grand-total span,
.invoice-grand-total strong {
  color: #ffffff;
}

@media (max-width: 820px) {
  .invoice-top,
  .invoice-bottom {
    grid-template-columns: 1fr;
  }

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

  .invoice-auth-head {
    grid-template-columns: 1fr;
  }

  .invoice-auth-head strong {
    justify-self: start;
  }
}

.account-code {
  color: var(--accent-dark);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  .summary-grid,
  .major-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .side-nav {
    position: static;
  }

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

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

  .tax-rates-row {
    grid-template-columns: 1fr;
  }

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

  .profile-company-grid,
  .profile-regime-settings-grid,
  .profile-billing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-logo-tools,
  .profile-regime-group,
  .profile-signature-grid {
    grid-column: 1 / -1;
  }

  .profile-regime-group,
  .profile-rimpe-row {
    grid-template-columns: 1fr;
  }

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

  .journal-header-grid,
  .journal-form-footer,
  .accounting-book-header,
  .profile-signature-grid,
  .service-catalog-card {
    grid-template-columns: 1fr;
  }

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

  .journal-header-grid .settings-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 16px;
  }

  .topbar,
  .brand-lockup,
  .document-layout,
  .tax-iva-grid,
  .tax-ice-grid,
  .opening-grid,
  .purchase-layout,
  .invoice-top,
  .invoice-bottom,
  .invoice-customer,
  .financial-filters,
  .major-filters,
  .major-hero,
  .financial-header,
  .kardex-exchange-header,
  .loan-card-header,
  .form104-header,
  .form104-meta,
  .doc-header,
  .doc-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .kardex-balance {
    justify-items: start;
  }

  .kardex-header-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .kardex-metric-strip {
    grid-template-columns: 1fr;
  }

  .kardex-metric-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kardex-metric-strip div:last-child {
    border-bottom: 0;
  }

  .kardex-period-options {
    grid-template-columns: 1fr;
  }

  .journal-header-grid .settings-wide {
    grid-column: auto;
  }

  .top-actions {
    justify-content: stretch;
  }

  .app-logo {
    width: 118px;
    height: 64px;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .operations-panel .operation-exchange-buttons {
    justify-content: flex-start;
  }

  .operations-panel .exchange-load-button {
    flex: 1 1 140px;
  }

  .summary-grid,
  .major-summary-grid,
  .dashboard-balance-layout,
  .dashboard-sales-total,
  .field-row,
  .form104-control-bar,
  .form104-summary-strip,
  .operations-import-board,
  .transfer-export-bar,
  .transfer-form-grid,
  .transfer-bank-field,
  .bybit-bank-cell,
  .bybit-client-form,
  .side-nav,
  .settings-grid,
  .profile-signature-grid,
  .profile-company-grid,
  .profile-regime-settings-grid,
  .profile-billing-grid,
  .profile-regime-group,
  .profile-rimpe-row,
  .service-tax-layout,
  .service-catalog-card,
  .bank-statement-switch,
  .bank-movement-top-row,
  .bank-movement-type-buttons,
  .bank-movement-direction-buttons,
  .bank-movement-entry-row,
  .bank-movement-amount-row,
  .cash-audit-config-form,
  .cash-audit-tools,
  .bank-statement-filter-bar,
  .bank-reconciliation-bar,
  .bank-statement-control-row {
    grid-template-columns: 1fr;
  }

  .bank-statement-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .cash-audit-export-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .cash-audit-export-actions .compact-button,
  .transfer-export-actions .compact-button {
    flex: 1;
  }

  .transfer-export-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .dashboard-sales-panel {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .dashboard-sales-total {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .settings-wide {
    grid-column: auto;
  }

  .form104-hero,
  .form104-header {
    display: grid;
    align-items: start;
  }

  .form104-actions {
    justify-content: stretch;
  }

  .form104-actions > * {
    flex: 1 1 auto;
  }

  .form104-payable-card,
  .form104-period-pill {
    justify-self: stretch;
    text-align: left;
  }

  .sri-logo {
    width: 118px;
    height: 54px;
  }

  .supercias-brand-panel {
    gap: 10px;
    padding: 12px;
  }

  .supercias-brand-mark {
    width: 64px;
    height: 54px;
  }

  .supercias-brand-mark span {
    font-size: 3.1rem;
  }

  .supercias-letter-s {
    left: 6px;
    top: 2px;
  }

  .supercias-letter-c {
    left: 24px;
    top: 5px;
  }

  .supercias-brand-copy strong {
    font-size: 1.28rem;
  }

  .supercias-brand-copy span {
    font-size: 0.68rem;
  }

  .document-preview {
    min-height: 0;
    padding: 18px;
  }

  .profile-section summary {
    align-items: flex-start;
    padding: 11px 14px;
  }

  .profile-taxpayer-card-with-code {
    grid-template-columns: 1fr;
  }

  .profile-logo-actions {
    align-items: stretch;
  }

  .profile-logo-actions > * {
    flex: 1 1 140px;
  }
}

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

  .topbar,
  .summary-grid,
  .side-nav,
  .operation-panel,
  .tabs,
  .document-list,
  .table-toolbar,
  #operationsPanel,
  #ledgerPanel,
  #kardexPanel,
  #accountsPanel {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .data-panel,
  .tab-panel,
  .document-layout,
  .document-preview {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    display: block !important;
  }
}
