:root {
  --ink: #06223f;
  --app-ink: #23272f;
  --muted: #738099;
  --line: #b7c8e4;
  --app-line: #d8dee8;
  --app-bg: #f7f8fb;
  --app-surface: #ffffff;
  --line-strong: #003f4d;
  --brand: #003f4d;
  --brand-hover: #013542;
  --brand-soft: #e7f4f7;
  --logo-blue: #069ce0;
  --logo-blue-dark: #047fba;
  --panel-width: 25vw;
  --login-bg: url("/assets/podklad1.webp");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  background: #fff;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, var(--panel-width)) 1fr;
  overflow: hidden;
}

.login-panel {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}

.login-content {
  width: min(100%, 360px);
}

.login-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto 42px;
}

.form-title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
}

.message {
  margin: 0 0 18px;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.35;
}

.message p {
  margin: 0;
}

.message p + p {
  margin-top: 6px;
}

.message.error {
  border: 1px solid #f0b5b5;
  color: #8e1f1f;
  background: #fff2f2;
}

.message.success {
  border: 1px solid #b7d7c0;
  color: #145f2d;
  background: #eefaf1;
}

.message.info {
  border: 1px solid #b7d7c0;
  color: #145f2d;
  background: #eefaf1;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.field label,
.forgot-link {
  font-size: 14px;
  line-height: 1.25;
}

.field label {
  color: var(--ink);
  font-weight: 700;
}

.forgot-link {
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}

.forgot-link:hover,
.forgot-link:focus-visible,
.form-footer a:hover,
.form-footer a:focus-visible {
  text-decoration: underline;
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input::placeholder {
  color: #748099;
  opacity: 1;
}

.field input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px var(--line-strong);
}

.login-button {
  height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--logo-blue);
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.login-button:hover {
  background: var(--logo-blue-dark);
}

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

.login-button:focus-visible {
  outline: 3px solid rgba(0, 63, 77, 0.28);
  outline-offset: 3px;
}

.captcha-field {
  gap: 7px;
}

.captcha-field input {
  max-width: 160px;
}

.form-footer {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.form-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.form-footer-secondary {
  margin-top: -12px;
  font-size: 13px;
}

.form-footer-secondary a {
  color: var(--muted);
  font-weight: 650;
}

.form-footer-secondary a:hover,
.form-footer-secondary a:focus-visible {
  color: var(--brand);
}

.verified-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 2px;
}

.verified-summary span {
  border: 1px solid #d6e3ef;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--ink);
  background: #f6f9fc;
  font-size: 13px;
  line-height: 1.2;
}

.app-body {
  color: var(--app-ink);
  background: var(--app-bg);
}

.public-help-shell {
  min-height: 100vh;
  padding: 26px clamp(16px, 4vw, 42px) 48px;
}

.public-help-topbar,
.public-help-shell .help-page {
  width: min(1280px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.public-help-topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.public-help-brand {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.public-help-brand img {
  display: block;
  width: min(190px, 52vw);
  height: auto;
}

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

.public-help-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cdd8e3;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--app-ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.public-help-actions a:last-child {
  border-color: var(--logo-blue);
  color: #fff;
  background: var(--logo-blue);
}

.public-help-actions a:hover,
.public-help-actions a:focus-visible {
  border-color: var(--logo-blue);
  color: var(--logo-blue-dark);
  background: #eef8fd;
}

.public-help-actions a:last-child:hover,
.public-help-actions a:last-child:focus-visible {
  color: #fff;
  background: var(--logo-blue-dark);
}

.public-help-actions a:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.2);
  outline-offset: 2px;
}

.public-help-actions a:active {
  transform: translateY(1px);
}

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

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--app-line);
  padding: 22px 16px;
  background: var(--app-surface);
  overflow-y: auto;
}

.app-brand {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
}

.app-brand img {
  display: block;
  width: 190px;
  height: auto;
}

.app-menu {
  display: grid;
  gap: 4px;
}

.app-menu-item,
.app-menu-section-label,
.app-logout button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #30343d;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.app-menu-item svg,
.app-menu-section-label svg,
.app-logout svg,
.dashboard-tile svg,
.empty-panel svg,
.user-chip svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-menu-spacer {
  height: 42px;
}

.app-menu-section-label {
  color: var(--brand);
  background: #f6fafc;
  font-weight: 800;
  cursor: default;
}

.app-submenu {
  display: grid;
  gap: 4px;
  margin: 0 0 10px 22px;
  padding-left: 14px;
  border-left: 1px solid #dbe4ee;
}

.app-submenu-item {
  min-height: 38px;
  padding-left: 10px;
  font-size: 14px;
}

.app-menu-divider {
  display: block;
  height: 1px;
  margin: 5px 8px 5px 10px;
  background: #dbe4ee;
}

.app-menu-item:hover,
.app-logout button:hover {
  color: var(--brand);
  background: #f1f4f8;
}

.app-menu-item.active {
  color: #ffffff;
  background: var(--logo-blue);
  box-shadow: inset 4px 0 0 var(--app-ink);
}

.app-menu-item.disabled {
  color: #9aa4b2;
  background: #f2f4f7;
  cursor: not-allowed;
  box-shadow: none;
}

.app-menu-item.placeholder {
  background: transparent;
  cursor: default;
}

.app-menu-item.placeholder:hover {
  color: #9aa4b2;
  background: transparent;
}

.app-menu-item.disabled svg {
  opacity: 0.62;
}

.app-sidebar-bottom {
  margin: auto 0 0;
  display: grid;
  gap: 4px;
}

.app-menu-bottom {
  gap: 4px;
}

.app-menu-divider-bottom {
  margin: 6px 12px;
}

.app-logout {
  margin: 0;
}

.app-logout button {
  width: 100%;
}

.app-main {
  min-width: 0;
  padding: 34px 42px 48px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flow-root;
  margin-top: -14px;
  padding: 14px 0 1px;
  background: var(--app-bg);
}

.app-topbar .app-header {
  flex-wrap: wrap;
  gap: 12px 24px;
}

.app-topbar .user-chip {
  max-width: 100%;
  padding-top: 7px;
  padding-bottom: 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app-topbar .user-chip span { min-width: 0; }
.app-topbar .user-chip svg { flex-shrink: 0; }

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #697386;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-header h1 {
  margin: 0;
  color: var(--app-ink);
  font-size: 30px;
  line-height: 1.15;
}

.user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  padding: 0 13px;
  color: #394150;
  background: var(--app-surface);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.user-chip svg {
  width: 19px;
  height: 19px;
  flex-basis: 19px;
}

.price-ticker {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -12px 0 24px;
  border: 1px solid #cfdbe8;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--app-ink);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.price-ticker-label {
  display: grid;
  gap: 1px;
  min-width: 86px;
  min-height: 34px;
  align-content: center;
  border-radius: 6px;
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.86);
  background: var(--logo-blue);
  font-size: 11px;
  line-height: 1.1;
}

.price-ticker-label strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.price-ticker-label span {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  text-transform: none;
}

.price-ticker-track {
  min-width: 0;
  overflow: hidden;
}

.price-ticker-strip {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-ticker-track.is-scrollable .price-ticker-strip {
  animation: price-ticker-marquee 180s linear infinite;
}

.price-ticker-track.is-scrollable:hover .price-ticker-strip {
  animation-play-state: paused;
}

.price-ticker-item {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce5ee;
  border-radius: 6px;
  padding: 5px 8px;
  background: #f8fbfd;
  color: #475467;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.price-ticker-name {
  max-width: 190px;
  overflow: hidden;
  color: #344054;
  font-weight: 800;
  text-overflow: ellipsis;
}

.price-ticker-item strong {
  color: var(--app-ink);
  font-weight: 900;
}

.price-ticker-arrow {
  width: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.price-ticker-item.is-up {
  border-color: #f1b8b4;
  background: #fff4f2;
}

.price-ticker-item.is-up .price-ticker-arrow {
  color: #b42318;
}

.price-ticker-item.is-down {
  border-color: #b7d7c0;
  background: #eefaf1;
}

.price-ticker-item.is-down .price-ticker-arrow {
  color: #16803c;
}

.price-ticker-item.is-neutral .price-ticker-arrow {
  color: #98a2b3;
}

.price-ticker-item.is-unavailable {
  color: #98a2b3;
  background: #f3f6fa;
}

.price-ticker-status,
.price-ticker-updated {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.price-ticker-status.error {
  color: #b42318;
}

.price-ticker-updated {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 10px;
  color: #ffffff;
  background: var(--logo-blue);
  font-weight: 900;
  text-align: right;
}

.price-ticker.is-stale .price-ticker-updated {
  background: #5f7280;
}

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

@media (prefers-reduced-motion: reduce) {
  .price-ticker-track.is-scrollable .price-ticker-strip {
    animation: none;
  }
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -10px 0 22px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px 14px;
  color: #7c2d12;
  background: #fff7ed;
  box-shadow: inset 4px 0 0 #f97316;
}

.impersonation-banner strong {
  display: block;
  color: #7c2d12;
  font-size: 14px;
  line-height: 1.25;
}

.impersonation-banner span {
  display: block;
  margin-top: 2px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.35;
}

.impersonation-banner form {
  margin: 0;
}

.impersonation-banner button,
.impersonation-banner a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fdba74;
  border-radius: 7px;
  padding: 0 12px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.impersonation-banner button:hover,
.impersonation-banner button:focus-visible,
.impersonation-banner a:hover,
.impersonation-banner a:focus-visible {
  color: #fff;
  background: #ea580c;
}

.impersonation-banner button:focus-visible,
.impersonation-banner a:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.24);
  outline-offset: 2px;
}

.welcome-panel,
.empty-panel,
.dashboard-tile {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
}

.welcome-panel h2,
.empty-panel h2,
.dashboard-tile h3 {
  margin: 0;
  color: var(--app-ink);
  line-height: 1.2;
}

.welcome-panel h2 {
  font-size: 24px;
}

.welcome-panel p:not(.eyebrow),
.empty-panel p,
.dashboard-tile p {
  margin: 8px 0 0;
  color: #667085;
  line-height: 1.5;
}

.customer-badge {
  min-width: 184px;
  border: 1px solid #c8dce2;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--brand);
  background: #f3fbfd;
}

.customer-badge span {
  display: block;
  margin-bottom: 5px;
  color: #5f7280;
  font-size: 12px;
  font-weight: 700;
}

.customer-badge strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.customer-badge.compact {
  min-width: 170px;
  padding: 10px 12px;
}

.company-profile {
  display: grid;
  gap: 16px;
}

.profile-title,
.profile-section {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.profile-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.profile-title h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 24px;
  line-height: 1.2;
}

.profile-section {
  overflow: hidden;
}

.profile-section h3 {
  margin: 0;
  border-bottom: 1px solid var(--logo-blue-dark);
  padding: 10px 14px;
  color: #ffffff;
  background: var(--logo-blue);
  font-size: 15px;
  line-height: 1.35;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr);
  gap: 1px;
  background: var(--app-line);
}

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

.profile-grid.three {
  grid-template-columns: 2fr 1fr 1fr;
}

.profile-grid.address {
  grid-template-columns: 2fr 1fr 1fr;
}

.profile-field {
  min-height: 58px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px 12px;
  background: #fff;
}

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

.profile-field span {
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.profile-field strong {
  color: var(--app-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-layout {
  max-width: 880px;
  display: grid;
  gap: 18px;
}

.account-card {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 22px;
  background: var(--app-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.account-card h2 {
  margin: 0 0 8px;
  color: var(--app-ink);
  font-size: 22px;
  line-height: 1.2;
}

.account-card p {
  margin: 0;
  color: #667085;
  line-height: 1.5;
}

.linked-account {
  width: fit-content;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  border: 1px solid #c8dce2;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--brand);
  background: #f3fbfd;
}

.linked-account svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linked-account span {
  display: block;
  margin-bottom: 4px;
  color: #5f7280;
  font-size: 12px;
  font-weight: 700;
}

.linked-account strong {
  display: block;
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.2;
}

.account-toggle-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid #d9e3ed;
  border-radius: 8px;
  padding: 13px 14px;
  background: #f8fbfd;
  cursor: pointer;
}

.account-toggle-row input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--logo-blue);
}

.account-toggle-row strong,
.account-toggle-row small {
  display: block;
  line-height: 1.35;
}

.account-toggle-row strong {
  color: var(--app-ink);
  font-size: 15px;
  font-weight: 850;
}

.account-toggle-row small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.settings-form {
  max-width: 420px;
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.settings-button {
  width: fit-content;
  min-width: 156px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: var(--logo-blue);
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.settings-button-link {
  text-decoration: none;
}

.settings-button.compact {
  min-width: 104px;
  height: 34px;
  padding: 0 12px;
}

.settings-button.danger {
  background: #b42318;
}

.settings-button.danger:hover {
  background: #8f1d14;
}

.settings-button:hover {
  background: var(--logo-blue-dark);
}

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

.settings-button:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.28);
  outline-offset: 3px;
}

.settings-button:disabled {
  color: #7b8794;
  background: #d9e3ed;
  cursor: not-allowed;
  transform: none;
}

.settings-button:disabled:hover {
  background: #d9e3ed;
}

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

.admin-page-header,
.admin-section-header,
.admin-user-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-page-header h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 26px;
  line-height: 1.2;
}

.admin-section-header h3 {
  margin: 0;
  color: var(--app-ink);
  font-size: 21px;
  line-height: 1.2;
}

.admin-approval-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.admin-approval-table-wrap {
  overflow-x: auto;
}

.admin-approval-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-approval-table th,
.admin-approval-table td {
  border-bottom: 1px solid var(--app-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.admin-approval-table th {
  color: #667085;
  background: #f8fbfd;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-approval-table .nowrap {
  white-space: nowrap;
}

.admin-approval-table .number {
  text-align: right;
  white-space: nowrap;
}

.admin-approval-table .strong {
  color: var(--app-ink);
  font-weight: 850;
}

.admin-approved-note {
  display: inline-flex;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-status-cell,
.admin-trading-cell {
  display: grid;
  align-items: start;
  gap: 6px;
}

.admin-status-cell .admin-approved-note,
.admin-trading-cell .admin-approved-note {
  display: block;
}

.admin-trading-status {
  color: #53627a;
}

.admin-purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 5px;
}

.admin-global-settings-card {
  gap: 16px;
}

.admin-global-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, 0.55fr) repeat(2, minmax(210px, 0.85fr));
  gap: 12px;
  align-items: stretch;
}

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

.admin-confirmation-settings-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.admin-trading-email-setting {
  grid-column: span 2;
}

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

.admin-protocol-settings-grid .wide {
  grid-column: 1 / -1;
}

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

.admin-setting-box {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d9e3ed;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}

.admin-setting-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.admin-setting-label span,
.admin-lifetime-setting > span:first-child,
.admin-number-setting > span:first-child,
.admin-toggle-setting > span:first-child,
.admin-text-setting > span:first-child,
.admin-email-setting > span:first-child {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.admin-setting-label strong {
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-setting-label small {
  grid-column: 2;
  margin-top: -8px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: right;
}

.admin-priceindex-priority-box {
  align-content: start;
}

.admin-priceindex-priority-box .admin-setting-label small {
  grid-column: 1 / -1;
  margin-top: -4px;
  text-align: left;
}

.admin-priceindex-priority-list {
  display: grid;
  gap: 8px;
}

.admin-priceindex-priority-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid #cddfeb;
  border-radius: 8px;
  padding: 10px 10px 10px 12px;
  background: #fff;
  cursor: grab;
}

.admin-priceindex-priority-item.is-dragging {
  opacity: 0.72;
  border-color: var(--logo-blue);
  box-shadow: 0 10px 24px rgba(15, 54, 82, 0.12);
}

.admin-priceindex-priority-item strong,
.admin-priceindex-priority-item span {
  display: block;
  min-width: 0;
}

.admin-priceindex-priority-item strong {
  color: var(--app-ink);
  font-size: 15px;
  font-weight: 850;
}

.admin-priceindex-priority-item span {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-priceindex-priority-item button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--logo-blue);
  font-size: 18px;
  font-weight: 900;
  cursor: grab;
}

.admin-time-range {
  --range-start: 33.333%;
  --range-end: 66.667%;
  display: grid;
  gap: 8px;
}

.admin-time-range-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.admin-time-range-labels strong {
  color: var(--app-ink);
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-time-range-control {
  position: relative;
  height: 46px;
}

.admin-time-range-control::before {
  position: absolute;
  right: 0;
  left: 0;
  top: 19px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #dfeaf3 0 var(--range-start),
    var(--logo-blue) var(--range-start) var(--range-end),
    #dfeaf3 var(--range-end) 100%
  );
  content: "";
}

.admin-time-range-control input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 46px;
  margin: 0;
  appearance: none;
  background: transparent;
  outline: none;
  pointer-events: none;
}

.admin-time-range-control input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
}

.admin-time-range-control input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--logo-blue);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  appearance: none;
  cursor: grab;
  pointer-events: auto;
}

.admin-time-range-control input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(6, 156, 224, 0.2), 0 4px 12px rgba(15, 23, 42, 0.2);
}

.admin-time-range-control input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
}

.admin-time-range-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--logo-blue);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  cursor: grab;
  pointer-events: auto;
}

.admin-range-scale {
  display: flex;
  justify-content: space-between;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-number-with-suffix {
  display: flex;
  align-items: center;
  max-width: 180px;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  background: #fff;
}

.admin-number-with-suffix:focus-within {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.admin-number-with-suffix input {
  width: 100%;
  height: 40px;
  min-width: 0;
  border: 0;
  padding: 0 10px;
  color: var(--app-ink);
  background: transparent;
  outline: none;
}

.admin-number-with-suffix i {
  padding: 0 11px 0 4px;
  color: #667085;
  font-style: normal;
  font-weight: 850;
}

.admin-email-setting input {
  width: 100%;
  height: 40px;
  min-width: 0;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--app-ink);
  background: #fff;
}

.admin-email-setting input:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
  outline: none;
}

.admin-email-setting small {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.admin-text-setting input,
.admin-text-setting textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--app-ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
}

.admin-text-setting input {
  height: 40px;
}

.admin-text-setting textarea {
  resize: vertical;
}

.admin-text-setting input:focus,
.admin-text-setting textarea:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
  outline: none;
}

.admin-ares-header-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 190px;
}

.admin-ares-header-actions .settings-button {
  min-width: 104px;
}

.admin-ares-status {
  min-height: 15px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: right;
}

.admin-ares-status.success {
  color: #027a48;
}

.admin-ares-status.error {
  color: #b42318;
}

.admin-toggle-setting {
  align-content: start;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.admin-toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--logo-blue);
  flex: 0 0 auto;
}

.admin-toggle-row strong {
  color: var(--app-ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.admin-toggle-setting small {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.admin-intro-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) auto;
  align-items: stretch;
  gap: 12px;
}

.admin-file-setting {
  align-content: start;
}

.admin-file-setting > span:first-child,
.admin-intro-format-box > span:first-child,
.admin-intro-order-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.admin-file-setting input[type="file"],
.admin-intro-order-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  color: var(--app-ink);
  background: #fff;
  outline: none;
}

.admin-file-setting input[type="file"] {
  min-height: 40px;
  padding: 8px 10px;
  font-weight: 700;
}

.admin-intro-order-field input {
  height: 40px;
  padding: 0 10px;
}

.admin-file-setting input[type="file"]:focus,
.admin-intro-order-field input:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.admin-file-setting small,
.admin-intro-format-box small {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.admin-intro-format-box {
  align-content: start;
}

.admin-intro-format-box strong {
  color: var(--app-ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.admin-intro-upload-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.admin-intro-upload-actions .settings-button {
  min-width: 150px;
}

.admin-intro-image-list {
  display: grid;
  gap: 10px;
}

.admin-intro-image-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: center;
  gap: 14px;
  border: 1px solid #d9e3ed;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.admin-intro-image-item.is-disabled {
  background: #f8fafc;
}

.admin-intro-image-item.is-missing {
  border-color: #f3b5ad;
  background: #fff8f7;
}

.admin-intro-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #d9e3ed;
  border-radius: 6px;
  background: #eef2f6;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.admin-intro-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-intro-image-detail {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.admin-intro-image-detail strong,
.admin-intro-image-detail small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-intro-image-detail strong {
  color: var(--app-ink);
  font-size: 16px;
  font-weight: 850;
}

.admin-intro-image-detail small {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-intro-image-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-intro-image-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid #d9e3ed;
  border-radius: 999px;
  padding: 0 9px;
  color: #53627a;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.admin-intro-warning {
  margin: 4px 0 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.admin-intro-image-controls {
  display: grid;
  align-items: end;
  gap: 10px;
}

.admin-intro-order-field {
  display: grid;
  gap: 6px;
}

.admin-global-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-user-grid {
  display: grid;
  gap: 12px;
}

.admin-user-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.admin-customer-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.admin-customer-filter {
  display: grid;
  gap: 6px;
  width: min(100%, 460px);
}

.admin-customer-filter span,
.admin-customer-detail-bar span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.admin-customer-filter input {
  width: 100%;
  height: 40px;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--app-ink);
  background: #fff;
  outline: none;
}

.admin-customer-filter input:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.admin-customers-table {
  min-width: 1180px;
}

.admin-customers-table .admin-customer-main-row[hidden],
.admin-customers-table .admin-customer-detail-row[hidden],
.admin-customers-table .admin-customer-no-results[hidden] {
  display: none;
}

.admin-customer-main-cell {
  min-width: 260px;
}

.admin-customer-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-customer-name strong,
.admin-customer-detail-bar strong {
  overflow: hidden;
  color: var(--app-ink);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customer-name strong {
  font-size: 14px;
  font-weight: 850;
}

.admin-customer-name small {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customer-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  padding: 7px 12px;
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.admin-customer-status.is-enabled {
  border-color: #b7e4c7;
  color: #0b6b32;
  background: #ecfdf3;
}

.admin-customer-status.is-disabled {
  border-color: #d8e0e8;
  color: #667085;
  background: #f2f4f7;
}

.admin-customer-action-cell {
  width: 190px;
}

.admin-customer-switch-form {
  display: flex;
  justify-content: flex-start;
  margin: 0;
}

.admin-customer-switch-button {
  min-width: 172px;
}

.admin-customer-no-results td {
  padding: 18px;
  color: #667085;
  background: #fff;
  font-weight: 750;
  text-align: center;
}

.admin-customer-detail-cell {
  padding: 0;
}

.admin-customer-detail {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-customer-detail-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-customer-detail-bar > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-customer-detail-bar strong {
  font-size: 17px;
  font-weight: 850;
}

.admin-user-card-header strong {
  display: block;
  margin-top: 3px;
  color: var(--app-ink);
  font-size: 19px;
  line-height: 1.2;
}

.admin-user-card-header span,
.admin-user-meta,
.admin-settings-grid label > span:first-child,
.admin-coefficient-mode legend,
.admin-coefficient-calculation legend,
.admin-foreign-spread-list legend {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--app-ink);
  background: #f8fbfd;
  cursor: pointer;
}

.admin-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--logo-blue);
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.admin-customer-settings-grid {
  grid-template-columns: 188px 188px 240px minmax(420px, 520px);
  align-items: start;
  max-width: 1184px;
  column-gap: 12px;
  row-gap: 10px;
}

.admin-settings-grid label {
  display: grid;
  gap: 6px;
}

.admin-settings-grid input,
.admin-settings-grid select {
  width: 100%;
  height: 40px;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--app-ink);
  background: #fff;
  outline: none;
}

.admin-settings-grid input:focus,
.admin-settings-grid select:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.admin-coefficient-mode,
.admin-coefficient-calculation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  grid-column: span 2;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.admin-customer-settings-grid .admin-coefficient-calculation,
.admin-customer-settings-grid .admin-coefficient-mode {
  grid-column: 1 / span 2;
}

.admin-customer-settings-grid .admin-coefficient-calculation {
  grid-row: 2;
}

.admin-customer-settings-grid .admin-coefficient-mode {
  grid-row: 3;
}

.admin-coefficient-mode legend,
.admin-coefficient-calculation legend {
  grid-column: 1 / -1;
  padding: 0;
}

.admin-coefficient-mode label,
.admin-coefficient-calculation label {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 0 14px 0 10px;
  background: #f8fbfd;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.admin-coefficient-mode input,
.admin-coefficient-calculation input {
  width: 15px;
  height: 15px;
  border: 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--logo-blue);
}

.admin-coefficient-single {
  grid-column: 1 / span 2;
}

.admin-customer-settings-grid .admin-coefficient-single {
  grid-row: 4;
}

.admin-coefficient-single.is-disabled > span:first-child {
  color: #9aa6b2;
}

.admin-coefficient-single.is-disabled .admin-money-input {
  border-color: #d8e0e8;
  background: #f2f5f8;
}

.admin-coefficient-single.is-disabled input,
.admin-coefficient-single.is-disabled i {
  color: #98a2b3;
}

.admin-coefficient-single.is-disabled input {
  cursor: not-allowed;
}

.admin-coefficient-product-list {
  display: grid;
  grid-column: 1 / span 2;
  gap: 8px;
}

.admin-customer-settings-grid .admin-coefficient-product-list {
  grid-row: 5;
}

.admin-coefficient-product-list[hidden] {
  display: none;
}

.admin-money-input[hidden] {
  display: none;
}

.admin-coefficient-product-list label,
.admin-customer-settings-grid .admin-coefficient-single {
  display: grid;
  grid-template-columns: 150px 150px;
  align-items: center;
  gap: 8px;
}

.admin-coefficient-product-list label > span:first-child {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-customer-settings-grid .admin-coefficient-single .admin-money-input,
.admin-customer-settings-grid .admin-coefficient-product-list .admin-money-input {
  max-width: 150px;
}

.admin-foreign-spread-list {
  display: grid;
  grid-column: 4;
  grid-row: 3 / span 4;
  gap: 12px;
  align-self: start;
  max-width: 520px;
  min-width: 0;
  border: 1px solid #dde7f0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.admin-foreign-spread-list legend {
  padding: 0;
}

.admin-foreign-spread-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-foreign-spread-group + .admin-foreign-spread-group {
  border-top: 1px solid #e4ecf3;
  padding-top: 10px;
}

.admin-foreign-spread-group h3 {
  margin: 0;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-foreign-spread-row {
  display: grid;
  grid-template-columns: 150px 220px;
  align-items: end;
  gap: 8px;
  justify-content: start;
  min-width: 0;
}

.admin-foreign-spread-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-foreign-spread-title strong {
  color: var(--app-ink);
  font-size: 13px;
  line-height: 1.2;
}

.admin-foreign-spread-title small {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-field-title-row select {
  width: auto;
  min-width: 136px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 750;
}

.admin-customer-settings-grid .settings-button {
  grid-column: 1 / span 1;
  align-self: end;
}

.admin-percent-input,
.admin-money-input {
  display: flex;
  align-items: center;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  background: #fff;
}

.admin-percent-input:focus-within,
.admin-money-input:focus-within {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.admin-percent-input input,
.admin-money-input input {
  border: 0;
  box-shadow: none;
}

.admin-percent-input i,
.admin-money-input i {
  padding: 0 11px 0 4px;
  color: #667085;
  font-style: normal;
  font-weight: 850;
}

.contracts-page {
  display: grid;
  gap: 16px;
}

.contract-account {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.contract-account {
  overflow: hidden;
}

.contract-account > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-left: 4px solid var(--app-ink);
  padding: 12px 18px 12px 16px;
  color: #fff;
  background: var(--logo-blue);
  cursor: pointer;
  list-style: none;
}

.contract-account > summary::-webkit-details-marker {
  display: none;
}

.contract-account > summary::after {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.contract-account[open] > summary::after {
  transform: rotate(225deg);
}

.contract-account > summary span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.contract-account > summary strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
}

.contract-count {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  white-space: nowrap;
}

.contract-table-wrap {
  overflow-x: auto;
  background: #fff;
}

.contracts-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.contracts-table.contracts-opm-table {
  min-width: 1040px;
}

.contracts-table.contract-addenda-table {
  min-width: 1180px;
  font-size: 12.5px;
}

.contracts-table.advances-table {
  min-width: 980px;
}

.contracts-table.invoices-table {
  min-width: 1680px;
}

.pdf-cell {
  min-width: 52px;
  text-align: center;
  white-space: nowrap;
}

.pdf-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3c6c2;
  border-radius: 8px;
  background: #fff1f0;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.pdf-link:hover,
.pdf-link:focus-visible {
  border-color: #e28b84;
  background: #ffe3e0;
}

.pdf-link:focus-visible {
  outline: 3px solid rgba(217, 48, 37, 0.18);
  outline-offset: 2px;
}

.pdf-link:active {
  transform: translateY(1px);
}

.pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.advance-years {
  display: grid;
  gap: 0;
  background: #fff;
}

.advance-year {
  border-top: 1px solid var(--app-line);
}

.advance-year summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--brand);
  background: #e8f7fd;
  cursor: pointer;
  list-style: none;
}

.advance-year summary::-webkit-details-marker {
  display: none;
}

.advance-year summary span:not(.contract-row-chevron) {
  font-size: 14px;
  font-weight: 800;
}

.advance-year summary strong {
  margin-left: auto;
  color: #50606f;
  font-size: 13px;
  line-height: 1.25;
}

.advance-year[open] .contract-row-chevron::before {
  transform: translate(-50%, -58%) rotate(45deg);
}

.contracts-table th,
.contracts-table td {
  border: 1px solid var(--app-line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.contracts-table th {
  color: #fff;
  background: var(--logo-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.contracts-table td {
  color: var(--app-ink);
}

.contracts-table tbody tr.is-even td {
  background: #f8fbfd;
}

.contracts-table tbody tr.is-late-payment td,
.contracts-table tbody tr.is-late-payment.is-even td {
  color: #7f1d1d;
  background: #fff1f1;
}

.contracts-table tbody tr.is-late-payment td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}

.contract-main-row {
  cursor: pointer;
}

.contract-main-row:hover td,
.contract-main-row:focus-visible td {
  background: #eef8fd;
}

.contract-main-row:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.28);
  outline-offset: -3px;
}

.contract-main-row.is-open td {
  background: #eef8fd;
}

.contract-row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  color: var(--app-ink);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.contract-row-toggle:focus-visible {
  outline: 0;
}

.contract-row-chevron {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  position: relative;
  display: inline-block;
  border: 1px solid #b9ddec;
  border-radius: 999px;
  color: var(--logo-blue-dark);
  background: #e8f7fd;
}

.contract-row-chevron::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translate(-58%, -50%) rotate(-45deg);
  transition: transform 140ms ease;
}

.contract-main-row.is-open .contract-row-chevron::before {
  transform: translate(-50%, -58%) rotate(45deg);
}

.contract-detail-cell {
  padding: 0;
  background: #f4f7fb;
}

.contracts-table tbody tr.contract-detail-row td {
  background: #f4f7fb;
}

.contract-detail-panel {
  padding: 14px 16px 16px;
}

.contract-addenda-panel {
  padding: 12px 14px 14px;
  background: #f4f7fb;
}

.contract-addenda-panel .contract-detail-empty {
  padding: 4px 2px;
}

.contract-addenda-table .contract-detail-cell {
  padding: 0;
}

.contract-detail-panel h3 {
  margin: 0 0 10px;
  color: var(--app-ink);
  font-size: 15px;
  line-height: 1.3;
}

.contract-detail-empty {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.45;
}

.contract-monthly-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.contract-monthly-table th,
.contract-monthly-table td {
  border: 1px solid var(--app-line);
  padding: 8px 10px;
}

.contract-monthly-table thead th {
  color: #fff;
  background: var(--logo-blue);
}

.contract-monthly-table tbody th {
  color: var(--app-ink);
  background: #fff;
  font-weight: 700;
  text-align: left;
}

.contract-monthly-table tbody tr:nth-child(even) th,
.contract-monthly-table tbody tr:nth-child(even) td {
  background: #f8fbfd;
}

.contracts-table .nowrap {
  white-space: nowrap;
}

.contracts-table .number {
  text-align: right;
  white-space: nowrap;
}

.contracts-table .strong {
  font-weight: 700;
}

.consumption-chart-link {
  border: 0;
  padding: 0;
  color: var(--logo-blue-dark);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.consumption-chart-link:hover,
.consumption-chart-link:focus-visible {
  color: var(--logo-blue);
}

.consumption-chart-link:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.24);
  outline-offset: 3px;
  border-radius: 4px;
}

body.modal-open {
  overflow: hidden;
}

.chart-modal[hidden] {
  display: none;
}

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
}

.chart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.chart-modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.chart-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--app-line);
  padding: 20px 22px 14px;
}

.chart-modal-header h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 24px;
  line-height: 1.2;
}

.chart-modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  color: #394150;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chart-modal-close:hover,
.chart-modal-close:focus-visible {
  color: var(--logo-blue-dark);
  background: #eef8fd;
}

.chart-modal-close:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.24);
  outline-offset: 2px;
}

.chart-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
}

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

.chart-back-button,
.chart-export-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9ddec;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--logo-blue-dark);
  background: #e8f7fd;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.chart-export-button {
  border-color: var(--logo-blue);
  color: #fff;
  background: var(--logo-blue);
}

.chart-back-button[hidden],
.chart-export-button[hidden] {
  display: none;
}

.chart-back-button:hover,
.chart-back-button:focus-visible,
.chart-export-button:hover,
.chart-export-button:focus-visible {
  color: #fff;
  background: var(--logo-blue-dark);
}

.chart-back-button:focus-visible,
.chart-export-button:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.24);
  outline-offset: 2px;
}

.chart-hint {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.chart-stage {
  overflow-x: auto;
  padding: 0 22px 22px;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  max-width: 260px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(17, 24, 39, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

.purchase-chart-tooltip[hidden] {
  display: none;
}

.purchase-chart-tooltip {
  position: fixed;
  z-index: 80;
  max-width: min(280px, calc(100vw - 24px));
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(17, 24, 39, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
}

.chart-message {
  margin: 0;
  border: 1px dashed #c8dce2;
  border-radius: 8px;
  padding: 28px;
  color: #667085;
  background: #f8fbfd;
  text-align: center;
}

.chart-message.error {
  border-color: #f0b5b5;
  color: #8e1f1f;
  background: #fff2f2;
}

.consumption-chart-svg {
  width: 100%;
  min-width: 680px;
  height: auto;
  display: block;
}

.spot-chart-axis {
  fill: #5a6775;
  font-size: 14px;
  font-weight: 650;
}

.spot-chart-value {
  fill: #111827;
  font-size: 12px;
  font-weight: 800;
}

.chart-day-hit,
.chart-day-point {
  cursor: pointer;
}

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

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

.help-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.help-hero h2 {
  margin: 3px 0 0;
  color: var(--app-ink);
  font-size: 26px;
  line-height: 1.2;
}

.help-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 9px 0 0;
  color: #667085;
  line-height: 1.5;
}

.help-search {
  width: min(360px, 100%);
  min-width: 280px;
  display: grid;
  gap: 7px;
}

.help-search span {
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.help-search input {
  width: 100%;
  height: 42px;
  border: 1px solid #cdd8e3;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--app-ink);
  background: #fff;
  font-weight: 700;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.help-search input:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

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

.help-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 18px;
}

.help-box,
.help-article {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.help-box {
  overflow: hidden;
}

.help-box h2 {
  margin: 0;
  border-left: 4px solid var(--app-ink);
  padding: 14px 16px;
  color: #fff;
  background: var(--logo-blue);
  font-size: 18px;
  line-height: 1.2;
}

.help-toc,
.help-quick-links {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.help-toc a,
.help-quick-link {
  display: grid;
  border: 1px solid #d5e2ec;
  border-radius: 8px;
  color: var(--app-ink);
  background: #fbfdff;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.help-toc a {
  gap: 4px;
  padding: 10px 11px;
}

.help-toc a:hover,
.help-toc a:focus-visible,
.help-quick-link:hover,
.help-quick-link:focus-visible {
  border-color: var(--logo-blue);
  background: #eef8fd;
}

.help-toc a:focus-visible,
.help-quick-link:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.2);
  outline-offset: 2px;
}

.help-toc a:active,
.help-quick-link:active {
  transform: translateY(1px);
}

.help-toc span,
.help-quick-links h3 {
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.help-toc strong {
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.25;
}

.help-quick-links h3 {
  margin: 8px 2px 0;
}

.help-quick-links h3:first-child {
  margin-top: 0;
}

.help-quick-link {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.help-quick-link svg {
  width: 22px;
  height: 22px;
  justify-self: center;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.help-quick-link strong,
.help-quick-link small {
  display: block;
}

.help-quick-link strong {
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.25;
}

.help-quick-link small {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.help-articles {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.help-article {
  overflow: hidden;
  scroll-margin-top: 22px;
}

.help-article[hidden] {
  display: none;
}

.help-article summary {
  position: relative;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px 54px 16px 18px;
  cursor: pointer;
  list-style: none;
}

.help-article summary::-webkit-details-marker {
  display: none;
}

.help-article summary::after {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--logo-blue-dark);
  border-bottom: 2px solid var(--logo-blue-dark);
  content: "";
  transform: translateY(-64%) rotate(45deg);
  transition: transform 140ms ease;
}

.help-article[open] summary::after {
  transform: translateY(-36%) rotate(225deg);
}

.help-article summary:hover,
.help-article summary:focus-visible {
  background: #f8fbfd;
}

.help-article summary:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.2);
  outline-offset: -3px;
}

.help-article-category {
  color: var(--logo-blue-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.help-article summary strong {
  color: var(--app-ink);
  font-size: 20px;
  line-height: 1.22;
}

.help-article summary small {
  color: #667085;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.help-article-body {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--app-line);
  padding: 4px 20px 18px;
  background: #fff;
}

.help-article-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.help-article-image {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid #d5e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.help-article-image a {
  display: block;
  background: #f8fbfd;
}

.help-article-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
}

.help-article-image figcaption {
  border-top: 1px solid #d5e2ec;
  padding: 8px 10px;
  color: #4f5f70;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.help-article-section {
  padding-top: 14px;
}

.help-article-section + .help-article-section {
  border-top: 1px solid #edf2f7;
}

.help-article-section h3 {
  margin: 0 0 8px;
  color: var(--app-ink);
  font-size: 16px;
  line-height: 1.3;
}

.help-article-section p,
.help-article-section ul {
  margin: 0;
  color: #4f5f70;
  font-size: 14px;
  line-height: 1.55;
}

.help-article-section ul {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.help-empty-state {
  border: 1px dashed #c8dce2;
  border-radius: 8px;
  padding: 24px;
  color: #667085;
  background: #fff;
  text-align: center;
}

.help-empty-state[hidden] {
  display: none;
}

.help-empty-state strong,
.help-empty-state span {
  display: block;
}

.help-empty-state strong {
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.25;
}

.help-empty-state span {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

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

  .help-sidebar {
    position: static;
  }

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

@media (max-width: 680px) {
  .help-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .help-search {
    min-width: 0;
  }

  .help-toc {
    grid-template-columns: 1fr;
  }

  .help-article summary {
    padding-right: 46px;
  }
}

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

.purchase-year-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.purchase-year-panel h2 {
  margin: 3px 0 0;
  color: var(--app-ink);
  font-size: 22px;
  line-height: 1.2;
}

.purchase-year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.purchase-year-tab {
  min-width: 104px;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #c8dce2;
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--app-ink);
  background: #f8fbfd;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.purchase-year-tab span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.purchase-year-tab strong {
  font-size: 21px;
  line-height: 1.1;
}

.purchase-year-tab:hover,
.purchase-year-tab:focus-visible {
  border-color: var(--logo-blue);
  background: #eef8fd;
}

.purchase-year-tab:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.22);
  outline-offset: 2px;
}

.purchase-year-tab.active {
  border-color: var(--logo-blue);
  color: #fff;
  background: var(--logo-blue);
  box-shadow: 0 10px 24px rgba(6, 156, 224, 0.18);
}

.purchase-year-tab.active span,
.purchase-year-tab.active strong {
  color: #fff;
}

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

@media (max-width: 1500px) {
  .purchase-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .purchase-market-grid {
    grid-template-columns: 1fr;
  }
}

.market-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.market-card-header {
  min-height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-left: 4px solid var(--app-ink);
  padding: 16px 18px;
  color: #fff;
  background: var(--logo-blue);
}

.market-card-header h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.market-card-header .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.market-source {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 7px;
  padding: 0 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.market-source:hover,
.market-source:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.market-source:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.32);
  outline-offset: 2px;
}

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

.market-card-actions form {
  margin: 0;
}

.market-remove-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 7px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.market-remove-button:hover,
.market-remove-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.market-remove-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.32);
  outline-offset: 2px;
}

.market-dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.market-dashboard-controls h2 {
  margin: 3px 0 0;
  color: var(--app-ink);
  font-size: 21px;
  line-height: 1.2;
}

.market-dashboard-controls .purchase-source-badge {
  border-color: #c8dce2;
  color: var(--brand);
  background: #f3fbfd;
}

.dashboard-market-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-market-form select {
  min-width: 230px;
  height: 40px;
  border: 1px solid #cdd8e3;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--app-ink);
  background: #fff;
  font-weight: 750;
}

.dashboard-market-form select:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
  outline: none;
}

.market-card-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-top: 1px solid var(--app-line);
  padding: 10px 16px;
  color: #667085;
  background: #f8fbfd;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

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

.dashboard-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dashboard-settings-header h2 {
  margin: 3px 0 0;
  color: var(--app-ink);
  font-size: 24px;
  line-height: 1.2;
}

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

.dashboard-transfer-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.dashboard-transfer-column > header {
  border-left: 4px solid var(--app-ink);
  padding: 16px 18px;
  color: #fff;
  background: var(--logo-blue);
}

.dashboard-transfer-column > header h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-transfer-column > header .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.dashboard-transfer-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dashboard-transfer-list h3 {
  margin: 10px 0 2px;
  color: #667085;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-transfer-list h3:first-child {
  margin-top: 0;
}

.dashboard-transfer-item {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d5e2ec;
  border-radius: 8px;
  padding: 10px 10px 10px 13px;
  background: #fbfdff;
}

.dashboard-transfer-list.is-sortable .dashboard-transfer-item.is-selected {
  cursor: grab;
}

.dashboard-transfer-list.is-sortable .dashboard-transfer-item.is-selected:active {
  cursor: grabbing;
}

.dashboard-transfer-item.is-dragging {
  border-color: var(--logo-blue);
  background: #eef8fd;
  opacity: 0.58;
}

.dashboard-transfer-list.is-sort-saved .dashboard-transfer-item {
  border-color: #95c11f;
}

.dashboard-transfer-list.is-sort-error {
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.dashboard-transfer-item strong,
.dashboard-transfer-item span {
  display: block;
}

.dashboard-transfer-item strong {
  color: var(--app-ink);
  font-size: 15px;
  line-height: 1.25;
}

.dashboard-transfer-item span {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-transfer-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--logo-blue);
  font-size: 23px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.dashboard-transfer-button:hover,
.dashboard-transfer-button:focus-visible {
  background: var(--logo-blue-dark);
}

.dashboard-transfer-button:active {
  transform: translateY(1px);
}

.dashboard-transfer-button:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.24);
  outline-offset: 2px;
}

.purchase-source-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 7px;
  padding: 0 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.purchase-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-line);
}

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

.purchase-metric {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
}

.purchase-metric span,
.purchase-metric small {
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.purchase-metric strong {
  color: var(--app-ink);
  font-size: 20px;
  line-height: 1.2;
}

.purchase-chart-wrap {
  overflow: hidden;
  padding: 16px 18px 18px;
}

.purchase-chart-svg {
  width: 100%;
  min-width: 0;
  height: auto;
  display: block;
}

.purchase-chart-wrap:has(.purchase-forecast-chart-svg) {
  overflow-x: auto;
}

.purchase-forecast-chart-svg {
  width: 100%;
  min-width: 900px;
  height: auto;
  display: block;
}

.purchase-forecast-bar {
  fill: #cdeefe;
  stroke: #9eddf6;
  stroke-width: 1;
  transition: fill 140ms ease, opacity 140ms ease;
}

.purchase-forecast-bar:hover {
  fill: #b9e6fb;
}

.purchase-segment-bar {
  cursor: pointer;
  transition: opacity 140ms ease, stroke-width 140ms ease, filter 140ms ease;
}

.purchase-segment-bar:hover,
.purchase-segment-bar:focus-visible,
.purchase-segment-bar.is-highlighted {
  opacity: 0.82;
  filter: brightness(1.08);
  stroke: rgba(17, 24, 39, 0.42);
  stroke-width: 1.4;
}

.purchase-segment-bar:focus-visible {
  outline: none;
}

.purchase-segment-hatch {
  pointer-events: none;
}

.purchase-segment-label {
  pointer-events: none;
  fill: #fff;
  font-size: 4.6px;
  font-weight: 850;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, 0.2);
  stroke-width: 1.1px;
}

.purchase-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.purchase-status-badge.pending {
  border: 1px solid #f6c56b;
  color: #8a4b00;
  background: #fff4d8;
}

.purchase-status-badge.approved {
  border: 1px solid #a6dbb8;
  color: #146c2e;
  background: #e8f8ed;
}

.purchase-status-badge.rejected_timeout {
  border: 1px solid #cbd5e1;
  color: #475467;
  background: #f1f5f9;
}

.purchase-status-badge.rejected_admin {
  border: 1px solid #f0b5ae;
  color: #912018;
  background: #fff1f0;
}

.purchase-expiry-label {
  color: #8a4b00;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-expiry-label.muted {
  color: #98a2b3;
}

.purchase-chart-axis {
  fill: #5a6775;
  font-size: 13px;
  font-weight: 650;
}

.purchase-chart-month-price {
  fill: #182b49;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.purchase-chart-month-price-unit {
  fill: #5a6775;
  font-size: 10px;
  font-weight: 650;
}

.purchase-chart-average {
  fill: #5d7418;
  font-size: 12px;
  font-weight: 800;
}

.purchase-chart-last {
  fill: #111827;
  font-size: 12px;
  font-weight: 850;
}

.purchase-chart-coverage {
  fill: #237846;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
}

.purchase-chart-point {
  transition: opacity 140ms ease;
}

.purchase-chart-point:hover {
  opacity: 1;
}

.purchase-chart-empty {
  border: 1px dashed #b7d7c0;
  border-radius: 8px;
  padding: 28px;
  color: #145f2d;
  background: #eefaf1;
  text-align: center;
}

.purchase-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.purchase-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.purchase-chart-legend i {
  width: 22px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
}

.purchase-spot-note {
  margin: 10px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.legend-plan {
  border: 1px solid #9eddf6;
  background: #cdeefe;
}

.legend-year {
  background: #16a34a;
}

.legend-quarter {
  background: #ef7c1a;
}

.legend-month {
  background: #6d5bd0;
}

.purchase-create-card,
.purchase-tranches-card {
  overflow: hidden;
}

.purchase-protocol-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  padding: 14px 18px;
  background: #f8fbfd;
}

.purchase-protocol-strip > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.purchase-protocol-strip strong {
  color: var(--app-ink);
  font-size: 16px;
  line-height: 1.25;
}

.purchase-protocol-strip span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.purchase-protocol-strip .settings-button {
  flex: 0 0 auto;
}

.purchase-tranche-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(250px, 320px);
  align-items: end;
  gap: 14px;
  padding: 18px;
}

.purchase-form-summary {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 11px 13px;
  background: #f8fbfd;
}

.purchase-form-summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.purchase-form-summary strong {
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.2;
}

.purchase-tranche-actions {
  display: grid;
  gap: 9px;
  align-self: stretch;
}

.purchase-tranche-actions .settings-button {
  width: 100%;
}

.purchase-window-status {
  display: grid;
  gap: 3px;
  min-height: 72px;
  border: 1px solid #d9e3ed;
  border-left: 4px solid var(--logo-blue);
  border-radius: 8px;
  padding: 9px 11px;
  background: #f8fbfd;
}

.purchase-window-status span {
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.purchase-window-status strong {
  color: var(--app-ink);
  font-size: 13px;
  line-height: 1.25;
}

.purchase-window-status small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.purchase-window-status.is-open {
  border-left-color: #16a34a;
  background: #f3fbf5;
}

.purchase-window-status.is-closed {
  border-left-color: #ef7c1a;
  background: #fff8ec;
}

.purchase-percent-field {
  margin: 0;
}

.purchase-percent-control {
  display: flex;
  align-items: center;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  background: #fff;
}

.purchase-percent-control:focus-within {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
}

.purchase-percent-control input {
  min-width: 0;
  border: 0;
  padding-right: 6px;
  box-shadow: none;
}

.purchase-percent-control input:focus {
  outline: 0;
  box-shadow: none;
}

.purchase-percent-control span {
  padding: 0 12px 0 4px;
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}

.settings-button.secondary {
  border: 1px solid #cdd8e3;
  color: var(--app-ink);
  background: #fff;
}

.settings-button.secondary:hover {
  color: var(--logo-blue-dark);
  background: #eef8fd;
}

.settings-button.secondary:disabled,
.settings-button.secondary:disabled:hover {
  border-color: #d9e3ed;
  color: #7b8794;
  background: #eef2f6;
}

.purchase-modal[hidden] {
  display: none;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 8px;
}

.purchase-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.purchase-modal-panel {
  position: relative;
  width: min(1240px, 100%);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  border: 1px solid rgba(216, 222, 232, 0.92);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.purchase-detail-panel {
  width: min(620px, 100%);
}

.purchase-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--app-line);
  padding: 12px 22px 10px;
}

.purchase-modal-header h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 22px;
  line-height: 1.2;
}

.purchase-modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  color: #394150;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.purchase-modal-close:hover,
.purchase-modal-close:focus-visible {
  color: var(--logo-blue-dark);
  background: #eef8fd;
}

.purchase-modal-form {
  display: grid;
  gap: 10px;
  padding: 10px 22px 12px;
}

.purchase-modal-section {
  display: grid;
  gap: 8px;
}

.purchase-modal-section h3 {
  margin: 0;
  color: var(--app-ink);
  font-size: 15px;
  line-height: 1.25;
}

.purchase-expiry-section {
  border: 1px solid #d8dee8;
  border-left: 4px solid #069ce0;
  border-radius: 8px;
  padding: 12px 16px;
  background: #eef8fd;
}

.purchase-expiry-section p {
  margin: 0;
  color: #175c78;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.purchase-price-section {
  border: 1px solid #b7d7c0;
  border-left: 4px solid #19a04b;
  border-radius: 8px;
  padding: 12px 16px;
  background: #edf9f1;
}

.purchase-price-section.is-loading {
  border-color: #b9ddec;
  border-left-color: var(--logo-blue);
  background: #eef8fd;
}

.purchase-price-section.is-error {
  border-color: #f0b5b5;
  border-left-color: #b42318;
  background: #fff2f2;
}

.purchase-price-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.purchase-price-heading p {
  margin: 4px 0 0;
  color: #116b32;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.purchase-price-section.is-loading .purchase-price-heading p {
  color: #175c78;
}

.purchase-price-section.is-error .purchase-price-heading p {
  color: #8e1f1f;
}

#purchase-modal-price-note[hidden],
#purchase-modal-price-footnote[hidden] {
  display: none !important;
}

.purchase-price-value {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: max-content;
  text-align: right;
  white-space: nowrap;
}

.purchase-price-heading strong {
  color: #116b32;
  font-size: 22px;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.purchase-price-value span {
  color: #4e6858;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.purchase-price-section.is-loading .purchase-price-heading strong {
  color: var(--logo-blue-dark);
}

.purchase-price-section.is-loading .purchase-price-value span {
  color: #467083;
}

.purchase-price-section.is-error .purchase-price-heading strong {
  color: #8e1f1f;
}

.purchase-price-section.is-error .purchase-price-value span {
  color: #9d4b4b;
}

.purchase-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

#purchase-modal-price-total-row {
  display: none !important;
}

.purchase-price-grid > div[hidden] {
  display: none !important;
}

.purchase-price-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(17, 107, 50, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
}

.purchase-price-grid span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.purchase-price-grid strong {
  color: var(--app-ink);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-price-footnote {
  margin: 0;
  color: #394150;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

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

.purchase-product-tabs button,
.purchase-period-option {
  min-height: 42px;
  border: 1px solid #c8dce2;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--app-ink);
  background: #f8fbfd;
  font-weight: 800;
  cursor: pointer;
}

.purchase-product-tabs button.active,
.purchase-period-option.active {
  border-color: var(--logo-blue);
  color: #fff;
  background: var(--logo-blue);
}

.purchase-product-tabs button:focus-visible,
.purchase-period-option:focus-visible,
.purchase-modal-close:focus-visible {
  outline: 3px solid rgba(6, 156, 224, 0.24);
  outline-offset: 2px;
}

.purchase-period-options {
  display: none;
  gap: 8px;
}

.purchase-period-options.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.purchase-period-option {
  display: grid;
  align-content: center;
  gap: 3px;
  text-align: left;
}

.purchase-period-option span {
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
}

.purchase-period-option.active span {
  color: rgba(255, 255, 255, 0.86);
}

.purchase-slider-section {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 12px 16px;
  background: #f8fbfd;
}

.purchase-slider-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.purchase-slider-heading p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.purchase-slider-heading strong {
  color: var(--logo-blue-dark);
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

.purchase-percent-slider {
  width: 100%;
  accent-color: var(--logo-blue);
}

.purchase-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 12px;
}

.purchase-slider-row label {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

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

.purchase-modal-metrics div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.purchase-modal-metrics span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.purchase-modal-metrics strong {
  color: var(--app-ink);
  font-size: 17px;
  line-height: 1.2;
}

.purchase-confirmation-section {
  border: 1px solid #f6c56b;
  border-left: 4px solid #ef7c1a;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fff8ec;
}

.purchase-confirmation-section p {
  margin: 0;
  color: #8a4b00;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.purchase-confirmation-section p + p {
  margin-top: 8px;
}

.purchase-confirmation-test-note {
  color: #116b32;
}

.purchase-confirmation-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 12px;
}

.purchase-confirmation-code label {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.purchase-confirmation-code input {
  width: 100%;
  height: 44px;
  border: 1px solid #cdd8e3;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--app-ink);
  background: #fff;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 4px;
  text-align: center;
}

.purchase-confirmation-code input:focus {
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 3px rgba(6, 156, 224, 0.16);
  outline: none;
}

.purchase-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--app-line);
  padding-top: 10px;
}

.purchase-detail-body {
  display: grid;
  gap: 16px;
  padding: 18px 22px 0;
}

.purchase-detail-highlight {
  display: grid;
  gap: 4px;
  border: 1px solid #c8dce2;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fbfd;
}

.purchase-detail-highlight span {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.purchase-detail-highlight strong {
  color: var(--app-ink);
  font-size: 22px;
  line-height: 1.2;
}

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

.purchase-detail-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.purchase-detail-grid dt {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.purchase-detail-grid dd {
  margin: 0;
  color: var(--app-ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-detail-panel .purchase-modal-actions {
  margin: 18px 22px 22px;
}

.purchase-empty-state {
  padding: 18px;
  color: #667085;
  background: #fff;
  font-size: 14px;
}

.purchase-tranches-table-wrap {
  border-top: 1px solid var(--app-line);
  overflow-x: auto;
}

.purchase-tranches-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.purchase-tranches-table th,
.purchase-tranches-table td {
  border: 1px solid var(--app-line);
  padding: 9px 10px;
  text-align: left;
}

.purchase-tranches-table thead th {
  color: #fff;
  background: var(--logo-blue);
  font-size: 12px;
}

.purchase-tranches-table tbody td {
  color: var(--app-ink);
}

.purchase-tranches-table tbody tr:nth-child(even) td {
  background: #f8fbfd;
}

.purchase-tranches-table .nowrap {
  white-space: nowrap;
}

.purchase-tranches-table .number {
  text-align: right;
  white-space: nowrap;
}

.purchase-tranches-table .strong {
  font-weight: 800;
}

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

.dashboard-tile {
  min-height: 168px;
  padding: 20px;
}

.dashboard-tile svg,
.empty-panel svg {
  color: var(--brand);
}

.dashboard-tile h3 {
  margin-top: 16px;
  font-size: 18px;
}

.empty-panel {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 32px;
  text-align: center;
}

.empty-panel svg {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  margin-bottom: 14px;
}

.empty-panel h2 {
  font-size: 24px;
}

.visual-panel {
  min-height: 100vh;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.02)),
    var(--login-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.visual-panel.is-empty {
  background-image: none;
  background-color: #eef4f8;
}

@media (max-width: 980px) {
  .portal-app {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .app-sidebar {
    padding: 18px 12px;
  }

  .app-brand {
    justify-content: center;
    padding: 0;
  }

  .app-brand img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    object-position: left center;
  }

  .app-menu-item,
  .app-menu-section-label,
  .app-logout button {
    justify-content: center;
    padding: 0;
  }

  .app-menu-item span,
  .app-menu-section-label span,
  .app-logout span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .app-submenu {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .app-submenu-item {
    padding-left: 0;
  }

  .app-menu-divider {
    width: 34px;
    margin: 5px auto;
  }

  .app-main {
    padding: 28px 24px 36px;
  }

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

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

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

  .admin-customer-settings-grid {
    max-width: 680px;
  }

  .admin-customer-settings-grid .admin-coefficient-calculation,
  .admin-customer-settings-grid .admin-coefficient-mode,
  .admin-customer-settings-grid .admin-coefficient-single,
  .admin-customer-settings-grid .admin-coefficient-product-list,
  .admin-customer-settings-grid .settings-button {
    grid-row: auto;
  }

  .admin-foreign-spread-list {
    grid-column: 1 / -1;
    grid-row: auto;
    max-width: none;
  }

  .admin-coefficient-product-list {
    grid-column: 1 / -1;
  }

  .purchase-tranche-form .settings-button {
    width: 100%;
  }

}

@media (max-width: 860px) {
  .login-shell {
    display: block;
    min-height: 100vh;
  }

  .visual-panel {
    position: fixed;
    inset: 0;
    opacity: 0.28;
  }

  .login-panel {
    min-height: 100vh;
    padding: 32px 22px;
    background: rgba(255, 255, 255, 0.94);
  }

  .login-logo {
    margin-bottom: 34px;
  }
}

@media (max-width: 680px) {
  .public-help-shell {
    padding: 18px 12px 32px;
  }

  .public-help-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .public-help-actions {
    width: 100%;
    justify-content: stretch;
  }

  .public-help-actions a {
    flex: 1 1 140px;
    justify-content: center;
  }

  .portal-app {
    display: block;
  }

  .app-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .app-brand img {
    width: 38px;
    height: 38px;
  }

  .app-menu {
    display: flex;
    min-width: max-content;
  }

  .app-menu-spacer {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .app-menu-section-label {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
  }

  .app-submenu {
    display: flex;
    min-width: max-content;
    margin: 0;
    padding-left: 0;
    border-left: 0;
  }

  .app-menu-divider {
    width: 1px;
    height: 28px;
    margin: 7px 4px;
  }

  .app-menu-item,
  .app-logout button {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .app-sidebar-bottom {
    margin: 0 0 0 auto;
    display: flex;
    align-items: center;
    min-width: max-content;
  }

  .app-menu-bottom {
    display: flex;
    min-width: max-content;
  }

  .app-menu-divider-bottom {
    margin: 7px 4px;
  }

  .app-logout {
    margin: 0;
  }

  .app-main {
    padding: 22px 16px 32px;
  }

  .app-header,
  .welcome-panel,
  .admin-page-header,
  .admin-section-header,
  .admin-user-card-header,
  .admin-customer-detail-bar,
  .impersonation-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .user-chip {
    width: fit-content;
  }

  .price-ticker {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 7px;
    margin-top: -8px;
  }

  .price-ticker-label {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .price-ticker-updated {
    text-align: left;
  }

  .price-ticker-name {
    max-width: 150px;
  }

  .customer-badge {
    min-width: 0;
  }

  .linked-account {
    width: 100%;
    min-width: 0;
  }

  .profile-title {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-grid,
  .profile-grid.two,
  .profile-grid.three,
  .profile-grid.address {
    grid-template-columns: 1fr;
  }

  .contract-account > summary {
    align-items: stretch;
    flex-direction: column;
  }

  .market-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .market-dashboard-controls,
  .dashboard-settings-header,
  .dashboard-market-form,
  .market-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-transfer-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-transfer-item {
    align-items: stretch;
  }

  .dashboard-market-form select,
  .dashboard-market-form .settings-button,
  .dashboard-settings-header .settings-button {
    width: 100%;
  }

  .purchase-year-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-year-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

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

  .purchase-plan-metrics {
    grid-template-columns: 1fr;
  }

  .purchase-protocol-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-protocol-strip .settings-button {
    width: 100%;
  }

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

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

  .admin-customer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-customer-filter {
    width: 100%;
  }

  .admin-coefficient-single,
  .admin-coefficient-mode,
  .admin-coefficient-calculation,
  .admin-coefficient-product-list,
  .admin-foreign-spread-list {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .admin-coefficient-mode,
  .admin-coefficient-calculation,
  .admin-coefficient-product-list label,
  .admin-foreign-spread-row {
    grid-template-columns: 1fr;
  }

  .admin-global-settings-grid {
    grid-template-columns: 1fr;
  }

  .admin-intro-upload-grid,
  .admin-intro-image-item {
    grid-template-columns: 1fr;
  }

  .admin-trading-email-setting {
    grid-column: auto;
  }

  .admin-ares-header-actions {
    justify-items: start;
    min-width: 0;
  }

  .admin-ares-status {
    text-align: left;
  }

  .admin-global-actions .settings-button,
  .admin-settings-grid .settings-button,
  .admin-intro-upload-actions .settings-button {
    width: 100%;
  }

  .purchase-modal {
    padding: 12px;
  }

  .purchase-modal-header,
  .purchase-slider-heading,
  .purchase-price-heading,
  .purchase-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-product-tabs,
  .purchase-modal-metrics,
  .purchase-price-grid,
  .purchase-detail-grid,
  .purchase-slider-row,
  .purchase-confirmation-code {
    grid-template-columns: 1fr;
  }

  .purchase-period-options.active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-count {
    margin-left: 0;
    text-align: left;
  }

  .chart-modal {
    padding: 12px;
  }

  .chart-modal-header,
  .chart-modal-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .chart-modal-header {
    padding-right: 62px;
  }
}

@media (max-width: 420px) {
  .login-content {
    width: 100%;
  }

  .field-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .forgot-link {
    white-space: normal;
  }
}

.purchase-group-editor { border: 1px solid #d9e2eb; border-radius: 12px; padding: 18px; margin: 0 0 20px; min-width: 0; }
.purchase-group-editor[hidden] { display: none; }
.purchase-group-editor legend { font-weight: 700; padding: 0 8px; }
.purchase-group-editor p { font-size: 13px; color: #526476; line-height: 1.5; }
.purchase-group-search { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0; }
.purchase-group-search label { display: grid; gap: 6px; flex: 1; min-width: 200px; }
.purchase-group-search input, .purchase-group-search select { padding: 10px; border: 1px solid #cad5df; border-radius: 8px; width: 100%; }
.purchase-group-results { display: grid; gap: 4px; max-height: 250px; overflow: auto; margin: 10px 0; }
.purchase-group-results button { text-align: left; background: #f1f6fa; border: 1px solid #d9e2eb; border-radius: 6px; padding: 10px; cursor: pointer; }
.purchase-group-results button:hover { background: #e1eef7; }
.purchase-group-members { list-style: none; padding: 0; display: grid; gap: 8px; }
.purchase-group-members li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5ebf0; }
.purchase-group-members span { overflow-wrap: anywhere; }
[data-group-toggle]:disabled { opacity: .45; cursor: not-allowed; }

.purchase-group-companies .purchase-group-owner,
.purchase-group-companies .purchase-group-owner td { background: #e7f4fc; color: #145677; }
.purchase-group-companies .purchase-group-owner td:first-child { border-left: 4px solid #25a4d7; }
.purchase-group-member-page .purchase-segment-bar { cursor: default; }

.purchase-group-member-page > .purchase-spot-note {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
}

.admin-customer-sources { margin: 0 0 24px; }
.admin-customer-sources > p { color: #526476; font-size: 13px; line-height: 1.5; }
.admin-customer-source-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-customer-sources fieldset { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.admin-customer-sources fieldset:disabled { opacity: .5; }
.admin-customer-sources h4 { margin: 0 0 12px; }
.admin-customer-sources [data-source-item] > label { display: flex; align-items: center; gap: 12px; }
.admin-customer-sources [data-source-item] small { display: block; color: #697386; }
.admin-customer-sources .customer-source-move { display: flex; gap: 5px; }
@media (max-width: 760px) { .admin-customer-source-columns { grid-template-columns: 1fr; } }
.admin-customer-source-columns > .admin-setting-box { display: block; }
