:root {
  --bg: #f4f7fb;
  --bg-accent: #e8eef7;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d9e2ee;
  --line-strong: #c2cfdf;
  --text: #18324a;
  --muted: #6d8195;
  --navy: #173b63;
  --navy-deep: #0f2843;
  --blue: #2d6fbe;
  --blue-soft: #e9f1fb;
  --success: #14815f;
  --warning: #d58e25;
  --danger: #c64a4a;
  --shadow: 0 18px 40px rgba(17, 39, 65, 0.08);
  --radius: 20px;
}

/* Refined enterprise workspace navigation */
.enterprise-portal {
  gap: 18px;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
  border: 1px solid #dfe8f3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 5%, rgba(62, 120, 190, 0.11), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 16px 42px rgba(22, 50, 82, 0.08);
}

.workspace-eyebrow,
.workspace-section-heading p {
  margin: 0 0 7px;
  color: #3e72ad;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.workspace-hero h3,
.workspace-section-heading h3 {
  margin: 0;
  color: var(--navy-deep);
  letter-spacing: -0.035em;
}

.workspace-hero h3 {
  font-size: clamp(2rem, 3vw, 2.75rem);
}

.workspace-hero-copy > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

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

.workspace-quick-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #d7e3f1;
  border-radius: 14px;
  color: #224c7d;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: 160ms ease;
}

.workspace-quick-button b {
  color: #7591b1;
  font-size: 0.9rem;
}

.workspace-quick-button:hover {
  color: white;
  border-color: #285f9f;
  background: #285f9f;
  transform: translateY(-1px);
}

.workspace-quick-button:hover b {
  color: white;
}

.workspace-empty-inline {
  color: var(--muted);
}

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

.workspace-signal-card {
  --signal: #3e72ad;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 18px 20px;
  border: 1px solid #e1e8f1;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(22, 50, 82, 0.055);
}

.workspace-signal-card[data-tone="todo"] { --signal: #2b6fb1; }
.workspace-signal-card[data-tone="risk"] { --signal: #c8862d; }
.workspace-signal-card[data-tone="activity"] { --signal: #34836c; }

.workspace-signal-mark {
  width: 9px;
  height: 34px;
  border-radius: 99px;
  background: var(--signal);
}

.workspace-signal-card p,
.workspace-signal-card strong,
.workspace-signal-card em {
  margin: 0;
}

.workspace-signal-card p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.workspace-signal-card strong {
  display: block;
  margin-top: 4px;
  color: var(--navy-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-signal-card em {
  color: var(--signal);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.workspace-apps-section {
  padding: 25px;
  border: 1px solid #e0e8f2;
  border-radius: 24px;
  background: #f8fafd;
}

.workspace-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 2px 18px;
}

.workspace-section-heading h3 {
  font-size: 1.55rem;
}

.workspace-section-heading > span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.workspace-module-card {
  --module-accent: #356fae;
  min-width: 0;
  padding: 20px;
  border: 1px solid #dfe7f0;
  border-radius: 19px;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 50, 82, 0.045);
}

.workspace-module-card[data-tone="teal"] { --module-accent: #317e78; }
.workspace-module-card[data-tone="cyan"] { --module-accent: #287b9c; }
.workspace-module-card[data-tone="blue"] { --module-accent: #2f68aa; }
.workspace-module-card[data-tone="navy"] { --module-accent: #193e69; }
.workspace-module-card[data-tone="amber"] { --module-accent: #a66f24; }
.workspace-module-card[data-tone="violet"] { --module-accent: #645a9b; }
.workspace-module-card[data-tone="slate"] { --module-accent: #53677c; }

.workspace-module-card.is-wide {
  grid-column: span 2;
}

.workspace-module-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
}

.workspace-module-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: white;
  background: var(--module-accent);
  font-size: 1rem;
  font-weight: 900;
}

.workspace-module-header h3,
.workspace-module-header p {
  margin: 0;
}

.workspace-module-header h3 {
  color: var(--navy-deep);
  font-size: 1.08rem;
}

.workspace-module-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace-module-count {
  color: #7c8da1;
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace-module-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  padding-top: 13px;
}

.workspace-module-card.is-wide .workspace-module-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-module-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 39px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: #334e6d;
  background: transparent;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.workspace-module-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-module-link b {
  color: #a4b2c2;
  font-weight: 600;
}

.workspace-module-link:hover {
  color: var(--module-accent);
  background: color-mix(in srgb, var(--module-accent) 8%, white);
}

.workspace-module-link:hover b {
  color: var(--module-accent);
  transform: translateX(2px);
}

@media (max-width: 1280px) {
  .workspace-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .workspace-hero,
  .workspace-apps-section {
    padding: 20px;
    border-radius: 20px;
  }

  .workspace-quick-actions,
  .workspace-signal-grid,
  .workspace-module-grid,
  .workspace-module-card.is-wide .workspace-module-links {
    grid-template-columns: 1fr;
  }

  .workspace-module-card.is-wide {
    grid-column: auto;
  }

  .workspace-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.selected-comparison-row td {
  background: #edf8f2;
  border-bottom-color: #cfe8da;
}

.selected-comparison-row td:first-child {
  box-shadow: inset 3px 0 0 #3d8b68;
}

.procurement-bid-matrix {
  display: grid;
  gap: 14px;
}

.bid-global-settings {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #d9e5f5;
  border-radius: 14px;
  background: #f6f9fe;
}

.bid-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #cfe2d8;
  border-radius: 12px;
  color: #2d7659;
  background: #eff8f3;
}

.bid-selection-summary span {
  color: #536b62;
}

.bid-supplier-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 10px;
}

.bid-supplier-control {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faff;
}

.bid-supplier-control span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.bid-matrix-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.bid-matrix-table {
  min-width: 1120px;
}

.bid-matrix-table th,
.bid-matrix-table td {
  min-width: 120px;
  padding: 9px;
  text-align: center;
  vertical-align: middle;
}

.bid-matrix-table th:first-child,
.bid-matrix-table td:first-child {
  min-width: 170px;
}

.bid-matrix-table input,
.bid-matrix-table select {
  min-width: 105px;
  padding: 9px 10px;
}

.bid-quote-heading {
  color: var(--navy);
  background: #edf4ff;
}

.bid-award-heading {
  color: #285f4a;
  background: #edf8f2;
}

.bid-award-price {
  color: #285f4a;
  font-weight: 700;
  background: #f3faf6;
}

.bid-matrix-table [data-bid-selected-supplier-host] select {
  width: 100%;
  min-width: 180px;
  color: #17324f;
  background: #fff;
}

#quotationProcurementBidId[multiple] {
  min-height: 130px;
  padding: 8px;
}

#quotationProcurementBidId[multiple] option {
  padding: 10px 12px;
  border-radius: 8px;
}

.quotation-items-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.quotation-items-wrap tfoot td {
  font-weight: 700;
  background: #f4f7fb;
}

.bid-quote-cell {
  background: #fbfdff;
}

.bid-selected-price {
  min-height: 18px;
  margin-top: 6px;
  color: #2d7659;
  font-size: 0.78rem;
  font-weight: 700;
}

.compact-rate {
  margin-top: 6px;
}

.bid-matrix-table tfoot td {
  font-weight: 700;
  background: #f4f7fb;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #6f7f94;
  background: #e9f0f9;
  cursor: pointer;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(45, 111, 190, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(23, 59, 99, 0.08), transparent 35%),
    linear-gradient(180deg, #f7faff 0%, #eef4fb 100%);
}

body.modal-open {
  overflow: hidden;
}

body:has(#authScreen:not(.hidden)) {
  background: #020b18;
  overflow: hidden;
}

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

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: block;
  padding: clamp(30px, 5vw, 70px);
  background:
    radial-gradient(circle at 50% 18%, rgba(99, 168, 255, 0.32), transparent 26%),
    radial-gradient(circle at 18% 76%, rgba(20, 129, 95, 0.18), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.13), transparent 24%),
    linear-gradient(145deg, #071522 0%, #102b48 48%, #173b63 100%);
  overflow: hidden;
  position: relative;
}

.auth-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(980px, 78vw);
  height: min(980px, 78vw);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 90px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.auth-screen::after {
  content: "";
  position: absolute;
  inset: 10%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.1) 48%, transparent 52%);
  transform: rotate(-8deg);
  opacity: 0.42;
  pointer-events: none;
}

.auth-art {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  color: #f3f7fb;
  background: transparent;
  overflow: visible;
}

.auth-art::before,
.auth-art::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-art::before {
  width: 460px;
  height: 460px;
  right: 8%;
  top: 12%;
  border: 58px solid rgba(255, 255, 255, 0.045);
}

.auth-art::after {
  width: 520px;
  height: 520px;
  left: 8%;
  bottom: -220px;
  background: rgba(45, 111, 190, 0.2);
  filter: blur(18px);
}

.auth-kicker,
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--muted);
}

.auth-art .auth-kicker {
  color: rgba(243, 247, 251, 0.72);
}

.auth-brandline,
.auth-hero-copy {
  position: relative;
  z-index: 1;
}

.auth-brandline {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  top: clamp(24px, 4vw, 54px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.auth-logo-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  letter-spacing: 0;
}

.auth-art h1 {
  max-width: none;
  margin: 14px 0;
  font-size: clamp(3.2rem, 6vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  white-space: nowrap;
  text-wrap: nowrap;
}

.auth-art p {
  max-width: 62ch;
  line-height: 1.8;
  color: rgba(243, 247, 251, 0.84);
}

.auth-hero-copy {
  position: absolute;
  z-index: 2;
  top: clamp(110px, 15vh, 155px);
  left: 50%;
  width: min(1100px, calc(100vw - 72px));
  transform: translateX(-50%);
  text-align: center;
}

.auth-hero-copy p {
  margin-left: auto;
  margin-right: auto;
}

.auth-illustration {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 45%;
  width: min(780px, 68vw);
  height: min(360px, 34vw);
  transform: translate(-50%, -50%);
  opacity: 0.5;
  pointer-events: none;
}

.orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.orbit-one {
  transform: rotate(-14deg) scaleX(1.08);
}

.orbit-two {
  inset: 24%;
  border-style: dashed;
  opacity: 0.72;
}

.hub-card {
  position: absolute;
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 11px 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.hub-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hub-card strong {
  color: white;
  font-size: 1rem;
}

.hub-main {
  left: 43%;
  top: 28%;
  background: rgba(45, 111, 190, 0.24);
}

.hub-finance {
  right: 8%;
  bottom: 18%;
}

.hub-trade {
  left: 8%;
  bottom: 15%;
}

.hub-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
  transform-origin: left center;
}

.line-one {
  width: 210px;
  left: 44%;
  top: 48%;
  transform: rotate(34deg);
}

.line-two {
  width: 180px;
  left: 22%;
  top: 54%;
  transform: rotate(124deg);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
  z-index: 3;
  min-height: 100vh;
}

.auth-panel::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: rgba(75, 139, 220, 0.18);
  filter: blur(24px);
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
}

.glass,
.card,
.topbar,
.sidebar {
  backdrop-filter: blur(18px);
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.glass,
.auth-login-shell {
  width: min(500px, calc(100vw - 48px));
}

.auth-login-shell {
  position: relative;
  z-index: 1;
  margin-top: clamp(215px, 31vh, 295px);
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(14, 40, 68, 0.82), rgba(12, 32, 55, 0.66));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
}

.auth-login-header {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}

.auth-login-header h2 {
  margin: 0;
  color: white;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.auth-login-header .muted {
  color: rgba(255, 255, 255, 0.68);
}

.auth-secure-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  color: #d8fff1;
  background: rgba(20, 129, 95, 0.22);
  border: 1px solid rgba(188, 255, 231, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-login-shell label span {
  color: rgba(255, 255, 255, 0.82);
}

.auth-login-shell input {
  color: white;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-login-shell input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.auth-login-shell input:focus {
  border-color: rgba(132, 184, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(45, 111, 190, 0.2);
}

.auth-login-shell .btn-primary {
  min-height: 54px;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 1.02rem;
}

.auth-login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-login-footer span {
  border-radius: 999px;
  padding: 8px 11px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Reference-style international login portal */
.auth-screen {
  min-height: 900px;
  height: max(100vh, 900px);
  display: block;
  padding: 0;
  color: white;
  background:
    linear-gradient(180deg, rgba(2, 9, 22, 0.02), rgba(2, 9, 22, 0.08)),
    url("assets/login-bg-global.png") center top / cover no-repeat,
    linear-gradient(145deg, #020b18 0%, #061b35 44%, #082a54 100%);
  overflow: hidden;
  position: relative;
}

.auth-screen::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 260px;
  transform: none;
  background: linear-gradient(180deg, rgba(2, 11, 29, 0.99) 0%, rgba(2, 11, 29, 0.98) 84%, rgba(2, 11, 29, 0) 100%);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
}

.auth-screen::after {
  content: none;
}

.auth-real-logo {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 24px;
  width: min(330px, 23vw);
  height: auto;
  transform: translateX(-50%);
  padding: 0 70px 18px;
  border-radius: 42px;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.auth-globe {
  display: none;
}

.auth-globe::before {
  content: none;
}

.auth-globe::after {
  content: none;
}

.auth-wave {
  display: none;
}

.auth-brand-center {
  display: none !important;
  position: relative;
  z-index: 2;
  justify-items: center;
  gap: 2px;
  margin-top: 2px;
}

.auth-q-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.8rem, 8vw, 7.2rem);
  line-height: 0.86;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.auth-q-name {
  font-size: clamp(2.1rem, 3.8vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 300;
}

.auth-q-sub {
  margin-top: 8px;
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.auth-slogan {
  display: none;
  position: relative;
  z-index: 2;
  margin: 10px 0 4px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-stage {
  position: absolute;
  z-index: 2;
  display: block;
  left: 50.2%;
  top: 39.6%;
  width: min(25.6vw, 430px);
  min-width: 390px;
  margin: 0;
}

.auth-access-panel {
  display: none;
  justify-items: center;
  text-align: center;
}

.auth-shield-orb {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(57, 151, 255, 0.95), rgba(17, 83, 186, 0.76) 58%, rgba(16, 57, 118, 0.24) 70%);
  box-shadow: 0 0 34px rgba(51, 150, 255, 0.9), 0 0 90px rgba(51, 150, 255, 0.36);
  border: 1px solid rgba(136, 206, 255, 0.72);
}

.auth-shield {
  color: white;
  font-size: 5.6rem;
  line-height: 1;
  transform: rotate(45deg);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.auth-access-kicker {
  margin: 26px 0 8px;
  color: #ffc35b;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.auth-access-panel h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3.6vw, 3.15rem);
  letter-spacing: -0.04em;
}

.auth-access-panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.auth-login-panel {
  min-width: 0;
}

.auth-login-shell {
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-login-header {
  display: none;
  margin-bottom: 18px;
}

.auth-login-header h2 {
  margin: 0;
  color: white;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.auth-login-header .muted {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
}

.auth-login-shell label span {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.auth-login-shell .stack {
  gap: 18px;
}

.auth-login-shell input {
  height: 60px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(147, 190, 242, 0.22);
  border-radius: 8px;
}

.auth-login-shell input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.auth-login-shell input:focus {
  border-color: rgba(70, 161, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(38, 133, 255, 0.18);
}

.auth-login-shell .btn-primary {
  min-height: 60px;
  margin-top: 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #28a7ff, #1e5fd6);
  box-shadow: 0 14px 34px rgba(31, 117, 239, 0.34);
}

.auth-bottom-features {
  display: none !important;
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.auth-bottom-features span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.auth-bottom-features span::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(45, 139, 255, 0.08), 0 0 18px rgba(73, 158, 255, 0.18);
}

.auth-bottom-features i {
  display: block;
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.42);
}

.stack,
.info-list {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--text);
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(45, 111, 190, 0.16);
  border-color: var(--blue);
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #173b63, #2d6fbe);
  color: white;
}

.btn-secondary {
  background: var(--blue-soft);
  color: var(--navy);
}

.btn-danger {
  background: rgba(198, 74, 74, 0.12);
  color: var(--danger);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

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

.message {
  min-height: 18px;
  color: var(--navy);
}

.message.inline {
  min-height: auto;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: linear-gradient(180deg, #102946 0%, #183b63 100%);
  color: white;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 6px 24px;
}

.brand-mark {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 66px;
  overflow: hidden;
}

.brand-mark img {
  position: absolute;
  top: -1px;
  left: -28px;
  width: 118px;
  max-width: none;
  height: auto;
  display: block;
}

.brand > div:last-child {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 1.04rem;
  line-height: 1.25;
}

.brand small {
  color: rgba(255, 255, 255, 0.68);
  margin-top: 4px;
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding-right: 2px;
  max-height: calc(100vh - 106px);
  overflow: auto;
}

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

.nav-group + .nav-group {
  margin-top: 8px;
}

.nav-group-title {
  margin: 0;
  padding: 10px 12px 2px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.52);
}

.nav-link {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.main-shell {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.topbar {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar h2 {
  margin: 8px 0 0;
}

.topbar-actions,
.user-chip,
.section-head,
.action-bar,
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.user-chip {
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--panel-soft);
  flex-direction: column;
  align-items: flex-start;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 129, 95, 0.12);
  color: var(--success);
  font-weight: 600;
}

.banner {
  border-radius: 16px;
  background: #eff6ff;
  border: 1px solid #cfe0f8;
  color: var(--navy);
  padding: 14px 16px;
}

.view-section {
  display: grid;
  gap: 18px;
}

.stats-grid,
.content-grid,
.form-grid,
.mini-stats,
.report-panels {
  display: grid;
  gap: 18px;
}

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

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

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

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

.content-grid.two-thirds {
  grid-template-columns: 1.8fr 1fr;
}

.content-grid.ledger-layout {
  grid-template-columns: 1.2fr 1fr;
}

.content-grid.module-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  align-items: start;
}

body.forms-modalized .content-grid.module-layout {
  grid-template-columns: minmax(0, 1fr);
}

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

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

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

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

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

.section-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 0 0 6px;
}

.section-head h4,
.form-group h4 {
  margin: 0 0 12px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 1.78rem;
  margin-top: 10px;
}

.stat-card.income strong { color: var(--success); }
.stat-card.expense strong { color: var(--danger); }
.stat-card.profit strong { color: var(--blue); }
.stat-card.warning strong { color: var(--warning); }
.stat-card.neutral strong { color: var(--navy); }
.stat-card.danger strong { color: var(--danger); }

.dashboard-guide-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background:
    radial-gradient(circle at 88% 20%, rgba(45, 111, 190, 0.14), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f6f9fd 100%);
}

.dashboard-guide-hero h3 {
  margin: 4px 0 10px;
  font-size: 1.75rem;
  color: var(--navy-deep);
}

.guide-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.guide-tips span {
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.module-guide-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.module-guide-head h3 {
  margin: 0 0 6px;
  color: var(--navy-deep);
}

.module-guide-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(23, 59, 99, 0.16);
}

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

.module-guide-link {
  border: 1px solid #d7e3f2;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: left;
  background: #f9fbfe;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-guide-link:hover {
  transform: translateY(-2px);
  border-color: #a9c4e8;
  box-shadow: 0 14px 28px rgba(23, 59, 99, 0.12);
}

.module-guide-link strong,
.module-guide-link small {
  display: block;
}

.module-guide-link strong {
  color: var(--navy);
  font-size: 1rem;
}

.module-guide-link small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.enterprise-portal {
  display: grid;
  gap: 20px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  border-radius: 32px;
  color: white;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 16% 100%, rgba(73, 146, 255, 0.34), transparent 34%),
    linear-gradient(135deg, #10253f 0%, #173b63 48%, #2f6fbd 100%);
  box-shadow: 0 28px 70px rgba(16, 37, 63, 0.28);
  overflow: hidden;
  position: relative;
}

.portal-hero::after {
  content: "";
  position: absolute;
  inset: auto -70px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 42px solid rgba(255, 255, 255, 0.08);
}

.portal-hero-copy,
.portal-hero-panel {
  position: relative;
  z-index: 1;
}

.portal-eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 900;
}

.portal-hero h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.portal-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
}

.portal-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.portal-quick-button,
.portal-muted-pill {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 11px 16px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.portal-quick-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.portal-hero-panel {
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.portal-hero-panel span,
.portal-hero-panel small {
  color: rgba(255, 255, 255, 0.72);
}

.portal-hero-panel strong {
  margin: 8px 0;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.portal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.portal-side-panel,
.portal-right-panel {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.portal-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-side-card,
.portal-module-card {
  border: 1px solid rgba(211, 225, 242, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(23, 59, 99, 0.08);
}

.portal-side-card {
  padding: 18px;
}

.portal-side-card.subtle {
  background: #f8fbff;
}

.portal-side-card.alert {
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}

.portal-side-title {
  margin: 0 0 14px;
  color: var(--navy-deep);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.portal-path-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 12px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.portal-path-step:hover {
  background: var(--blue-soft);
}

.portal-path-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  color: var(--navy);
  background: #edf4ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.portal-path-step strong,
.portal-note strong {
  color: var(--navy-deep);
}

.portal-path-step small,
.portal-note small {
  color: var(--muted);
  line-height: 1.45;
}

.portal-note {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid #e8eef6;
}

.portal-note:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.portal-note.warning strong {
  color: var(--warning);
}

.portal-module-card {
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.portal-module-card:hover {
  transform: translateY(-2px);
  border-color: #bfd4ee;
  box-shadow: 0 24px 56px rgba(23, 59, 99, 0.12);
}

.portal-module-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
}

.portal-module-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #173b63, #2d6fbe);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.portal-module-top h3 {
  margin: 2px 0 6px;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
}

.portal-module-top p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.portal-module-link {
  min-height: 82px;
  border: 1px solid #e1eaf5;
  border-radius: 18px;
  padding: 13px 14px;
  text-align: left;
  background: #fbfdff;
  cursor: pointer;
}

.portal-module-link:hover {
  border-color: #abc5e7;
  background: #f2f7ff;
}

.portal-module-link span,
.portal-module-link small {
  display: block;
}

.portal-module-link span {
  color: var(--navy);
  font-weight: 900;
}

.portal-module-link small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.chart-area,
.share-chart {
  min-height: 320px;
}

.share-chart {
  display: grid;
  place-items: center;
  gap: 18px;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: white;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  text-align: center;
}

.legend-list,
.rank-list,
.timeline-list,
.info-list,
.report-panels {
  display: grid;
  gap: 12px;
}

.legend-item,
.rank-item,
.timeline-item,
.info-item,
.report-panel {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.warning-item {
  border-color: rgba(213, 142, 37, 0.35);
  background: #fff9f0;
}

.legend-item,
.rank-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-panel h4,
.timeline-item strong,
.info-item strong {
  display: block;
  margin-bottom: 6px;
}

.table-wrap {
  overflow: auto;
}

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

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

th {
  font-size: 0.85rem;
  color: var(--muted);
  background: #f8fbff;
}

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

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.pill.normal { background: rgba(20, 129, 95, 0.12); color: var(--success); }
.pill.void,
.pill.disabled { background: rgba(198, 74, 74, 0.12); color: var(--danger); }
.pill.income { background: rgba(20, 129, 95, 0.12); color: var(--success); }
.pill.expense { background: rgba(198, 74, 74, 0.12); color: var(--danger); }
.pill.active,
.pill.confirmed,
.pill.completed,
.pill.open { background: rgba(20, 129, 95, 0.12); color: var(--success); }
.pill.draft,
.pill.pending,
.pill.partial,
.pill.production,
.pill.shipped,
.pill.paid,
.pill.warning { background: rgba(213, 142, 37, 0.12); color: var(--warning); }
.pill.cancelled,
.pill.inactive,
.pill.overdue,
.pill.danger,
.pill.failed { background: rgba(198, 74, 74, 0.12); color: var(--danger); }
.pill.passed,
.pill.blue { background: rgba(45, 111, 190, 0.12); color: var(--blue); }
.pill.low { background: rgba(20, 129, 95, 0.12); color: var(--success); }
.pill.medium,
.pill.in_review { background: rgba(213, 142, 37, 0.12); color: var(--warning); }
.pill.high,
.pill.expired,
.pill.rejected { background: rgba(198, 74, 74, 0.12); color: var(--danger); }

.pager {
  justify-content: flex-end;
  margin-top: 14px;
}

.attachment-meta {
  min-height: 18px;
  color: var(--muted);
  margin-top: 10px;
}

.grouped-form {
  gap: 16px;
}

.form-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fbfdff;
}

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

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

.table-card,
.form-card {
  min-height: 100%;
}

.form-modal-staging {
  display: none !important;
}

.document-asset-library {
  margin-top: 20px;
}

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

.document-asset-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce5f1;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfdff, #f4f8fd);
}

.document-asset-card p {
  margin: 6px 0 0;
}

.document-asset-preview {
  display: grid;
  place-items: center;
  min-height: 132px;
  overflow: hidden;
  border: 1px dashed #b9c9dd;
  border-radius: 14px;
  background: #fff;
  color: #7b8da6;
}

.document-asset-preview.logo-preview {
  background: #0b2a57;
}

.document-asset-preview img {
  display: block;
  max-width: 88%;
  max-height: 112px;
  object-fit: contain;
}

.document-asset-preview.seal-preview img {
  max-width: 112px;
}

@media (max-width: 980px) {
  .document-assets-grid {
    grid-template-columns: 1fr;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 40, 67, 0.46);
  backdrop-filter: blur(6px);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(15, 40, 67, 0.24);
}

.modal-panel.large {
  width: min(980px, 100%);
}

.modal-panel.xlarge {
  width: min(1180px, calc(100vw - 48px));
}

.modal-panel.drawer {
  width: min(980px, calc(100vw - 24px));
  height: min(100vh, 100%);
  max-height: none;
  justify-self: end;
  border-radius: 24px 0 0 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.modal-header h3 {
  margin: 4px 0 0;
  font-size: 1.24rem;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 1.45rem;
  line-height: 1;
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.modal-body .form-card {
  min-height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.modal-body .form-card > .section-head {
  display: none;
}

.modal-body .form-card > .action-bar {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 18px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.modal-body .grouped-form {
  gap: 16px;
}

.empty-inline,
.empty-table,
.empty-state {
  display: grid;
  gap: 12px;
  place-items: start;
}

.empty-table {
  justify-items: center;
  padding: 22px 0;
}

.empty-state-card {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.empty-state {
  max-width: 460px;
  text-align: center;
  justify-items: center;
}

.legend-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #f2f6fb;
  color: var(--navy);
}

.legend-chip.green::before,
.legend-chip.red::before,
.legend-chip.blue::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-chip.green::before { background: var(--success); }
.legend-chip.red::before { background: var(--danger); }
.legend-chip.blue::before { background: var(--blue); }

.trend-svg {
  width: 100%;
  height: auto;
}

.amount {
  font-variant-numeric: tabular-nums;
}

.status-pill.offline {
  background: rgba(198, 74, 74, 0.12);
  color: var(--danger);
}

.banner.success {
  background: #eefbf5;
  border-color: #c6ead8;
  color: var(--success);
}

.banner.warning {
  background: #fff8ec;
  border-color: #f2d7a6;
  color: #9a650f;
}

.check-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}

.line-items {
  display: grid;
  gap: 12px;
}

.nested-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #f8fbff;
}

.action-bar.compact {
  justify-content: flex-end;
}

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

.permission-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.permission-item {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
}

.permission-item input {
  width: auto;
}

.permission-item small {
  color: var(--muted);
}

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

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

@media (max-width: 1280px) {
  .auth-screen {
    padding: 0;
  }

  .auth-stage {
    left: 50.2%;
    top: 39.6%;
    width: min(25.8vw, 410px);
    min-width: 360px;
    gap: 0;
  }

  .auth-art h1 {
    font-size: clamp(3rem, 5.2vw, 5.1rem);
  }

  .auth-illustration {
    opacity: 0.42;
  }

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

  .portal-side-panel,
  .portal-right-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .content-grid,
  .content-grid.two-thirds,
  .content-grid.ledger-layout,
  .content-grid.module-layout,
  .form-grid.columns-4,
  .form-grid.columns-5,
  .form-grid.columns-3 {
    grid-template-columns: 1fr;
  }

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

  .stats-grid.account-grid,
  .form-hint-grid,
  .module-guide-grid,
  .permission-box {
    grid-template-columns: 1fr;
  }
}

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

  .auth-screen {
    padding: 0;
    min-height: 100vh;
    background-position: center;
  }

  .auth-brand-center {
    transform: scale(0.82);
    transform-origin: top center;
    margin-top: -10px;
  }

  .auth-slogan {
    text-align: center;
    font-size: 1.2rem;
  }

  .auth-stage {
    left: 50%;
    top: 43%;
    width: min(80vw, 430px);
    min-width: 0;
    transform: translateX(-50%);
    display: block;
    gap: 0;
  }

  .auth-access-panel {
    display: none;
  }

  .auth-login-shell {
    padding: 0;
  }

  .auth-bottom-features {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
  }

  .auth-bottom-features i {
    display: none;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .main-shell {
    padding: 14px;
  }

  .topbar,
  .section-head,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .portal-hero,
  .portal-side-panel,
  .portal-right-panel,
  .portal-main-grid,
  .module-guide-actions {
    grid-template-columns: 1fr;
  }

  .portal-hero {
    padding: 24px;
  }

  .portal-module-links {
    grid-template-columns: 1fr;
  }
}
