:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #18191b;
  --muted: #667085;
  --line: #dde3ea;
  --charcoal: #171717;
  --wine: #9a302f;
  --wine-dark: #651412;
  --wine-soft: #fae8e6;
  --teal: #147d74;
  --teal-soft: #e7f5f2;
  --amber: #b7791f;
  --amber-soft: #fff4d7;
  --green: #2f7a55;
  --green-soft: #e6f4ec;
  --red: #b42318;
  --red-soft: #fde8e5;
  --qbiax-blue: #005cff;
  --qbiax-blue-dark: #0046c7;
  --qbiax-blue-soft: #eaf2ff;
  --qbiax-cloud: #e9eaee;
  --qbiax-stone: #cbbbbb;
  --shadow: 0 18px 44px rgba(24, 25, 27, 0.09);
  --dashboard-scale: 0.9;
  --app-header-height: 72px;
  --command-band-height: 130px;
  --sticky-gap: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 92, 255, 0.12), transparent 30%),
    radial-gradient(circle at 90% 88%, rgba(20, 125, 116, 0.1), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 52%, #ffffff 100%);
  color: #172033;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 54, 128, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 54, 128, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 86%);
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: -44px;
  z-index: 0;
  background: url("../img/login-background-soft.png") center / cover no-repeat;
  filter: blur(18px);
  opacity: 0.62;
  transform: scale(1.04);
  pointer-events: none;
}

.login-screen > * {
  position: relative;
  z-index: 2;
}

.login-corner-logo {
  position: absolute;
  top: clamp(14px, 2.4vw, 28px);
  left: clamp(14px, 2.4vw, 28px);
  z-index: 2;
  width: min(260px, 36vw);
  height: auto;
  object-fit: contain;
}

.login-panel {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(91, 166, 255, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 30, 58, 0.88), rgba(4, 10, 24, 0.92)),
    rgba(7, 14, 30, 0.92);
  box-shadow: 0 24px 64px rgba(15, 31, 61, 0.12);
  padding: clamp(28px, 5vw, 46px) clamp(24px, 5vw, 44px);
}

.login-panel-password {
  width: min(720px, 100%);
  padding-top: 36px;
  padding-bottom: 36px;
}

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

.login-logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 32px;
}

.login-logo-stacked {
  flex-direction: column;
  gap: 12px;
}

.login-logo-lockup img {
  width: 92px;
  height: 82px;
  object-fit: contain;
  filter: none;
}

.login-logo-lockup strong,
.login-logo-lockup span {
  display: block;
}

.login-logo-lockup strong {
  color: #d9e6f8;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.login-logo-lockup span {
  margin-top: 4px;
  color: #d9e6f8;
  font-size: 15px;
  font-weight: 850;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-brand span {
  color: #d9e6f8;
}

.login-panel h1 {
  margin: 0 0 22px;
  color: #fff;
  font-size: 30px;
  line-height: 1.05;
  text-align: left;
  text-shadow: none;
}

.login-copy {
  margin: 12px 0 32px;
  color: #aab6c9;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}

.startup-screen {
  --startup-progress-value: 0%;
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 32px 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(0, 92, 255, 0.08), transparent 34%),
    repeating-linear-gradient(90deg, rgba(0, 92, 255, 0.025) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(20, 125, 116, 0.022) 0 1px, transparent 1px 76px),
    #ffffff;
  color: #172033;
}

.startup-panel {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(480px, 100%);
  text-align: center;
}

.startup-icon-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 238px;
  aspect-ratio: 1;
  margin-bottom: 28px;
}

.startup-icon-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 238px;
  aspect-ratio: 1;
}

.startup-icon {
  position: absolute;
  width: 230px;
  height: 230px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.startup-icon.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.startup-percent {
  display: block;
  color: #1d2939;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
}

.startup-progress {
  width: min(420px, 100%);
  height: 5px;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 999px;
  background: #dce7f7;
}

.startup-progress span {
  display: block;
  width: var(--startup-progress-value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #005cff, #47c9ff);
  box-shadow: 0 0 16px rgba(0, 92, 255, 0.38);
  transition: width 0.36s ease;
}

.startup-panel p {
  margin: 22px 0 0;
  color: #60708f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-transform: uppercase;
}

.startup-screen.is-error {
  --startup-progress-value: 100%;
}

.startup-screen.is-error .startup-progress span {
  background: var(--wine);
  box-shadow: 0 0 16px rgba(154, 48, 47, 0.22);
}

.startup-screen.is-error .startup-percent {
  color: var(--wine);
}

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

.login-form label,
.field-control,
.filter-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.login-form label {
  gap: 0;
  color: #e7eefc;
  font-size: 14px;
  font-weight: 800;
}

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

.login-form input,
.field-control input,
.user-form input,
.user-form select,
.filter-trigger,
.filter-search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.login-input-shell {
  position: relative;
  display: grid;
  align-items: center;
}

.login-field-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #a8b4c8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-form input {
  height: 50px;
  border: 1px solid rgba(120, 151, 195, 0.38);
  border-radius: 10px;
  background: rgba(5, 14, 31, 0.72);
  color: #f6fbff;
  padding: 0 52px 0 46px;
  font-size: 14px;
  box-shadow: 0 0 0 1px rgba(11, 85, 187, 0.08) inset;
}

.login-form input::placeholder {
  color: #95a2b6;
  opacity: 1;
}

.field-control input::placeholder,
.user-form input::placeholder,
.filter-search::placeholder {
  color: #aab4c1;
  opacity: 1;
}

.login-form .field-hint {
  color: #aebbd0;
  font-size: 12px;
}

.login-form input:focus {
  border-color: #2a9dff;
  box-shadow:
    0 0 0 3px rgba(0, 92, 255, 0.18),
    0 0 22px rgba(0, 166, 255, 0.18);
}

.field-control input:focus,
.user-form input:focus,
.user-form select:focus,
.filter-trigger:focus,
.filter-search:focus {
  border-color: var(--qbiax-blue);
  box-shadow: 0 0 0 3px rgba(0, 92, 255, 0.16);
}

.login-submit,
.export-button,
.ghost-button,
.filter-head button,
.pager button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
}

.login-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background-color: var(--qbiax-blue);
  background-image: none;
  color: #fff;
  font-size: 15px;
  box-shadow:
    0 12px 26px rgba(0, 92, 255, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.16s ease,
    filter 0.2s ease;
}

.login-submit svg {
  position: absolute;
  right: 18px;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-submit:hover {
  background-color: var(--qbiax-blue-dark);
  background-image: none;
  box-shadow:
    0 16px 32px rgba(0, 92, 255, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.login-submit:active,
.login-submit.is-pressed {
  box-shadow:
    0 8px 18px rgba(0, 92, 255, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.18) inset;
  filter: brightness(0.98);
  transform: translateY(1px) scale(0.992);
}

.login-submit:focus-visible,
.password-toggle:focus-visible {
  box-shadow:
    0 0 0 4px rgba(0, 92, 255, 0.18),
    0 12px 26px rgba(0, 92, 255, 0.22);
  outline: none;
}

.login-submit[disabled] {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.login-submit[aria-busy="true"] span {
  transform: translateX(-8px);
}

.login-submit[aria-busy="true"]::after {
  content: "";
  position: absolute;
  right: calc(50% - 66px);
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.login-submit[aria-busy="true"] svg {
  opacity: 0;
}

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b6c2d4;
  padding: 0;
}

.password-toggle:hover {
  color: #2bc4ff;
}

.password-toggle svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #aab6c9;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.login-help-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.forgot-password {
  border: 0;
  background: transparent;
  color: #8cc8ff;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
}

.forgot-password:hover,
.forgot-password:focus-visible {
  color: #cde8ff;
  outline: none;
  text-decoration: underline;
}

.login-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 20, 0.56);
  backdrop-filter: blur(5px);
}

.login-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid rgba(120, 151, 195, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 30, 58, 0.96), rgba(4, 10, 24, 0.98)),
    rgba(7, 14, 30, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
  color: #eef6ff;
  padding: 30px 28px 28px;
}

.login-dialog h2 {
  margin: 0 38px 12px 0;
  color: #f7fbff;
  font-size: 22px;
  line-height: 1.2;
}

.login-dialog p {
  margin: 0;
  color: #aab6c9;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.login-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(120, 151, 195, 0.26);
  border-radius: 9px;
  background: rgba(5, 14, 31, 0.6);
  color: #c5d3e8;
  padding: 0;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.login-dialog-close:hover,
.login-dialog-close:focus-visible {
  background: rgba(0, 92, 255, 0.16);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.login-dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  display: block;
  min-height: 100vh;
  overflow: visible;
  background: var(--bg);
  zoom: var(--dashboard-scale);
}

.admin-shell {
  min-height: 100vh;
  background: #eef1f4;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: auto auto minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.86);
  background: #fff;
  backdrop-filter: none;
}

.main-dashboard-menu {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.module-switch {
  display: inline-flex;
}

.module-switch-select {
  min-width: 132px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 34px 0 12px;
  font-size: 12px;
  font-weight: 850;
  outline: none;
}

.module-switch-select:focus {
  border-color: var(--qbiax-blue);
  box-shadow: 0 0 0 3px rgba(0, 92, 255, 0.14);
}

.main-dashboard-item {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.main-dashboard-item.active {
  border-color: rgba(0, 92, 255, 0.22);
  background: var(--qbiax-blue-soft);
  color: var(--qbiax-blue-dark);
}

.main-dashboard-item[data-module-home] {
  display: none;
}

.brand-lockup img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.admin-tabs {
  display: flex;
  justify-content: center;
}

.menu-item {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 15px;
  font-size: 13px;
  font-weight: 850;
}

.menu-item.active {
  border-color: rgba(0, 92, 255, 0.22);
  background: var(--qbiax-blue-soft);
  color: var(--qbiax-blue-dark);
}

.header-actions {
  grid-column: -2 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.data-pill {
  border-color: rgba(0, 92, 255, 0.2);
  color: var(--qbiax-blue-dark);
  background: var(--qbiax-blue-soft);
}

.dashboard-home {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 28px 28px 56px;
}

.module-home {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 38px 28px 64px;
}

.module-home-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.module-home-hero h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
}

.module-home-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.module-card,
.module-empty-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    var(--surface);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
}

.module-card {
  display: grid;
  gap: 22px;
  min-height: 360px;
  padding: 24px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.module-card:hover,
.module-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(0, 92, 255, 0.34);
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.13);
}

.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.module-card-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 12px;
  background: #101828;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.module-card--qby .module-card-icon {
  background: var(--qbiax-blue);
}

.module-card-copy {
  display: grid;
  gap: 10px;
}

.module-card-copy h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.module-card-copy p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.module-card-preview {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.module-preview-bar,
.module-preview-line,
.module-preview-message {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--qbiax-blue), var(--teal));
}

.module-preview-bar {
  width: var(--w);
}

.module-preview-line {
  width: 74%;
}

.module-preview-line.wide {
  width: 88%;
}

.module-preview-line.short {
  width: 44%;
}

.module-preview-message {
  width: 62%;
  height: 28px;
  border-radius: 8px;
  background: var(--qbiax-blue-soft);
}

.module-card-action {
  justify-self: start;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--module-accent);
  color: #fff;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 900;
}

.module-home {
  width: min(1560px, 100%);
  padding-top: 34px;
}

.module-home-hero {
  max-width: 920px;
  margin-bottom: 26px;
}

.module-cards {
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 18px;
}

.module-card {
  --module-accent: var(--qbiax-blue);
  --module-accent-2: #00a3ff;
  --module-accent-soft: var(--qbiax-blue-soft);
  position: relative;
  gap: 0;
  min-height: 285px;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(0, 92, 255, 0.1), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #ffffff 100%);
}

.module-card--qby {
  --module-accent: #00a3ff;
  --module-accent-2: var(--qbiax-blue);
  --module-accent-soft: #edf8ff;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--module-accent), var(--module-accent-2));
}

.module-card-copy {
  align-content: start;
  padding: 28px 30px 28px 34px;
}

.module-card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--module-accent), var(--module-accent-2));
  box-shadow: 0 16px 32px rgba(0, 92, 255, 0.18);
  font-size: 24px;
}

.module-card-copy h2 {
  font-size: clamp(30px, 3.1vw, 46px);
}

.module-card-copy p {
  max-width: 40ch;
  font-size: 14px;
}

.module-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.module-card-chips span {
  border: 1px solid rgba(0, 92, 255, 0.16);
  border-radius: 999px;
  background: var(--module-accent-soft);
  color: var(--qbiax-blue-dark);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 850;
}

.module-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 30px 28px 34px;
}

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

.module-empty-card {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-home-hero {
  display: grid;
  gap: 6px;
  margin: 2px 0 22px;
}

.dashboard-home-hero h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
}

.dashboard-home-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 430px));
  align-items: start;
  gap: 38px;
}

.dashboard-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 92, 255, 0.34);
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.13);
}

.dashboard-card--with-tools {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.dashboard-card-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #eef2f6;
}

.dashboard-empty-card {
  display: grid;
  min-height: 148px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.dashboard-card-tools {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  padding: 8px 5px;
}

.dashboard-card-tool {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.dashboard-card-tool svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-card-tool:hover,
.dashboard-card-tool:focus-visible {
  border-color: rgba(0, 92, 255, 0.28);
  background: var(--qbiax-blue-soft);
  color: var(--qbiax-blue-dark);
  outline: none;
}

.dashboard-card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f8fafc;
}

.dashboard-card-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.dashboard-cover {
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template:
    "top mark" 34px
    "copy mark" minmax(72px, 1fr)
    "visual visual" 78px
    "chips note" 36px / minmax(0, 1fr) 142px;
  gap: 10px 14px;
  padding: 18px 18px 14px;
  color: #fff;
}

.dashboard-cover::before,
.dashboard-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.dashboard-cover::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.56;
}

.dashboard-cover::after {
  right: -70px;
  bottom: -88px;
  width: 260px;
  height: 230px;
  transform: rotate(-14deg);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
}

.dashboard-cover--payables {
  background:
    linear-gradient(135deg, #1b1111 0%, #261111 47%, #651412 100%);
}

.dashboard-cover--receivables {
  background:
    linear-gradient(135deg, #061b22 0%, #082b2c 52%, #147d74 100%);
}

.dashboard-cover--accounting {
  background:
    linear-gradient(135deg, #101315 0%, #1a2025 52%, #355a52 100%);
}

.dashboard-cover-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-cover-top span {
  color: rgba(227, 235, 248, 0.78);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-cover-top i {
  display: block;
  width: 44px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.48;
}

.dashboard-cover-copy {
  grid-area: copy;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.dashboard-cover-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 31px;
  font-weight: 900;
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-cover-copy em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
}

.dashboard-cover-mark {
  grid-area: mark;
  align-self: start;
  justify-self: end;
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.dashboard-cover-mark span {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-cover-mark span:first-child {
  inset: 14px 13px auto;
  height: 6px;
}

.dashboard-cover-mark span:last-child {
  inset: auto 13px 14px;
  height: 22px;
  background: var(--cover-accent, rgba(255, 255, 255, 0.72));
}

.dashboard-cover-visual {
  grid-area: visual;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  min-width: 0;
}

.dashboard-cover-chips {
  grid-area: chips;
  display: flex;
  align-items: end;
  gap: 7px;
  min-width: 0;
}

.dashboard-cover-chips span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
}

.dashboard-cover small {
  grid-area: note;
  align-self: end;
  justify-self: end;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 820;
  text-align: right;
}

.cover-deadlines,
.cover-flow,
.cover-ledger,
.cover-risk,
.cover-pipeline,
.cover-waterfall {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.cover-deadlines {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 12px;
}

.cover-deadlines span {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.cover-deadlines span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 72%;
  border-radius: inherit;
  background: #ff7b61;
}

.cover-deadlines span:nth-child(2)::before {
  width: 48%;
  background: #f5b544;
}

.cover-deadlines span:nth-child(3)::before {
  width: 86%;
  background: #ef4444;
}

.cover-risk {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
}

.cover-risk i {
  flex: 1;
  border-radius: 999px 999px 4px 4px;
  background: #ef4444;
}

.cover-risk i:nth-child(1) {
  height: 32%;
}

.cover-risk i:nth-child(2) {
  height: 58%;
}

.cover-risk i:nth-child(3) {
  height: 84%;
}

.cover-risk i:nth-child(4) {
  height: 48%;
  background: #f97316;
}

.cover-flow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px;
}

.cover-flow::before {
  content: "";
  position: absolute;
  right: 25px;
  left: 25px;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(117, 229, 209, 0.36);
}

.cover-flow span {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid #7ddfd1;
  border-radius: 50%;
  background: #083034;
}

.cover-flow span:nth-child(2) {
  transform: translateY(-14px);
}

.cover-flow span:nth-child(3) {
  transform: translateY(12px);
}

.cover-pipeline {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 12px;
}

.cover-pipeline i {
  display: block;
  height: 11px;
  border-radius: 999px;
  background: #7ddfd1;
}

.cover-pipeline i:nth-child(2) {
  width: 72%;
  background: #37b9a7;
}

.cover-pipeline i:nth-child(3) {
  width: 46%;
  background: #e4f9f5;
}

.cover-ledger {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.cover-ledger span {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.cover-ledger span::before,
.cover-ledger span::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.cover-ledger span::before {
  left: 0;
  width: 58%;
  background: #8fd3c4;
}

.cover-ledger span::after {
  right: 0;
  width: 22%;
  background: rgba(255, 255, 255, 0.48);
}

.cover-ledger span:nth-child(2)::before {
  width: 34%;
  background: #f87171;
}

.cover-ledger span:nth-child(3)::before {
  width: 76%;
}

.cover-ledger span:nth-child(4)::before {
  width: 48%;
  background: #d1d5db;
}

.cover-waterfall {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px;
}

.cover-waterfall i {
  flex: 1;
  border-radius: 5px;
  background: #8fd3c4;
}

.cover-waterfall i:nth-child(1) {
  height: 72%;
}

.cover-waterfall i:nth-child(2) {
  height: 38%;
  background: #f87171;
}

.cover-waterfall i:nth-child(3) {
  height: 58%;
}

.cover-waterfall i:nth-child(4) {
  height: 46%;
  background: #e5e7eb;
}

/* Restrained dashboard covers for the menu. */
.dashboard-cover {
  grid-template:
    "top mark" 18px
    "copy mark" minmax(54px, 1fr)
    "visual visual" 62px
    "chips note" 24px / minmax(0, 1fr) 112px;
  gap: 7px 10px;
  padding: 13px 14px 11px;
  background: #f8fafc;
  color: #172033;
}

.dashboard-cover::before {
  inset: 0 0 auto;
  height: 92px;
  background: linear-gradient(135deg, #151515 0%, var(--cover-hero, #171717) 100%);
  background-size: auto;
  opacity: 1;
}

.dashboard-cover::after {
  display: none;
}

.dashboard-cover--payables {
  --cover-accent: #b42318;
  --cover-accent-2: #b7791f;
  --cover-hero: #241313;
  --cover-soft: #fff4f2;
}

.dashboard-cover--receivables {
  --cover-accent: #147d74;
  --cover-accent-2: #2f7a55;
  --cover-hero: #102626;
  --cover-soft: #eefaf7;
}

.dashboard-cover--accounting {
  --cover-accent: #147d74;
  --cover-accent-2: #64748b;
  --cover-hero: #20262b;
  --cover-soft: #f1f5f9;
}

.dashboard-cover-top span {
  color: #b8c5d8;
  font-size: 9px;
}

.dashboard-cover-top i {
  width: 34px;
  background: var(--cover-accent);
  opacity: 0.9;
}

.dashboard-cover-copy {
  gap: 4px;
}

.dashboard-cover-copy strong {
  color: #fff;
  font-size: 24px;
  line-height: 1.06;
}

.dashboard-cover-copy em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.dashboard-cover-mark {
  align-self: stretch;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: none;
  width: 44px;
  height: 44px;
}

.dashboard-cover-mark span:first-child {
  inset: 12px 10px auto;
  height: 5px;
}

.dashboard-cover-mark span:last-child {
  inset: auto 10px 11px;
  height: 16px;
  background: var(--cover-accent);
}

.dashboard-cover-visual {
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.dashboard-cover-chips {
  gap: 5px;
}

.dashboard-cover-chips span {
  border-color: #d9e0ea;
  background: #fff;
  color: #667085;
  padding: 5px 7px;
  font-size: 9px;
}

.dashboard-cover small {
  color: #667085;
  font-size: 9px;
}

.cover-deadlines,
.cover-flow,
.cover-ledger,
.cover-risk,
.cover-pipeline,
.cover-waterfall {
  border-color: #d9e0ea;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.cover-deadlines {
  gap: 8px;
  padding: 11px;
}

.cover-deadlines span {
  height: 6px;
  background: #eef2f6;
}

.cover-deadlines span::before {
  background: var(--cover-accent);
}

.cover-deadlines span:nth-child(2)::before {
  background: var(--cover-accent-2);
}

.cover-deadlines span:nth-child(3)::before {
  background: var(--cover-accent);
}

.cover-risk {
  gap: 6px;
  padding: 11px;
}

.cover-risk i {
  background: var(--cover-accent);
}

.cover-risk i:nth-child(4) {
  background: var(--cover-accent-2);
}

.cover-flow::before {
  right: 18px;
  left: 18px;
  height: 3px;
  background: rgba(20, 125, 116, 0.22);
}

.cover-flow span {
  width: 14px;
  height: 14px;
  border-width: 3px;
  border-color: var(--cover-accent);
  background: #fff;
}

.cover-flow span:nth-child(2) {
  transform: translateY(-9px);
}

.cover-flow span:nth-child(3) {
  transform: translateY(8px);
}

.cover-pipeline {
  gap: 7px;
  padding: 11px;
}

.cover-pipeline i {
  height: 8px;
  background: var(--cover-accent);
}

.cover-pipeline i:nth-child(2) {
  background: var(--cover-accent-2);
}

.cover-pipeline i:nth-child(3) {
  background: #cbd5e1;
}

.cover-ledger {
  gap: 7px;
  padding: 11px;
}

.cover-ledger span {
  height: 7px;
  background: #eef2f6;
}

.cover-ledger span::before {
  background: var(--cover-accent);
}

.cover-ledger span::after {
  background: #cbd5e1;
}

.cover-ledger span:nth-child(2)::before {
  background: #b42318;
}

.cover-ledger span:nth-child(4)::before {
  background: var(--cover-accent-2);
}

.cover-waterfall {
  gap: 6px;
  padding: 11px;
}

.cover-waterfall i {
  background: var(--cover-accent);
}

.cover-waterfall i:nth-child(2) {
  background: #b42318;
}

.cover-waterfall i:nth-child(4) {
  background: var(--cover-accent-2);
}

/* Text-first dashboard cards. */
.dashboard-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 320px));
  gap: 22px;
}

.dashboard-card--with-tools {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.dashboard-card-tools {
  padding: 8px 4px;
}

.dashboard-card-preview {
  aspect-ratio: 4 / 3;
  background: #fff;
}

.dashboard-cover {
  display: grid;
  grid-template:
    "top" auto
    "copy" 1fr / minmax(0, 1fr);
  gap: 16px;
  padding: 19px 18px 18px;
  color: #101828;
  background: #fff;
}

.dashboard-cover::before {
  inset: 0 0 auto;
  height: 4px;
  background: var(--cover-accent, var(--qbiax-blue));
  opacity: 1;
}

.dashboard-cover::after,
.dashboard-cover-mark,
.dashboard-cover-visual,
.dashboard-cover-chips,
.dashboard-cover small {
  display: none;
}

.dashboard-cover--payables {
  --cover-accent: #b42318;
  --cover-soft: #fffafa;
  background: linear-gradient(180deg, #fffafa 0%, #fff 52%);
}

.dashboard-cover--receivables {
  --cover-accent: #147d74;
  --cover-soft: #f7fffd;
  background: linear-gradient(180deg, #f7fffd 0%, #fff 52%);
}

.dashboard-cover--accounting {
  --cover-accent: #475467;
  --cover-soft: #f8fafc;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 52%);
}

.dashboard-cover-top {
  grid-area: top;
  gap: 8px;
}

.dashboard-cover-top span {
  color: #667085;
  font-size: 10px;
}

.dashboard-cover-top i {
  width: 28px;
  height: 2px;
  background: var(--cover-accent);
  opacity: 1;
}

.dashboard-cover-copy {
  grid-area: copy;
  align-content: center;
  gap: 12px;
}

.dashboard-cover-copy strong {
  color: #101828;
  font-size: 29px;
  line-height: 1.16;
  padding-bottom: 2px;
  white-space: normal;
}

.dashboard-cover-copy p {
  max-width: 28ch;
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-card-caption {
  display: grid;
  gap: 4px;
  min-height: 58px;
  place-items: center;
  border-top: 1px solid var(--line);
  padding: 11px 12px 13px;
  text-align: center;
}

.dashboard-card-caption strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
}

.dashboard-card-caption span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-access-dialog {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.46);
}

.dashboard-access-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(220px, 1fr) auto auto;
  width: min(980px, 100%);
  min-height: min(640px, calc(100vh - 44px));
  max-height: calc(100vh - 44px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.24);
  padding: 18px 0 0;
}

.dashboard-access-panel h2 {
  margin: 0 56px 10px 20px;
  color: #101828;
  font-size: 19px;
  font-weight: 750;
}

.dashboard-access-panel p {
  margin: 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-access-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
}

.dashboard-access-toolbar,
.dashboard-access-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8f8f9;
  padding: 12px 24px;
}

.dashboard-access-list-head {
  display: grid;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid #d5d7db;
  background: #f3f3f4;
  color: #23252a;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 850;
}

.dashboard-access-current-head {
  grid-template-columns: 44px minmax(0, 1fr) 82px;
  gap: 12px;
}

.dashboard-access-picker-head {
  grid-template-columns: 34px 44px minmax(180px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  padding-left: 22px;
}

.dashboard-access-toolbar button {
  min-height: 38px;
  border: 1px solid rgba(154, 48, 47, 0.26);
  border-radius: 7px;
  background: #fff;
  color: #c4143d;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 850;
}

.dashboard-access-picker-toolbar input {
  width: min(440px, 100%);
  min-height: 38px;
  border: 1px solid #c9ced6;
  border-radius: 999px;
  background: #fff;
  padding: 0 18px;
  color: #333;
  font-size: 14px;
}

.dashboard-access-users {
  display: grid;
  align-content: start;
  overflow: auto;
  margin: 0;
}

.dashboard-access-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid #d5d7db;
  background: #fff;
  padding: 10px 24px;
}

.dashboard-access-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: #7d7d7d;
  color: #fff;
}

.dashboard-access-avatar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-access-identity {
  min-width: 0;
}

.dashboard-access-identity strong,
.dashboard-access-identity em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-access-identity strong {
  color: #2b2d31;
  font-size: 15px;
  font-weight: 650;
}

.dashboard-access-identity em {
  margin-top: 2px;
  color: #70747c;
  font-size: 14px;
  font-style: normal;
}

.dashboard-access-user.locked {
  color: #777;
}

.dashboard-access-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d5d7db;
  border-radius: 7px;
  background: #f6f6f7;
  color: #333;
  padding: 0;
}

.dashboard-access-remove svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-access-remove:hover,
.dashboard-access-remove:focus-visible {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--red-soft);
  color: var(--red);
  outline: none;
}

.dashboard-access-lock {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-access-loading,
.dashboard-access-message {
  display: grid;
  min-height: 44px;
  align-items: center;
  padding: 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-access-panel > .form-actions {
  justify-content: flex-end;
  border-top: 1px solid #d5d7db;
  background: #fff;
  padding: 14px 20px;
}

.dashboard-access-panel > .form-actions button {
  min-width: 160px;
  min-height: 42px;
  font-size: 14px;
}

.dashboard-access-picker-dialog {
  z-index: 190;
}

.dashboard-access-picker-panel {
  width: min(980px, 100%);
  grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
}

.dashboard-access-picker-users {
  display: grid;
  align-content: start;
  overflow: auto;
}

.dashboard-access-picker-user {
  display: grid;
  grid-template-columns: 34px 44px minmax(180px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #d5d7db;
  background: #fff;
  padding: 6px 22px;
}

.dashboard-access-picker-user input {
  width: 19px;
  height: 19px;
  accent-color: #c4143d;
}

.dashboard-access-picker-user.is-locked {
  background: #fafafa;
  color: #767a82;
}

.dashboard-access-picker-user.is-locked .dashboard-access-avatar {
  background: #9a9a9a;
}

.dashboard-access-picker-user.is-locked input {
  opacity: 0.55;
}

.dashboard-access-picker-name,
.dashboard-access-picker-email {
  display: block;
  overflow: hidden;
  color: #2b2d31;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-access-picker-email {
  color: #666b73;
}

.dashboard-access-picker-panel > .form-actions button:first-child {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

#dashboardAccessPickerSelect {
  border-color: #c4143d;
  background: #c4143d;
  color: #fff;
}

#dashboardAccessPickerSelect:disabled {
  border-color: #d5d7db;
  background: #a9abb0;
  color: #fff;
  cursor: not-allowed;
}

.preview-shell {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 20px 1fr;
  background: #f3f5f7;
}

.preview-rail {
  display: grid;
  align-content: start;
  gap: 6px;
  background: #7b1515;
  padding: 10px 5px;
}

.preview-shell--receipts .preview-rail {
  background: #0d5c70;
}

.preview-rail i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.88);
}

.preview-canvas {
  display: grid;
  grid-template-rows: 14px 34px 20px 30px 1fr;
  gap: 6px;
  padding: 8px;
}

.preview-topline,
.preview-filters,
.preview-insights,
.preview-body {
  min-width: 0;
}

.preview-topline {
  display: grid;
  grid-template-columns: 1fr 34px 34px 44px;
  gap: 5px;
  align-items: center;
}

.preview-topline span,
.preview-filters span,
.preview-list span {
  display: block;
  border-radius: 3px;
  background: #ffffff;
  border: 1px solid #d8dee8;
}

.preview-topline span {
  height: 9px;
}

.preview-hero {
  border-radius: 4px;
  background: #151515;
}

.preview-filters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.preview-filters span {
  height: 18px;
}

.preview-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.preview-insights span {
  position: relative;
  min-height: 26px;
  border: 1px solid #d9e0ea;
  border-radius: 4px;
  background: #fff;
}

.preview-insights span::before,
.preview-insights span::after {
  content: "";
  position: absolute;
  left: 6px;
  border-radius: 999px;
}

.preview-insights span::before {
  top: 7px;
  width: var(--w);
  height: 4px;
  background: #c42119;
}

.preview-insights span::after {
  top: 15px;
  width: calc(var(--w) * 0.72);
  height: 3px;
  background: #dfe5ec;
}

.preview-shell--receipts .preview-insights span::before {
  background: #0a7f78;
}

.preview-body {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 6px;
}

.preview-chart,
.preview-list {
  border: 1px solid #d9e0ea;
  border-radius: 4px;
  background: #fff;
}

.preview-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  padding: 12px 10px 8px;
}

.preview-chart i {
  flex: 1;
  height: var(--h);
  min-height: 12px;
  border-radius: 3px 3px 0 0;
  background: #8d221f;
}

.preview-shell--receipts .preview-chart i {
  background: #0d7880;
}

.preview-list {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 9px;
}

.preview-list span {
  height: 8px;
}

.preview-shell--accounting {
  background: #eef2f5;
}

.preview-shell--accounting .preview-rail {
  background: #26323d;
}

.preview-shell--accounting .preview-rail i:nth-child(1),
.preview-shell--accounting .preview-rail i:nth-child(4) {
  background: #8fd3c4;
}

.preview-accounting-canvas {
  display: grid;
  grid-template-rows: 14px 38px 30px 1fr;
  gap: 6px;
  min-width: 0;
  padding: 8px;
}

.preview-accounting-topline {
  display: grid;
  grid-template-columns: 1fr 42px 56px;
  gap: 5px;
  align-items: center;
}

.preview-accounting-topline span,
.preview-accounting-hero,
.preview-accounting-kpis span,
.preview-accounting-statement,
.preview-accounting-timeline {
  border: 1px solid #d8dee8;
  background: #fff;
}

.preview-accounting-topline span {
  height: 9px;
  border-radius: 3px;
}

.preview-accounting-hero {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #171717;
}

.preview-accounting-hero span,
.preview-accounting-hero strong,
.preview-accounting-hero em {
  position: absolute;
  left: 12px;
  display: block;
  border-radius: 999px;
}

.preview-accounting-hero span {
  top: 9px;
  width: 64px;
  height: 4px;
  background: #8fd3c4;
}

.preview-accounting-hero strong {
  top: 18px;
  width: 132px;
  height: 7px;
  background: rgba(255, 255, 255, 0.92);
}

.preview-accounting-hero em {
  top: 29px;
  width: 88px;
  height: 3px;
  background: rgba(255, 255, 255, 0.45);
}

.preview-accounting-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.preview-accounting-kpis span {
  position: relative;
  min-width: 0;
  border-radius: 4px;
}

.preview-accounting-kpis span::before,
.preview-accounting-kpis span::after,
.preview-accounting-statement span::before,
.preview-accounting-statement span::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.preview-accounting-kpis span::before {
  top: 7px;
  left: 7px;
  width: 42%;
  height: 4px;
  background: #dce3eb;
}

.preview-accounting-kpis span::after {
  left: 7px;
  bottom: 7px;
  width: 68%;
  height: 6px;
}

.preview-accounting-kpis .revenue::after {
  background: #2f7a55;
}

.preview-accounting-kpis .expense::after {
  background: #b42318;
}

.preview-accounting-kpis .result::after {
  background: #147d74;
}

.preview-accounting-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6px;
  min-width: 0;
}

.preview-accounting-statement {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
  padding: 9px;
  border-radius: 4px;
}

.preview-accounting-statement span {
  position: relative;
  display: block;
  min-height: 10px;
}

.preview-accounting-statement span::before {
  top: 3px;
  left: 0;
  width: var(--w);
  height: 4px;
  background: #cfd7e1;
}

.preview-accounting-statement span::after {
  top: 2px;
  right: 0;
  width: 34px;
  height: 6px;
  background: #e9edf2;
}

.preview-accounting-statement .revenue::before {
  background: #2f7a55;
}

.preview-accounting-statement .deduction::before,
.preview-accounting-statement .expense::before {
  background: #b42318;
}

.preview-accounting-statement .subtotal::before {
  background: #b7791f;
}

.preview-accounting-statement .total::before {
  height: 6px;
  background: #147d74;
}

.preview-accounting-timeline {
  display: flex;
  align-items: end;
  gap: 6px;
  min-width: 0;
  padding: 12px 10px 8px;
  border-radius: 4px;
}

.preview-accounting-timeline i {
  flex: 1;
  height: var(--h);
  min-height: 14px;
  border-radius: 999px 999px 3px 3px;
  background: #147d74;
}

.preview-accounting-timeline i.negative {
  background: #b42318;
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(0, 92, 255, 0.22);
  color: var(--qbiax-blue-dark);
  background: var(--qbiax-blue-soft);
}

.export-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.export-icon-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  justify-content: center;
  width: 38px;
  padding: 0;
}

.export-icon-button img {
  width: 24px;
  height: 24px;
}

.fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
}

.fullscreen-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.fullscreen-collapse-icon {
  display: none;
}

.fullscreen-button.is-fullscreen .fullscreen-expand-icon {
  display: none;
}

.fullscreen-button.is-fullscreen .fullscreen-collapse-icon {
  display: inline;
}

.workspace {
  --workspace-padding: 16px;
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: var(--sticky-gap);
  width: min(1680px, 100%);
  min-height: auto;
  margin: 0 auto;
  padding: var(--workspace-padding);
  overflow: visible;
  background: var(--bg);
}

.admin-workspace {
  display: grid;
  gap: 16px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.admin-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.admin-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-sticky-head {
  position: sticky;
  top: calc(var(--app-header-height) + var(--workspace-padding));
  z-index: 80;
  display: grid;
  gap: var(--sticky-gap);
  background: var(--bg);
  isolation: isolate;
}

.dashboard-sticky-head::before {
  content: "";
  position: absolute;
  top: calc(var(--workspace-padding) * -1);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
}

.command-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--command-band-height);
  height: var(--command-band-height);
  padding: 22px;
  border-radius: 10px;
  background: var(--charcoal);
  color: #fff;
  box-shadow: none;
}

.command-copy h1 {
  margin: 7px 0 0;
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1;
}

.command-copy {
  min-width: 0;
}

.executive-insight-button {
  display: inline-grid;
  place-items: center;
  align-self: flex-end;
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transform: translate(8px, 8px);
}

.executive-insight-button:hover,
.executive-insight-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.executive-insight-button span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.executive-insight-button img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.executive-insight-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.command-copy p {
  max-width: 780px;
  margin: 0;
  color: #d4dae2;
  font-size: 13px;
  line-height: 1.55;
}

.command-band .eyebrow,
.command-band .last-update {
  color: #aeb7c4;
}

.command-band .last-update {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  line-height: 1.2;
  text-align: left;
}

.command-band .last-update span {
  color: #8f9aaa;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-band .last-update strong {
  color: #fff;
  font-size: 12px;
}

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

.command-metrics article {
  display: grid;
  align-content: end;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px;
}

.command-metrics span {
  color: #b9c2cf;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.command-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.command-metrics .risk strong {
  color: #ffb3aa;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: var(--sticky-gap);
  min-width: 0;
  min-height: auto;
  overflow: visible;
  background: var(--bg);
}

.dashboard-layout.filters-collapsed {
  grid-template-columns: 1fr;
}

.dashboard-content {
  min-width: 0;
  min-height: auto;
  overflow: visible;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 24px;
  background: var(--bg);
}

.filter-deck,
.panel,
.signal-card,
.insight-card,
.table-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.filter-deck {
  position: relative;
  align-self: start;
  overflow: visible;
  margin-bottom: 0;
  max-height: 520px;
  box-shadow: none;
  transition:
    max-height 0.28s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.filter-head {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 12px;
  border-bottom: 1px solid var(--line);
}

.filter-head,
.filters-form {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.18s ease,
    transform 0.24s ease;
}

.filter-head strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px 16px;
  padding: 14px 16px 16px;
}

.filter-item {
  min-width: 0;
  transition:
    box-shadow 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease;
}

.filter-item[draggable="true"] {
  cursor: grab;
}

.filter-item.is-dragging {
  opacity: 0.56;
  transform: scale(0.985);
}

.filter-item.is-drop-target {
  box-shadow: 0 0 0 2px rgba(20, 125, 116, 0.16);
}

.filter-item.is-drop-before {
  box-shadow: inset 0 3px 0 var(--teal), 0 0 0 2px rgba(20, 125, 116, 0.12);
}

.filter-item.is-drop-after {
  box-shadow: inset 0 -3px 0 var(--teal), 0 0 0 2px rgba(20, 125, 116, 0.12);
}

#clearFilters {
  grid-column: auto;
}

.filter-icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0 !important;
}

.filter-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.filter-toggle {
  appearance: none;
  position: absolute;
  left: 50%;
  top: -1px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  min-height: 20px;
  height: 20px;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid var(--line) !important;
  background: #fff !important;
  color: var(--line) !important;
  box-shadow: none;
  transform: translateX(-50%);
}

.filter-toggle svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.7;
}

.filter-toggle svg {
  transition: transform 0.16s ease;
}

.filters-collapsed .filter-toggle svg {
  transform: rotate(180deg);
}

.filters-collapsed .filter-toggle {
  top: 0;
}

.filter-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filters-collapsed .filter-deck {
  max-height: 22px;
  min-height: 22px;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
}

.filters-collapsed .filter-head,
.filters-collapsed .filters-form {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.filters-collapsed #clearFilters {
  pointer-events: none;
}

.field-control,
.filter-field {
  position: relative;
}

.filter-field,
.field-control {
  gap: 7px;
  font-size: 11.5px;
}

.field-control input,
.filter-trigger {
  height: 38px;
}

.filter-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.filter-trigger span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-clear {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #7a8492;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.filter-clear:hover {
  background: #edf1f5;
  color: var(--wine);
}

.filter-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: var(--filter-popover-left, 0);
  z-index: 140;
  width: var(--filter-popover-width, min(360px, max(100%, 280px)));
  overflow: hidden;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.filter-search {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.filter-options {
  max-height: 260px;
  overflow: auto;
  color: var(--ink);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 650;
}

.filter-option:hover {
  background: var(--surface-2);
}

.filter-option.is-muted {
  color: var(--muted);
  cursor: default;
}

.loading-state {
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  color: var(--muted);
  font-weight: 850;
}

.loader {
  width: 20px;
  height: 20px;
  border: 3px solid #dfe6ee;
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes qbiax-ring {
  to {
    transform: rotate(360deg);
  }
}

@keyframes qbiax-bars {
  0%,
  100% {
    height: 12px;
    opacity: 0.62;
  }

  50% {
    height: 40px;
    opacity: 1;
  }
}

@keyframes qbiax-scan {
  0% {
    transform: translateX(-100%);
  }

  52%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes qbiax-progress {
  0% {
    transform: translateX(-110%);
  }

  54%,
  100% {
    transform: translateX(240%);
  }
}

@keyframes qbiax-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.72;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.dashboard-grid,
.summary-view,
.base-view,
.users-view {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.dashboard-widget {
  cursor: grab;
  transition: box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.dashboard-widget:active {
  cursor: grabbing;
}

.dashboard-widget.is-dragging {
  opacity: 0.58;
  transform: scale(0.995);
}

.dashboard-widget.is-drop-target {
  box-shadow: 0 0 0 3px rgba(20, 125, 116, 0.22), 0 14px 32px rgba(24, 25, 27, 0.12);
}

.dashboard-widget.is-drop-before {
  box-shadow: inset 5px 0 0 var(--teal), 0 0 0 3px rgba(20, 125, 116, 0.18), 0 14px 32px rgba(24, 25, 27, 0.12);
}

.dashboard-widget.is-drop-after {
  box-shadow: inset -5px 0 0 var(--teal), 0 0 0 3px rgba(20, 125, 116, 0.18), 0 14px 32px rgba(24, 25, 27, 0.12);
}

.widget-drop-zone {
  display: none;
  grid-column: span 3;
  min-height: 112px;
  border: 2px dashed rgba(20, 125, 116, 0.45);
  border-radius: 8px;
  background: rgba(231, 245, 242, 0.72);
  color: var(--teal);
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.dashboard-grid.is-reordering .widget-drop-zone,
.accounting-dre-view.is-reordering .widget-drop-zone {
  display: grid;
}

.dashboard-grid.is-drop-end .widget-drop-zone,
.accounting-dre-view.is-drop-end .widget-drop-zone {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 2px rgba(20, 125, 116, 0.12);
}

.panel-span {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.signal-grid {
  display: contents;
}

.signal-grid.payment-signal-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.signal-grid.payment-signal-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.payment-signal-grid .signal-card {
  grid-column: auto;
}

.insight-rail {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2fr);
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.insight-rail.danger {
  border-left-color: var(--red);
}

.insight-rail.good {
  border-left-color: var(--green);
}

.insight-main {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(244, 246, 248, 0.92), rgba(255, 255, 255, 0));
}

.insight-main strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.insight-main p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.insight-rail.danger .insight-main strong {
  color: var(--red);
}

.insight-rail.good .insight-main strong {
  color: var(--green);
}

.insight-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.insight-fact {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

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

.insight-fact strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-fact em {
  display: block;
  min-width: 0;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.signal-card {
  display: grid;
  grid-column: span 3;
  align-content: start;
  min-height: 116px;
  padding: 13px;
}

.signal-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  min-width: 0;
  margin-top: 13px;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.signal-card em {
  display: block;
  min-width: 0;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.signal-card.good strong {
  color: var(--green);
}

.signal-card.warn strong,
.signal-card.focus strong {
  color: var(--amber);
}

.signal-card.danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red);
  color: #fff;
}

.signal-card.danger span,
.signal-card.danger em {
  color: rgba(255, 255, 255, 0.78);
}

.payment-signal-card {
  min-height: 194px;
  padding: 16px;
}

.payment-signal-card strong {
  margin-top: 11px;
}

.payment-signal-stats {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 14px;
}

.payment-signal-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.payment-signal-stat span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-transform: none;
}

.payment-signal-stat b {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
}

.payment-signal-card.charges {
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff;
}

.payment-signal-card.charges strong,
.payment-signal-card.charges .payment-signal-stat b {
  color: var(--red);
}

.payment-signal-card.danger .payment-signal-stat {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.payment-signal-card.danger .payment-signal-stat span,
.payment-signal-card.danger .payment-signal-stat b {
  color: rgba(255, 255, 255, 0.88);
}

.panel {
  grid-column: span 4;
  overflow: hidden;
}

.dashboard-grid > .panel:not(.panel-xl) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 430px;
}

.dashboard-grid > .panel:not(.panel-xl) > :not(header) {
  min-height: 0;
  overflow: auto;
}

.panel-xl {
  grid-column: span 8;
}

.panel-focus {
  grid-column: span 4;
}

.dashboard-grid > .dashboard-widget[data-widget-key="timeline"] {
  display: grid;
  grid-column: span 9;
  grid-template-rows: auto minmax(0, 1fr);
  height: 430px;
}

.dashboard-grid > .dashboard-widget[data-widget-key="upcoming"] {
  display: grid;
  grid-column: span 3;
  grid-template-rows: auto minmax(0, 1fr);
  height: 430px;
}

.dashboard-grid > .dashboard-widget[data-widget-key="suppliers"],
.dashboard-grid > .dashboard-widget[data-widget-key="projects"] {
  grid-column: span 6;
  height: 520px;
}

.panel header,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.panel h2,
.table-toolbar h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.panel-title-row {
  display: grid;
  gap: 3px;
}

.panel-title-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.timeline-chart {
  display: block;
  height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 6px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.timeline-chart.timeline-chart-payments {
  height: 100%;
  padding: 8px 6px 6px;
}

.timeline-stage {
  min-width: 100%;
  height: 100%;
}

.timeline-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.timeline-gridline line {
  stroke: #e7ecf2;
  stroke-width: 1;
}

.timeline-gridline text,
.timeline-x-label,
.timeline-value-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.timeline-gridline text {
  text-anchor: end;
}

.timeline-x-label {
  text-anchor: middle;
}

.timeline-value-label {
  fill: #4f5d6d;
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4px;
  text-anchor: middle;
}

.timeline-chart-payments .timeline-value-label {
  font-size: 11px;
}

.timeline-area {
  fill: url(#timelineArea);
}

.timeline-line {
  fill: none;
  stroke: var(--red);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.timeline-point {
  fill: #fff;
  stroke: var(--red);
  stroke-width: 3;
}

.timeline-point-target {
  cursor: default;
}

.timeline-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.empty-chart {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.focus-list,
.branch-grid,
.bucket-list,
.matrix-list,
.aging-chart,
.summary-chart {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.dashboard-grid > [data-widget-key="suppliers"] > .focus-list,
.dashboard-grid > [data-widget-key="projects"] > .project-grid {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.payment-ranking-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.bucket-list {
  gap: 6px;
}

.focus-summary {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  padding: 0;
}

.payment-kpi-summary {
  min-height: 0;
}

.focus-summary span,
.focus-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.focus-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  line-height: 1;
}

.payment-kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.payment-kpi-summary-grid article {
  min-width: 0;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
  background: #f8fafc;
  padding: 6px 8px;
}

.payment-kpi-summary-grid span {
  display: block;
  margin: 0 0 3px;
  color: #667085;
  font-size: 9px;
}

.payment-kpi-summary-grid b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-kpi-summary-grid article.danger b {
  color: var(--red);
}

.focus-row,
.bucket-row,
.matrix-row,
.summary-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.focus-row div,
.bucket-row div,
.matrix-row div,
.summary-row div {
  min-width: 0;
}

.focus-row strong,
.summary-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-row span,
.summary-row span,
.matrix-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.focus-row span b {
  color: var(--ink);
  font-weight: 900;
}

.focus-row .payment-row-overdue,
.focus-row .payment-row-overdue b {
  color: var(--red);
  font-style: normal;
  font-weight: 950;
}

.focus-row b,
.bucket-row b,
.matrix-row b,
.summary-row b {
  font-size: 12px;
  white-space: nowrap;
}

.supplier-focus-row {
  min-height: 94px;
  padding: 12px;
}

.supplier-focus-row > i {
  display: none;
}

.kpi-row-value {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.kpi-row-value b {
  color: var(--ink);
  font-size: 13px;
}

.kpi-row-value em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.focus-row > i,
.bucket-row > i,
.summary-row > i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--teal);
}

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

.project-grid {
  grid-template-columns: 1fr;
  align-content: start;
}

.branch-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.branch-card span,
.branch-card em,
.bucket-row em,
.matrix-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.payment-risk-card span {
  display: -webkit-box;
  min-height: 30px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-transform: uppercase;
}

.branch-card strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

.branch-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.branch-card p b {
  color: var(--ink);
}

.branch-card p em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.risk-line,
.aging-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.risk-line i,
.aging-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.bucket-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
}

.bucket-row div {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bucket-row em {
  margin-top: 0;
}

.bucket-row.danger > i {
  background: var(--red);
}

.project-breakdown-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.project-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 950;
}

.project-main {
  min-width: 0;
}

.project-main strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-main span,
.project-values span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-split {
  display: flex;
  height: 7px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #e8edf2;
}

.project-split i {
  display: block;
  height: 100%;
}

.project-split .paid {
  background: var(--teal);
}

.project-split .open {
  background: var(--red);
}

.project-values {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.project-values span {
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #f6f8fb;
  padding: 6px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-values b {
  color: var(--ink);
  font-weight: 950;
}

.project-values .danger b {
  color: var(--red);
}

.project-risk-shell {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.project-risk-overview {
  display: grid;
  grid-template-columns: 0.7fr repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.project-risk-overview article {
  min-width: 0;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
  background: #f6f8fb;
  padding: 8px 9px;
}

.project-risk-overview span,
.project-risk-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-risk-overview strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-risk-overview .danger strong {
  color: var(--red);
}

.project-risk-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-risk-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-bottom: 1px solid #edf1f5;
}

.project-risk-row:last-child {
  border-bottom: 0;
}

.project-risk-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.project-risk-head span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
  font-weight: 950;
}

.project-risk-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-risk-head b {
  font-size: 12px;
  white-space: nowrap;
}

.project-risk-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.project-risk-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #667085;
}

.project-risk-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.project-risk-meta span {
  overflow: hidden;
  border-radius: 6px;
  background: #f8fafc;
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.project-risk-meta b {
  color: var(--ink);
  font-weight: 950;
}

.project-risk-meta .danger b {
  color: var(--red);
}

.matrix-row {
  min-height: 58px;
}

.aging-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
}

.aging-row span,
.aging-row strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.aging-row strong {
  color: var(--ink);
  text-align: right;
}

.table-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.pager button:disabled,
.export-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.table-scroll {
  max-height: 520px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

th,
td {
  overflow: hidden;
  padding: 11px 10px;
  border-bottom: 1px solid #edf0f3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 900;
}

th:first-child,
td:first-child {
  text-align: left;
}

.supplier-group-row td {
  background: #ffffff;
  font-weight: 850;
}

.supplier-group-row:hover td {
  background: #f7fbfa;
}

.supplier-group-row.is-expanded td {
  border-top: 1px solid rgba(20, 125, 116, 0.28);
  border-bottom-color: rgba(20, 125, 116, 0.2);
  background: #eaf7f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.supplier-group-row.is-expanded td:first-child {
  box-shadow:
    inset 4px 0 0 var(--teal),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.supplier-group-row td:first-child {
  white-space: normal;
}

.drilldown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border: 1px solid rgba(20, 125, 116, 0.26);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  vertical-align: middle;
}

.drilldown-toggle span {
  line-height: 1;
  font-size: 16px;
  font-weight: 950;
}

.supplier-group-row.is-expanded .drilldown-toggle {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.supplier-cell {
  display: inline-grid;
  gap: 4px;
  max-width: calc(100% - 42px);
  vertical-align: middle;
}

.supplier-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-cell span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-tooltip-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-row td {
  background: #fbfcfd;
  color: #3d4652;
}

.invoice-row:hover td {
  background: #f1f8f7;
}

.invoice-row td:first-child {
  padding-left: 46px;
}

.invoice-cell {
  display: grid;
  gap: 4px;
}

.invoice-cell strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

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

.invoice-note td {
  background: #f7fbfa;
  color: var(--muted);
  padding: 14px 18px 14px 46px;
  text-align: left;
  font-weight: 850;
}

.invoice-note.danger td {
  color: var(--red);
  background: var(--red-soft);
}

.sort-header {
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 900;
}

.sort-header.sorted::after {
  content: " v";
  color: var(--wine);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f4faf9;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
}

.status-badge.ok {
  color: #0f766e;
  background: var(--teal-soft);
}

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

.summary-view,
.base-view {
  grid-template-columns: 1fr;
}

.accounting-dre-view {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.accounting-warning {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid rgba(168, 113, 21, 0.28);
  border-radius: 8px;
  background: #fff8e7;
  color: #7c4c06;
  font-size: 12px;
  font-weight: 850;
}

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

.accounting-kpi {
  min-width: 0;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.accounting-kpi span,
.accounting-rank-row span,
.accounting-month span,
.accounting-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.accounting-kpi span {
  text-transform: uppercase;
}

.accounting-kpi strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(18px, 1.6vw, 25px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.accounting-kpi em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
}

.accounting-kpi.revenue strong,
.accounting-line--revenue td:nth-child(2),
.accounting-rank-row.positive b,
.accounting-month.positive b,
.accounting-details-panel .positive,
.accounting-line-dialog .positive {
  color: var(--green);
}

.accounting-kpi.danger strong,
.accounting-line--deduction td:nth-child(2),
.accounting-line--cost td:nth-child(2),
.accounting-line--expense td:nth-child(2),
.accounting-rank-row.negative b,
.accounting-month.negative b,
.accounting-details-panel .negative,
.accounting-line-dialog .negative {
  color: var(--red);
}

.accounting-kpi.total {
  border-color: rgba(20, 125, 116, 0.28);
  background: var(--teal-soft);
}

.accounting-statement-panel {
  display: grid;
  grid-column: span 4;
  grid-template-rows: auto minmax(0, 1fr);
  height: 674px;
  min-width: 0;
}

.accounting-timeline-panel {
  grid-column: span 8;
  height: 674px;
}

.accounting-ranking-panel {
  display: grid;
  grid-column: span 4;
  grid-template-rows: auto minmax(0, 1fr);
  height: 430px;
}

.accounting-details-panel {
  grid-column: 1 / -1;
}

.accounting-statement,
.accounting-ranking,
.accounting-timeline {
  min-height: 0;
  overflow: auto;
}

.accounting-statement {
  overflow: hidden;
}

.accounting-statement table {
  border-collapse: separate;
  border-spacing: 0;
}

.accounting-statement table th,
.accounting-statement table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.accounting-statement table td:nth-child(n + 2),
.accounting-statement table th:nth-child(n + 2),
.accounting-details-panel table td:last-child,
.accounting-details-panel table th:last-child {
  text-align: right;
}

.accounting-statement table .accounting-value-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, auto);
  justify-content: end;
  gap: 8px;
}

.accounting-statement table .accounting-value-heading span:last-child {
  justify-self: end;
}

.accounting-line--subtotal td,
.accounting-line--total td {
  border-top: 0;
  border-bottom: 1px solid #edf0f3;
  background: #f7f8fa;
  font-family: "Aptos Display", "Segoe UI Variable Display", Segoe UI, Inter, Arial, sans-serif;
  font-weight: 850;
}

.accounting-line--total td {
  border-top: 0;
  border-bottom: 1px solid #edf0f3;
  background: #f7f8fa;
}

.accounting-line td:first-child {
  white-space: normal;
}

.accounting-line strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.accounting-line:not(.accounting-line--subtotal):not(.accounting-line--total) strong {
  font-weight: 500;
}

.accounting-line--subtotal strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.accounting-line--total strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-line span {
  display: inline-block;
  margin-top: 3px;
}

.accounting-line .accounting-value-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, auto);
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.accounting-line .accounting-value-main {
  display: inline;
  justify-self: end;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.accounting-line .value-tone--positive {
  color: var(--green);
}

.accounting-line .value-tone--negative {
  color: var(--red);
}

.accounting-line .accounting-share-pill {
  justify-self: end;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7b8794;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
}

.accounting-line .accounting-value-main,
.accounting-line .accounting-share-pill {
  margin-top: 0;
}

.accounting-line--subtotal .accounting-value-main,
.accounting-line--total .accounting-value-main {
  font-family: "Aptos Display", "Segoe UI Variable Display", Segoe UI, Inter, Arial, sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.accounting-line--total .accounting-value-main {
  font-size: 14px;
  font-weight: 900;
}

.accounting-line--subtotal .accounting-share-pill,
.accounting-line--total .accounting-share-pill {
  color: #7b8794;
  background: transparent;
}

.accounting-ranking,
.accounting-timeline {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.accounting-ranking {
  gap: 0;
  padding: 16px 14px;
}

.accounting-rank-row,
.accounting-month {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
  gap: 18px;
  overflow: hidden;
  padding: 10px 0 12px;
  border-bottom: 1px solid #edf0f3;
}

.accounting-rank-row {
  align-items: center;
  min-height: 66px;
  padding: 15px 0 17px;
}

.accounting-rank-row strong,
.accounting-month strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-rank-row strong {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.35;
}

.accounting-rank-row span {
  line-height: 1.35;
}

.accounting-rank-row b,
.accounting-month b {
  min-width: 132px;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.accounting-month i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.accounting-month.negative i {
  background: var(--red);
}

.accounting-dre-view > .widget-drop-zone {
  grid-column: 1 / -1;
}

.accounting-line[data-dre-line] {
  cursor: pointer;
}

.accounting-line[data-dre-line]:hover td {
  background: #eef8f6;
}

.accounting-hierarchy-row td:first-child {
  padding-left: calc(8px + var(--level, 0) * 18px);
}

.accounting-hierarchy-row.is-nested td {
  background: #fbfcfc;
}

.accounting-hierarchy-cell span {
  color: var(--muted);
  font-size: 11px;
}

.accounting-line-chart {
  display: block;
  height: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 8px 6px 6px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  scrollbar-gutter: stable;
}

.accounting-line-chart-line {
  stroke: var(--teal);
}

.accounting-zero-line {
  stroke: rgba(102, 112, 133, 0.45);
  stroke-dasharray: 5 6;
  stroke-width: 1.5;
}

.accounting-line-point.positive {
  stroke: var(--teal);
}

.accounting-line-point.negative {
  stroke: var(--red);
}

.accounting-details-panel .table-scroll {
  max-height: 560px;
}

.accounting-details-panel table {
  min-width: 1060px;
}

.accounting-annual-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.accounting-annual-panel {
  min-width: 0;
}

.accounting-annual-toggle {
  min-height: 34px;
  border: 1px solid rgba(20, 125, 116, 0.24);
  border-radius: 7px;
  background: #fff;
  color: var(--teal);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.accounting-annual-toggle[aria-pressed="true"] {
  background: var(--teal-soft);
  border-color: rgba(20, 125, 116, 0.4);
}

.accounting-annual-scroll {
  max-height: calc(100vh - 290px);
  min-height: 560px;
  overflow: auto;
}

.accounting-annual-table {
  min-width: 2720px;
  table-layout: fixed;
}

.accounting-annual-view.is-quarter-expanded .accounting-annual-table {
  min-width: 1380px;
}

.accounting-annual-table th,
.accounting-annual-table td {
  overflow: visible;
  width: 180px;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
}

.accounting-annual-table th {
  text-align: right;
}

.accounting-annual-table .accounting-annual-label-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  background: var(--surface);
  text-align: left;
}

.accounting-annual-table th.accounting-annual-label-col {
  z-index: 5;
  background: var(--surface-2);
}

.accounting-annual-table .is-annual {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  border-left: 1px solid #cfd8e3;
}

.accounting-annual-table .is-quarter {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

.accounting-annual-table th.is-annual,
.accounting-annual-table td.is-annual {
  box-shadow: inset 1px 0 0 #cfd8e3;
}

.accounting-annual-value {
  cursor: pointer;
}

.accounting-annual-value.is-ratio {
  cursor: default;
  font-size: 11px;
  font-weight: 750;
}

.accounting-annual-value:hover {
  background: #eef4f7;
}

.accounting-annual-value.is-ratio:hover {
  background: inherit;
}

.accounting-annual-row--group td {
  font-weight: 850;
}

.accounting-annual-row--child td:first-child {
  padding-left: 34px;
}

.accounting-annual-row--child td {
  color: #394452;
}

.accounting-annual-row--ratio td {
  background: #f7f8fa;
  color: #667085;
  font-size: 11px;
}

.accounting-annual-row--ratio .accounting-annual-label-col {
  background: #f7f8fa;
}

.accounting-annual-row--ratio .accounting-annual-label-col span {
  font-style: italic;
}

.accounting-annual-row--subtotal td,
.accounting-annual-row--total td {
  background: #f7f8fa;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-annual-row--subtotal td:first-child,
.accounting-annual-row--total td:first-child {
  background: #f7f8fa;
}

.accounting-annual-table .positive {
  color: var(--green);
}

.accounting-annual-table .negative {
  color: var(--red);
}

.accounting-entry-row {
  cursor: pointer;
}

.accounting-entry-row:hover td {
  background: #f7fbfa;
}

.accounting-line-dialog {
  width: min(1040px, 100%);
}

.accounting-line-dialog header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.accounting-line-dialog-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.accounting-line-dialog-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.accounting-line-dialog-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-line-dialog-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.accounting-line-dialog-table {
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.accounting-line-dialog-table table {
  min-width: 0;
  table-layout: fixed;
}

.accounting-line-dialog-table td:first-child,
.accounting-line-dialog-table th:first-child {
  width: 74%;
  text-align: left;
}

.accounting-line-dialog-table td:last-child,
.accounting-line-dialog-table th:last-child {
  text-align: right;
}

.accounting-line-dialog-table td:nth-child(2),
.accounting-line-dialog-table th:nth-child(2) {
  width: 26%;
  text-align: right;
}

.accounting-line-account-cell {
  display: inline-flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  max-width: 100%;
}

.accounting-line-account-cell strong {
  min-width: 0;
}

.accounting-entry-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid rgba(20, 125, 116, 0.22);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 0 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

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

.base-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.base-tile {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.base-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.base-tile strong {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.35;
}

.base-tile.wide {
  grid-column: span 4;
}

.nfe-manager-view {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.nfe-manager-view[hidden] {
  display: none;
}

.nfe-kpi-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.nfe-kpi-card {
  min-width: 0;
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  box-shadow: 0 14px 30px rgba(24, 25, 27, 0.06);
}

.nfe-kpi-card span,
.nfe-alert-strip span,
.nfe-status-pill {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nfe-kpi-card span {
  display: block;
  color: var(--muted);
}

.nfe-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.nfe-kpi-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.nfe-kpi-card.good strong,
.nfe-comparison-panel .positive {
  color: var(--green);
}

.nfe-kpi-card.focus strong {
  color: var(--teal);
}

.nfe-kpi-card.warn strong {
  color: var(--amber);
}

.nfe-kpi-card.danger strong,
.nfe-kpi-card.charges strong,
.nfe-comparison-panel .negative {
  color: var(--red);
}

.nfe-alert-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.6fr);
  gap: 12px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-left: 6px solid var(--red);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(24, 25, 27, 0.07);
}

.nfe-alert-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--red);
  font-size: 24px;
  line-height: 1.05;
}

.nfe-alert-strip p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

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

.nfe-alert-facts article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.nfe-alert-facts article.danger {
  border-color: rgba(180, 35, 24, 0.22);
  background: var(--red-soft);
}

.nfe-alert-facts strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 22px;
}

.nfe-alert-facts article.danger strong {
  color: var(--red);
}

.nfe-alert-facts em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.nfe-comparison-panel,
.nfe-issues-panel {
  grid-column: 1 / -1;
}

.nfe-comparison-panel header,
.nfe-issues-panel header {
  align-items: center;
}

.nfe-table-scroll {
  max-height: 520px;
}

.nfe-table-scroll table {
  min-width: 1480px;
}

.nfe-table-scroll th,
.nfe-table-scroll td {
  vertical-align: top;
}

.nfe-table-scroll td:nth-child(3),
.nfe-table-scroll td:nth-child(4),
.nfe-table-scroll td:nth-child(5),
.nfe-table-scroll td:nth-child(6),
.nfe-table-scroll td:nth-child(7),
.nfe-table-scroll td:nth-child(8),
.nfe-table-scroll td:nth-child(9),
.nfe-table-scroll td:nth-child(10),
.nfe-table-scroll td:nth-child(11),
.nfe-table-scroll td:nth-child(12) {
  white-space: nowrap;
}

.nfe-key {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.nfe-observation {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.nfe-status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 26px;
  border: 1px solid rgba(20, 125, 116, 0.2);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 4px 8px;
  line-height: 1.15;
  white-space: normal;
}

.status-warning .nfe-status-pill {
  border-color: rgba(191, 122, 27, 0.24);
  background: #fff7e8;
  color: var(--amber);
}

.status-danger .nfe-status-pill,
.nfe-status-pill.danger,
.nfe-issues-panel tr.is-critical .nfe-status-pill {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.nfe-issues-panel tr.is-critical td {
  background: #fffafa;
}

.nfe-manager-view .widget-drop-zone {
  grid-column: 1 / -1;
}

.admin-workspace .users-view {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.admin-workspace .users-view > .panel-span {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-shell.user-form-open,
.admin-shell.delete-confirm-open {
  overflow: hidden;
}

.admin-shell.user-form-open::before,
.admin-shell.delete-confirm-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(2px);
}

.users-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.users-admin.form-open {
  grid-template-columns: minmax(0, 1fr);
}

.user-form {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px;
}

.user-form:not([hidden]) {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  transform: translate(-50%, -50%);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
}

.confirm-dialog:not([hidden]) {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
  padding: 18px;
  transform: translate(-50%, -50%);
}

.confirm-dialog h3,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog h3 {
  font-size: 22px;
}

.confirm-dialog p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.user-form h3 {
  margin: 0;
  font-size: 20px;
}

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

.user-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  min-height: 38px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

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

.module-access-grid {
  display: grid;
  gap: 10px;
}

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

.module-check-card {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px !important;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.module-check-card input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.module-check-card strong,
.module-check-card small {
  display: block;
}

.module-check-card strong {
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.module-check-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.module-check-card.is-disabled {
  opacity: 0.72;
}

.scope-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scope-title button,
.param-row button {
  min-height: 34px;
  border: 1px solid rgba(20, 125, 116, 0.22);
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

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

.param-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.param-row button {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.user-message {
  min-height: 18px;
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions button,
.table-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.action-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-action.danger {
  border-color: rgba(180, 35, 24, 0.22);
  background: var(--red-soft);
  color: var(--red);
}

.action-tooltip {
  position: fixed;
  z-index: 130;
  max-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #18191b;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
  padding: 7px 9px;
  pointer-events: none;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

.action-tooltip.rich {
  min-width: 160px;
  max-width: 260px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, #111827, #1f2933);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  line-height: 1.2;
  white-space: normal;
}

.action-tooltip.subtle {
  max-width: 320px;
  border-color: var(--line);
  background: #fff;
  color: #344054;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
  font-size: 11px;
  font-weight: 800;
  white-space: normal;
}

.action-tooltip-meta,
.action-tooltip-title,
.action-tooltip-value {
  display: block;
}

.action-tooltip-meta {
  color: #aeb7c4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.action-tooltip-title {
  margin-top: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.action-tooltip-value {
  margin-top: 5px;
  color: #f7d9d6;
  font-size: 17px;
  font-weight: 950;
}

.form-actions button:first-child {
  border-color: var(--qbiax-blue);
  background: var(--qbiax-blue);
  color: #fff;
}

.users-table {
  width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.users-table table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.users-table th,
.users-table td {
  text-align: left;
}

.users-table tbody tr {
  cursor: default;
}

.users-table td:first-child strong,
.users-table td:first-child span {
  display: block;
}

.users-table td:first-child span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.empty-row {
  height: 96px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.executive-dialog-open {
  overflow: hidden;
}

.executive-dialog-backdrop:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 17, 23, 0.54);
  backdrop-filter: blur(3px);
}

.executive-dialog {
  display: grid;
  gap: 16px;
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
  padding: 18px;
}

.executive-dialog header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.executive-dialog h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.executive-dialog-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.executive-dialog-body {
  display: grid;
  gap: 12px;
}

.executive-dialog-lead,
.executive-dialog-metrics article,
.executive-dialog-facts article,
.executive-report-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.executive-dialog-lead {
  display: grid;
  gap: 7px;
  border-left: 6px solid var(--line);
  padding: 18px;
}

.executive-dialog.danger .executive-dialog-lead {
  border-left-color: var(--red);
}

.executive-dialog.good .executive-dialog-lead {
  border-left-color: var(--green);
}

.executive-dialog-lead span,
.executive-dialog-metrics span,
.executive-dialog-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-dialog-lead strong {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.executive-dialog.danger .executive-dialog-lead strong {
  color: var(--red);
}

.executive-dialog.good .executive-dialog-lead strong {
  color: var(--green);
}

.executive-dialog-lead p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.executive-dialog-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

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

.executive-report {
  display: grid;
  gap: 10px;
}

.executive-report-section {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
}

.executive-report-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.executive-report-section p,
.executive-report-section li {
  margin: 0;
  color: #3b4554;
  font-size: 14px;
  line-height: 1.52;
}

.executive-report-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
}

.executive-report-section li::marker {
  color: var(--wine);
}

.executive-dialog-metrics article,
.executive-dialog-facts article {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 5px;
  padding: 11px 12px;
}

.executive-dialog-metrics strong,
.executive-dialog-facts strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.executive-dialog-facts strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.executive-dialog-metrics em,
.executive-dialog-facts em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(14, 17, 23, 0.48);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(480px, 96vw);
  height: 100vh;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  box-shadow: -22px 0 60px rgba(0, 0, 0, 0.32);
}

.detail-drawer header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  padding: 26px 24px 28px;
  background: linear-gradient(135deg, var(--wine-dark), var(--wine));
  color: #fff;
}

.detail-drawer h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.detail-drawer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.detail-drawer button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.detail-drawer--finance {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(1080px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 14px;
  background: #f4f7fa;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
  transform: translate(-50%, -50%);
}

.detail-drawer--finance header {
  padding: 22px 24px 24px;
}

.detail-drawer--finance h2 {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.detail-drawer--finance p {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.35;
}

.detail-drawer--finance .drawer-total {
  padding: 18px 24px;
}

.detail-drawer--finance .drawer-total strong {
  font-size: clamp(28px, 3.2vw, 42px);
}

.detail-drawer--finance .drawer-timeline {
  padding: 26px 28px 10px;
}

.detail-drawer--finance .drawer-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  padding: 20px 28px 0;
}

.detail-drawer--finance .drawer-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  padding: 14px 28px 28px;
}

.detail-drawer--finance .drawer-metrics article,
.detail-drawer--finance .drawer-fields article {
  background: #fff;
}

.detail-drawer--finance .finance-summary-group,
.detail-drawer--finance .finance-field-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 226px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 14px 34px rgba(24, 25, 27, 0.07);
}

.detail-drawer--finance .finance-summary-group h3,
.detail-drawer--finance .finance-field-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-drawer--finance .finance-summary-group dl,
.detail-drawer--finance .finance-field-group dl {
  display: grid;
  gap: 0;
  flex: 1;
  margin: 0;
}

.detail-drawer--finance .finance-summary-group dl div,
.detail-drawer--finance .finance-field-group dl div {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid #edf1f5;
}

.detail-drawer--finance .finance-summary-group dl div:first-child,
.detail-drawer--finance .finance-field-group dl div:first-child {
  border-top: 0;
}

.detail-drawer--finance .finance-summary-group dt,
.detail-drawer--finance .finance-field-group dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-drawer--finance .finance-summary-group dd,
.detail-drawer--finance .finance-field-group dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-drawer--finance .finance-summary-group .strong dd,
.detail-drawer--finance .finance-field-group .strong dd {
  font-weight: 950;
}

.detail-drawer--finance .finance-summary-group .danger dd,
.detail-drawer--finance .finance-field-group .danger dd {
  color: var(--wine);
}

.detail-drawer--finance .finance-summary-group .warn dd,
.detail-drawer--finance .finance-field-group .warn dd {
  color: var(--amber);
}

.detail-drawer--finance .finance-field-group .wide {
  grid-template-columns: 1fr;
  gap: 4px;
}

.detail-drawer--finance .finance-field-group .wide dd {
  text-align: left;
  white-space: normal;
}

.drawer-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 22px 24px;
  background: var(--charcoal);
  color: #fff;
}

.drawer-total span {
  display: block;
  color: #aab5c4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-metrics span,
.drawer-fields span,
.drawer-timeline span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-total strong {
  grid-column: 1;
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.drawer-total em {
  align-self: center;
  border-radius: 999px;
  background: rgba(20, 125, 116, 0.25);
  color: #bff8f1;
  padding: 9px 12px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.drawer-total em.danger {
  background: rgba(180, 35, 24, 0.25);
  color: #ffd2cc;
}

.drawer-timeline,
.drawer-metrics,
.drawer-fields {
  display: grid;
  gap: 10px;
  padding: 18px 24px 0;
}

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

.drawer-timeline {
  position: relative;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 26px 24px 8px;
}

.drawer-timeline::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 58px;
  right: 58px;
  height: 3px;
  border-radius: 999px;
  background: #dce4ed;
}

.drawer-fields {
  grid-template-columns: repeat(2, 1fr);
  padding-bottom: 24px;
}

.drawer-metrics article,
.drawer-fields article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 10px 22px rgba(24, 25, 27, 0.06);
}

.drawer-timeline article {
  position: relative;
  min-width: 0;
  padding: 42px 8px 8px;
  text-align: center;
}

.drawer-timeline article::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 3px solid var(--teal);
  border-radius: 999px;
  background: var(--surface);
  transform: translateX(-50%);
}

.drawer-timeline article:first-child::before {
  border-color: var(--wine);
}

.drawer-timeline article:nth-child(2)::before {
  border-color: var(--amber);
}

.drawer-timeline article:last-child::before {
  border-color: var(--teal);
}

.drawer-timeline strong,
.drawer-metrics strong,
.drawer-fields strong {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-timeline strong {
  white-space: normal;
}

@media (max-width: 1280px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

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

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

  .signal-card,
  .widget-drop-zone {
    grid-column: span 4;
  }

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

  .panel,
  .panel-xl,
  .panel-focus {
    grid-column: span 6;
  }

  .payment-kpi-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .login-screen {
    align-items: center;
  }

  .login-panel {
    border-radius: 24px;
  }

  .startup-panel {
    width: min(440px, 100%);
  }

  .startup-icon-stage {
    width: 218px;
  }

  .startup-progress {
    width: 100%;
  }

  .app-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    grid-column: auto;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .module-cards,
  .module-access-list {
    grid-template-columns: 1fr;
  }

  .dashboard-menu,
  .main-dashboard-menu,
  .header-actions,
  .admin-tabs {
    justify-content: flex-start;
  }

  .command-band,
  .command-metrics,
  .summary-chart,
  .base-info {
    display: grid;
    grid-template-columns: 1fr;
  }

  .command-band {
    height: auto;
  }

  .executive-insight-button {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .command-copy {
    padding-right: 50px;
  }

  .executive-dialog-metrics,
  .executive-dialog-facts {
    grid-template-columns: 1fr;
  }

  .detail-drawer--finance {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

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

  .dashboard-layout,
  .dashboard-layout.filters-collapsed {
    grid-template-columns: 1fr;
  }

  .filter-deck {
    max-height: 900px;
  }

  .filters-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .filter-popover {
    top: calc(100% + 6px);
    left: var(--filter-popover-left, 0);
  }

  .filters-collapsed .filter-head {
    min-height: auto;
  }

  .filters-collapsed #filtersToggle {
    width: 42px;
    min-height: 20px;
    padding: 0;
    writing-mode: horizontal-tb;
  }

  .panel,
  .panel-xl,
  .panel-focus,
  .signal-card,
  .widget-drop-zone {
    grid-column: 1 / -1;
  }

  .signal-grid.payment-signal-grid,
  .signal-grid.payment-signal-grid--five {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > .dashboard-widget[data-widget-key="timeline"],
  .dashboard-grid > .dashboard-widget[data-widget-key="upcoming"],
  .dashboard-grid > .dashboard-widget[data-widget-key="suppliers"],
  .dashboard-grid > .dashboard-widget[data-widget-key="projects"] {
    grid-column: 1 / -1;
  }

  .insight-rail,
  .insight-facts {
    grid-template-columns: 1fr;
  }

  .insight-fact {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .timeline-chart {
    grid-template-columns: repeat(12, minmax(72px, 1fr));
  }

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

  .payment-kpi-summary,
  .payment-kpi-summary-grid,
  .project-values,
  .project-risk-overview,
  .project-risk-meta,
  .nfe-alert-strip,
  .nfe-alert-facts {
    grid-template-columns: 1fr;
  }

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

  .base-tile.wide {
    grid-column: span 1;
  }

  .admin-hero {
    display: grid;
  }

  .users-admin,
  .users-admin.form-open,
  .form-grid,
  .param-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 14px;
  }

  .login-corner-logo {
    top: 10px;
    left: 10px;
    width: min(190px, 54vw);
  }

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

  .login-panel h1 {
    margin-bottom: 20px;
    font-size: 30px;
  }

  .login-copy {
    margin-bottom: 26px;
    font-size: 15px;
  }

  .login-form {
    gap: 16px;
  }

  .login-form label {
    font-size: 14px;
  }

  .login-form input {
    height: 50px;
    padding-left: 46px;
    padding-right: 52px;
    font-size: 14px;
  }

  .login-field-icon {
    left: 14px;
    width: 21px;
    height: 21px;
  }

  .login-submit {
    height: 50px;
    font-size: 15px;
  }

  .login-submit svg {
    right: 18px;
    width: 24px;
    height: 24px;
  }

  .startup-screen {
    padding: 18px;
  }

  .startup-panel {
    width: min(360px, 100%);
  }

  .startup-icon-stage {
    width: 178px;
    margin-bottom: 24px;
  }

  .startup-icon-core {
    width: 178px;
  }

  .startup-icon {
    width: 170px;
    height: 170px;
  }

  .startup-percent {
    font-size: 40px;
  }

  .startup-panel p {
    font-size: 12px;
  }

  .workspace {
    --workspace-padding: 10px;
  }

  .app-header,
  .command-band,
  .admin-hero {
    padding: 14px;
  }

  .filters-form,
  .filter-head,
  .table-toolbar,
  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .menu-item {
    width: 100%;
  }

  .drawer-timeline,
  .drawer-metrics,
  .drawer-fields {
    grid-template-columns: 1fr;
  }

  .detail-drawer--finance .drawer-metrics,
  .detail-drawer--finance .drawer-fields {
    grid-template-columns: 1fr;
  }

  .detail-drawer--finance .drawer-fields article:first-child {
    grid-column: auto;
  }

  .nfe-kpi-grid {
    grid-template-columns: 1fr;
  }

  .nfe-alert-strip {
    padding: 14px;
  }

  .nfe-kpi-card {
    min-height: 108px;
  }
}

.panel-xl[data-widget-key="timeline"] {
  grid-column: 1 / -1;
}
