:root {
  color-scheme: light;
  --font-ui: "Bahnschrift", "Segoe UI Variable", "Segoe UI", "Trebuchet MS", sans-serif;
  --bg: #e7efeb;
  --bg-deep: #d9e7e0;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-soft: #f1f7f4;
  --surface-soft-alt: #f7fbf9;
  --ink: #13201b;
  --muted: #61736a;
  --line: rgba(19, 32, 27, 0.09);
  --line-strong: rgba(19, 32, 27, 0.16);
  --brand: #00a67a;
  --brand-dark: #0b5f49;
  --brand-contrast: #ffffff;
  --brand-glow: rgba(0, 166, 122, 0.16);
  --accent: #8da95f;
  --danger: #b2473e;
  --danger-soft: #fff1ef;
  --success: #2f8f5f;
  --success-soft: #e8f7ef;
  --warning: #b07a16;
  --warning-soft: #fff4de;
  --open-soft: #e8f8f2;
  --nav-bg: linear-gradient(180deg, #08120f 0%, #10201a 100%);
  --nav-ink: #f1faf5;
  --nav-muted: #90aa9d;
  --shadow: 0 24px 52px rgba(18, 32, 26, 0.12);
  --shadow-soft: 0 12px 28px rgba(18, 32, 26, 0.08);
  --hero-overlay: linear-gradient(115deg, rgba(6, 16, 12, 0.84), rgba(6, 16, 12, 0.3));
  --motion-fast: 180ms;
  --motion-base: 520ms;
  --motion-slow: 760ms;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07110d;
  --bg-deep: #0c1713;
  --surface: rgba(18, 30, 24, 0.9);
  --surface-strong: #12201a;
  --surface-soft: #162620;
  --surface-soft-alt: #0f1b16;
  --ink: #edf6f1;
  --muted: #9db2a8;
  --line: rgba(214, 242, 229, 0.08);
  --line-strong: rgba(214, 242, 229, 0.16);
  --brand: #2fd0a0;
  --brand-dark: #117d61;
  --brand-contrast: #072118;
  --brand-glow: rgba(47, 208, 160, 0.18);
  --accent: #b9d479;
  --danger: #ff8f82;
  --danger-soft: rgba(178, 71, 62, 0.18);
  --success: #64d492;
  --success-soft: rgba(47, 143, 95, 0.18);
  --warning: #f0bc57;
  --warning-soft: rgba(176, 122, 22, 0.18);
  --open-soft: rgba(47, 208, 160, 0.16);
  --nav-bg: linear-gradient(180deg, #050d0a 0%, #0b1511 100%);
  --nav-ink: #f1faf5;
  --nav-muted: #88a294;
  --shadow: 0 28px 56px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.24);
  --hero-overlay: linear-gradient(115deg, rgba(2, 8, 6, 0.86), rgba(2, 8, 6, 0.42));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, var(--brand-glow), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  color: var(--ink);
  font-family: var(--font-ui);
  position: relative;
}

body.logged-in .app-frame {
  animation: app-shell-reveal var(--motion-slow) cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

body::before {
  content: "";
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  position: fixed;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 20%),
    url("assets/futuro-simbolo-oficial.svg") no-repeat right 34px top 94px / 180px auto;
  z-index: 0;
}

body[data-theme="dark"]::before {
  filter: brightness(0.82) saturate(0.9);
  opacity: 0.06;
}

body:not(.logged-in) .app-frame {
  display: none;
}

body.logged-in .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  background: url("assets/futuro-login.jpeg") center / cover no-repeat;
  position: relative;
  isolation: isolate;
}

.login-overlay {
  align-items: stretch;
  background: var(--hero-overlay);
  display: grid;
  min-height: 100vh;
  padding: 48px;
  position: relative;
}

.login-scene {
  align-items: end;
  display: grid;
  gap: clamp(26px, 4vw, 70px);
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 430px);
  margin: auto;
  position: relative;
  width: min(1180px, 100%);
}

.login-hero {
  animation: surface-enter var(--motion-slow) cubic-bezier(0.18, 0.84, 0.28, 1) both;
  color: #ffffff;
  display: grid;
  gap: 16px;
  max-width: 640px;
  padding: 14px 8px;
}

.login-hero-logo {
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.24));
  width: min(260px, 60vw);
}

.login-hero h1 {
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 0.98;
  margin: 0;
  max-width: 9ch;
}

.login-hero-text {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.4;
  margin: 0;
  max-width: 31ch;
}

.login-card {
  animation: surface-enter calc(var(--motion-slow) + 80ms) cubic-bezier(0.18, 0.84, 0.28, 1) 90ms both;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 14px;
  max-width: 410px;
  padding: 32px;
  width: 100%;
}

body[data-theme="dark"] .login-card {
  background: rgba(10, 18, 14, 0.76);
  border-color: rgba(214, 242, 229, 0.14);
}

.login-card h1,
.login-card h2 {
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 8px;
}

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

.login-signature {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 14px;
}

.login-signature strong {
  color: var(--brand);
  font-size: 17px;
}

.login-signature span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-button {
  margin-top: 6px;
}

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

.login-form[hidden] {
  display: none !important;
}

.login-feedback {
  border-radius: 6px;
  color: var(--danger);
  display: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  margin: 0;
  padding: 10px 12px;
}

.login-feedback.visible {
  background: var(--danger-soft);
  display: block;
}

.login-feedback.success {
  background: var(--brand-soft);
  color: var(--brand);
}

.password-change-heading {
  display: grid;
  gap: 5px;
}

.password-change-heading strong {
  color: var(--ink);
  font-size: 18px;
}

.password-change-heading span,
.form-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.eyebrow.light {
  color: #d2f7eb;
}

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

button {
  cursor: pointer;
}

.app-frame {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main-nav {
  background: var(--nav-bg);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px 20px;
  position: relative;
}

.main-nav::before {
  content: "";
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  position: absolute;
  background:
    radial-gradient(circle at top left, var(--brand-glow), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16%);
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  padding: 10px;
  width: 56px;
}

.brand-mark img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  letter-spacing: 0;
}

.brand-copy strong {
  font-size: 13px;
}

.brand-copy small {
  color: var(--nav-muted);
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 7px;
  position: relative;
  z-index: 1;
}

.nav-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  color: var(--nav-muted);
  font-weight: 700;
  min-height: 42px;
  padding: 11px 12px;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(0, 166, 122, 0.14));
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--nav-ink);
  transform: translateX(2px);
}

.nav-item.hidden,
.restricted-hidden {
  display: none !important;
}

.nav-footer {
  align-items: center;
  color: var(--nav-muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: space-between;
  margin-top: auto;
  padding: 10px 8px;
  position: relative;
  z-index: 1;
}

.nav-session-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.nav-session-copy span,
.nav-session-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--nav-ink);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nav-logout-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-logout-button svg {
  height: 17px;
  width: 17px;
}

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

.form-help {
  margin: 12px 0 0;
}

.table-secondary {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.status-badge.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge.status-success {
  background: var(--brand-soft);
  color: var(--brand);
}

.content-shell {
  min-width: 0;
  position: relative;
}

.content-shell::before {
  content: "";
  height: 280px;
  pointer-events: none;
  position: fixed;
  right: -90px;
  top: -60px;
  width: 280px;
  background: radial-gradient(circle, var(--brand-glow), transparent 65%);
  z-index: 0;
}

.topbar {
  align-items: center;
  background: linear-gradient(135deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  padding: 20px 28px;
  position: relative;
  z-index: 1;
}

.topbar h1,
.panel h2,
.section-title h3 {
  letter-spacing: 0;
  margin: 0;
}

.topbar h1 {
  font-size: 26px;
}

.topbar-title {
  display: grid;
  gap: 9px;
}

.topbar-brand-chip {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 10px;
  padding: 7px 12px 7px 9px;
  width: fit-content;
}

.topbar-brand-chip img {
  display: block;
  height: 22px;
  width: 22px;
}

.topbar-brand-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

.topbar-actions,
.panel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.button {
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 13px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 26px rgba(0, 166, 122, 0.2);
  color: var(--brand-contrast);
}

.button.primary:hover {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

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

.button.ghost {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--brand);
  align-self: end;
}

.button.danger {
  background: var(--danger-soft);
  border-color: rgba(178, 71, 62, 0.16);
  color: var(--danger);
}

.theme-toggle {
  align-items: center;
  display: inline-flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 162px;
}

.theme-toggle-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.theme-toggle-copy small,
.theme-toggle-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.theme-toggle-state {
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 4px 8px;
}

.theme-toggle-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.theme-toggle.active {
  border-color: rgba(0, 166, 122, 0.28);
  box-shadow: 0 0 0 3px rgba(0, 166, 122, 0.08);
}

.floating-theme-toggle {
  position: absolute;
  right: 32px;
  top: 28px;
  z-index: 2;
}

.page {
  padding: 22px 28px 36px;
  position: relative;
  z-index: 1;
}

.control-strip {
  align-items: end;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
  padding: 16px;
}

.control-strip-rich {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

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

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

input,
select,
textarea {
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  min-height: 38px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  min-height: auto;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid var(--brand-glow);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.motion-scope.motion-enter {
  animation: view-shell-fade 320ms ease both;
}

.motion-item {
  will-change: opacity, transform, filter;
}

.motion-scope.motion-enter .motion-item {
  animation: surface-enter var(--motion-base) cubic-bezier(0.18, 0.84, 0.28, 1) both;
  animation-delay: calc(var(--motion-index, 0) * 40ms);
}

.motion-scope.motion-enter .trend-column-fill {
  animation: chart-grow-y calc(var(--motion-slow) + 80ms) cubic-bezier(0.2, 0.92, 0.28, 1) both;
  animation-delay: calc(var(--motion-index, 0) * 26ms + 120ms);
  transform-origin: bottom center;
}

.motion-scope.motion-enter .distribution-fill,
.motion-scope.motion-enter .comparison-fill {
  animation: chart-grow-x calc(var(--motion-base) + 120ms) cubic-bezier(0.2, 0.92, 0.28, 1) both;
  animation-delay: calc(var(--motion-index, 0) * 22ms + 120ms);
  transform-origin: left center;
}

.countup-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

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

.metric {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 18px 16px 16px;
  position: relative;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.metric::before {
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(90deg, var(--brand), #7fe0c2);
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 9px;
}

.metric strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 7px;
}

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

.paste-box {
  min-height: 190px;
}

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

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.dashboard-toolbar-copy {
  display: grid;
  gap: 6px;
}

.dashboard-toolbar-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-tabs {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.dashboard-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 38px;
  padding: 9px 14px;
}

.dashboard-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 26px rgba(0, 166, 122, 0.2);
  color: var(--brand-contrast);
}

.dashboard-pane {
  display: none;
}

.dashboard-pane.active {
  display: block;
}

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

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

.kpi-card {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 16px;
  position: relative;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.kpi-card::before {
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(90deg, var(--brand), #7fe0c2);
}

.kpi-card.tone-danger::before {
  background: linear-gradient(90deg, var(--danger), #eb8c82);
}

.kpi-card.tone-warning::before {
  background: linear-gradient(90deg, var(--warning), #f0cf7a);
}

.kpi-card.tone-success::before {
  background: linear-gradient(90deg, var(--success), #83d7b2);
}

.kpi-card.tone-info::before,
.kpi-card.tone-neutral::before {
  background: linear-gradient(90deg, #4f8f7b, #98d1bd);
}

.kpi-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-icon {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.tone-danger .kpi-icon {
  color: var(--danger);
}

.tone-warning .kpi-icon {
  color: var(--warning);
}

.tone-success .kpi-icon {
  color: var(--success);
}

.tone-info .kpi-icon,
.tone-neutral .kpi-icon {
  color: #4f8f7b;
}

.kpi-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.kpi-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.kpi-value {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kpi-note {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
}

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

.trend-chart,
.distribution-list,
.comparison-stack {
  min-height: 100%;
}

.trend-columns {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  min-height: 220px;
}

.trend-column {
  align-items: end;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.trend-column-value {
  color: var(--ink);
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.trend-column-track {
  align-items: flex-end;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  height: 165px;
  overflow: hidden;
  padding: 6px;
}

.trend-column-fill {
  background: linear-gradient(180deg, #7fe0c2, var(--brand));
  border-radius: 8px;
  display: block;
  min-height: 0;
  width: 100%;
}

.trend-column-fill.tone-danger {
  background: linear-gradient(180deg, #f0b0a8, var(--danger));
}

.trend-column-fill.tone-warning {
  background: linear-gradient(180deg, #f4d78a, var(--warning));
}

.trend-column-fill.tone-success {
  background: linear-gradient(180deg, #b5ecd1, var(--success));
}

.trend-column-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.distribution-list {
  align-content: start;
  display: grid;
  gap: 12px;
}

.distribution-item {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.distribution-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.distribution-copy strong {
  font-size: 13px;
}

.distribution-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.distribution-track {
  background: var(--surface);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.distribution-fill {
  background: linear-gradient(90deg, var(--brand), #7fe0c2);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.comparison-stack {
  align-content: start;
  display: grid;
  gap: 12px;
}

.comparison-item {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.comparison-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  margin-bottom: 9px;
}

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

.comparison-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.comparison-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.comparison-fill {
  background: linear-gradient(90deg, var(--brand), #7fe0c2);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.alert-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.alert-card {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.alert-card.tone-danger {
  border-color: rgba(178, 71, 62, 0.2);
}

.alert-card.tone-warning {
  border-color: rgba(182, 122, 40, 0.22);
}

.alert-card.tone-info {
  border-color: rgba(79, 143, 123, 0.24);
}

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

.alert-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.alert-card-head strong {
  font-size: 24px;
  line-height: 1;
}

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

.alert-link {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
}

.alert-link strong,
.alert-link span,
.alert-link small {
  display: block;
}

.alert-link span,
.alert-link small {
  color: var(--muted);
}

.alert-link small {
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
}

.empty-inline {
  color: var(--muted);
  font-size: 12px;
}

.insight-stat {
  align-content: start;
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.insight-stat-main strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.insight-stat-main span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

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

.insight-stat-grid div {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.insight-stat-grid strong,
.insight-stat-grid span {
  display: block;
}

.insight-stat-grid strong {
  font-size: 18px;
  margin-bottom: 4px;
}

.insight-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-table-dense table th,
.dashboard-table-dense table td {
  white-space: normal;
}

.dashboard-table-dense table td {
  font-size: 12px;
}

.table-wrap-text {
  min-width: 240px;
}

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

.span-3 {
  grid-column: 1 / -1;
}

.panel {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 18px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.panel-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 14px;
}

.panel h2 {
  font-size: 19px;
}

.record-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stage-cell {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 132px;
  padding: 12px;
}

.stage-cell strong {
  display: block;
  font-size: 13px;
  margin-bottom: 9px;
}

.stage-number {
  color: var(--brand);
  font-size: 28px;
  font-weight: 800;
}

.stage-money {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 8px;
}

.task-list,
.compact-table,
.bar-list {
  display: grid;
  gap: 10px;
}

.task-item,
.bar-row {
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.task-item strong,
.bar-top strong {
  display: block;
}

.task-item span,
.task-item small,
.bar-top span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.status-open {
  background: var(--open-soft);
  color: var(--brand);
}

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

.status-done {
  background: var(--success-soft);
  color: var(--success);
}

.status-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.data-table {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 13px;
}

.actions-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
  white-space: normal;
}

.invoice-summary-cell {
  min-width: 190px;
}

.invoice-summary-line {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.invoice-summary-line:last-child {
  margin-bottom: 0;
}

.invoice-summary-line small {
  color: var(--muted);
  font-size: 12px;
}

tr.table-row {
  cursor: pointer;
}

tr.table-row:hover,
tr.table-row.active {
  background: var(--open-soft);
}

.money {
  font-weight: 800;
  text-align: right;
}

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

body[data-theme="dark"] .report-paper {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.form-layout {
  display: block;
}

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

.process-rail {
  display: grid;
  gap: 18px;
}

.process-rail-stack,
.finance-breakdown-list,
.micro-list {
  display: grid;
  gap: 10px;
}

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

.mini-metric-card {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.mini-metric-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.mini-metric-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.mini-metric-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.mini-metric-card.tone-danger,
.micro-list-item.tone-danger {
  border-color: rgba(178, 71, 62, 0.22);
}

.mini-metric-card.tone-warning,
.micro-list-item.tone-warning {
  border-color: rgba(176, 122, 22, 0.22);
}

.mini-metric-card.tone-info,
.micro-list-item.tone-info {
  border-color: rgba(0, 166, 122, 0.22);
}

.mini-metric-card.tone-success,
.micro-list-item.tone-success {
  border-color: rgba(47, 143, 95, 0.24);
}

.stage-rail {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 18px;
}

.stage-chip {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.stage-chip span,
.stage-chip small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.stage-chip span {
  font-weight: 800;
  margin-bottom: 8px;
}

.stage-chip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.stage-chip.is-current {
  background: linear-gradient(180deg, rgba(0, 166, 122, 0.16), var(--surface-soft-alt));
  border-color: rgba(0, 166, 122, 0.28);
}

.stage-chip.is-done {
  border-color: rgba(47, 143, 95, 0.22);
}

.timeline-composer {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

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

.summary-tile {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.summary-tile span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.summary-tile strong {
  display: block;
  font-size: 17px;
}

.metric:hover,
.panel:hover,
.kpi-card:hover,
.summary-tile:hover,
.mini-metric-card:hover,
.distribution-item:hover,
.comparison-item:hover,
.alert-card:hover,
.task-item:hover,
.bar-row:hover,
.stage-chip:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 36px rgba(18, 32, 26, 0.11);
  transform: translateY(-2px);
}

.summary-note {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 14px 16px;
}

.summary-note span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.summary-note p {
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  white-space: normal;
  word-break: break-word;
}

.summary-note-success {
  border-left-color: var(--success);
}

.section-title {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.section-title h3 {
  font-size: 15px;
}

.form-grid,
.finance-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

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

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

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

.checklist-overview {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.checklist-kpi {
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.checklist-kpi span,
.checklist-hint span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.checklist-kpi strong {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

.checklist-kpi small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.checklist-hint {
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  padding: 14px 16px;
}

.checklist-hint.is-complete {
  border-left-color: var(--success);
}

.checklist-hint p {
  line-height: 1.6;
  margin: 0;
}

.checklist-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.checklist-section {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.checklist-section-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.checklist-section-head h4 {
  font-size: 15px;
  margin: 0 0 4px;
}

.checklist-section-head p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 60ch;
}

.checklist-section-status {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 138px;
  padding: 10px 12px;
  text-align: right;
}

.checklist-section-status strong,
.checklist-section-status small {
  display: block;
}

.checklist-section-status strong {
  font-size: 20px;
}

.checklist-section-status small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.check-item {
  align-items: flex-start;
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 100%;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.check-item:hover {
  transform: translateY(-1px);
}

.check-item.is-checked {
  background: linear-gradient(180deg, var(--open-soft), var(--surface-soft-alt));
  border-color: rgba(0, 166, 122, 0.28);
  box-shadow: 0 10px 24px rgba(10, 28, 22, 0.08);
}

.check-item input {
  margin-top: 2px;
  min-height: 18px;
  width: 18px;
}

.check-item-copy {
  display: grid;
  gap: 8px;
}

.check-item-copy strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.check-item-copy small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.check-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-tag {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}

.doc-tag.required {
  background: var(--warning-soft);
  border-color: rgba(176, 122, 22, 0.18);
  color: var(--warning);
}

.doc-tag.optional,
.doc-tag.muted-tag {
  color: var(--muted);
}

.compact-checklist label {
  align-items: center;
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  font-size: 12px;
  gap: 8px;
  padding: 10px;
}

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

.credit-attachment-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.attachment-entry.stacked {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.finance-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) 360px;
}

.finance-executive-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 18px;
}

.finance-summary-stack {
  display: grid;
  gap: 16px;
}

.finance-form {
  margin-top: 0;
}

.finance-form input {
  text-align: right;
}

.finance-summary {
  background: linear-gradient(180deg, #10211b 0%, #0d1713 100%);
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 20px 36px rgba(6, 16, 12, 0.24);
  padding: 16px;
}

.finance-side-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.finance-insight-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

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

.collection-card {
  background: var(--surface-soft-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.collection-card span,
.collection-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.collection-card strong {
  display: block;
  font-size: 16px;
  margin: 6px 0;
}

.expense-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 14px 0 10px;
}

.expense-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.volume-note {
  margin-bottom: 12px;
}

.volume-summary {
  display: grid;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editable-table {
  overflow: auto;
}

.editable-table table {
  min-width: 920px;
}

.editable-table input,
.editable-table select {
  min-height: 34px;
  padding: 7px 8px;
}

.row-button,
.editable-table .row-button {
  background: var(--danger-soft);
  border: 1px solid rgba(178, 71, 62, 0.16);
  border-radius: 7px;
  color: var(--danger);
  font-weight: 800;
  min-height: 34px;
  padding: 6px 10px;
}

.detail-stack {
  display: grid;
  gap: 10px;
}

.detail-line {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.detail-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-line strong {
  min-width: 0;
  text-align: right;
}

.micro-list-item {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.micro-list-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.micro-list-item p,
.micro-list-item small {
  color: var(--muted);
  display: block;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.micro-list-item small {
  margin-top: 6px;
}

.finance-side-card h3 {
  margin: 0 0 14px;
}

.report-command-center {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  margin-bottom: 18px;
}

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

.report-type-card {
  align-items: flex-start;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 100%;
  padding: 12px;
  text-align: left;
}

.report-type-card strong {
  font-size: 13px;
}

.report-type-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-type-card.active {
  background: linear-gradient(180deg, rgba(0, 166, 122, 0.16), var(--surface-soft-alt));
  border-color: rgba(0, 166, 122, 0.28);
  box-shadow: 0 12px 28px rgba(11, 95, 73, 0.1);
}

.report-summary-board {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.report-summary-copy h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.report-summary-copy p {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

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

.report-paper {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 45px rgba(23, 32, 39, 0.1);
  color: #222;
  font-family: "Times New Roman", Times, serif;
  line-height: 1.35;
  margin: 0 auto;
  max-width: 850px;
  min-height: 980px;
  padding: 58px 64px;
}

.report-paper h2 {
  font-size: 18px;
  margin: 0 0 20px;
}

.report-letterhead {
  align-items: center;
  display: flex;
  gap: 24px;
  margin: 0 0 26px;
}

.report-letterhead img {
  height: auto;
  max-width: 300px;
  width: 100%;
}

.report-paper .report-letterhead p {
  font-size: 19px;
  line-height: 1.2;
  margin: 0;
}

.internal-report h3 {
  border-bottom: 1px solid #aaa;
  font-size: 16px;
  margin: 22px 0 10px;
  padding-bottom: 5px;
}

.internal-report {
  max-width: 1080px;
  padding: 36px 34px;
}

.report-meta {
  color: #4c5554;
  font-family: var(--font-ui);
}

.report-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 1fr);
  margin: 16px 0 22px;
}

.report-kpis span {
  background: #f4f6f5;
  border: 1px solid #cfd8d3;
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 9px;
}

.report-kpis strong {
  display: block;
  font-size: 13px;
}

.report-reference {
  border: 1px solid #999;
  margin: 16px 0 18px;
  padding: 10px 12px;
}

.report-reference span,
.report-reference small {
  display: block;
  font-family: var(--font-ui);
}

.report-reference span {
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
}

.report-reference strong {
  display: block;
  font-size: 24px;
  margin: 2px 0;
}

.report-primary-id {
  font-size: 14px;
}

.report-note {
  background: #f7faf8;
  border-left: 4px solid var(--brand);
  color: #33413d;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 18px;
  padding: 10px 12px;
}

.report-section-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.report-badge {
  border-radius: 999px;
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
}

.report-badge.danger {
  background: #ffe7e1;
  color: #b23b2c;
}

.weekly-brief-table th {
  font-size: 11px;
}

.weekly-brief-table td {
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 8px;
  vertical-align: top;
}

.weekly-brief-table .report-primary-id {
  font-size: 13px;
}

.weekly-brief-table th:nth-child(1),
.weekly-brief-table td:nth-child(1) { width: 12%; }
.weekly-brief-table th:nth-child(2),
.weekly-brief-table td:nth-child(2) { width: 10%; }
.weekly-brief-table th:nth-child(3),
.weekly-brief-table td:nth-child(3) { width: 8%; }
.weekly-brief-table th:nth-child(4),
.weekly-brief-table td:nth-child(4) { width: 9%; }
.weekly-brief-table th:nth-child(5),
.weekly-brief-table td:nth-child(5) { width: 13%; }
.weekly-brief-table th:nth-child(6),
.weekly-brief-table td:nth-child(6) { width: 9%; }
.weekly-brief-table th:nth-child(7),
.weekly-brief-table td:nth-child(7) { width: 9%; }
.weekly-brief-table th:nth-child(8),
.weekly-brief-table td:nth-child(8) { width: 30%; }

.history-stack {
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.weekly-receipts-table th,
.weekly-receipts-table td {
  font-size: 11px;
  line-height: 1.35;
  padding: 7px 7px;
  vertical-align: top;
}

.internal-report ul {
  margin: 8px 0 14px 20px;
  padding: 0;
}

.internal-report li {
  margin: 5px 0;
}

.report-paper p {
  font-size: 15px;
  margin: 13px 0;
}

.report-paper table {
  border-collapse: collapse;
  margin: 18px 0;
  table-layout: fixed;
  width: 100%;
}

.report-paper th,
.report-paper td {
  border: 1px solid #999;
  font-size: 13px;
  overflow-wrap: anywhere;
  padding: 6px 7px;
  white-space: normal;
}

.internal-report th,
.internal-report td {
  font-size: 12px;
  padding: 5px 6px;
}

.internal-report .money {
  font-size: 11.5px;
}

.report-paper th {
  background: #d4d4d4;
  color: #333;
  text-align: center;
}

.report-total {
  font-weight: 800;
}

.bank-data {
  margin-top: 28px;
}

.report-signature {
  margin-top: 44px;
}

.report-date-line {
  text-align: right;
}

.signature-block {
  margin-top: 86px;
  width: 310px;
}

.signature-block span {
  border-top: 1px solid #222;
  display: block;
  height: 1px;
  margin-bottom: 4px;
}

.signature-block p {
  line-height: 1.2;
  margin: 0;
}

.finance-summary h3 {
  margin: 0 0 14px;
}

.finance-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.finance-line span {
  color: #aeb9c2;
}

.finance-line strong {
  text-align: right;
}

.finance-line.total strong {
  color: #f0c65a;
  font-size: 20px;
}

.bar-top {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bar-track {
  background: rgba(132, 153, 142, 0.18);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.bar-fill {
  background: var(--brand);
  height: 100%;
  min-width: 2px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.timeline-entry,
.attachment-entry {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 170px minmax(240px, 1fr) auto;
  margin-top: 14px;
}

.timeline-list,
.attachment-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.timeline-item,
.attachment-item {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-alt));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.timeline-item {
  border-left: 3px solid rgba(0, 166, 122, 0.18);
}

.timeline-item.is-current {
  border-left-color: var(--brand);
}

.timeline-item-top {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.timeline-item-top small {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.timeline-item strong,
.attachment-item strong {
  display: block;
}

.timeline-item span,
.attachment-item span {
  color: var(--muted);
  font-size: 12px;
}

.audit-section-title {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.audit-section-title > div {
  min-width: 0;
}

.audit-section-title .eyebrow {
  margin-bottom: 4px;
}

.audit-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 18px;
}

.audit-timeline {
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
}

.audit-item {
  background: var(--surface-strong);
}

.audit-change-list {
  display: grid;
  gap: 6px;
}

.audit-change-row {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(100px, 1fr) 18px minmax(100px, 1fr);
  padding: 8px 10px;
}

.audit-change-row strong,
.audit-change-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-change-row svg {
  color: var(--brand);
  height: 15px;
  width: 15px;
}

.attachment-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

@media (max-width: 720px) {
  .audit-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-change-row {
    grid-template-columns: 1fr;
  }

  .audit-change-row svg {
    transform: rotate(90deg);
  }
}

.role-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.role-vip {
  background: var(--open-soft);
  color: var(--brand);
}

.role-visitor {
  background: var(--warning-soft);
  color: var(--warning);
}

.risk-toolbar {
  align-items: center;
}

.risk-location-summary {
  align-items: flex-end;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 210px;
  padding: 12px 14px;
}

.risk-location-summary strong {
  color: var(--brand);
  font-size: 24px;
}

.risk-location-summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.risk-location-summary small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.accident-map {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  z-index: 0;
}

.accident-map-large {
  height: 520px;
}

.accident-map-picker {
  height: 410px;
  min-width: 0;
}

.location-capture {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 14px;
  min-width: 0;
}

.location-entry-panel {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
}

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

.location-primary-row label,
.location-secondary-row label {
  min-width: 0;
}

.location-primary-action {
  min-height: 43px;
  min-width: 170px;
}

.location-secondary-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(260px, 1fr);
}

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

.location-actions .button {
  min-height: 43px;
}

.location-map-frame {
  min-width: 0;
  position: relative;
}

.map-help {
  align-items: center;
  background: var(--surface-soft);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  margin: 0;
  min-height: 36px;
  padding: 8px 12px;
}

.map-help::before {
  background: var(--muted);
  border-radius: 50%;
  content: "";
  flex: 0 0 8px;
  height: 8px;
  margin-right: 8px;
  width: 8px;
}

.map-help[data-tone="success"] {
  background: var(--success-soft);
  border-left-color: var(--success);
  color: var(--ink);
}

.map-help[data-tone="success"]::before {
  background: var(--success);
}

.map-help[data-tone="warning"] {
  background: var(--warning-soft);
  border-left-color: var(--warning);
  color: var(--ink);
}

.map-help[data-tone="warning"]::before {
  background: var(--warning);
}

.map-help[data-tone="danger"] {
  background: var(--danger-soft);
  border-left-color: var(--danger);
  color: var(--ink);
}

.map-help[data-tone="danger"]::before {
  background: var(--danger);
}

.map-fallback-list {
  background: var(--surface-soft);
  border-left: 3px solid var(--brand);
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
  padding: 10px 12px;
}

.map-fallback-list strong {
  color: var(--ink);
}

.map-unavailable {
  align-items: center;
  color: var(--muted);
  display: flex;
  height: 100%;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.map-popup {
  display: grid;
  gap: 4px;
  min-width: 210px;
}

.map-popup strong,
.map-popup b {
  color: #073d2d;
}

.map-popup span {
  color: #4a5d56;
  font-size: 12px;
}

body[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.72) saturate(0.75) contrast(1.08);
}

body[data-theme="dark"] .leaflet-control-zoom a {
  background: #14251f;
  color: #e9f3ef;
}

.cause-checklist {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

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

.cause-checklist-head div {
  display: grid;
  gap: 3px;
}

.cause-checklist-head strong {
  color: var(--ink);
  font-size: 14px;
}

.cause-checklist-head span,
.cause-checklist-head small {
  color: var(--muted);
  font-size: 12px;
}

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

.cause-option {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
}

.cause-option.is-checked {
  background: var(--brand-glow);
  border-color: var(--brand);
  color: var(--ink);
}

.cause-option input {
  accent-color: var(--brand);
  flex: 0 0 auto;
  width: auto;
}

.driver-history-insight {
  background: var(--surface-soft);
  border-left: 3px solid var(--brand);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.driver-history-insight span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-history-insight p,
.driver-history-insight small {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

@media (max-width: 1200px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .main-nav {
    flex-direction: row;
    overflow: auto;
  }

  .brand-block {
    border-bottom: 0;
    min-width: 240px;
    padding-bottom: 4px;
  }

  .nav-list {
    display: flex;
    min-width: max-content;
  }

  .nav-footer {
    display: none;
  }

  .dashboard-grid,
  .dashboard-bi-grid,
  .finance-grid,
  .finance-insight-grid,
  .checklist-kpi-grid,
  .checklist-card-grid,
  .finance-executive-grid,
  .process-workspace,
  .report-command-center {
    grid-template-columns: 1fr;
  }

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

  .location-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

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

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

  .span-3 {
    grid-column: auto;
  }

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

@media (max-width: 820px) {
  .login-overlay {
    padding: 24px 18px;
  }

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

  .login-hero {
    padding-top: 56px;
  }

  .floating-theme-toggle {
    right: 18px;
    top: 18px;
  }

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

  .page {
    padding: 16px;
  }

  .control-strip,
  .metric-grid,
  .dashboard-kpi-grid,
  .report-kpis,
  .report-section-grid,
  .stage-rail,
  .mini-metric-grid,
  .form-grid,
  .finance-form,
  .process-summary,
  .finance-executive-grid,
  .checklist-grid,
  .report-type-grid,
  .collection-card-grid,
  .credit-attachment-grid,
  .timeline-entry,
  .attachment-entry,
  .report-settings,
  .stage-board {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .panel-actions {
    justify-content: stretch;
  }

  .button {
    flex: 1;
  }

  .topbar-brand-chip {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
  }

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

  .dashboard-toolbar,
  .dashboard-tabs,
  .distribution-copy,
  .comparison-copy,
  .checklist-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-tabs {
    display: grid;
  }

  .alert-board,
  .dashboard-bi-grid,
  .insight-stat-grid {
    grid-template-columns: 1fr;
  }

  .risk-toolbar,
  .cause-checklist-head {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-location-summary {
    align-items: flex-start;
    min-width: 0;
  }

  .cause-option-grid,
  .location-primary-row,
  .location-secondary-row {
    grid-template-columns: 1fr;
  }

  .location-primary-action,
  .location-actions .button {
    flex-basis: 100%;
    width: 100%;
  }

  .accident-map-large {
    height: 430px;
  }

  .accident-map-picker {
    height: 340px;
  }
}

@keyframes app-shell-reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes view-shell-fade {
  from {
    opacity: 0.84;
  }
  to {
    opacity: 1;
  }
}

@keyframes surface-enter {
  from {
    opacity: 0;
    filter: saturate(0.86) blur(10px);
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: none;
    transform: translateY(0) scale(1);
  }
}

@keyframes chart-grow-y {
  from {
    opacity: 0.28;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes chart-grow-x {
  from {
    opacity: 0.28;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.logged-in .app-frame,
  .login-hero,
  .login-card,
  .motion-scope.motion-enter,
  .motion-scope.motion-enter .motion-item,
  .motion-scope.motion-enter .trend-column-fill,
  .motion-scope.motion-enter .distribution-fill,
  .motion-scope.motion-enter .comparison-fill {
    animation: none !important;
  }

  .panel,
  .metric,
  .kpi-card,
  .summary-tile,
  .mini-metric-card,
  .distribution-item,
  .comparison-item,
  .alert-card,
  .task-item,
  .bar-row,
  .stage-chip,
  .button,
  .nav-item {
    transition: none !important;
  }
}

/* Executive application shell */
.app-frame {
  grid-template-columns: 276px minmax(0, 1fr);
}

.main-nav {
  height: 100vh;
  overflow-y: auto;
  padding: 22px 14px 18px;
  position: sticky;
  top: 0;
}

.brand-block {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  padding: 4px 6px 20px;
}

.official-logo-frame {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  overflow: hidden;
}

.official-logo-frame img {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.sidebar-official-logo {
  min-height: 74px;
  padding: 10px 12px;
  width: 100%;
}

.sidebar-official-logo img {
  width: 198px;
}

.login-official-logo {
  padding: 12px 16px;
  width: fit-content;
}

.login-hero-logo {
  filter: none;
  width: min(278px, 64vw);
}

.brand-copy {
  padding: 0 4px;
}

.brand-copy strong {
  font-size: 0;
  height: 0;
  overflow: hidden;
}

.brand-copy small {
  color: #35d2a3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-list {
  gap: 5px;
}

.nav-item {
  align-items: center;
  display: flex;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.nav-item svg {
  flex: 0 0 20px;
  height: 20px;
  stroke-width: 1.8;
  width: 20px;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  background: linear-gradient(135deg, #08735a, #00a67a);
  border-color: rgba(87, 231, 187, 0.34);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.topbar {
  padding: 18px 28px;
}

.topbar-title {
  gap: 10px;
  min-width: min(100%, 360px);
}

.topbar-brand-chip {
  background: #ffffff;
  border-color: var(--line-strong);
  border-radius: 8px;
  padding: 7px 12px;
}

.topbar-brand-chip img {
  height: 34px;
  object-fit: contain;
  width: 116px;
}

.topbar-heading {
  align-items: center;
  display: flex;
  gap: 13px;
}

.topbar-page-icon,
.heading-icon {
  align-items: center;
  background: var(--open-soft);
  border: 1px solid rgba(0, 166, 122, 0.18);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
}

.topbar-page-icon {
  height: 46px;
  width: 46px;
}

.topbar-page-icon svg {
  height: 23px;
  width: 23px;
}

.topbar h1 {
  font-size: 28px;
  line-height: 1.05;
}

.topbar-subtitle {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 5px;
}

.topbar-actions {
  gap: 9px;
}

.button,
.row-button,
.dashboard-tab {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.button-icon,
.dashboard-tab svg {
  flex: 0 0 auto;
  height: 17px;
  stroke-width: 2;
  width: 17px;
}

.theme-toggle > .button-icon {
  color: var(--brand);
}

.control-strip {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(18, 32, 26, 0.06);
  gap: 12px 14px;
  padding: 18px;
}

.panel {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(18, 32, 26, 0.07);
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .control-strip {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.panel-heading-with-icon {
  align-content: center;
  min-height: 42px;
  padding-left: 52px;
  position: relative;
}

.panel-heading-with-icon > .heading-icon {
  height: 40px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
}

.heading-icon svg {
  height: 19px;
  stroke-width: 1.9;
  width: 19px;
}

.panel-head {
  align-items: center;
}

.panel h2 {
  font-size: 18px;
  line-height: 1.2;
}

.section-title.panel-heading-with-icon {
  border-bottom: 1px solid var(--line);
  margin: 22px 0 12px;
  padding-bottom: 10px;
}

.record-count {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  min-height: 30px;
  padding: 5px 10px;
}

.dashboard-tabs {
  flex-wrap: wrap;
}

.dashboard-tab {
  min-height: 40px;
}

.kpi-card,
.metric {
  box-shadow: 0 8px 22px rgba(18, 32, 26, 0.07);
}

.metric-with-icon {
  padding-left: 68px;
}

.metric-icon {
  align-items: center;
  background: var(--open-soft);
  border: 1px solid rgba(0, 166, 122, 0.18);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  left: 16px;
  position: absolute;
  top: 18px;
  width: 40px;
}

.metric-icon svg {
  height: 19px;
  stroke-width: 1.9;
  width: 19px;
}

.kpi-icon {
  border-radius: 8px;
}

.data-table.paginated-table-host {
  overflow: visible;
}

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

.table-scroll-shell table {
  min-width: 820px;
}

.table-scroll-shell thead th {
  background: var(--surface-soft);
  border-bottom-color: var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  padding-bottom: 12px;
  padding-top: 12px;
  text-transform: uppercase;
}

.table-scroll-shell tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll-shell tbody tr {
  transition: background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.table-scroll-shell tbody tr:hover {
  box-shadow: inset 3px 0 0 var(--brand);
}

.pagination-bar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 2px 0;
}

.pagination-summary {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
}

.pagination-size {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.pagination-size select {
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  width: auto;
}

.pagination-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.pagination-button {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 9px;
}

.pagination-button:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.pagination-button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: var(--brand-contrast);
}

.pagination-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.pagination-button svg {
  height: 16px;
  width: 16px;
}

.pagination-gap {
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  min-width: 24px;
}

.finance-form-modern {
  display: block;
  margin: 0;
}

.finance-form-section {
  border-bottom: 1px solid var(--line-strong);
  padding: 4px 0 20px;
}

.finance-form-section + .finance-form-section {
  padding-top: 22px;
}

.finance-form-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.finance-form-section-head > span {
  align-items: center;
  background: var(--open-soft);
  border: 1px solid rgba(0, 166, 122, 0.18);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.finance-form-section-head svg {
  height: 19px;
  width: 19px;
}

.finance-form-section-head strong,
.finance-form-section-head small,
.finance-field-copy strong,
.finance-field-copy small,
.finance-notes-field > span strong,
.finance-notes-field > span small {
  display: block;
}

.finance-form-section-head strong {
  color: var(--ink);
  font-size: 15px;
}

.finance-form-section-head small,
.finance-field-copy small,
.finance-notes-field > span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 3px;
}

.finance-field-list {
  display: grid;
}

.finance-field-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  min-height: 64px;
  padding: 11px 0;
}

.finance-field-row input,
.finance-field-row select {
  margin: 0;
  min-height: 42px;
}

.finance-field-row input {
  text-align: right;
}

.finance-field-copy strong,
.finance-notes-field > span strong {
  color: var(--ink);
  font-size: 13px;
}

.finance-field-highlight {
  background: linear-gradient(90deg, transparent, var(--open-soft));
  box-shadow: inset -3px 0 0 var(--brand);
  padding-left: 10px;
  padding-right: 10px;
}

.finance-notes-field {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.3fr);
  padding-top: 20px;
}

.finance-notes-field textarea {
  min-height: 108px;
}

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

#receiptItemsTable select[data-field="classificacao"] {
  min-width: 190px;
}

@media (max-width: 1200px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .main-nav {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
  }

  .brand-block {
    align-items: center;
    flex-direction: row;
    min-width: 250px;
    padding: 0 12px 0 0;
  }

  .sidebar-official-logo {
    min-height: 54px;
    padding: 7px 9px;
    width: 154px;
  }

  .brand-copy {
    padding: 0;
  }

  .nav-item {
    min-height: 42px;
    width: auto;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 16px;
  }

  .topbar-title,
  .topbar-brand-chip {
    width: 100%;
  }

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

  .topbar h1 {
    font-size: 24px;
  }

  .topbar-page-icon {
    height: 42px;
    width: 42px;
  }

  .panel-heading-with-icon {
    padding-left: 48px;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: flex-start;
  }

  .finance-field-row,
  .finance-notes-field {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .finance-field-row input,
  .finance-field-row select {
    max-width: none;
  }
}

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

  body::before,
  .content-shell::before {
    display: none !important;
  }

  .login-screen,
  .main-nav,
  .topbar,
  .control-strip,
  .panel-head,
  .report-settings,
  .view:not(.active),
  .panel > :not(.report-paper) {
    display: none !important;
  }

  .app-frame,
  .content-shell,
  .page,
  .view,
  .panel {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #ffffff !important;
  }

  .report-paper {
    border: 0;
    box-shadow: none;
    max-width: none;
    min-height: auto;
    padding: 22mm 18mm;
  }
}
