:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #20242a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #175cd3;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dde3ea;
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr auto auto;
  min-height: 64px;
  padding: 0 28px;
}

.brand {
  color: #111827;
  font-weight: 700;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 8px;
}

.nav-links > a,
.nav-trigger {
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 11px 12px;
}

.nav-links > a:hover,
.nav-group:hover .nav-trigger,
.nav-trigger:hover {
  background: #eef4ff;
  color: #175cd3;
}

.nav-product .nav-trigger {
  background: #eff4ff;
  color: #175cd3;
}

.nav-product:hover .nav-trigger,
.nav-product:focus-within .nav-trigger {
  background: #175cd3;
  color: #ffffff;
}

.nav-group {
  position: relative;
}

.nav-group::after {
  bottom: -12px;
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
}

.nav-trigger::after {
  content: "v";
  font-size: 10px;
  margin-left: 7px;
}

.nav-group:hover .nav-trigger::after {
  content: "^";
}

.nav-menu {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.12);
  display: none;
  gap: 4px;
  left: 0;
  min-width: 210px;
  padding: 8px;
  position: absolute;
  top: 100%;
  z-index: 20;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  display: grid;
}

.nav-menu a {
  border-radius: 6px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 11px;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: #f2f4f7;
  color: #175cd3;
}

.profile-menu {
  justify-self: end;
}

.active-company {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #d8e1eb;
  border-radius: 10px;
  color: #344054;
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 8px 12px;
}

.active-company:hover {
  background: #eef4ff;
  border-color: #b7c9ed;
}

.active-company span,
.company-context-card span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.active-company strong,
.company-context-card strong {
  color: #101828;
  font-size: 14px;
  line-height: 1.2;
}

.profile-trigger {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #d8e1eb;
  border-radius: 999px;
  color: #344054;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 6px 12px 6px 6px;
}

.profile-trigger:hover {
  background: #eef4ff;
}

.profile-avatar {
  align-items: center;
  background: linear-gradient(135deg, #175cd3, #ff7a00);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  width: 32px;
}

.profile-name {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 2px;
  line-height: 1.05;
  text-align: left;
}

.profile-name small {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
}

.status-pill {
  background: #fff4e5;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #b54708;
  display: inline-block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  margin-left: 8px;
  padding: 3px 8px;
  vertical-align: middle;
}

.profile-dropdown {
  left: auto;
  right: 0;
}

.profile-page {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.35fr) minmax(420px, 0.65fr);
}

.profile-photo-card,
.profile-details-card {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.profile-photo-large {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #173b78, #175cd3 54%, #ff7a00);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  font-size: 54px;
  font-weight: 900;
  justify-content: center;
  margin: 0 auto;
  max-width: 180px;
  object-fit: cover;
  overflow: hidden;
  width: 72%;
}

img.profile-avatar,
img.profile-photo-large {
  display: block;
}

.shell {
  margin: 0 auto;
  max-width: min(1760px, calc(100vw - 56px));
  padding: 32px clamp(20px, 3vw, 44px);
}

.public-shell {
  max-width: none;
  padding: 0;
}

.app-release {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  margin: -18px auto 22px;
  max-width: min(1760px, calc(100vw - 56px));
  padding: 0 clamp(20px, 3vw, 44px);
  text-align: right;
}

.login-hero {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 122, 0, 0.18), transparent 26%),
    radial-gradient(circle at 78% 74%, rgba(32, 92, 196, 0.22), transparent 30%),
    linear-gradient(135deg, #070b15 0%, #0b1426 48%, #111827 100%);
  color: #ffffff;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  overflow: hidden;
  padding: 34px clamp(24px, 5vw, 80px);
  position: relative;
}

.login-hero::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(30deg, transparent 0 48%, rgba(255, 122, 0, 0.12) 48% 49%, transparent 49%),
    linear-gradient(150deg, transparent 0 48%, rgba(22, 93, 214, 0.14) 48% 49%, transparent 49%);
  background-size: 72px 72px, 72px 72px, 118px 118px, 118px 118px;
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.42;
  position: absolute;
  right: 0;
  top: 0;
}

.login-hero::before {
  background: linear-gradient(180deg, transparent, rgba(255, 122, 0, 0.14), rgba(23, 92, 211, 0.12));
  bottom: -12%;
  content: "";
  height: 46%;
  left: 0;
  position: absolute;
  right: 0;
}

.login-nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

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

.brand-lockup span {
  color: #d0d5dd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-logo {
  border-radius: 6px;
  display: block;
  height: 42px;
  mix-blend-mode: screen;
  object-fit: contain;
  opacity: 0.96;
  width: 132px;
}

.login-stage {
  align-items: center;
  align-self: center;
  display: grid;
  gap: clamp(38px, 7vw, 118px);
  grid-template-columns: minmax(520px, 1.08fr) minmax(360px, 430px);
  justify-self: stretch;
  margin: 36px auto 0;
  max-width: 1320px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-product {
  max-width: 820px;
}

.product-kicker {
  color: #ff8a00;
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-top: 22px;
  text-transform: uppercase;
}

.login-product h1 {
  color: #ffffff;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
  margin: 18px 0 0;
  max-width: 760px;
}

.login-product p {
  color: #d0d5dd;
  font-size: 20px;
  line-height: 1.5;
  margin-top: 22px;
  max-width: 680px;
}

.login-highlights {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  max-width: 760px;
}

.login-highlights span {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid #ff8a00;
  border-radius: 8px;
  color: #f2f4f7;
  font-size: 13px;
  font-weight: 800;
  padding: 14px 16px;
}

.login-workspace {
  display: grid;
  justify-items: stretch;
}

.login-card {
  background: rgba(9, 18, 34, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
  display: grid;
  gap: 16px;
  max-width: none;
  padding: 32px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-card::before {
  background: linear-gradient(90deg, #ff8a00, #1d5fd1);
  border-radius: 8px 8px 0 0;
  content: "";
  height: 4px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}

.card-kicker {
  color: #ffb36b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card h2 {
  color: #ffffff;
  font-size: 30px;
  margin-bottom: 2px;
}

.login-card label span {
  color: #d0d5dd;
}

.login-card input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.login-card input:focus {
  border-color: #ff8a00;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.16);
  outline: none;
}

.login-card button {
  background: #ff7a00;
  box-shadow: 0 18px 34px rgba(255, 122, 0, 0.24);
  margin-top: 8px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 10px;
}

h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

p {
  color: #55606d;
  margin: 0;
}

.field-help {
  font-size: 13px;
  margin-bottom: 8px;
}

.inline-alert {
  border: 1px solid #b9d6ff;
  border-radius: 8px;
  color: #17345d;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.inline-alert.success {
  background: #eef6ff;
}

.inline-alert.error {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.page-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

.reports-home {
  display: grid;
  gap: 18px;
}

.module-page {
  display: grid;
  gap: 18px;
}

.reports-hero {
  align-items: end;
  background: linear-gradient(135deg, #101828, #173b78);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  min-height: 180px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.reports-hero::after {
  background:
    linear-gradient(30deg, transparent 0 48%, rgba(255, 122, 0, 0.24) 48% 49%, transparent 49%),
    linear-gradient(150deg, transparent 0 48%, rgba(255, 255, 255, 0.12) 48% 49%, transparent 49%);
  background-size: 76px 76px;
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.42;
  position: absolute;
  right: 0;
  top: 0;
}

.reports-hero > * {
  position: relative;
  z-index: 1;
}

.reports-hero h1 {
  color: #ffffff;
  font-size: 38px;
  margin-bottom: 10px;
}

.reports-hero p {
  color: #d0d5dd;
  font-size: 17px;
  max-width: 680px;
}

.eyebrow {
  color: #ffb36b;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.reports-count {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  min-width: 130px;
  padding: 16px;
  text-align: center;
}

.reports-count strong {
  color: #ffffff;
  display: block;
  font-size: 42px;
  line-height: 1;
}

.reports-count span {
  color: #e4e7ec;
  font-size: 13px;
}

.intelligence-home-hero {
  min-height: 210px;
}

.intelligence-home-hero h1 {
  max-width: 760px;
}

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

.module-strip a {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  color: #101828;
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px;
}

.module-strip a:hover {
  border-color: #84adff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.07);
}

.module-strip span {
  color: #667085;
  font-size: 13px;
}

.client-report-board {
  display: grid;
  gap: 14px;
}

.client-report-panel {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.client-report-panel > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.client-report-panel h2 {
  margin: 0;
}

.client-report-panel > header strong {
  align-items: center;
  background: #eff4ff;
  border: 1px solid #d1e0ff;
  border-radius: 8px;
  color: #175cd3;
  display: flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  min-width: 58px;
}

.report-tile-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.report-tile {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #101828;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px 1fr auto;
  min-height: 82px;
  padding: 12px;
  transition: 140ms ease;
}

.report-tile:hover {
  background: #ffffff;
  border-color: #84adff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.report-tile-index {
  align-items: center;
  background: #175cd3;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.report-tile-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-tile-main strong,
.report-tile-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-tile-main small,
.report-tile-meta {
  color: #667085;
  font-size: 12px;
}

.report-tile-meta {
  white-space: nowrap;
}

.access-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.access-overview article {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.access-overview span {
  color: #667085;
}

.finance-hero {
  min-height: 150px;
}

.module-filters {
  margin-bottom: 0;
}

.module-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-summary article {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 18px;
}

.module-summary span {
  color: #667085;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.module-summary strong {
  color: #111827;
  display: block;
  font-size: 28px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.module-tabs {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.module-tabs a {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #344054;
  font-weight: 700;
  padding: 10px 12px;
}

.module-tabs a:hover {
  background: #eff4ff;
  border-color: #d1e0ff;
  color: #175cd3;
}

.module-tabs a.active {
  background: #175cd3;
  border-color: #175cd3;
  color: #ffffff;
}

.module-tabs .tab-action {
  background: #175cd3;
  border-color: #175cd3;
  color: #ffffff;
}

.module-tabs .tab-action:hover {
  background: #0f4bb8;
  border-color: #0f4bb8;
  color: #ffffff;
}

.crm-switcher {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 420px) auto;
  padding: 14px;
}

.crm-switcher label {
  display: grid;
  gap: 6px;
}

.crm-switcher span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-switcher select {
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 6px;
  min-height: 42px;
  padding: 9px 10px;
}

.crm-entry .crm-switcher {
  max-width: 720px;
}

.module-grid {
  display: grid;
  gap: 16px;
}

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

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

.module-card {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.connection-panel {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  padding: 14px;
}

.connection-panel span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.connection-panel strong {
  color: #111827;
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.module-tag {
  background: #eff4ff;
  border-radius: 999px;
  color: #175cd3;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  white-space: nowrap;
}

.module-tag.ok {
  background: #ecfdf3;
  color: #067647;
}

.module-tag.warn {
  background: #fffaeb;
  color: #b54708;
}

.module-tag.danger {
  background: #fef3f2;
  color: #b42318;
}

.table-action {
  background: #eff4ff;
  border: 1px solid #d1e0ff;
  border-radius: 6px;
  color: #175cd3;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  margin-left: 10px;
  padding: 4px 8px;
  vertical-align: middle;
}

.table-action:hover {
  background: #175cd3;
  border-color: #175cd3;
  color: #ffffff;
}

.muted {
  color: #667085;
  font-size: 12px;
}

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

.crm-hero {
  background: linear-gradient(135deg, #101828, #1d4b5f);
}

.payroll-hero {
  background: linear-gradient(135deg, #101828, #32513c);
}

.payroll-workspace {
  scroll-behavior: smooth;
}

.payroll-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
}

.compact-selector {
  align-items: end;
  grid-template-columns: minmax(260px, 420px) auto;
}

.company-context-card {
  align-items: center;
}

.company-context-strip {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 14px;
}

.company-context-strip span {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.company-context-strip strong {
  font-size: 14px;
}

.compact-selector label,
.payroll-config-panel label {
  display: grid;
  gap: 6px;
}

.compact-selector span,
.payroll-config-panel span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-selector select,
.payroll-config-panel select {
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 6px;
  min-height: 42px;
  padding: 9px 10px;
}

.payroll-parameter-grid {
  align-items: start;
}

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

.employee-workbench {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(420px, 0.85fr) minmax(520px, 1.15fr);
}

.employee-workbench-wide {
  grid-template-columns: 1fr;
}

.employee-master,
.employee-detail {
  display: grid;
  gap: 16px;
}

.employee-search-panel {
  gap: 10px;
  padding: 12px 14px;
}

.employee-search-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 0.45fr) minmax(320px, 1fr) auto;
}

.employee-search-form h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.employee-search-form p {
  font-size: 13px;
  margin: 0;
}

.employee-search-results {
  background: #fbfcfe;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.employee-search-results h3 {
  font-size: 15px;
  margin: 0 0 2px;
}

.employee-search-results p {
  font-size: 13px;
  margin: 0;
}

.employee-search-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

.employee-list {
  max-height: 520px;
  overflow: auto;
}

.employee-list-horizontal {
  max-height: 240px;
}

.employee-list table {
  min-width: 560px;
}

.selected-row td {
  background: #eef4ff;
}

.employee-detail-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 0;
  padding: 10px 14px;
}

.employee-detail-head h2 {
  font-size: 18px;
  margin: 4px 0;
}

.employee-detail-head p {
  font-size: 13px;
  margin: 0;
}

.employee-detail-tabs {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
}

.employee-detail-tabs a {
  border-radius: 6px;
  color: #344054;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 10px 12px;
}

.employee-detail-tabs a.active,
.employee-detail-tabs a:hover {
  background: #175cd3;
  color: #ffffff;
}

.employee-tab-panel {
  display: none;
}

.employee-tab-panel:target,
.employee-tab-panel.is-active {
  display: block;
}

.employee-detail:not(:has(.employee-tab-panel:target)) #dados-funcionario {
  display: block;
}

.employee-full-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-full-form label:nth-child(2) {
  grid-column: span 2;
}

.fixed-value-grid {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}

.fixed-value-row {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, 0.55fr) minmax(180px, 1fr) minmax(90px, 0.45fr);
  padding: 10px 12px;
}

.fixed-value-row:last-child {
  border-bottom: 0;
}

.fixed-value-head {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.fixed-value-row small {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.stacked-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.compact-table {
  margin-top: 10px;
}

.payroll-preview-table table {
  min-width: 1280px;
}

.payslip-page {
  background: #e9eef5;
  min-height: calc(100vh - 64px);
  padding: 24px;
}

.payslip-sheet {
  background: #ffffff;
  border: 1px solid #d8e1eb;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.12);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  min-height: 277mm;
  padding: 18mm;
  width: 210mm;
}

.payslip-head,
.payslip-total,
.payslip-signatures,
.payslip-values {
  display: grid;
  gap: 14px;
}

.payslip-head {
  align-items: center;
  border-bottom: 2px solid #101828;
  grid-template-columns: 1fr auto;
  padding-bottom: 14px;
}

.payslip-head span,
.payslip-identification span,
.payslip-total span,
.payslip-signatures span {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payslip-head h1 {
  margin: 4px 0 0;
}

.payslip-identification {
  border: 1px solid #d8e1eb;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payslip-identification div,
.payslip-total div {
  border-bottom: 1px solid #edf1f5;
  padding: 10px 12px;
}

.payslip-identification div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.payslip-values {
  grid-template-columns: 1fr 1fr;
}

.payslip-values article {
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  overflow: hidden;
}

.payslip-values h2 {
  background: #f8fafc;
  margin: 0;
  padding: 10px 12px;
}

.payslip-values table {
  border-collapse: collapse;
  width: 100%;
}

.payslip-values td {
  border-top: 1px solid #edf1f5;
  padding: 9px 12px;
}

.payslip-total {
  border: 1px solid #d8e1eb;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payslip-total div {
  border-bottom: 0;
  border-right: 1px solid #edf1f5;
}

.payslip-total div:last-child {
  border-right: 0;
}

.payslip-signatures {
  align-items: end;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
}

.payslip-signatures div {
  border-top: 1px solid #101828;
  padding-top: 8px;
  text-align: center;
}

.payroll-toggle-list label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-weight: 800;
  gap: 10px;
  padding: 12px;
}

.payroll-toggle-list input {
  height: 18px;
  width: 18px;
}

.payroll-status-card {
  align-content: start;
}

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

.payroll-progress span {
  background: linear-gradient(90deg, #175cd3, #ff7a00);
  display: block;
  height: 100%;
}

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

.payroll-step-grid div {
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
}

.payroll-step-grid strong {
  align-items: center;
  background: #175cd3;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.payroll-step-grid span {
  color: #182230;
  font-weight: 800;
}

.payroll-step-grid em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.payroll-facts,
.payroll-rule-list,
.payroll-checklist {
  display: grid;
  gap: 10px;
}

.payroll-facts div,
.payroll-rule-list div,
.payroll-checklist label {
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  padding: 12px;
}

.payroll-facts span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payroll-facts strong {
  color: #111827;
  display: block;
  font-size: 24px;
  margin-top: 4px;
}

.payroll-facts small,
.payroll-rule-list span {
  color: #667085;
  display: block;
  margin-top: 4px;
}

.payroll-rule-list div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 0.6fr) minmax(220px, 1fr) auto;
}

.payroll-checklist label {
  align-items: center;
  color: #344054;
  display: flex;
  font-weight: 800;
  gap: 10px;
}

.payroll-checklist input {
  height: 18px;
  width: 18px;
}

.finance-suite-hero {
  background: linear-gradient(135deg, #101828, #17416f 52%, #0d2e34);
}

.product-hero {
  background: linear-gradient(135deg, #101828, #31514a 52%, #17345d);
}

.finance-suite-tabs button {
  margin-top: 0;
}

.finance-suite-panel {
  display: none;
  gap: 18px;
}

.finance-suite-panel.active {
  display: grid;
}

.finance-suite-form {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.finance-cert-alert {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.finance-cert-alert em {
  background: #dcfae6;
  border-radius: 999px;
  color: #067647;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
}

.finance-danfe {
  background: #ffffff;
  border: 2px solid #111827;
  border-radius: 6px;
  color: #111827;
  display: grid;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
}

.finance-danfe[hidden] {
  display: none;
}

.finance-danfe-head,
.finance-danfe-values {
  align-items: center;
  border-bottom: 1px dashed #111827;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.finance-danfe-values {
  border-bottom: 0;
  border-top: 1px dashed #111827;
  padding-bottom: 0;
  padding-top: 10px;
}

.statement-list {
  display: grid;
  gap: 0;
}

.statement-list div {
  align-items: center;
  border-bottom: 1px solid #e6ebf0;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
}

.statement-list div:last-child {
  border-bottom: 2px solid #cbd5e1;
  color: #111827;
}

.statement-list span {
  font-weight: 800;
  white-space: nowrap;
}

.pbi-card pre {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  color: #182230;
  font-family: Consolas, "Courier New", monospace;
  overflow: auto;
  padding: 14px;
}

.funnel-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.pipeline-kpis article {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.pipeline-kpis span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-kpis strong {
  color: #111827;
  font-size: 24px;
}

.funnel-stage {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr;
  min-height: 220px;
  min-width: 220px;
  padding: 10px;
}

.funnel-stage header {
  border-bottom: 1px solid #e6ebf0;
  display: grid;
  gap: 3px;
  padding: 4px 4px 10px;
}

.funnel-stage h2 {
  color: #111827;
  font-size: 16px;
  margin: 0;
}

.funnel-stage header strong {
  color: #175cd3;
  font-size: 18px;
}

.funnel-stage header span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.funnel-stage.won header strong {
  color: #067647;
}

.funnel-stage.lost header strong {
  color: #b42318;
}

.funnel-stage-stack {
  align-content: start;
  display: grid;
  gap: 10px;
}

.funnel-empty {
  border: 1px dashed #c8d2de;
  border-radius: 8px;
  color: #667085;
  font-size: 13px;
  padding: 16px 10px;
  text-align: center;
}

.funnel-deal {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-left: 4px solid #175cd3;
  border-radius: 6px;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.funnel-deal.late {
  border-left-color: #b42318;
}

.funnel-deal-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.funnel-deal-head strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

.funnel-deal-head span {
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
}

.funnel-deal p {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.funnel-deal dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.funnel-deal dl div {
  display: grid;
  gap: 2px;
}

.funnel-deal dt {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.funnel-deal dd {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.funnel-deal small {
  color: #667085;
  line-height: 1.4;
}

.funnel-actions {
  align-items: center;
  border-top: 1px solid #edf1f5;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 9px;
}

.funnel-actions em {
  background: #eff4ff;
  border-radius: 999px;
  color: #175cd3;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 8px;
}

.funnel-deal.late .funnel-actions em {
  background: #fef3f2;
  color: #b42318;
}

.funnel-actions a {
  color: #175cd3;
  font-size: 12px;
  font-weight: 800;
}

.cash-dashboard {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 138, 0, 0.16), transparent 24%),
    linear-gradient(135deg, #17115f 0%, #25167c 48%, #150d46 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(20, 24, 80, 0.18);
  color: #ffffff;
  display: grid;
  gap: 18px;
  margin: 22px 0;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.dre-dashboard {
  background:
    radial-gradient(circle at 80% 8%, rgba(23, 201, 100, 0.18), transparent 24%),
    linear-gradient(135deg, #101828 0%, #193b5f 52%, #111827 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(20, 24, 80, 0.18);
  color: #ffffff;
  display: grid;
  gap: 18px;
  margin: 22px 0;
  overflow: hidden;
  padding: 22px;
}

.product-dashboard {
  background:
    radial-gradient(circle at 82% 12%, rgba(23, 201, 100, 0.16), transparent 24%),
    linear-gradient(135deg, #101828 0%, #1c4d42 50%, #17345d 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.16);
  color: #ffffff;
  display: grid;
  gap: 18px;
  margin: 22px 0;
  overflow: hidden;
  padding: 22px;
}

.product-kpis {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.product-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(360px, 0.7fr) minmax(520px, 1.3fr);
}

.product-panel {
  padding: 18px;
}

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

.product-panel-head h3 {
  margin: 0;
}

.abc-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.abc-filter-actions a {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  min-width: 38px;
  padding: 8px 10px;
  text-decoration: none;
}

.abc-filter-actions a.active,
.abc-filter-actions a:hover {
  background: #ffffff;
  color: #1c4d42;
}

.abc-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.abc-stack div {
  display: grid;
  gap: 7px;
}

.abc-stack span {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
}

.abc-stack b,
.abc-stack em {
  color: #ffffff;
  font-style: normal;
}

.abc-stack i {
  border-radius: 999px;
  display: block;
  height: 9px;
}

.abc-stack small {
  color: #cbd5e1;
}

.abc-a {
  background: linear-gradient(90deg, #17c964, #84cc16);
}

.abc-b {
  background: linear-gradient(90deg, #f79009, #facc15);
}

.abc-c {
  background: linear-gradient(90deg, #f04438, #fb7185);
}

.product-ranking i {
  background: linear-gradient(90deg, #17c964, #2e90fa);
}

.product-rank-main {
  align-items: center;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 0;
  text-align: left;
  width: 100%;
}

.product-rank-main:hover b {
  text-decoration: underline;
}

.product-rank-main span {
  min-width: 0;
}

.product-thumb {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  height: 36px;
  object-fit: contain;
  width: 42px;
}

.product-thumb-empty {
  align-items: center;
  color: #cbd5e1;
  display: inline-flex;
  font-size: 9px;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
}

.product-ranking-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
}

.product-ranking-scroll::-webkit-scrollbar {
  width: 8px;
}

.product-ranking-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.product-ranking-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}

.product-detail-backdrop {
  align-items: center;
  background: rgba(16, 24, 40, 0.64);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.product-detail-backdrop[hidden] {
  display: none;
}

.product-detail-modal {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.34);
  color: #101828;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(220px, 0.65fr) minmax(260px, 1fr);
  max-height: min(88vh, 720px);
  max-width: 900px;
  overflow: auto;
  padding: 24px;
  position: relative;
  width: min(900px, 100%);
}

.product-detail-close {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
}

.product-detail-media {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 280px;
  padding: 18px;
}

.product-detail-media img {
  max-height: 360px;
  max-width: 100%;
  object-fit: contain;
}

.product-detail-empty {
  color: #667085;
  font-weight: 800;
}

.product-detail-content {
  display: grid;
  gap: 16px;
  padding-right: 28px;
}

.product-detail-content h3 {
  color: #101828;
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.product-detail-content dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.product-detail-content dl div {
  border-bottom: 1px solid #eef2f6;
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.product-detail-content dt {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-detail-content dd {
  color: #101828;
  font-weight: 800;
  margin: 0;
}

.modal-open {
  overflow: hidden;
}

.rupture-dashboard {
  background:
    radial-gradient(circle at 82% 12%, rgba(240, 68, 56, 0.18), transparent 24%),
    linear-gradient(135deg, #101828 0%, #4a1f2b 50%, #17345d 100%);
}

.dre-dashboard .cash-kpis {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.dre-lines {
  display: grid;
  gap: 12px;
}

.dre-line {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.5fr) minmax(180px, 1fr) auto;
}

.dre-line span,
.dre-line strong {
  color: #ffffff;
  font-weight: 800;
}

.dre-line i {
  border-radius: 999px;
  display: block;
  height: 10px;
}

.dre-line.positive i {
  background: linear-gradient(90deg, #17c964, #5eead4);
}

.dre-line.negative i {
  background: linear-gradient(90deg, #ff8a00, #f04438);
}

.cash-dashboard::before {
  background:
    linear-gradient(120deg, transparent 0 52%, rgba(255, 255, 255, 0.08) 52% 53%, transparent 53%),
    linear-gradient(160deg, transparent 0 58%, rgba(255, 138, 0, 0.13) 58% 59%, transparent 59%);
  background-size: 140px 140px;
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.34;
  position: absolute;
  right: 0;
  top: 0;
}

.cash-dashboard > * {
  position: relative;
  z-index: 1;
}

.cash-dashboard-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cash-dashboard-head h2 {
  color: #ffffff;
  font-size: 26px;
}

.cash-dashboard-head strong {
  background: rgba(255, 138, 0, 0.12);
  border: 1px solid rgba(255, 138, 0, 0.48);
  border-radius: 999px;
  color: #ffca8a;
  font-size: 14px;
  padding: 8px 12px;
}

.cash-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.cash-kpis article,
.cash-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.cash-kpis article {
  padding: 16px;
}

.cash-kpis span,
.cash-panel h3 {
  color: #cbd5ff;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cash-kpis strong {
  color: #ffffff;
  display: block;
  font-size: clamp(22px, 2vw, 32px);
  margin-top: 8px;
}

.cash-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
}

.cash-panel {
  padding: 18px;
}

.cash-month-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  min-height: 260px;
  padding-top: 18px;
}

.cash-month {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.cash-bars {
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  height: 170px;
}

.cash-bars span {
  border-radius: 5px 5px 0 0;
  display: block;
  min-height: 6px;
}

.cash-bars .entry {
  background: linear-gradient(180deg, #17c964, #0b8f46);
}

.cash-bars .exit {
  background: linear-gradient(180deg, #ff8a00, #f04438);
}

.cash-month strong {
  color: #ffffff;
  font-size: 12px;
  text-transform: capitalize;
}

.cash-month small {
  color: #cbd5ff;
  font-size: 11px;
  white-space: nowrap;
}

.cash-ranking {
  display: grid;
  gap: 15px;
  margin-top: 18px;
}

.cash-ranking div {
  display: grid;
  gap: 7px;
}

.cash-ranking span {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
}

.cash-ranking b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-ranking em {
  color: #ffca8a;
  font-style: normal;
  white-space: nowrap;
}

.cash-ranking i {
  background: linear-gradient(90deg, #ff8a00, #f04438);
  border-radius: 999px;
  display: block;
  height: 8px;
}

.cash-ranking p {
  color: #cbd5ff;
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 52px 1fr auto;
  padding: 18px;
}

.report-card:hover {
  border-color: #b2ccff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

.report-icon {
  align-items: center;
  background: #eff4ff;
  border: 1px solid #d1e0ff;
  border-radius: 8px;
  color: #175cd3;
  display: flex;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.report-card h2 {
  font-size: 20px;
}

.report-card p {
  min-height: 0;
}

.report-card-body {
  display: grid;
  gap: 4px;
}

.report-meta {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: 12px;
  gap: 6px;
  margin-top: 4px;
}

.report-meta strong {
  color: #344054;
}

.button-link,
button {
  background: #175cd3;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 600;
  margin-top: 16px;
  padding: 10px 14px;
}

.resilient-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.resilient-overlay[hidden] {
  display: none;
}

.resilient-card {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
  color: #0f172a;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 28px;
  text-align: center;
}

.resilient-card strong {
  font-size: 22px;
}

.resilient-card span {
  color: #475569;
  font-size: 15px;
}

.resilient-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: resilient-spin 0.9s linear infinite;
}

@keyframes resilient-spin {
  to {
    transform: rotate(360deg);
  }
}

.stack,
.filters,
.editor-form {
  display: grid;
  gap: 14px;
}

.filters {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
  padding: 18px;
}

.compact-filter {
  grid-template-columns: minmax(220px, 320px) auto;
}

.editor-form {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 20px;
}

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

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

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

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

.form-tabs {
  display: grid;
  gap: 18px;
}

.tab-radio {
  display: none;
}

.tab-buttons {
  align-items: center;
  border-bottom: 1px solid #dde3ea;
  display: flex;
  gap: 8px;
}

.tab-buttons label {
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  color: #475467;
  cursor: pointer;
  font-weight: 800;
  margin-bottom: -1px;
  padding: 12px 16px;
}

#client-tab-data:checked ~ .tab-buttons label[for="client-tab-data"],
#client-tab-finance:checked ~ .tab-buttons label[for="client-tab-finance"] {
  background: #ffffff;
  border-color: #dde3ea;
  border-bottom-color: #ffffff;
  color: #175cd3;
}

.tab-panel {
  display: none;
  gap: 14px;
}

#client-tab-data:checked ~ .tab-data,
#client-tab-finance:checked ~ .tab-finance {
  display: grid;
}

.tab-finance {
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  padding: 18px;
}

.form-section-title {
  border-top: 1px solid #dde3ea;
  color: #182230;
  font-size: 17px;
  margin: 10px 0 0;
  padding-top: 16px;
}

label span {
  color: #344054;
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field-error {
  color: #b42318;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

input,
select,
textarea {
  border: 1px solid #c8d2de;
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  font-family: Consolas, "Courier New", monospace;
}

fieldset {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
}

legend {
  color: #344054;
  font-weight: 700;
}

.check input {
  width: auto;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  overflow: auto;
  width: 100%;
}

.data-table {
  max-height: min(68vh, 760px);
}

.report-image {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  display: block;
  height: 74px;
  object-fit: contain;
  width: 96px;
}

.table-note {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  color: #55606d;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 9px 14px;
}

.tab.active {
  background: #175cd3;
  border-color: #175cd3;
  color: #ffffff;
}

table {
  border-collapse: collapse;
  min-width: max-content;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e6ebf0;
  padding: 12px 14px;
  text-align: left;
}

tfoot th,
tfoot td {
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
  color: #111827;
  font-weight: 800;
}

.numeric-total {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.payroll-closing-table table {
  table-layout: fixed;
  min-width: 760px;
}

.payroll-closing-table th:nth-child(1),
.payroll-closing-table td:nth-child(1) {
  width: 32%;
}

.payroll-closing-table th:nth-child(2),
.payroll-closing-table td:nth-child(2) {
  width: 18%;
}

.payroll-closing-table th:nth-child(n+3),
.payroll-closing-table td:nth-child(n+3) {
  text-align: right;
  width: 16%;
}

th {
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
}

.empty {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  color: #55606d;
  padding: 22px;
}

.empty.compact {
  padding: 12px;
}

.button-secondary {
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 6px;
  color: #344054;
  display: inline-block;
  font-weight: 600;
  padding: 10px 14px;
}

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

.inline-form input {
  max-width: 180px;
}

.inline-form button {
  margin-top: 0;
  white-space: nowrap;
}

.designer {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 18px;
}

.field-designer {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 18px;
}

.field-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.75fr) minmax(420px, 1.25fr);
  margin-bottom: 12px;
}

.view-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.view-actions .button-secondary {
  background: #ffffff;
  cursor: pointer;
  margin: 0;
}

.view-actions span {
  color: #067647;
  font-size: 13px;
  font-weight: 700;
}

.pivot-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.62fr) minmax(520px, 1.38fr);
  margin-bottom: 12px;
}

.pivot-zones {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.compact-controls {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.field-bucket {
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  min-height: 180px;
  padding: 14px;
}

.field-bucket.selected {
  background: #ffffff;
  border-color: #b2ccff;
}

.field-bucket h3 {
  color: #344054;
  font-size: 14px;
  margin: 0 0 10px;
}

.field-list {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 126px;
}

.field-chip {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
}

.field-chip span {
  color: #667085;
  font-weight: 900;
}

.field-chip.dragging {
  opacity: 0.45;
}

.section-head {
  margin-bottom: 14px;
}

.chart-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.chart-head p {
  margin-top: 4px;
}

.chart-total {
  background: #eff4ff;
  border: 1px solid #d1e0ff;
  border-radius: 8px;
  min-width: 120px;
  padding: 12px;
  text-align: center;
}

.chart-total span {
  color: #344054;
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.chart-total strong {
  color: #175cd3;
  display: block;
  font-size: 28px;
}

.split-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

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

.button-row .button-secondary {
  background: #ffffff;
  cursor: pointer;
  margin: 0;
}

.button-secondary.danger-soft {
  border-color: #fecdca;
  color: #b42318;
}

.button-secondary.danger-soft:hover {
  background: #fff1f0;
}

.parameter-editor {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.filter-builder {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.6fr) minmax(160px, 1fr) auto auto;
  padding: 12px;
}

.filter-builder button {
  margin: 0;
  white-space: nowrap;
}

.parameter-grid-head,
.parameter-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(130px, 1fr) 110px minmax(160px, 1.1fr) 120px minmax(130px, 1fr) minmax(180px, 1.2fr) 44px;
}

.parameter-grid-head {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.parameter-row .icon-button {
  height: 42px;
  margin: 0;
  padding: 0;
  width: 42px;
}

.drag-handle {
  background: #ffffff;
  border: 1px solid #c8d2de;
  border-radius: 6px;
  color: #344054;
  cursor: grab;
  font-weight: 800;
  height: 42px;
  margin: 0;
  padding: 0;
  width: 42px;
}

.parameter-row.dragging {
  opacity: 0.48;
}

.inline-check {
  align-items: center;
  display: flex;
  gap: 6px;
  margin: 0;
}

.inline-check input {
  width: auto;
}

.parameter-row textarea {
  min-height: 42px;
  resize: vertical;
}

.parameter-row textarea:disabled {
  background: #f1f5f9;
  color: #98a2b3;
}

.parameter-row.has-options textarea {
  background: #ffffff;
}

.param-warnings {
  color: #b54708;
  display: grid;
  font-size: 13px;
  gap: 4px;
}

.param-warnings div {
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 6px;
  padding: 8px 10px;
}

.designer-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.chart-controls {
  background: #f8fafc;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  padding: 14px;
}

.chart-insight {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.chart-insight span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-insight strong {
  color: #7c2d12;
}

.chart-insight em {
  font-style: normal;
  font-weight: 800;
}

.visual-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(520px, 1.35fr) minmax(340px, 0.65fr);
}

.chart-panel {
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  overflow: auto;
}

.chart-panel canvas {
  display: block;
  max-width: 100%;
}

.summary-panel {
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  max-height: 320px;
  overflow: auto;
}

.print-header,
.print-footer {
  display: none;
}

@media (max-width: 720px) {
  .shell {
    max-width: none;
    padding: 24px 16px;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .nav-group {
    position: static;
  }

  .nav-menu {
    position: static;
  }

  .page-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .reports-hero {
    align-items: start;
    flex-direction: column;
  }

  .module-strip,
  .access-overview {
    grid-template-columns: 1fr;
  }

  .crm-switcher {
    grid-template-columns: 1fr;
  }

  .module-tabs {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-tabs a {
    text-align: center;
  }

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

  .report-tile {
    grid-template-columns: 40px 1fr;
  }

  .report-tile-meta {
    grid-column: 2;
  }

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

  .cash-dashboard-head {
    align-items: start;
    display: grid;
  }

  .cash-kpis,
  .cash-panels,
  .pipeline-kpis,
  .product-kpis,
  .product-panels {
    grid-template-columns: 1fr;
  }

  .product-panel-head {
    align-items: start;
    display: grid;
  }

  .product-detail-modal {
    grid-template-columns: 1fr;
  }

  .product-detail-content {
    padding-right: 0;
  }

  .product-detail-media {
    min-height: 180px;
  }

  .compact-selector,
  .company-context-strip,
  .employee-search-form,
  .form-grid.four,
  .form-grid.three,
  .module-grid.two,
  .module-grid.three,
  .funnel-board,
  .connection-panel,
  .employee-workbench,
  .profile-page {
    grid-template-columns: 1fr;
  }

  .employee-search-row,
  .employee-detail-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .employee-full-form,
  .fixed-value-row {
    grid-template-columns: 1fr;
  }

  .employee-full-form label:nth-child(2) {
    grid-column: auto;
  }

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

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

  .chart-head {
    display: grid;
    gap: 10px;
  }

  .field-layout {
    grid-template-columns: 1fr;
  }

  .pivot-layout,
  .pivot-zones {
    grid-template-columns: 1fr;
  }

  .split-head,
  .button-row {
    display: grid;
    justify-content: stretch;
  }

  .parameter-grid-head {
    display: none;
  }

  .filter-builder,
  .parameter-row {
    border: 1px solid #e6ebf0;
    border-radius: 8px;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .drag-handle {
    width: 100%;
  }

  .login-hero {
    padding: 22px 18px;
  }

  .login-nav {
    align-items: flex-start;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    height: 38px;
    width: 120px;
  }

  .login-stage {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .login-product h1 {
    font-size: 42px;
  }

  .login-product p {
    font-size: 17px;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
  }
}

@media print {
  @page {
    margin: 0;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 10px;
    margin: 0 !important;
  }

  .topbar,
  .page-head,
  .filters,
  .reports-hero,
  .module-tabs,
  .tabs,
  .no-print,
  script {
    display: none !important;
  }

  .shell {
    max-width: none;
    padding: 10mm 12mm 18mm !important;
  }

  .report-print-shell {
    display: block;
  }

  .product-print-shell {
    display: block;
  }

  .print-header,
  .print-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .print-footer {
    display: none !important;
  }

  .print-header {
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .print-header span {
    color: #175cd3;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .print-header h1 {
    font-size: 22px;
    line-height: 1.15;
    margin: 4px 0;
  }

  .print-header p,
  .print-header small {
    color: #475467;
    margin: 0;
  }

  [data-tab-panel][hidden] {
    display: none !important;
  }

  [data-tab-panel]:not([hidden]) {
    display: block !important;
  }

  .designer,
  .field-designer,
  .pivot-designer,
  .module-summary,
  .product-dashboard,
  .product-panel,
  .empty,
  .table-note,
  .table-wrap,
  .chart-panel,
  .summary-panel {
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 10px;
    overflow: visible !important;
    padding: 0 !important;
  }

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

  .module-summary article {
    background: #ffffff !important;
    border: 1px solid #d0d5dd !important;
    color: #111827 !important;
    padding: 8px !important;
  }

  .product-dashboard,
  .rupture-dashboard,
  .cash-panel,
  .product-panel {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .product-dashboard *,
  .rupture-dashboard *,
  .cash-panel *,
  .product-panel * {
    color: #111827 !important;
  }

  .product-panels {
    display: block !important;
  }

  .product-ranking-scroll {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .product-rank-main {
    color: #111827 !important;
  }

  .product-detail-backdrop,
  .abc-filter-actions {
    display: none !important;
  }

  .visual-grid {
    display: block !important;
  }

  .field-layout,
  .pivot-layout,
  .pivot-zones,
  .field-bucket,
  .designer-controls,
  .field-designer > .section-head,
  .pivot-designer > .section-head,
  .chart-designer > .section-head,
  .table-note {
    display: none !important;
  }

  table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 9px;
    min-width: 0;
    page-break-inside: auto;
    table-layout: fixed;
    width: 100%;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  th,
  td {
    border: 1px solid #d0d5dd;
    border-left: 0;
    border-top: 0;
    padding: 5px 6px;
    vertical-align: top;
    word-break: break-word;
  }

  th:first-child,
  td:first-child {
    border-left: 1px solid #d0d5dd;
  }

  thead tr:first-child th {
    border-top: 1px solid #d0d5dd;
  }

  th {
    background: #f2f4f7 !important;
    color: #111827 !important;
  }

  canvas,
  svg {
    max-width: 100% !important;
  }

  button,
  input,
  select,
  textarea,
  .drag-handle,
  .view-actions,
  .builder-actions {
    display: none !important;
  }
}
