:root {
  color-scheme: dark;
  --bg-portal-canvas: #0b0f17;
  --bg-card-surface: rgba(255, 255, 255, 0.02);
  --text-portal-primary: #f8fafc;
  --text-portal-muted: #94a3b8;
  --border-portal-hairline: rgba(255, 255, 255, 0.06);
  --input-portal-bg: rgba(255, 255, 255, 0.03);
  --input-portal-text: #f8fafc;
  --input-portal-placeholder: #64748b;
  --accent-portal-cyan: #38bdf8;
  --accent-portal-cyan-rgb: 56, 189, 248;
  --button-primary-bg: #f8fafc;
  --button-primary-text: #0b0f17;
  --button-secondary-bg: rgba(255, 255, 255, 0.04);
  --button-danger-text: #fecaca;
  --ink: var(--text-portal-primary);
  --muted: var(--text-portal-muted);
  --line: var(--border-portal-hairline);
  --blue: #8ecbff;
  --deep: var(--bg-portal-canvas);
  --glass: rgba(11, 15, 23, 0.8);
  --glass-soft: var(--bg-card-surface);
  --estara-logo-contrast-filter:
    brightness(0) invert(1)
    drop-shadow(0 0 2px rgba(142, 203, 255, 0.68))
    drop-shadow(0 14px 38px rgba(142, 203, 255, 0.24));
}

:root[data-theme="light"],
:root.theme-light {
  color-scheme: light;
  --bg-portal-canvas: #f1f5f9;
  --bg-card-surface: #ffffff;
  --text-portal-primary: #0f172a;
  --text-portal-muted: #475569;
  --border-portal-hairline: rgba(15, 23, 42, 0.12);
  --input-portal-bg: #ffffff;
  --input-portal-text: #0f172a;
  --input-portal-placeholder: #94a3b8;
  --accent-portal-cyan: #0284c7;
  --accent-portal-cyan-rgb: 2, 132, 199;
  --button-primary-bg: #ffffff;
  --button-primary-text: #0f172a;
  --button-secondary-bg: #ffffff;
  --button-danger-text: #991b1b;
  --ink: var(--text-portal-primary);
  --muted: var(--text-portal-muted);
  --line: var(--border-portal-hairline);
  --blue: #075985;
  --deep: var(--bg-portal-canvas);
  --glass: var(--bg-card-surface);
  --glass-soft: var(--bg-card-surface);
  --estara-logo-contrast-filter: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(142, 203, 255, 0.09), transparent 30%),
    linear-gradient(145deg, var(--bg-portal-canvas) 0%, var(--deep) 100%);
  scrollbar-gutter: stable;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 78%);
}

.portal-shell,
.dashboard-shell {
  display: grid;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
  place-items: center;
}

.login-panel,
.dashboard-panel,
.dashboard-header {
  position: relative;
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 0%, rgba(114, 184, 255, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  box-shadow: 0 42px 140px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(26px) saturate(1.12);
}

.login-panel {
  padding: clamp(26px, 5vw, 44px);
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin: -8px 0 22px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 180ms ease, text-shadow 180ms ease, text-decoration-color 180ms ease;
}

.login-back-link:hover,
.login-back-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-shadow: 0 0 18px rgba(142, 203, 255, 0.28);
  outline: none;
}

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

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0b5cab, #0b3a6d);
  box-shadow: 0 18px 48px rgba(11, 92, 171, 0.3);
  font-weight: 760;
  letter-spacing: 0.06em;
}

.brand-lockup p,
.brand-lockup span {
  margin: 0;
}

.brand-lockup p {
  font-weight: 720;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.login-copy {
  margin-top: 58px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  font-weight: 620;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.login-copy p:last-child,
#dashboard-role,
.security-note {
  color: var(--muted);
  line-height: 1.75;
}

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

.login-step {
  display: grid;
  gap: 16px;
  animation: loginStepIn 220ms ease both;
}

.login-step[hidden] {
  display: none;
}

.step-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(142, 203, 255, 0.08), rgba(255, 255, 255, 0.032)),
    rgba(0, 0, 0, 0.18);
}

.step-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step-card strong {
  color: #ffffff;
  font-size: 20px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

label span {
  color: var(--text-portal-primary);
  font-size: 13px;
  font-weight: 680;
}

input,
select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input[type="checkbox"] {
  box-sizing: border-box;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  border-radius: 5px;
  border: 1px solid rgba(142, 203, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  accent-color: #8ecbff;
  transform: none;
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible {
  border-color: rgba(142, 203, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(142, 203, 255, 0.16);
  outline: none;
}

select {
  appearance: none;
}

select option {
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
}

input:focus,
select:focus {
  border-color: rgba(114, 184, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(114, 184, 255, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: var(--input-portal-placeholder);
  opacity: 1;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-size: 14px;
  font-weight: 620;
  transition: transform 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.language-switcher button {
  min-width: 36px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  color: rgba(248, 251, 255, 0.62);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.language-switcher button:hover {
  color: #ffffff;
  transform: none;
}

.language-switcher button.active {
  color: #06111f;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.08);
}

.portal-language-switcher {
  margin-top: 24px;
}

.session-chip .portal-language-switcher {
  margin-top: 0;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: #ffcece;
  font-size: 13px;
}

.form-status.is-success,
.account-status.is-success {
  color: #8fffc2;
}

.security-note {
  margin: 26px 0 0;
  font-size: 13px;
}

.dashboard-shell {
  align-content: center;
  gap: 20px;
}

.dashboard-header,
.dashboard-panel {
  width: min(100%, 900px);
}

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

.logout-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.dashboard-panel {
  padding: clamp(26px, 5vw, 44px);
}

.module-grid {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.module-card {
  min-height: 70px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 251, 255, 0.9);
  font-weight: 680;
}

.portal-dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.portal-sidebar,
.portal-workspace {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 85% 0%, rgba(114, 184, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow: 0 42px 140px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(1.08);
}

.portal-sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - 36px);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border-radius: 28px;
  padding: 20px;
}

.sidebar-brand,
.sidebar-nav a {
  color: inherit;
  text-decoration: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-logo {
  display: block;
  width: auto;
  height: clamp(54px, 6.4vh, 68px);
  max-width: 96px;
  object-fit: contain;
  object-position: center;
  opacity: 0.96;
  filter: var(--estara-logo-contrast-filter);
  pointer-events: none;
  -webkit-user-drag: none;
}

.sidebar-brand strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  margin: 26px -6px 16px;
  padding: 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 203, 255, 0.32) transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(142, 203, 255, 0.28);
}

.sidebar-nav {
  display: grid;
  gap: 16px;
}

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

.route-section > span {
  display: block;
  padding: 0 6px;
  color: rgba(248, 251, 255, 0.42);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-nav a,
.nav-accordion-toggle {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 14px;
  color: rgba(248, 251, 255, 0.72);
  font-size: 14px;
  font-weight: 720;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.nav-accordion-toggle:hover,
.nav-accordion.active > .nav-accordion-toggle {
  color: #ffffff;
  border-color: rgba(114, 184, 255, 0.24);
  background: rgba(114, 184, 255, 0.12);
  transform: translateX(2px);
}

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

.nav-accordion-toggle {
  width: 100%;
  justify-content: space-between;
  cursor: pointer;
  color: rgba(248, 251, 255, 0.72);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: none;
}

.nav-accordion-toggle i {
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.nav-accordion.open > .nav-accordion-toggle i {
  transform: rotate(225deg);
}

.nav-children {
  display: grid;
  gap: 5px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 240ms ease, opacity 180ms ease;
  will-change: max-height;
}

.nav-accordion.open > .nav-children {
  max-height: max-content;
  overflow: visible;
  opacity: 1;
}

.sidebar-nav a:active,
.sidebar-nav a:focus-visible,
.nav-accordion-toggle:active,
.nav-accordion-toggle:focus-visible {
  color: #ffffff;
  outline: none;
  border-color: rgba(142, 203, 255, 0.3);
  background: rgba(142, 203, 255, 0.11);
  box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.06);
}

.sidebar-nav .nav-child-link {
  min-height: 34px;
  margin-left: 12px;
  border-left: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 10px;
  padding-left: 14px;
  font-size: 12px;
  font-weight: 520;
}

.sidebar-nav .nav-direct-link {
  min-height: 42px;
  font-size: 13px;
  font-weight: 760;
}

.sidebar-nav .nav-folder {
  gap: 5px;
}

.sidebar-nav .nav-folder-depth-1 .nav-accordion-toggle {
  min-height: 38px;
  margin-left: 10px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 12px;
}

.sidebar-nav .nav-folder-depth-2 .nav-accordion-toggle {
  min-height: 34px;
  margin-left: 20px;
  border-radius: 10px;
  padding: 0 11px;
  color: rgba(248, 251, 255, 0.62);
  font-size: 11px;
}

.sidebar-nav .nav-folder-depth-1.open > .nav-children {
  max-height: max-content;
  overflow: visible;
}

.sidebar-nav .nav-folder-depth-2.open > .nav-children {
  max-height: max-content;
  overflow: visible;
}

.sidebar-nav .nav-depth-1 {
  margin-left: 18px;
}

.sidebar-nav .nav-depth-2 {
  margin-left: 30px;
  font-size: 11.5px;
}

.nav-disabled-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  border-left: 1px solid rgba(248, 251, 255, 0.08);
  border-radius: 10px;
  padding: 0 10px 0 14px;
  color: rgba(248, 251, 255, 0.36);
  font-size: 11.5px;
  font-weight: 560;
  letter-spacing: 0.01em;
  opacity: 0.64;
  pointer-events: none;
}

.nav-disabled-link small {
  flex: 0 0 auto;
  margin-left: 8px;
  color: rgba(142, 203, 255, 0.5);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-status {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 0;
  border: 1px solid rgba(114, 184, 255, 0.16);
  border-radius: 18px;
  padding: 14px;
  background: rgba(3, 9, 18, 0.34);
}

.sidebar-settings-trigger {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(142, 203, 255, 0.18);
  border-radius: 14px;
  margin: 0 0 12px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-settings-trigger:hover,
.sidebar-settings-trigger:focus-visible {
  color: #ffffff;
  border-color: rgba(142, 203, 255, 0.36);
  background: rgba(142, 203, 255, 0.11);
  outline: none;
  transform: translateY(-1px);
}

.settings-gear {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(142, 203, 255, 0.22));
}

.settings-gear-outer {
  fill: rgba(142, 203, 255, 0.18);
  stroke: #8ecbff;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.settings-gear-core {
  fill: rgba(142, 203, 255, 0.12);
  stroke: rgba(255, 255, 255, 0.58);
  stroke-width: 1.7;
}

.settings-gear-inner {
  fill: rgba(255, 255, 255, 0.18);
  stroke: rgba(142, 203, 255, 0.76);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.settings-gear-spokes {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 6.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-gear-pin {
  fill: #d9edff;
  stroke: #0b1726;
  stroke-width: 1.5;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 999px;
  background: #69ffa8;
  box-shadow: 0 0 22px rgba(105, 255, 168, 0.72);
}

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

.sidebar-status strong {
  font-size: 12px;
}

.sidebar-status small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.portal-workspace {
  min-width: 0;
  border-radius: 32px;
  padding: clamp(20px, 3vw, 34px);
}

.dashboard-view h2 {
  margin: 0;
  max-width: 820px;
  font-weight: 640;
  letter-spacing: -0.045em;
  line-height: 1;
}

.dashboard-view h2 {
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.session-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.session-chip span {
  max-width: 280px;
  color: rgba(248, 251, 255, 0.72);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-view {
  display: none;
  padding-top: 28px;
}

.dashboard-view.is-active {
  display: block;
}

.hero-panel,
.section-head,
.data-card,
.timeline-list,
.news-grid,
.admin-panel,
.metric-card,
.module-card {
  animation: portalRise 520ms ease both;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 90% 0%, rgba(114, 184, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

.hero-panel p,
.section-head p,
.module-card p,
.timeline-item p,
.news-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel h2 {
  margin-bottom: 18px;
}

.integrity-card {
  align-self: stretch;
  display: grid;
  align-content: end;
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(11, 92, 171, 0.34), rgba(6, 18, 36, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.integrity-card span,
.integrity-card small,
.metric-card span,
.metric-card small,
.panel-title span,
.analytics-metric small,
.analytics-metric em,
.news-card span {
  color: var(--muted);
  font-size: 12px;
}

.integrity-card strong {
  margin: 10px 0 6px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

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

.metric-card,
.module-card,
.data-card,
.timeline-item,
.news-card,
.admin-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
}

.metric-card {
  min-height: 132px;
  border-radius: 22px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

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

.portal-dashboard-shell .module-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  border-radius: 22px;
  padding: 18px;
  font-weight: 500;
}

.portal-dashboard-shell .module-card strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.portal-dashboard-shell .module-card span {
  color: rgba(169, 213, 255, 0.86);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-dashboard-shell .module-card p {
  margin: 18px 0 0;
  font-size: 13px;
}

.section-head {
  max-width: 840px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin-bottom: 18px;
}

.data-card {
  overflow: hidden;
  border-radius: 26px;
}

.finance-table,
.audit-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table th,
.finance-table td,
.audit-table th,
.audit-table td {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  text-align: left;
  vertical-align: top;
}

.finance-table th,
.audit-table th {
  color: rgba(248, 251, 255, 0.56);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.finance-table td,
.audit-table td {
  color: rgba(248, 251, 255, 0.86);
  font-size: 14px;
}

.finance-table tbody tr:hover,
.audit-table tbody tr:hover {
  background: rgba(114, 184, 255, 0.08);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 96px;
  gap: 18px;
  align-items: center;
  border-radius: 22px;
  padding: 18px;
}

.timeline-item > span {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 18px;
  background: rgba(114, 184, 255, 0.12);
  color: #a9d5ff;
  font-weight: 780;
}

.timeline-item strong {
  font-size: 18px;
}

.timeline-item p {
  margin: 7px 0 0;
}

.timeline-item small {
  color: var(--muted);
  text-align: right;
}

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

.news-card {
  min-height: 260px;
  border-radius: 26px;
  padding: 22px;
}

.news-card span {
  color: #a9d5ff;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-card h3 {
  margin: 22px 0 16px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.workspace-grid,
.document-grid,
.kanban-board {
  display: grid;
  gap: 14px;
}

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

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

.kanban-board article,
.curve-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.kanban-board article {
  min-height: 210px;
  border-radius: 24px;
  padding: 18px;
}

.kanban-board span {
  color: rgba(169, 213, 255, 0.88);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kanban-board strong {
  display: block;
  margin: 22px 0 16px;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.kanban-board p {
  color: var(--muted);
  line-height: 1.6;
}

.curve-card {
  margin: 18px 0;
  border-radius: 26px;
  padding: 22px;
}

.line-chart {
  position: relative;
  height: 220px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    rgba(0, 0, 0, 0.18);
  background-size: 100% 44px, 84px 100%, auto;
}

.line-chart::before {
  content: "";
  position: absolute;
  inset: 34px 22px 46px;
  border-bottom: 4px solid rgba(114, 184, 255, 0.78);
  border-left: 4px solid rgba(114, 184, 255, 0.18);
  transform: skewY(-9deg);
  transform-origin: left bottom;
  filter: drop-shadow(0 16px 24px rgba(11, 92, 171, 0.25));
}

.curve-point {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 22px rgba(114, 184, 255, 0.88);
}

.curve-point.p1 {
  left: 12%;
  bottom: 34%;
}

.curve-point.p2 {
  left: 30%;
  bottom: 42%;
}

.curve-point.p3 {
  left: 49%;
  bottom: 48%;
}

.curve-point.p4 {
  left: 68%;
  bottom: 58%;
}

.curve-point.p5 {
  left: 86%;
  bottom: 67%;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.admin-panel {
  min-width: 0;
  border-radius: 26px;
  padding: 22px;
}

.account-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
}

.account-management-workspace {
  min-width: 0;
}

.account-management-fullscreen {
  display: grid;
  min-height: calc(100vh - 260px);
}

.account-management-fullscreen .account-admin-layout {
  grid-template-columns: minmax(340px, 0.48fr) minmax(560px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.account-management-fullscreen .admin-panel {
  display: grid;
  align-content: start;
}

.account-management-fullscreen .account-list-panel {
  min-height: 560px;
}

.account-management-fullscreen .audit-table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

body.account-management-route .portal-dashboard-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
}

body.account-management-route .portal-sidebar,
body.account-management-route .workspace-header {
  display: none;
}

body.account-management-route .portal-workspace {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(114, 184, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #0a0c10, #171a20 52%, #20242b);
  box-shadow: none;
  backdrop-filter: none;
}

body.account-management-route .dashboard-view {
  padding: 0;
}

body.account-management-route .account-management-fullscreen {
  min-height: auto;
}

.account-management-standalone {
  display: grid;
  gap: 24px;
  min-height: 100vh;
  padding: clamp(24px, 3vw, 42px);
}

.account-management-standalone-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.account-management-standalone-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.account-management-standalone-header p {
  max-width: 720px;
}

.account-management-session-chip {
  display: grid;
  justify-items: end;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
}

.account-management-session-chip span,
.account-management-session-chip strong {
  max-width: min(42vw, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-management-session-chip span {
  color: rgba(248, 251, 255, 0.68);
  font-size: 12px;
}

.account-management-session-chip strong {
  color: #ffffff;
  font-size: 13px;
}

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

.account-status {
  min-height: 22px;
  margin: 0;
  color: #ffcece;
  font-size: 13px;
}

.credential-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border: 1px solid rgba(143, 255, 194, 0.22);
  border-radius: 18px;
  padding: 16px;
  background: rgba(39, 188, 112, 0.1);
}

.credential-box[hidden] {
  display: none;
}

.credential-box span,
.credential-box p {
  color: rgba(248, 251, 255, 0.66);
  font-size: 12px;
}

.credential-box strong {
  color: #ffffff;
  font-size: 14px;
}

.credential-box code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 12px;
  color: #06111f;
  background: #dfffee;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.security-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.two-factor-panel {
  display: grid;
  gap: 18px;
}

.two-factor-state {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.two-factor-state strong {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.two-factor-state p,
.two-factor-state small,
.security-warning,
.two-factor-setup p,
.two-factor-setup summary {
  color: var(--muted);
  line-height: 1.65;
}

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

.two-factor-setup {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.qr-frame {
  display: grid;
  width: 228px;
  height: 228px;
  place-items: center;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.qr-frame img {
  display: block;
  width: 208px;
  height: 208px;
}

.two-factor-setup strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.two-factor-setup details {
  margin-top: 14px;
}

.two-factor-setup details code {
  display: block;
  max-height: 120px;
  overflow: auto;
  margin-top: 10px;
  border-radius: 14px;
  padding: 12px;
  color: #dff0ff;
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.backup-code-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.backup-code-grid code {
  border-radius: 14px;
  padding: 12px 10px;
  color: #06111f;
  background: #dfffee;
  font-size: 13px;
  font-weight: 780;
  text-align: center;
}

.security-warning {
  margin: 0;
  border: 1px solid rgba(255, 206, 125, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 206, 125, 0.08);
}

.account-table {
  min-width: 1040px;
  width: 100%;
  border-collapse: collapse;
}

.account-table th,
.account-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  text-align: left;
  vertical-align: top;
}

.account-table th {
  color: rgba(248, 251, 255, 0.56);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-table td {
  color: rgba(248, 251, 255, 0.86);
  font-size: 13px;
}

.account-table td > strong,
.account-table td > small {
  display: block;
}

.account-table td > small {
  margin-top: 6px;
  color: var(--muted);
}

.self-badge,
.owner-badge,
.protected-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 8px;
  margin-right: 6px;
  border: 1px solid rgba(114, 184, 255, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  color: #a9d5ff;
  font-size: 11px;
}

.owner-badge {
  border-color: rgba(255, 255, 255, 0.26);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.protected-badge {
  border-color: rgba(255, 180, 116, 0.28);
  color: #ffd6ad;
  background: rgba(255, 180, 116, 0.1);
}

.account-table tr.is-protected-account {
  background: linear-gradient(90deg, rgba(255, 180, 116, 0.07), rgba(255, 255, 255, 0.018));
}

.inline-select {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 13px;
}

.inline-select:disabled,
.soft-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.18);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
}

.status-pill.is-active {
  color: #9cffca;
  background: rgba(39, 188, 112, 0.12);
}

.status-pill.is-disabled {
  color: #ffd1d1;
  background: rgba(255, 102, 102, 0.12);
}

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

.soft-button,
.danger-button {
  min-height: 34px;
  border-radius: 12px;
  padding: 0 10px;
  box-shadow: none;
  font-size: 12px;
}

.soft-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.danger-button {
  border: 1px solid rgba(255, 115, 115, 0.24);
  color: #ffffff;
  background: rgba(255, 77, 77, 0.16);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title span {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-title strong {
  color: #ffffff;
}

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

.analytics-metric {
  min-height: 118px;
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.analytics-metric strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 31px;
  letter-spacing: -0.05em;
}

.analytics-metric em {
  color: #79ffb5;
  font-style: normal;
}

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

.signal-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.18);
}

.signal-list span {
  color: rgba(248, 251, 255, 0.64);
  font-size: 13px;
}

.signal-list strong {
  color: #ffffff;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 156px;
  margin-top: 22px;
  border-radius: 20px;
  padding: 14px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    rgba(0, 0, 0, 0.18);
  background-size: 100% 34px;
}

.bar-chart span {
  flex: 1;
  height: var(--bar);
  min-height: 22px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #a9d5ff, #0b5cab);
  box-shadow: 0 16px 40px rgba(11, 92, 171, 0.26);
}

.bar-chart .bar-45 {
  --bar: 45%;
}

.bar-chart .bar-68 {
  --bar: 68%;
}

.bar-chart .bar-52 {
  --bar: 52%;
}

.bar-chart .bar-78 {
  --bar: 78%;
}

.bar-chart .bar-61 {
  --bar: 61%;
}

.bar-chart .bar-88 {
  --bar: 88%;
}

.bar-chart .bar-73 {
  --bar: 73%;
}

.audit-table-wrap {
  overflow-x: auto;
}

/* Premium minimal portal refinement */
.portal-dashboard-shell {
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.portal-sidebar,
.portal-workspace,
.login-panel,
.dashboard-panel,
.dashboard-header {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)), var(--glass);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.05);
}

.portal-sidebar {
  top: 14px;
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  border-radius: 22px;
  padding: 16px;
}

.portal-workspace {
  border-radius: 24px;
  padding: clamp(16px, 2.4vw, 26px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(142, 203, 255, 0.28);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  font-weight: 640;
}

.brand-lockup p,
.sidebar-brand strong,
.route-section > span,
.eyebrow,
.panel-title span,
.portal-dashboard-shell .module-card span,
.kanban-board span,
.news-card span {
  font-weight: 620;
}

.sidebar-brand {
  gap: 11px;
  min-height: 70px;
  padding-bottom: 12px;
}

.sidebar-nav-scroll {
  margin: 18px -5px 12px;
  padding: 0 5px;
}

.sidebar-nav {
  gap: 12px;
}

.route-section {
  gap: 6px;
}

.route-section > span {
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.16em;
}

.sidebar-nav a,
.nav-accordion-toggle {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 520;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.nav-accordion-toggle:hover,
.nav-accordion.active > .nav-accordion-toggle {
  color: #ffffff;
  border-color: rgba(142, 203, 255, 0.26);
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-status {
  margin-top: 0;
  border-color: rgba(142, 203, 255, 0.16);
  border-radius: 14px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-view h2 {
  font-size: clamp(1.75rem, 3.2vw, 3.2rem);
  font-weight: 520;
  letter-spacing: -0.035em;
}

.section-head p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.session-chip {
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.logout-button,
.soft-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

.hero-panel,
.metric-card,
.module-card,
.data-card,
.timeline-item,
.news-card,
.admin-panel,
.kanban-board article,
.curve-card {
  border-color: var(--line);
  background: var(--glass-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  border-radius: 22px;
  padding: clamp(18px, 2.8vw, 26px);
}

.hero-panel h2 {
  margin-bottom: 12px;
}

.integrity-card {
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.integrity-card strong {
  font-size: 24px;
  font-weight: 540;
}

.metric-grid,
.portal-dashboard-shell .module-grid {
  gap: 10px;
  margin-top: 14px;
}

.metric-card {
  min-height: 110px;
  border-radius: 18px;
  padding: 14px;
}

.metric-card strong,
.portal-dashboard-shell .module-card strong,
.timeline-item strong,
.kanban-board strong,
.panel-title strong,
.signal-list strong,
.two-factor-state strong {
  font-weight: 560;
}

.metric-card strong {
  margin: 10px 0 6px;
  font-size: 18px;
}

.portal-dashboard-shell .module-card {
  min-height: 126px;
  border-radius: 18px;
  padding: 14px;
}

.portal-dashboard-shell .module-card p {
  margin-top: 14px;
}

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

.section-head h2 {
  margin-bottom: 12px;
}

.finance-table th,
.finance-table td,
.audit-table th,
.audit-table td,
.account-table th,
.account-table td {
  padding: 13px 14px;
}

.timeline-item,
.kanban-board article,
.news-card,
.admin-panel {
  border-radius: 18px;
  padding: 16px;
}

.timeline-item > span {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(142, 203, 255, 0.085);
}

.news-card {
  min-height: 220px;
}

.news-card h3 {
  margin: 16px 0 12px;
  font-size: 21px;
}

.admin-panel {
  padding: 16px;
}

.panel-title {
  margin-bottom: 14px;
}

input,
select {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.055);
}

label span {
  font-weight: 540;
}

.account-admin-layout {
  gap: 12px;
}

.security-settings-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.82fr);
  gap: 12px;
  align-items: start;
}

.security-stack,
.credential-settings-panel {
  display: grid;
  gap: 12px;
}

.two-factor-panel {
  gap: 12px;
}

.two-factor-state {
  gap: 8px;
  border-radius: 15px;
  padding: 13px;
  background: rgba(0, 0, 0, 0.18);
}

.two-factor-state strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.two-factor-state p,
.two-factor-state small,
.security-warning,
.two-factor-setup p,
.two-factor-setup summary {
  line-height: 1.55;
}

.two-factor-form {
  gap: 10px;
}

.security-accordion {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.security-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  border-radius: 0;
  padding: 0 14px;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.security-accordion-toggle:hover {
  transform: none;
  filter: none;
  background: rgba(255, 255, 255, 0.035);
}

.security-accordion-toggle small,
.compact-title span {
  display: block;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.security-accordion-toggle strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-weight: 560;
}

.security-accordion-toggle i {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--blue);
  border-bottom: 1.5px solid var(--blue);
  transform: rotate(45deg);
  transition: transform 220ms ease;
}

.security-accordion.is-open .security-accordion-toggle i {
  transform: rotate(-135deg);
}

.security-accordion-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 260ms ease, opacity 220ms ease, transform 220ms ease;
}

.security-accordion.is-open .security-accordion-body {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}

.compact-signal-list {
  gap: 8px;
  padding: 0 12px 12px;
}

.compact-signal-list div,
.signal-list div {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.14);
}

.signal-list span {
  font-size: 12px;
}

.credential-settings-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.085);
  padding-top: 12px;
}

.credential-settings-grid {
  display: grid;
  gap: 10px;
}

.compact-security-form {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.compact-security-form strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 560;
}

.compact-security-form label {
  gap: 6px;
}

.compact-security-form input {
  min-height: 40px;
}

.compact-security-form.is-inactive {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.16);
}

.compact-security-form input.credential-locked-input,
.compact-security-form input[readonly].credential-locked-input {
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.48);
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.28);
  box-shadow: none;
}

.credential-status {
  min-height: 16px;
  margin: 0;
  font-size: 11px;
}

.credential-status.is-muted {
  color: rgba(203, 213, 225, 0.72);
}

.placeholder-button {
  min-height: 36px;
  justify-self: start;
  cursor: not-allowed;
  opacity: 0.48;
}

.backup-code-grid code,
.credential-box code {
  font-weight: 620;
}

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

.tool-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.compact-strip {
  margin-top: 12px;
}

.compact-field,
.tool-strip select {
  width: auto;
  min-width: 180px;
  min-height: 40px;
}

.tool-strip button {
  min-height: 40px;
  padding: 0 14px;
}

.module-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.finance-module-jump .module-card {
  min-height: 118px;
}

.financial-intelligence-hub {
  display: grid;
  gap: 16px;
}

.financial-hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: end;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.financial-hub-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.financial-hub-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.financial-hub-head span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.tax-tool-compact-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.financial-ai-engine,
.financial-live-card {
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(142, 203, 255, 0.11), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.026)),
    rgba(5, 7, 11, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px);
}

.financial-ai-engine {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.financial-ai-engine.is-disabled {
  opacity: 0.82;
}

.financial-ai-engine label {
  color: #ffffff;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.financial-ai-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.financial-ai-input-row input {
  min-height: 48px;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 16px;
  padding: 0 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.052);
  outline: none;
}

.financial-ai-input-row input:disabled,
.financial-ai-input-row input[readonly] {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.42);
}

.financial-ai-input-row input:disabled::placeholder,
.financial-ai-input-row input[readonly]::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.financial-ai-input-row button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  color: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: none;
}

.financial-ai-output {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 13px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(0, 0, 0, 0.18);
  line-height: 1.55;
}

.financial-ai-output strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-weight: 620;
}

.financial-ai-output p {
  margin: 0;
}

.financial-ai-output small {
  display: block;
  margin-top: 8px;
  color: rgba(142, 203, 255, 0.68);
  font-size: 11px;
}

.mining-calc-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}

.mining-calc-card,
.mining-calc-result {
  border: 1px solid rgba(255, 255, 255, 0.105);
  background:
    radial-gradient(circle at 92% 0%, rgba(142, 203, 255, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
    rgba(5, 7, 11, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 55px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
}

.mining-calc-card {
  display: grid;
  gap: 16px;
  border-radius: 24px;
  padding: clamp(16px, 2.2vw, 24px);
}

.mining-calc-head {
  display: grid;
  gap: 8px;
}

.mining-calc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mining-calc-head span {
  color: #8ecbff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mining-calc-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.6vw, 2.45rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.mining-calc-info-button {
  min-height: 34px;
  border: 1px solid rgba(142, 203, 255, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(214, 239, 255, 0.92);
  background: rgba(142, 203, 255, 0.07);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.mining-calc-info-button:hover {
  border-color: rgba(142, 203, 255, 0.42);
  color: #ffffff;
  background: rgba(142, 203, 255, 0.12);
}

.mining-calc-head p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.mining-calc-currency {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(142, 203, 255, 0.17);
  border-radius: 16px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(142, 203, 255, 0.09), rgba(255, 255, 255, 0.028)),
    rgba(0, 0, 0, 0.18);
}

.mining-calc-currency span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mining-calc-currency select {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  outline: none;
  font-weight: 700;
}

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

.mining-calc-field {
  display: grid;
  gap: 7px;
}

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

.mining-calc-field > span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mining-calc-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 16px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.mining-calc-field input,
.mining-calc-field select {
  width: 100%;
  border: 0;
  color: #ffffff;
  background: transparent;
  outline: none;
  font: inherit;
}

.mining-calc-field input {
  min-width: 0;
  padding: 0 6px;
  font-size: 18px;
  font-weight: 620;
}

.mining-calc-field select,
.mining-calc-field em {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.mining-calc-info {
  margin: -4px 0 0;
  border: 1px solid rgba(142, 203, 255, 0.15);
  border-radius: 14px;
  padding: 10px 12px;
  color: rgba(214, 239, 255, 0.72);
  background: rgba(142, 203, 255, 0.055);
  font-size: 12px;
  line-height: 1.45;
}

.mining-calc-fees {
  display: grid;
  gap: 10px;
}

.mining-calc-fee-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.mining-calc-fee-row > span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mining-calc-fee-control {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mining-calc-fee-control input[type="number"] {
  min-height: 36px;
  border: 1px solid rgba(142, 203, 255, 0.14);
  border-radius: 12px;
  padding: 0 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.2);
  outline: none;
  font-weight: 700;
}

.mining-calc-fee-control input[type="range"] {
  width: 100%;
  accent-color: #8ecbff;
}

.mining-calc-fee-control em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
}

.mining-calc-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mining-calc-run,
.mining-calc-reset {
  min-height: 46px;
  border: 1px solid rgba(142, 203, 255, 0.26);
  border-radius: 16px;
  font-weight: 760;
}

.mining-calc-run {
  color: #06111f;
  background: linear-gradient(135deg, #d6efff, #ffffff);
  box-shadow: 0 16px 42px rgba(142, 203, 255, 0.13);
}

.mining-calc-reset {
  min-width: 132px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.mining-calc-reset:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

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

.mining-formula-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.mining-formula-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.mining-formula-card {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  max-height: calc(100vh - clamp(24px, 6vw, 64px));
  overflow-y: auto;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  padding: clamp(22px, 3.5vw, 38px);
  color: var(--text-portal-primary);
  background: color-mix(in srgb, var(--bg-portal-canvas) 96%, transparent);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  scrollbar-color: var(--border-portal-hairline) transparent;
}

.mining-formula-card,
.mining-formula-card * {
  border-radius: 0 !important;
}

.mining-formula-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-primary);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.mining-formula-close:hover,
.mining-formula-close:focus-visible {
  border-color: color-mix(in srgb, var(--text-portal-primary) 30%, transparent);
  background: color-mix(in srgb, var(--text-portal-primary) 6%, transparent);
}

.mining-formula-card > span {
  display: block;
  color: var(--accent-portal-cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mining-formula-card h3 {
  margin: 10px 52px 26px 0;
  color: var(--text-portal-primary);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 420;
  letter-spacing: 0.02em;
  line-height: 1.12;
}

.mining-formula-content {
  display: grid;
  gap: 28px;
}

.mining-formula-equations {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.mining-formula-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-width: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
  background: transparent;
}

.mining-formula-index {
  display: grid;
  place-items: start center;
  padding: 18px 10px;
  border-right: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.mining-formula-row > div {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px clamp(16px, 3vw, 28px) 22px;
}

.mining-formula-row h4,
.mining-formula-symbols h4 {
  margin: 0;
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.mining-math-expression {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38em;
  min-width: 0;
  color: var(--text-portal-primary);
  font-family: Cambria, "Times New Roman", Times, serif;
  font-size: clamp(1.15rem, 2.7vw, 1.8rem);
  line-height: 1.45;
}

.mining-math-expression var,
.mining-formula-symbols var {
  color: inherit;
  font-family: Cambria, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
}

.mining-math-expression b {
  font-weight: 400;
}

.mining-math-expression sub,
.mining-formula-symbols sub {
  position: relative;
  bottom: -0.08em;
  font-size: 0.58em;
  line-height: 0;
}

.mining-math-fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 3.3em;
  line-height: 1.05;
  text-align: center;
  vertical-align: middle;
}

.mining-math-fraction > span:first-child {
  padding: 0 0.24em 0.14em;
  border-bottom: 1px solid currentColor;
}

.mining-math-fraction > span:last-child {
  padding: 0.12em 0.24em 0;
  font-size: 0.72em;
}

.mining-math-fraction b {
  margin: 0 0.18em;
}

.mining-math-parenthesis {
  display: inline-block;
  font-size: 1.4em;
  font-weight: 300;
  line-height: 1;
}

.mining-math-unit {
  margin-left: 0.08em;
  font-size: 0.66em;
  font-style: normal;
}

.mining-formula-symbols {
  display: grid;
  gap: 12px;
}

.mining-formula-symbols dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.mining-formula-symbols dl > div {
  display: grid;
  grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.mining-formula-symbols dt,
.mining-formula-symbols dd {
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
}

.mining-formula-symbols dt {
  border-right: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-primary);
  font-size: 1rem;
  text-align: center;
}

.mining-formula-symbols dd {
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .mining-formula-card {
    padding: 20px 14px;
  }

  .mining-formula-symbols dl {
    grid-template-columns: 1fr;
  }

  .mining-formula-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .mining-formula-index {
    padding-inline: 6px;
  }
}

body.mining-formula-open {
  overflow: hidden;
}

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

.mining-calc-result {
  display: grid;
  gap: 8px;
  min-height: 128px;
  border-radius: 20px;
  padding: 15px;
}

.mining-calc-result span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mining-calc-result strong {
  color: #ffffff;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.mining-calc-result strong.is-positive {
  color: #4ade80;
}

.mining-calc-result strong.is-cost {
  color: #fbbf77;
}

.mining-calc-result strong.is-negative {
  color: #f59e8b;
  animation: miningAlertPulse 1.8s ease-in-out infinite;
}

.mining-calc-result small {
  color: rgba(142, 203, 255, 0.68);
  font-size: 11px;
}

@keyframes miningAlertPulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(245, 158, 139, 0);
  }
  50% {
    text-shadow: 0 0 18px rgba(245, 158, 139, 0.28);
  }
}

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

.financial-live-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 320px;
  padding: 15px;
}

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

.fi-metric-stack div,
.fi-reinvestment-total,
.fi-rule-row {
  border: 1px solid rgba(255, 255, 255, 0.082);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.fi-metric-stack span,
.fi-reinvestment-total span,
.fi-rule-row span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fi-metric-stack strong,
.fi-reinvestment-total strong {
  display: block;
  margin-top: 7px;
  color: #ffffff;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 560;
  line-height: 1;
}

.fi-asset-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.fi-donut-visual,
.fi-donut-visual .donut-chart {
  width: 154px;
  height: 154px;
}

.fi-donut-legend {
  align-content: center;
}

.fi-rule-list {
  display: grid;
  gap: 8px;
}

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

.fi-rule-row strong,
.fi-rule-row em {
  color: #ffffff;
  font-style: normal;
  font-weight: 560;
}

.tax-dashboard {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.tax-hydration-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.tax-hydration-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-portal-cyan);
  content: "";
  animation: executiveStatusBreath 1.8s ease-in-out infinite;
}

.tax-hydration-status.is-error {
  color: #fca5a5;
}

.tax-hydration-status.is-error::before {
  background: #ef4444;
  animation: none;
}

.tax-dashboard-head,
.tax-panel,
.tax-metric {
  border: 1px solid rgba(255, 255, 255, 0.105);
  background:
    radial-gradient(circle at 92% 10%, rgba(142, 203, 255, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.024)),
    rgba(5, 7, 11, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.tax-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  border-radius: 22px;
  padding: 16px;
}

.tax-dashboard-head h3 {
  margin: 2px 0 8px;
  color: #ffffff;
  font-size: clamp(1.55rem, 3.1vw, 2.8rem);
  font-weight: 540;
  letter-spacing: -0.045em;
}

.tax-dashboard-head p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.55;
}

.tax-control-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tax-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 430px;
}

.tax-export-actions .ghost-link {
  min-height: 34px;
  padding: 8px 11px;
}

.tax-control-stack label {
  display: grid;
  gap: 5px;
  min-width: 118px;
}

.tax-control-stack label span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tax-control-stack select,
.tax-control-stack input,
.tax-review-form input,
.tax-review-form textarea,
.tax-balance-form input {
  border: 1px solid rgba(255, 255, 255, 0.115);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.tax-control-stack select,
.tax-control-stack input {
  min-height: 38px;
  padding: 0 12px;
}

.ghost-link {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(142, 203, 255, 0.22);
  border-radius: 14px;
  padding: 0 13px;
  color: #ffffff;
  background: rgba(142, 203, 255, 0.075);
  text-decoration: none;
  font-size: 12px;
  font-weight: 560;
}

.tax-live-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tax-metric {
  display: grid;
  gap: 8px;
  min-height: 116px;
  border-radius: 18px;
  padding: 13px;
}

.tax-metric span,
.tax-elster-row span,
.tax-rule-chip span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tax-metric strong {
  color: #ffffff;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 560;
}

.tax-metric small {
  color: rgba(142, 203, 255, 0.72);
  font-size: 11px;
}

.tax-metric.is-warning {
  border-color: rgba(251, 191, 36, 0.45);
  background:
    radial-gradient(circle at 92% 10%, rgba(251, 191, 36, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(25, 15, 4, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(251, 191, 36, 0.05),
    0 18px 44px rgba(251, 191, 36, 0.08);
}

.tax-metric.is-warning small {
  color: rgba(251, 191, 36, 0.86);
}

.tax-estimator {
  border-color: rgba(142, 203, 255, 0.22);
  background:
    radial-gradient(circle at 92% 10%, rgba(142, 203, 255, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.026)),
    rgba(4, 10, 18, 0.48);
}

.nowrap-amount {
  white-space: nowrap;
}

.tax-rate-control {
  display: grid;
  gap: 5px;
}

.tax-rate-control span {
  display: inline-grid;
  grid-template-columns: minmax(0, 72px) auto;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
}

.tax-rate-control input {
  width: 72px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

.tax-rate-control em {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-style: normal;
}

.tax-estimator-note {
  line-height: 1.35;
}

.tax-info-badge {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 7px;
  border: 1px solid rgba(142, 203, 255, 0.36);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(142, 203, 255, 0.12);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  text-transform: none;
  cursor: help;
}

.tax-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
}

.tax-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 270px;
  border-radius: 22px;
  padding: 14px;
}

.tax-month-grid,
.tax-quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tax-month-card,
.tax-quarter-card,
.tax-elster-row,
.tax-rule-chip {
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.18);
}

.tax-month-card,
.tax-quarter-card {
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 10px;
}

.tax-month-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 190px;
}

.tax-month-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tax-month-card-snapshot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 41, 55, 0.5);
}

.tax-month-card span,
.tax-quarter-card span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tax-month-card strong,
.tax-quarter-card strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 560;
}

.tax-month-card small,
.tax-month-card em,
.tax-quarter-card small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-style: normal;
}

.tax-month-card small {
  white-space: nowrap;
}

.tax-month-card.status-green,
.tax-quarter-card.status-green {
  border-color: rgba(52, 211, 153, 0.35);
  background:
    radial-gradient(circle at 94% 0%, rgba(52, 211, 153, 0.14), transparent 38%),
    rgba(6, 78, 59, 0.16);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.05);
}

.tax-month-card.status-green strong,
.tax-quarter-card.status-green strong {
  color: #34d399;
}

.tax-month-card.status-green small,
.tax-month-card.status-green em,
.tax-quarter-card.status-green small {
  color: rgba(209, 250, 229, 0.68);
}

.tax-month-card.status-yellow,
.tax-quarter-card.status-yellow {
  border-color: rgba(250, 204, 21, 0.28);
  background:
    radial-gradient(circle at 94% 0%, rgba(250, 204, 21, 0.09), transparent 38%),
    rgba(20, 16, 4, 0.2);
}

.tax-month-card.status-yellow strong,
.tax-quarter-card.status-yellow strong {
  color: #facc15;
}

.tax-month-card.status-red,
.tax-quarter-card.status-red {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(0, 0, 0, 0.18);
}

.tax-month-card.status-red strong,
.tax-quarter-card.status-red strong {
  color: #ffffff;
}

.snapshot-verification-trigger,
.snapshot-verification-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 22px;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  font-size: 10px;
  text-align: left;
  font: inherit;
}

.snapshot-verification-trigger {
  cursor: pointer;
  overflow: hidden;
}

.snapshot-verification-trigger:hover .snapshot-badge,
.snapshot-verification-trigger:focus-visible .snapshot-badge {
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.08);
}

.snapshot-verification-trigger span,
.snapshot-verification-header span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snapshot-verification-panel {
  display: grid;
  gap: 12px;
}

.snapshot-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
  font-weight: 560;
}

.snapshot-badge.is-matched {
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #34d399;
  background: rgba(6, 95, 70, 0.18);
}

.snapshot-badge.is-mismatch {
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.18);
}

.snapshot-badge.is-empty {
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(156, 163, 175, 0.92);
  background: rgba(31, 41, 55, 0.46);
}

.snapshot-badge.is-ignored {
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.2);
}

.snapshot-verification-panel dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.snapshot-verification-panel dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.snapshot-verification-panel dt,
.snapshot-verification-panel dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.snapshot-verification-panel dd {
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.tax-review-form,
.tax-balance-form {
  display: grid;
  gap: 9px;
}

.tax-checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.tax-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  flex: 0 0 16px;
  accent-color: #8ecbff;
}

.tax-checkbox-row input[type="checkbox"]:focus,
.tax-checkbox-row input[type="checkbox"]:focus-visible {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-color: rgba(142, 203, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(142, 203, 255, 0.12);
  outline: none;
}

.tax-form-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
}

.tax-review-form input,
.tax-balance-form input {
  min-height: 39px;
  padding: 0 12px;
}

.tax-balance-form input.is-disabled,
.tax-balance-form input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tax-file-input {
  min-height: 42px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.72);
}

.tax-file-input::file-selector-button {
  margin-right: 12px;
  border: 1px solid rgba(142, 203, 255, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(142, 203, 255, 0.1);
}

.tax-file-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 14px;
  background: rgba(142, 203, 255, 0.07);
  color: rgba(255, 255, 255, 0.76);
}

.tax-file-state[hidden] {
  display: none;
}

.tax-file-state span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-file-remove {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  color: rgba(252, 165, 165, 0.92);
  background: rgba(127, 29, 29, 0.18);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tax-file-remove:hover {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(127, 29, 29, 0.28);
  color: #ffffff;
}

.tax-review-form textarea {
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.tax-review-form textarea.file-loaded {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.1), 0 0 24px rgba(52, 211, 153, 0.08);
}

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

.tax-actions button,
.tax-balance-form button {
  min-height: 38px;
  padding: 0 13px;
}

.tax-review-table {
  overflow-x: auto;
}

.tax-review-table-wrapper {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(8, 13, 20, 0.34);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.42) rgba(255, 255, 255, 0.04);
}

.tax-review-table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.tax-review-table-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.tax-review-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tax-review-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

.tax-review-table-wrapper .finance-table {
  min-width: 100%;
  table-layout: fixed;
}

.tax-review-table-wrapper .finance-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 18, 27, 0.94);
  backdrop-filter: blur(14px);
}

.tax-review-table-wrapper .finance-table th,
.tax-review-table-wrapper .finance-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-validation-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(120, 53, 15, 0.26);
  color: rgba(253, 230, 138, 0.96);
}

.tax-validation-alert strong {
  font-size: 12px;
  font-weight: 620;
}

.tax-validation-alert span {
  color: rgba(253, 230, 138, 0.78);
  font-size: 11px;
}

.compact-tax-table tr.tax-row-warning td {
  border-top-color: rgba(248, 113, 113, 0.38);
  border-bottom-color: rgba(248, 113, 113, 0.18);
  background: rgba(127, 29, 29, 0.18);
}

.compact-tax-table tr.tax-row-warning td:first-child {
  border-left: 2px solid rgba(248, 113, 113, 0.72);
}

.tax-derived-value,
.tax-hydration-pending {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.tax-derived-value {
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: rgba(8, 47, 73, 0.34);
  color: rgba(186, 230, 253, 0.98);
}

.tax-hydration-pending {
  border: 1px solid rgba(251, 191, 36, 0.34);
  background: rgba(120, 53, 15, 0.24);
  color: rgba(253, 230, 138, 0.94);
}

.section23-import-panel {
  min-height: 220px;
}

.section23-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  line-height: 1.55;
}

.section23-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
}

.section23-summary-row span {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section23-summary-row strong {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 620;
  white-space: nowrap;
}

.section23-summary-row strong.positive {
  color: #34d399;
}

.section23-summary-row strong.negative {
  color: #fca5a5;
}

.compact-tax-table {
  min-width: 620px;
}

.tax-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 9px;
  color: #ffffff;
  font-size: 11px;
}

.tax-status-pill.status-green {
  border-color: rgba(52, 211, 153, 0.28);
  color: #34d399;
  background: rgba(6, 95, 70, 0.14);
}

.tax-status-pill.status-yellow {
  border-color: rgba(250, 204, 21, 0.28);
  color: #facc15;
  background: rgba(113, 63, 18, 0.14);
}

.tax-status-pill.status-red {
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.14);
}

.tax-action-status {
  min-height: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.tax-action-status.is-error,
.account-status.is-error {
  color: #fca5a5;
}

.tax-action-status.is-success {
  color: #86efac;
}

.tax-delete-button {
  position: absolute;
  right: 8px;
  top: 8px;
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  min-height: 27px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  padding: 0;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.18);
  font-size: 13px;
}

.tax-delete-button.table-delete {
  position: static;
}

.tax-month-card {
  position: relative;
  padding-right: 42px;
}

.tax-delete-modal[hidden],
.tax-month-detail-modal[hidden],
.tax-elster-modal[hidden],
.tax-snapshot-overview-modal[hidden] {
  display: none;
}

.tax-delete-modal,
.tax-snapshot-modal,
.tax-month-detail-modal,
.tax-elster-modal,
.tax-snapshot-overview-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  animation: taxModalFadeIn 180ms ease-out both;
}

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

body.tax-modal-open {
  overflow: hidden;
}

.tax-delete-card,
.tax-snapshot-card,
.tax-month-detail-card,
.tax-elster-card,
.tax-snapshot-overview-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(560px, 94vw);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(248, 113, 113, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(7, 8, 12, 0.9);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
}

.tax-snapshot-card {
  z-index: 50;
  width: min(448px, 100%);
  max-width: 448px;
  max-height: min(90vh, calc(100dvh - 2rem));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  box-sizing: border-box;
  border-color: rgba(63, 63, 70, 0.9);
  border-radius: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at 88% 0%, rgba(125, 211, 252, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(24, 24, 27, 0.96);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.62);
  animation: taxModalPanelIn 200ms ease-out both;
}

.tax-snapshot-card::-webkit-scrollbar {
  width: 8px;
}

.tax-snapshot-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.tax-snapshot-card::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.34);
  border-radius: 999px;
}

.tax-snapshot-card::-webkit-scrollbar-thumb:hover {
  background: rgba(186, 230, 253, 0.42);
}

.tax-snapshot-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.38) rgba(255, 255, 255, 0.04);
}

.tax-month-detail-card {
  z-index: 50;
  width: min(520px, 100%);
  max-width: 520px;
  border-color: rgba(125, 211, 252, 0.28);
  border-radius: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(125, 211, 252, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(18, 18, 22, 0.96);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.62);
  animation: taxModalPanelIn 200ms ease-out both;
}

.tax-elster-card,
.tax-snapshot-overview-card {
  z-index: 50;
  width: min(980px, 96vw);
  max-height: min(820px, 90vh);
  overflow: auto;
  border-color: rgba(125, 211, 252, 0.22);
  border-radius: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(125, 211, 252, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(12, 15, 20, 0.96);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.66);
  animation: taxModalPanelIn 200ms ease-out both;
}

.tax-snapshot-overview-card {
  width: min(860px, 96vw);
}

.tax-modal-title-row,
.tax-panel-title-actions,
.panel-title-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.tax-modal-title-row h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 560;
}

.tax-modal-title-row strong,
.panel-title-controls strong {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 560;
}

.tax-modal-action {
  min-height: 36px;
  border-radius: 12px;
  padding: 0 12px;
  color: #dff6ff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.tax-modal-action.compact {
  min-height: 30px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 11px;
}

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

.tax-elster-modal-grid section,
.tax-elster-fifo-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.tax-elster-modal-grid h4,
.tax-elster-fifo-section h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tax-elster-fifo-section {
  margin-top: 14px;
}

.tax-snapshot-overview-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.snapshot-overview-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 2fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.snapshot-overview-row > div:first-child {
  display: grid;
  gap: 2px;
}

.snapshot-overview-row strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 620;
}

.snapshot-overview-row span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.snapshot-overview-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.snapshot-open-button {
  min-height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 10px;
  padding: 0 12px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.12);
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}

.snapshot-open-button:hover,
.snapshot-open-button:focus-visible {
  border-color: rgba(125, 211, 252, 0.42);
  color: #ffffff;
  background: rgba(14, 116, 144, 0.2);
}

/* Snapshot verification uses the portal's strict flat-canvas geometry. */
.tax-snapshot-card,
.tax-snapshot-overview-card,
.snapshot-overview-row,
.snapshot-badge,
.snapshot-open-button,
.tax-snapshot-summary,
.snapshot-external-note,
.snapshot-input-grid label,
.snapshot-calculation-row,
.tax-snapshot-modal button,
.tax-snapshot-modal input,
.tax-snapshot-modal select,
.tax-snapshot-modal textarea,
.tax-snapshot-overview-modal button,
.tax-snapshot-overview-modal input,
.tax-snapshot-overview-modal select,
.tax-snapshot-overview-modal textarea {
  border-radius: 0 !important;
}

.tax-month-detail-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 560;
}

.tax-month-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.tax-month-detail-grid {
  display: grid;
  gap: 8px;
}

.tax-month-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
}

.tax-month-detail-row span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.tax-month-detail-row strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
}

.tax-month-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.tax-month-detail-actions button {
  min-height: 38px;
  border: 1px solid rgba(63, 63, 70, 0.95);
  border-radius: 10px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(39, 39, 42, 0.9);
  font-size: 13px;
  font-weight: 560;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tax-month-detail-actions button:hover {
  border-color: rgba(125, 211, 252, 0.38);
  color: #ffffff;
  background: rgba(63, 63, 70, 0.96);
}

.tax-snapshot-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 560;
}

.tax-snapshot-summary {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.snapshot-external-note {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  color: rgba(226, 232, 240, 0.76);
  background: rgba(14, 116, 144, 0.08);
  font-size: 0.75rem;
  line-height: 1.45;
}

.tax-snapshot-guidance {
  margin: -0.15rem 0 0.85rem;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.76rem;
  line-height: 1.45;
}

.snapshot-input-grid {
  display: grid;
  gap: 10px;
}

.snapshot-input-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.22);
}

.snapshot-input-grid span,
.snapshot-calculation-row span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.snapshot-input-grid input {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(63, 63, 70, 0.95);
  border-radius: 10px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(9, 9, 11, 0.82);
  font-size: 13px;
  text-align: right;
  outline: none;
}

.snapshot-input-grid input:focus {
  border-color: rgba(125, 211, 252, 0.5);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.08);
}

.snapshot-history-button {
  justify-self: start;
  min-height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 10px;
  padding: 0 12px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.12);
  font-size: 12px;
  font-weight: 560;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.snapshot-history-button:hover,
.snapshot-history-button:focus-visible {
  border-color: rgba(125, 211, 252, 0.42);
  color: #ffffff;
  background: rgba(14, 116, 144, 0.2);
}

.snapshot-input-grid em {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-align: right;
  white-space: nowrap;
}

.snapshot-calculation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  padding-top: 10px;
}

.snapshot-calculation-row strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.snapshot-deviation-row strong.is-matched {
  color: #34d399;
}

.snapshot-deviation-row strong.is-mismatch {
  color: #fbbf24;
}

.snapshot-rate-footnote {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  padding-top: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  line-height: 1.35;
}

.snapshot-rate-footnote b {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 560;
}

.snapshot-rate-warning {
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 12px;
  padding: 9px 10px;
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.16);
  font-size: 0.7rem;
  line-height: 1.35;
}

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

.tax-snapshot-meta div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.tax-snapshot-meta span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tax-snapshot-meta strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 560;
}

.secondary-danger {
  min-height: 40px;
  border-color: rgba(248, 113, 113, 0.28);
  border-radius: 10px;
  padding: 0 16px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.16);
  font-size: 14px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.secondary-danger:hover,
.secondary-danger:focus-visible {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.28);
}

.snapshot-modal-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}

.snapshot-modal-actions button {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 560;
  line-height: 1;
}

.snapshot-save-primary {
  border: 1px solid rgba(125, 211, 252, 0.36);
  color: #e0f2fe;
  background: rgba(14, 116, 144, 0.26);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.snapshot-save-primary:hover,
.snapshot-save-primary:focus-visible {
  border-color: rgba(125, 211, 252, 0.55);
  color: #ffffff;
  background: rgba(14, 116, 144, 0.38);
}

.snapshot-ignore-button {
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.18);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.snapshot-ignore-button:hover,
.snapshot-ignore-button:focus-visible {
  border-color: rgba(96, 165, 250, 0.48);
  color: #ffffff;
  background: rgba(30, 64, 175, 0.3);
}

.snapshot-close-secondary {
  border: 1px solid rgba(63, 63, 70, 0.95);
  color: #e4e4e7;
  background: rgba(39, 39, 42, 0.92);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.snapshot-close-secondary:hover,
.snapshot-close-secondary:focus-visible {
  border-color: rgba(113, 113, 122, 0.95);
  color: #ffffff;
  background: rgba(63, 63, 70, 0.95);
}

@keyframes taxModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes taxModalPanelIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.tax-delete-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 560;
}

.tax-delete-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

.tax-delete-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.tax-delete-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.035);
}

.tax-delete-confirm input {
  width: 16px;
  min-height: 16px;
  accent-color: #ef4444;
}

.tax-elster-list,
.tax-rules-list,
.tax-fifo-breakdown {
  display: grid;
  gap: 8px;
}

.tax-elster-row,
.tax-rule-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
}

.tax-elster-row strong,
.tax-rule-chip strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 560;
}

.tax-law-info {
  display: grid;
  gap: 8px;
}

.tax-law-info article {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(142, 203, 255, 0.11);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(142, 203, 255, 0.055);
}

.tax-law-info strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tax-law-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.tax-fifo-breakdown {
  margin-top: 6px;
}

.fifo-breakdown-shell,
.fifo-event {
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.18);
}

.fifo-breakdown-shell {
  overflow: hidden;
}

.fifo-breakdown-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
}

.fifo-accordion-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 320px);
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.fifo-accordion-toggle:hover,
.fifo-accordion-toggle:focus-visible,
.fifo-accordion-toggle:active {
  color: #ffffff;
  background: transparent;
  outline: none;
}

.fifo-accordion-toggle em {
  color: rgba(255, 255, 255, 0.42);
  font-size: 16px;
  font-style: normal;
  transition: transform 180ms ease;
}

.fifo-breakdown-shell.is-open .fifo-accordion-toggle em {
  transform: rotate(180deg);
}

.fifo-pdf-button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  padding: 0 12px;
  color: #dff4ff;
  background: rgba(14, 116, 144, 0.14);
  font-size: 11px;
  font-weight: 560;
  text-decoration: none;
}

.fifo-pdf-button:hover,
.fifo-pdf-button:focus-visible {
  border-color: rgba(125, 211, 252, 0.46);
  color: #ffffff;
  background: rgba(14, 116, 144, 0.24);
}

.fifo-breakdown-head span,
.fifo-breakdown-empty {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.fifo-breakdown-head strong {
  color: #93c5fd;
  font-size: 12px;
}

.fifo-breakdown-empty {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.fifo-event {
  overflow: hidden;
}

.fifo-events-list {
  display: grid;
  gap: 8px;
  max-height: 24rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
}

.fifo-events-list::-webkit-scrollbar {
  width: 7px;
}

.fifo-events-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
}

.fifo-events-list[hidden] {
  display: none;
}

.fifo-event summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.78);
  list-style: none;
}

.fifo-event summary::-webkit-details-marker {
  display: none;
}

.fifo-event summary strong {
  color: #ffffff;
  font-weight: 560;
}

.fifo-event summary b {
  font-weight: 560;
  white-space: nowrap;
}

.fifo-event summary i {
  color: rgba(125, 211, 252, 0.64);
  font-style: normal;
}

.fifo-event summary .positive {
  color: #34d399;
}

.fifo-event summary .negative {
  color: #f87171;
}

.fifo-event summary em {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-style: normal;
}

.fifo-tranche-table {
  display: grid;
  gap: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.045);
}

.fifo-tranche-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(52px, 0.65fr) minmax(78px, 0.9fr) minmax(78px, 0.9fr) minmax(78px, 0.9fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.fifo-tranche-header {
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fifo-tranche-row .positive {
  color: #34d399;
}

.fifo-tranche-row .negative {
  color: #f87171;
}

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

.treasury-table .matrix-input,
.asset-table .matrix-input {
  min-width: 110px;
  min-height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

.treasury-table td strong,
.asset-table td strong {
  display: block;
  font-weight: 560;
}

.treasury-table td small,
.asset-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.calendar-panel {
  gap: 10px;
}

.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-filters label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.calendar-filters input {
  width: 13px;
  min-height: 13px;
  accent-color: var(--blue);
}

.calendar-grid {
  display: grid;
  grid-template-columns: 108px repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.calendar-day-label,
.calendar-cell {
  min-height: 82px;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.36);
  box-shadow: none;
}

.calendar-day-label {
  display: grid;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 560;
}

.calendar-cell {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #ffffff;
  text-align: left;
}

.calendar-cell:hover {
  transform: none;
  filter: none;
  background: rgba(255, 255, 255, 0.045);
}

.calendar-cell > span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.calendar-entry {
  display: block;
  border-left: 2px solid var(--blue);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(142, 203, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
}

.calendar-entry.tax {
  border-left-color: #ffffff;
}

.calendar-entry.server {
  border-left-color: #8ecbff;
}

.calendar-entry.operations {
  border-left-color: #9cffca;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
}

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

.settings-modal-open {
  overflow: hidden;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
}

.settings-modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(950px, 94vw);
  height: min(650px, 88vh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    radial-gradient(circle at 92% 100%, rgba(142, 203, 255, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(18, 22, 29, 0.84), rgba(6, 8, 12, 0.74));
  box-shadow: 0 42px 140px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(30px) saturate(1.08);
  animation: settingsModalIn 180ms ease both;
}

.settings-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 24px 26px 18px;
}

.settings-modal-header h2 {
  margin: 3px 0 5px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 520;
  letter-spacing: -0.035em;
}

.settings-modal-header span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.settings-modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.settings-modal-close:hover,
.settings-modal-close:focus-visible {
  border-color: rgba(142, 203, 255, 0.35);
  background: rgba(142, 203, 255, 0.12);
  outline: none;
}

.settings-modal-layout {
  display: grid;
  grid-template-columns: minmax(230px, 28%) minmax(0, 1fr);
  min-height: 0;
}

.settings-tabs {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px;
  overflow-y: auto;
}

.settings-tab-button {
  display: grid;
  gap: 6px;
  align-content: start;
  width: 100%;
  min-height: 82px;
  height: auto;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 13px 14px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: visible;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.settings-tab-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 580;
}

.settings-tab-button small {
  display: block;
  min-width: 0;
  overflow: visible;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10.5px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: normal;
  text-overflow: clip;
}

.settings-tab-button:hover,
.settings-tab-button.active {
  color: #ffffff;
  border-color: rgba(142, 203, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.settings-sudo-launch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 22px;
  padding: 18px;
  background: rgba(8, 18, 30, 0.34);
}

.settings-sudo-launch-panel span,
.account-sudo-card .eyebrow {
  color: #8ecbff;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.settings-sudo-launch-panel strong {
  display: block;
  margin: 8px 0;
  color: #ffffff;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.settings-sudo-launch-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.settings-sudo-launch,
.account-sudo-primary,
.account-sudo-secondary,
.account-sudo-inline {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.settings-sudo-launch,
.account-sudo-primary,
.account-sudo-inline {
  border: 1px solid rgba(142, 203, 255, 0.42);
  color: #06111f;
  background: linear-gradient(135deg, #ffffff, #bfe4ff);
}

.settings-sudo-launch:hover,
.account-sudo-primary:hover,
.account-sudo-inline:hover {
  transform: translateY(-1px);
}

.account-sudo-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.07);
}

.account-sudo-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.account-sudo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.account-sudo-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  border: 1px solid rgba(142, 203, 255, 0.18);
  border-radius: 28px;
  padding: 26px;
  background:
    radial-gradient(circle at 92% 0%, rgba(142, 203, 255, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(24, 28, 35, 0.96), rgba(10, 12, 17, 0.96));
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.42);
}

.account-sudo-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.account-sudo-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.6;
}

.account-sudo-card label {
  display: grid;
  gap: 8px;
}

.account-sudo-card label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.account-sudo-card input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.26);
}

.account-sudo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.account-sudo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.account-sudo-status {
  min-height: 20px;
  color: #ffcece;
  font-size: 12px;
}

.account-sudo-status.is-success {
  color: #52d990;
}

.account-management-safe-open {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10070;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: min(340px, calc(100vw - 32px));
  border: 1px solid rgba(142, 203, 255, 0.46);
  border-radius: 999px;
  padding: 0 18px;
  color: #07111c;
  background: linear-gradient(135deg, #d7f0ff, #b9e3ff);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.account-management-safe-open:hover {
  border-color: rgba(142, 203, 255, 0.72);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  transform: translateY(-1px);
}

.settings-tab-button.active {
  box-shadow: inset 3px 0 0 rgba(142, 203, 255, 0.78);
}

.settings-tab-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
}

.settings-section-head {
  margin-bottom: 16px;
}

.settings-section-head span {
  display: block;
  color: #ffffff;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 520;
  letter-spacing: -0.02em;
}

.settings-section-head p {
  max-width: 680px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.55;
}

.settings-section-head-slim {
  margin-bottom: 10px;
}

.settings-embedded-form,
.settings-security-layout .admin-panel,
.settings-analytics-panel {
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.08), transparent 34%), rgba(255, 255, 255, 0.045);
}

.settings-terminal-stream {
  height: calc(100% - 62px);
  min-height: 430px;
}

.theme-settings-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 16px;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-choice-button {
  display: grid;
  gap: 7px;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.theme-choice-button span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
}

.theme-choice-button small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.45;
}

.theme-choice-button:hover,
.theme-choice-button:focus-visible,
.theme-choice-button.active {
  border-color: rgba(142, 203, 255, 0.42);
  background: rgba(142, 203, 255, 0.11);
  color: #ffffff;
  outline: none;
}

.theme-choice-button.active {
  box-shadow: inset 0 0 0 1px rgba(142, 203, 255, 0.2), 0 16px 42px rgba(13, 148, 236, 0.12);
}

@keyframes settingsModalIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.floating-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

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

.floating-modal-panel {
  position: relative;
  display: grid;
  width: min(100%, 520px);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(8, 9, 12, 0.86);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 12px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  resize: vertical;
  outline: none;
}

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

.asset-tool-strip {
  align-items: stretch;
}

.asset-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.asset-overview-grid .treasury-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
  margin-bottom: 0;
}

.donut-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022)),
    rgba(5, 7, 11, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.donut-visual {
  position: relative;
  display: grid;
  width: 176px;
  max-width: 100%;
  margin: 0 auto;
  place-items: center;
}

.donut-chart {
  display: block;
  width: 176px;
  height: 176px;
  overflow: visible;
}

.donut-track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 13;
}

.donut-segment {
  transition: stroke-dasharray 260ms ease, stroke-dashoffset 260ms ease, opacity 180ms ease;
}

.donut-center {
  position: absolute;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.donut-center span {
  color: #ffffff;
  font-size: 22px;
  font-weight: 560;
  line-height: 1;
}

.donut-center small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donut-legend {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.donut-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.donut-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend strong {
  color: #ffffff;
  font-weight: 560;
}

.donut-swatch {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 16px rgba(142, 203, 255, 0.26);
}

.donut-swatch.swatch-0 { background: #8ecbff; }
.donut-swatch.swatch-1 { background: #ffffff; }
.donut-swatch.swatch-2 { background: #9cffca; }
.donut-swatch.swatch-3 { background: #b7a7ff; }
.donut-swatch.swatch-4 { background: #ffd88e; }
.donut-swatch.swatch-5 { background: #ff9f9f; }
.donut-swatch.swatch-6 { background: #7dd3fc; }

.donut-empty {
  grid-template-columns: 1fr !important;
  color: rgba(255, 255, 255, 0.46);
}

.ths-price-card {
  gap: 8px;
}

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

.ths-control .matrix-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
}

.locked-note,
.price-source {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-source {
  margin-top: 4px;
}

.asset-table input[readonly] {
  border-color: rgba(142, 203, 255, 0.16);
  background: rgba(142, 203, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
}

[data-asset-summary],
[data-asset-value],
[data-asset-weight],
[data-asset-pnl],
[data-donut-count],
[data-donut-legend-weight],
[data-asset-price] {
  transition: color 300ms ease, border-color 300ms ease, background-color 300ms ease, text-shadow 300ms ease;
}

.market-tick-up {
  color: #9cffca !important;
  text-shadow: 0 0 18px rgba(156, 255, 202, 0.2);
}

.market-tick-down {
  color: #ff9f9f !important;
  text-shadow: 0 0 18px rgba(255, 159, 159, 0.18);
}

.asset-table input.market-tick-up,
.ths-control input.market-tick-up {
  border-color: rgba(156, 255, 202, 0.42);
  background: rgba(156, 255, 202, 0.07);
}

.asset-table input.market-tick-down,
.ths-control input.market-tick-down {
  border-color: rgba(255, 159, 159, 0.4);
  background: rgba(255, 159, 159, 0.06);
}

.pnl-value {
  display: grid;
  gap: 2px;
}

.pnl-value strong {
  font-weight: 580;
}

.pnl-value small {
  color: currentColor;
  opacity: 0.76;
}

.pnl-value.is-gain {
  color: #9cffca;
}

.pnl-value.is-loss {
  color: #ff9f9f;
}

.pnl-value.is-flat {
  color: rgba(255, 255, 255, 0.58);
}

.asset-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-logo {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  font-size: 11px;
  font-weight: 620;
}

.asset-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.weight-meter {
  display: block;
  width: 120px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.weight-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.reinvestment-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  align-items: start;
}

.large-number-input {
  min-height: 58px;
  font-size: 28px;
  font-weight: 520;
}

.preset-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.corporate-preset-grid {
  gap: 10px;
}

.preset-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 18px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.preset-category-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.preset-category-copy strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 560;
}

.preset-category-copy small,
.corporate-allocation-row small,
.allocation-subsplit,
.cit-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.percent-input {
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cit-simulator-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(142, 203, 255, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(10, 24, 38, 0.26);
}

.cit-toggle,
.cit-distribution-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cit-toggle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 560;
}

.cit-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.cit-distribution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px auto;
}

.preset-validation {
  min-height: 18px;
  margin: 8px 0;
  color: rgb(251, 191, 36);
  font-size: 12px;
}

.preset-validation.is-valid {
  color: rgb(52, 211, 153);
}

.compact-panel-title {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.saved-preset-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.saved-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.saved-preset-card {
  display: grid;
  gap: 5px;
  min-height: 92px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 11px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.saved-preset-card:hover,
.saved-preset-card.is-active {
  border-color: rgba(142, 203, 255, 0.36);
  background: rgba(142, 203, 255, 0.085);
}

.saved-preset-card:hover {
  transform: translateY(-1px);
}

.saved-preset-card strong {
  font-size: 13px;
  font-weight: 560;
}

.saved-preset-card small,
.saved-preset-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.input-warning-pulse {
  border-color: rgba(251, 191, 36, 0.85) !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14) !important;
}

#preset-save.preset-save-invalid {
  border-color: rgba(251, 191, 36, 0.6);
  color: rgba(251, 191, 36, 0.8);
  background: rgba(251, 191, 36, 0.08);
  cursor: not-allowed;
}

.split-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.split-results div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.corporate-split-results {
  gap: 10px;
}

.corporate-allocation-row {
  grid-template-columns: minmax(0, 1fr) auto 48px;
}

.corporate-allocation-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.corporate-allocation-row b {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 560;
}

.allocation-subsplit {
  display: block;
  color: rgba(142, 203, 255, 0.72);
}

.cit-result-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(142, 203, 255, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(142, 203, 255, 0.06);
}

.cit-result-card div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.cit-result-card span,
.cit-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.cit-result-card strong,
.cit-result-card b {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 560;
}

.split-results span,
.split-results small {
  color: var(--muted);
}

.split-results strong {
  font-weight: 560;
}

.terminal-stream {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 292px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(142, 203, 255, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.42);
}

.terminal-stream code {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.terminal-stream code span {
  color: var(--blue);
}

@keyframes portalRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginStepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-body {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(248, 251, 255, 0.11), transparent 28%),
    radial-gradient(circle at 8% 72%, rgba(142, 203, 255, 0.075), transparent 32%),
    linear-gradient(140deg, #030406 0%, #0b0d10 48%, #f3f6fa 160%);
}

.dashboard-body::before {
  opacity: 0.55;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.05) 45%, transparent 68%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

.portal-dashboard-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.portal-sidebar {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.028)),
    rgba(3, 4, 6, 0.62);
}

.sidebar-nav a,
.nav-accordion-toggle {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 520;
}

.sidebar-nav .nav-child-link {
  min-height: 30px;
  font-size: 11px;
  border-left-color: rgba(255, 255, 255, 0.12);
}

.portal-home-route .portal-workspace {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.026));
}

.portal-home-route .workspace-session-bar {
  position: relative;
  z-index: 4;
  justify-content: flex-end;
}

.portal-home-route .dashboard-view.is-active {
  display: grid;
  min-height: calc(100vh - 146px);
  padding-top: 0;
  place-items: center;
}

.onyx-home {
  position: relative;
  display: grid;
  width: 100%;
  min-height: min(720px, calc(100vh - 170px));
  align-content: center;
  justify-items: center;
  isolation: isolate;
  gap: clamp(26px, 4vh, 48px);
  padding: clamp(20px, 5vh, 56px) 0;
}

.onyx-frost-field {
  position: absolute;
  inset: -24% -10%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 45% 42%, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(ellipse at 58% 58%, rgba(142, 203, 255, 0.09), transparent 34%),
    linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.075) 48%, transparent 76%);
  filter: blur(20px);
  opacity: 0.82;
  transform: translate3d(0, 0, 0);
  animation: frostDrift 14s ease-in-out infinite alternate;
}

.onyx-home-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(920px, 92vw);
  padding: 0;
  text-align: center;
  animation: portalRise 720ms ease both;
}

.portal-lock-ui,
.portal-lock-ui *,
.portal-home-route .dashboard-view,
.portal-home-route .dashboard-view *,
.sidebar-brand,
.sidebar-brand *,
.sidebar-status,
.sidebar-status * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.portal-lock-ui,
.portal-lock-ui h1,
.portal-lock-ui h2,
.portal-lock-ui .eyebrow,
.portal-lock-ui .greeting,
.portal-lock-ui .welcome-line,
.portal-lock-ui .welcome-mail,
.portal-lock-ui .email,
.portal-lock-ui .stats-box,
.portal-lock-ui .stats-box *,
.portal-lock-ui .metric-card,
.portal-lock-ui .metric-card * {
  cursor: default;
}

.onyx-home-content > * {
  position: relative;
  z-index: 2;
}

.portal-home-brandmark {
  --portal-home-brand-size: clamp(3.35rem, 6.85vw, 7.65rem);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1.05rem, 2vw, 2.1rem);
  max-width: min(1180px, 92vw);
  margin: 0;
  color: #ffffff;
  font-family: "Inter", "Helvetica Neue", "Montserrat", Arial, sans-serif;
  font-size: var(--portal-home-brand-size);
  font-weight: 430;
  text-align: center;
  letter-spacing: 0.105em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12),
    0 22px 72px rgba(255, 255, 255, 0.12),
    0 34px 110px rgba(0, 0, 0, 0.42);
  animation: titleBreath 5.8s ease-in-out infinite;
}

.portal-home-brandline {
  display: block;
  white-space: nowrap;
  line-height: 0.96;
  text-align: center;
  font-size: 1em;
  font-weight: 430;
}

.portal-home-brandline-estara {
  letter-spacing: 0.11em;
  transform: none;
}

.portal-home-brand-separator {
  display: block;
  width: 1px;
  height: 0.72em;
  flex: 0 0 auto;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.84), transparent);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.18),
    0 0 1px rgba(255, 255, 255, 0.42);
}

.portal-home-brandline-capital {
  letter-spacing: 0.13em;
  font-weight: 430;
  transform: none;
}

.onyx-brand-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto minmax(96px, 0.8fr) auto minmax(92px, 0.72fr);
  align-items: center;
  justify-items: center;
  width: min(780px, 88vw);
  min-height: clamp(72px, 10vw, 96px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: clamp(12px, 1.7vw, 18px) clamp(24px, 4vw, 42px);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent) 50% 0 / 72% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent) 50% 100% / 58% 1px no-repeat,
    rgba(238, 243, 248, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 72px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(1.08);
  animation: brandStripRise 820ms ease 120ms both;
}

.brand-beam {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 0%, transparent 38%, rgba(255, 255, 255, 0.42) 48%, transparent 58%, transparent 100%);
  opacity: 0.42;
  transform: translateX(-125%);
  animation: brandBeamSweep 5.8s ease-in-out infinite;
}

.strip-logo,
.strip-divider {
  position: relative;
  z-index: 1;
}

.strip-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.94;
  pointer-events: none;
  -webkit-user-drag: none;
}

.strip-logo-gomining {
  width: clamp(150px, 17vw, 224px);
  filter: drop-shadow(0 14px 34px rgba(111, 72, 255, 0.18));
}

.strip-logo-estara {
  width: clamp(76px, 8vw, 108px);
  opacity: 0.98;
  filter: var(--estara-logo-contrast-filter);
}

.strip-logo-bit4mine {
  width: clamp(70px, 7.5vw, 96px);
  filter: drop-shadow(0 14px 34px rgba(203, 160, 92, 0.2));
}

.strip-divider {
  width: 1px;
  height: clamp(34px, 5vw, 54px);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.56), transparent);
  opacity: 0.72;
}

.welcome-line {
  margin: 34px 0 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  font-weight: 360;
  letter-spacing: 0.01em;
}

.welcome-line strong {
  color: #ffffff;
  font-weight: 520;
}

.welcome-mail {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.profile-settings-form {
  max-width: 980px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 30px);
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 34px 92px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px) saturate(1.08);
}

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

.profile-form-grid label {
  gap: 7px;
}

.profile-form-grid label span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-form-grid input {
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

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

.profile-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.profile-actions button {
  min-width: 180px;
}

.coming-soon-route {
  position: relative;
  display: grid;
  min-height: min(680px, calc(100vh - 170px));
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(28px, 6vw, 72px);
}

.coming-soon-glow {
  position: absolute;
  inset: 8% 10%;
  z-index: -1;
  background:
    radial-gradient(circle at 44% 36%, rgba(255, 255, 255, 0.18), transparent 32%),
    radial-gradient(circle at 62% 62%, rgba(142, 203, 255, 0.12), transparent 36%),
    linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.055), transparent 80%);
  filter: blur(18px);
  opacity: 0.92;
  animation: frostDrift 16s ease-in-out infinite alternate;
}

.coming-soon-card {
  width: min(680px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.034)),
    rgba(8, 11, 16, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 28px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(26px) saturate(1.08);
}

.coming-soon-badge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  margin-bottom: 18px;
  border: 1px solid rgba(142, 203, 255, 0.26);
  border-radius: 999px;
  padding: 0 15px;
  color: rgba(142, 203, 255, 0.9);
  background: rgba(142, 203, 255, 0.08);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.coming-soon-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  font-weight: 520;
  letter-spacing: -0.045em;
}

.coming-soon-card p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.65;
}

@keyframes frostDrift {
  from {
    opacity: 0.62;
    transform: translate3d(-1.8%, 1.4%, 0) scale(1);
  }

  to {
    opacity: 0.92;
    transform: translate3d(1.6%, -1.2%, 0) scale(1.045);
  }
}

@keyframes titleBreath {
  0%,
  100% {
    opacity: 0.94;
    filter: saturate(0.92);
  }

  50% {
    opacity: 1;
    filter: saturate(1.08);
  }
}

@keyframes brandStripRise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes brandBeamSweep {
  0%,
  46% {
    transform: translateX(-125%);
  }

  72%,
  100% {
    transform: translateX(125%);
  }
}

@media (min-width: 740px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .portal-dashboard-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .metric-grid,
  .portal-dashboard-shell .module-grid,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-grid,
  .admin-split,
  .account-admin-layout,
  .account-management-fullscreen .account-admin-layout,
  .security-settings-layout,
  .reinvestment-layout,
  .financial-live-grid,
  .tax-live-cards,
  .tax-workspace-grid,
  .asset-overview-grid,
  .treasury-summary,
  .kanban-board,
  .workspace-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .portal-dashboard-shell {
    display: block;
    padding: 12px;
  }

  .portal-sidebar {
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 12px;
  }

  .sidebar-nav-scroll {
    flex: initial;
    max-height: none;
    overflow: visible;
  }

  .sidebar-settings-trigger {
    position: relative;
    bottom: auto;
  }

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

  .financial-hub-head,
  .tax-dashboard-head,
  .financial-ai-input-row,
  .fi-asset-layout {
    grid-template-columns: 1fr;
  }

  .tax-control-stack {
    justify-content: flex-start;
  }

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

  .financial-live-card {
    min-height: auto;
  }

  .settings-modal-panel {
    height: min(760px, 92vh);
  }

  .settings-modal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .settings-tabs {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .settings-tab-button {
    min-width: 180px;
  }

  .settings-sudo-launch-panel {
    grid-template-columns: 1fr;
  }

  .account-sudo-actions {
    flex-direction: column-reverse;
  }

  .account-sudo-primary,
  .account-sudo-secondary {
    width: 100%;
  }

  .account-management-safe-open {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .hero-panel,
  .session-chip {
    display: grid;
  }

  .session-chip {
    justify-items: start;
  }

  .metric-grid,
  .portal-dashboard-shell .module-grid,
  .treasury-summary {
    grid-template-columns: 1fr;
  }

  .asset-overview-grid .treasury-summary {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 88px repeat(3, minmax(140px, 1fr));
    overflow-x: auto;
  }

  .tool-strip {
    display: grid;
  }

  .compact-field,
  .tool-strip select {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-item small {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .portal-shell,
  .dashboard-shell {
    padding: 16px;
  }

  .login-back-link {
    min-height: 38px;
    margin: -4px 0 18px;
    font-size: 12px;
  }

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

  .portal-workspace,
  .portal-sidebar {
    border-radius: 22px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

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

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

  .qr-frame {
    width: min(100%, 228px);
  }

  .backup-code-grid {
    grid-template-columns: 1fr;
  }

  .tax-month-grid,
  .tax-quarter-grid,
  .tax-form-row {
    grid-template-columns: 1fr;
  }

  .finance-table th,
  .finance-table td,
  .audit-table th,
  .audit-table td {
    padding: 14px;
  }
}

@media (max-width: 980px) {
  .profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mining-calc-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .portal-home-route .dashboard-view.is-active {
    min-height: 58vh;
  }

  .onyx-home {
    min-height: 56vh;
    gap: 24px;
  }

  .mining-calc-grid,
  .mining-calc-results {
    grid-template-columns: 1fr;
  }

  .mining-calc-title-row,
  .mining-calc-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .mining-calc-reset {
    width: 100%;
  }

  .portal-home-brandmark {
    --portal-home-brand-size: clamp(1.72rem, 6.4vw, 2.95rem);
    gap: clamp(0.62rem, 2.7vw, 1rem);
    max-width: 94vw;
    letter-spacing: 0.045em;
  }

  .portal-home-brandline-estara {
    letter-spacing: 0.055em;
    transform: none;
  }

  .portal-home-brand-separator {
    height: 0.68em;
  }

  .portal-home-brandline-capital {
    letter-spacing: 0.065em;
    transform: none;
  }

  .onyx-brand-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    width: min(340px, 88vw);
    border-radius: 30px;
    padding: 18px 24px;
  }

  .strip-divider {
    width: min(180px, 62vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  }

  .strip-logo-gomining {
    width: min(210px, 62vw);
  }

  .strip-logo-estara {
    width: 92px;
  }

  .strip-logo-bit4mine {
    width: 84px;
  }

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

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

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

@media (max-width: 420px) {
  .portal-home-brandmark {
    --portal-home-brand-size: clamp(1.42rem, 7.2vw, 1.82rem);
    gap: 0.5rem;
  }
}

/* Finance Intelligence responsive hardening */
.tax-mobile-fallback {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(142, 203, 255, 0.14), transparent 36%),
    rgba(8, 11, 17, 0.82);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  color: rgba(255, 255, 255, 0.76);
}

.tax-mobile-fallback strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: 0.04em;
}

.tax-mobile-fallback p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

.tax-desktop-ledger {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tax-dashboard,
.tax-dashboard-head,
.tax-workspace-grid,
.tax-panel,
.tax-review-form,
.tax-review-table,
.tax-review-table-wrapper,
.tax-month-grid,
.tax-month-card,
.tax-month-card-main,
.tax-quarter-grid {
  min-width: 0;
}

.tax-workspace-grid {
  align-items: start;
}

.tax-month-grid,
.tax-quarter-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.tax-month-card,
.tax-quarter-card {
  overflow: hidden;
}

.tax-month-card {
  min-height: 104px;
  gap: 6px;
  padding: 11px 42px 10px 12px;
  cursor: pointer;
}

.tax-month-card-main {
  gap: 4px;
}

.tax-month-card .tax-month-name {
  color: rgba(255, 255, 255, 0.54);
  font-size: clamp(0.68rem, 0.76vw, 0.78rem);
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tax-month-card .tax-month-status {
  color: #ffffff;
  font-size: clamp(0.86rem, 0.98vw, 1rem);
  font-weight: 640;
  letter-spacing: 0;
}

.tax-month-card-snapshot {
  padding-top: 8px;
}

.tax-month-card small,
.tax-month-card em,
.tax-quarter-card small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-month-card small {
  font-size: clamp(0.58rem, 0.72vw, 0.69rem);
}

.tax-month-card strong,
.tax-quarter-card strong {
  font-size: clamp(0.76rem, 0.86vw, 0.84rem);
}

.tax-review-form input,
.tax-review-form textarea,
.tax-control-stack input,
.tax-control-stack select {
  max-width: 100%;
  min-width: 0;
}

.tax-review-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

.compact-tax-table {
  width: 100%;
}

@media (min-width: 768px) {
  .tax-month-grid,
  .tax-quarter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tax-workspace-grid,
  .tax-dashboard-head {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 1024px) {
  .tax-month-grid,
  .tax-quarter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

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

@media (min-width: 1400px) {
  .tax-month-grid,
  .tax-quarter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .tax-workspace-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr) !important;
  }

  .tax-dashboard-head {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
}

@media (max-width: 1180px) {
  .tax-panel {
    padding: 12px;
  }

  .tax-live-cards,
  .tax-use-of-funds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .tax-dashboard-head h2 {
    font-size: clamp(1.55rem, 6vw, 2.15rem);
  }

  .tax-control-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .tax-control-stack .button,
  .tax-control-stack label,
  .tax-control-stack select,
  .tax-control-stack input {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .tax-desktop-ledger {
    display: none !important;
  }

  .tax-mobile-fallback {
    display: block;
  }
}

/* Strict dashboard card grid: Section 23 / Snapshot / Elster alignment */
.dashboard-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr)) !important;
  gap: 1.5rem !important;
  align-items: start !important;
  grid-auto-flow: row dense;
}

.dashboard-grid-container > .tax-panel {
  height: auto;
  min-width: 0;
  align-self: start;
}

.section23-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-outline-button {
  border: 1px solid rgba(248, 113, 113, 0.36);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.12);
}

.danger-outline-button:hover {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

@media (min-width: 768px) and (max-width: 1180px) {
  .dashboard-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1181px) {
  .dashboard-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .dashboard-grid-container {
    grid-template-columns: 1fr !important;
  }

  .tax-use-of-funds-grid {
    grid-template-columns: 1fr;
  }

  .tax-panel-title-actions,
  .panel-title-controls,
  .tax-modal-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tax-elster-modal-grid,
  .snapshot-overview-row,
  .snapshot-overview-values {
    grid-template-columns: 1fr;
  }
}

/* Dense finance dashboard layout: independent vertical columns */
.dashboard-columns-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  width: 100%;
}

.dashboard-column {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  gap: 1rem;
  min-width: min(100%, 360px);
}

.dashboard-column-left {
  flex: 1.25 1 470px;
}

.dashboard-column > .tax-panel {
  align-self: stretch;
  height: auto;
  min-height: 0;
}

.dashboard-column .tax-review-form,
.dashboard-column .tax-balance-form {
  height: auto;
  min-height: fit-content;
}

.dashboard-column .tax-review-table {
  min-height: 0;
}

.dashboard-column .tax-review-table:empty {
  display: none;
}

.dashboard-column .section23-import-panel {
  min-height: 0;
}

.tax-live-cards {
  align-items: start;
  gap: 0.75rem;
}

.tax-metric {
  align-self: start;
  gap: 0.4rem;
  min-height: 0;
  padding: 0.85rem;
}

.tax-metric strong {
  font-size: clamp(1.35rem, 1.55vw, 1.75rem);
  font-weight: 700;
  line-height: 1.05;
}

.tax-metric small {
  margin-top: 0.15rem;
  line-height: 1.3;
}

.tax-estimator .tax-rate-control {
  margin: 0.15rem 0;
}

@media (min-width: 1500px) {
  .dashboard-columns-wrapper,
  .dashboard-column {
    gap: 1.5rem;
  }

  .dashboard-column {
    flex-basis: 380px;
    min-width: min(100%, 380px);
  }

  .dashboard-column-left {
    flex-basis: 500px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .dashboard-column-left {
    flex-basis: 100%;
  }

  .dashboard-column-center,
  .dashboard-column-right {
    flex-basis: calc(50% - 0.5rem);
  }
}

@media (max-width: 900px) {
  .dashboard-column {
    flex-basis: 100%;
  }
}

/* High-density tax control panel alignment */
.tax-desktop-ledger {
  gap: 0.75rem;
}

.tax-live-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 146px), 1fr)) !important;
  gap: 0.55rem !important;
  align-items: stretch;
}

.tax-live-cards > .tax-metric {
  height: 100%;
  min-height: 112px;
  padding: 0.72rem 0.78rem;
}

.tax-live-cards > .tax-metric strong {
  font-size: clamp(1.25rem, 1.35vw, 1.72rem);
}

.tax-live-cards > .tax-metric small {
  font-size: 0.66rem;
}

.tax-use-of-funds-panel {
  margin-top: 0;
}

.tax-use-of-funds-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.tax-use-fund-metric {
  display: grid;
  align-content: start;
  gap: 0.42rem;
  min-height: 106px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  padding: 0.72rem 0.78rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(125, 211, 252, 0.08), transparent 36%),
    rgba(0, 0, 0, 0.18);
}

.tax-use-fund-metric span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.63rem;
  font-weight: 680;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.tax-use-fund-metric strong {
  color: #ffffff;
  font-size: clamp(1.15rem, 1.35vw, 1.55rem);
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.tax-use-fund-metric small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  line-height: 1.3;
}

.tax-use-fund-metric.is-total {
  border-color: rgba(52, 211, 153, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 211, 153, 0.12), transparent 36%),
    rgba(6, 78, 59, 0.12);
}

.tax-use-fund-metric.is-swap {
  border-color: rgba(125, 211, 252, 0.22);
}

.tax-use-fund-metric.is-audit {
  border-color: rgba(251, 191, 36, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.12), transparent 36%),
    rgba(120, 53, 15, 0.12);
}

.dashboard-columns-wrapper {
  gap: 0.75rem;
  align-items: stretch;
}

.dashboard-column {
  gap: 0.75rem;
}

.dashboard-column > .tax-panel {
  padding: 0.75rem;
}

.live-market-panel,
.coingecko-audit-panel {
  gap: 12px;
}

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

.coingecko-price-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, 0.2);
}

.coingecko-price-row span {
  color: rgba(125, 211, 252, 0.86);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.coingecko-price-row strong {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 680;
  white-space: nowrap;
}

.coingecko-price-row small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  line-height: 1.35;
}

@media (min-width: 1280px) {
  .tax-live-cards {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 980px) and (max-width: 1279px) {
  .tax-live-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .section23-gain-card {
    grid-column: 2;
  }

  .section23-volume-card {
    grid-column: 3;
  }
}

@media (max-width: 979px) {
  .tax-live-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

:root[data-theme="light"] body,
:root[data-theme="light"] .dashboard-body {
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
}

:root[data-theme="light"] body::before,
:root[data-theme="light"] .dashboard-body::before {
  opacity: 0.34;
  background:
    linear-gradient(115deg, transparent 0%, rgba(17, 17, 17, 0.035) 45%, transparent 68%),
    linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

:root[data-theme="light"] .portal-sidebar,
:root[data-theme="light"] .portal-workspace,
:root[data-theme="light"] .dashboard-panel,
:root[data-theme="light"] .dashboard-header,
:root[data-theme="light"] .hero-panel,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .module-card,
:root[data-theme="light"] .data-card,
:root[data-theme="light"] .timeline-item,
:root[data-theme="light"] .news-card,
:root[data-theme="light"] .admin-panel,
:root[data-theme="light"] .tool-panel,
:root[data-theme="light"] .financial-live-card,
:root[data-theme="light"] .tax-dashboard-head,
:root[data-theme="light"] .tax-panel,
:root[data-theme="light"] .tax-live-card,
:root[data-theme="light"] .tax-month-card,
:root[data-theme="light"] .settings-modal-panel,
:root[data-theme="light"] .settings-embedded-form,
:root[data-theme="light"] .theme-settings-panel,
:root[data-theme="light"] .settings-sudo-launch-panel,
:root[data-theme="light"] .account-sudo-card,
:root[data-theme="light"] .coingecko-price-row {
  border-color: rgba(17, 17, 17, 0.13);
  background:
    radial-gradient(circle at 86% 0%, rgba(3, 105, 161, 0.07), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.82));
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .portal-home-route .portal-workspace {
  background:
    radial-gradient(circle at 50% 8%, rgba(3, 105, 161, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
}

:root[data-theme="light"] .settings-modal-backdrop {
  background: rgba(248, 250, 252, 0.64);
}

:root[data-theme="light"] .dashboard-view,
:root[data-theme="light"] .dashboard-view h1,
:root[data-theme="light"] .dashboard-view h2,
:root[data-theme="light"] .dashboard-view h3,
:root[data-theme="light"] .dashboard-view h4,
:root[data-theme="light"] .dashboard-view strong,
:root[data-theme="light"] .settings-modal-header h2,
:root[data-theme="light"] .settings-section-head span,
:root[data-theme="light"] .settings-sudo-launch-panel strong,
:root[data-theme="light"] .account-sudo-card h3,
:root[data-theme="light"] .theme-choice-button span,
:root[data-theme="light"] .coingecko-price-row strong,
:root[data-theme="light"] .tax-live-card strong,
:root[data-theme="light"] .tax-month-card strong {
  color: #111111;
}

:root[data-theme="light"] .dashboard-view p,
:root[data-theme="light"] .dashboard-view small,
:root[data-theme="light"] .dashboard-view span,
:root[data-theme="light"] .settings-modal-header span,
:root[data-theme="light"] .settings-section-head p,
:root[data-theme="light"] .settings-tab-button small,
:root[data-theme="light"] .settings-sudo-launch-panel p,
:root[data-theme="light"] .account-sudo-card p,
:root[data-theme="light"] .account-sudo-card label span,
:root[data-theme="light"] .theme-choice-button small,
:root[data-theme="light"] .coingecko-price-row small,
:root[data-theme="light"] .tax-live-card small,
:root[data-theme="light"] .tax-month-card small,
:root[data-theme="light"] .account-status {
  color: rgba(17, 17, 17, 0.62);
}

:root[data-theme="light"] .sidebar-brand {
  border-bottom-color: rgba(17, 17, 17, 0.11);
}

:root[data-theme="light"] .account-sudo-card input {
  border-color: rgba(17, 17, 17, 0.16);
  color: #111111;
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .account-sudo-secondary,
:root[data-theme="light"] .account-sudo-close {
  border-color: rgba(17, 17, 17, 0.14);
  color: rgba(17, 17, 17, 0.78);
  background: rgba(17, 17, 17, 0.05);
}

:root[data-theme="light"] .sidebar-nav a,
:root[data-theme="light"] .nav-accordion-toggle,
:root[data-theme="light"] .settings-tab-button {
  color: rgba(17, 17, 17, 0.72);
}

:root[data-theme="light"] .sidebar-nav a:hover,
:root[data-theme="light"] .sidebar-nav a.active,
:root[data-theme="light"] .nav-accordion-toggle:hover,
:root[data-theme="light"] .nav-accordion.active > .nav-accordion-toggle,
:root[data-theme="light"] .settings-tab-button:hover,
:root[data-theme="light"] .settings-tab-button.active {
  color: #111111;
  border-color: rgba(3, 105, 161, 0.25);
  background: rgba(3, 105, 161, 0.08);
}

:root[data-theme="light"] .sidebar-nav .nav-child-link {
  border-left-color: rgba(17, 17, 17, 0.16);
}

:root[data-theme="light"] .nav-disabled-link {
  border-left-color: rgba(17, 17, 17, 0.1);
  color: rgba(17, 17, 17, 0.42);
}

:root[data-theme="light"] .nav-disabled-link small {
  color: rgba(3, 105, 161, 0.54);
}

:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select {
  color: var(--input-portal-text);
  border-color: var(--border-portal-hairline);
  background: var(--input-portal-bg);
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
  color: var(--input-portal-placeholder);
}

:root[data-theme="light"] table,
:root[data-theme="light"] th,
:root[data-theme="light"] td,
:root[data-theme="light"] .settings-tabs,
:root[data-theme="light"] .settings-modal-header {
  border-color: rgba(17, 17, 17, 0.11);
}

:root[data-theme="light"] .theme-choice-button {
  color: rgba(17, 17, 17, 0.72);
  border-color: rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .theme-choice-button:hover,
:root[data-theme="light"] .theme-choice-button:focus-visible,
:root[data-theme="light"] .theme-choice-button.active {
  border-color: rgba(3, 105, 161, 0.35);
  background: rgba(3, 105, 161, 0.08);
  box-shadow: inset 0 0 0 1px rgba(3, 105, 161, 0.12), 0 16px 42px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .donut-track {
  stroke: rgba(17, 17, 17, 0.12);
}

:root[data-theme="light"] .donut-empty,
:root[data-theme="light"] .donut-center small {
  color: rgba(17, 17, 17, 0.56);
}

:root[data-theme="light"] .terminal-stream,
:root[data-theme="light"] .settings-terminal-stream {
  color: #111111;
  border-color: rgba(17, 17, 17, 0.12);
  background: rgba(248, 250, 252, 0.86);
}

/* Financial Center: flat canvas system */
body.finance-center-route {
  --finance-canvas-line: rgba(255, 255, 255, 0.06);
  --finance-canvas-line-strong: rgba(255, 255, 255, 0.15);
  --finance-canvas-muted: rgba(255, 255, 255, 0.56);
  --finance-canvas-focus: rgba(142, 203, 255, 0.72);
}

:root[data-theme="light"] body.finance-center-route {
  --finance-canvas-line: rgba(17, 17, 17, 0.08);
  --finance-canvas-line-strong: rgba(17, 17, 17, 0.18);
  --finance-canvas-muted: rgba(17, 17, 17, 0.56);
  --finance-canvas-focus: rgba(3, 105, 161, 0.72);
}

body.finance-center-route .section-head {
  margin: 0 0 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--finance-canvas-line);
}

body.finance-center-route .portal-workspace {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.finance-center-route .section-head h2,
body.finance-center-route .financial-hub-head h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.55rem, 2.25vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.18;
}

body.finance-center-route .section-head > p:not(.eyebrow),
body.finance-center-route .financial-hub-head > span,
body.finance-center-route .mining-calc-head p {
  max-width: 720px;
  margin-top: 10px;
  color: var(--finance-canvas-muted);
  font-size: 0.8rem;
  letter-spacing: 0.012em;
  line-height: 1.6;
}

body.finance-center-route .tool-panel,
body.finance-center-route .metric-card,
body.finance-center-route .module-card,
body.finance-center-route .data-card,
body.finance-center-route .admin-panel,
body.finance-center-route .financial-live-card,
body.finance-center-route .donut-card,
body.finance-center-route .mining-calc-card,
body.finance-center-route .mining-calc-result {
  border: 1px solid var(--finance-canvas-line);
  border-radius: 2px;
  padding: 24px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.finance-center-route .tool-panel {
  gap: 24px;
}

body.finance-center-route .metric-card,
body.finance-center-route .module-card,
body.finance-center-route .financial-live-card,
body.finance-center-route .mining-calc-result {
  min-height: 0;
}

body.finance-center-route .asset-overview-grid,
body.finance-center-route .mining-calc-shell,
body.finance-center-route .financial-live-grid,
body.finance-center-route .reinvestment-layout {
  gap: 24px;
}

body.finance-center-route .treasury-summary,
body.finance-center-route .asset-overview-grid .treasury-summary,
body.finance-center-route .metric-grid,
body.finance-center-route .mining-calc-results {
  gap: 16px;
}

body.finance-center-route .asset-summary .metric-card,
body.finance-center-route .asset-summary .ths-price-card {
  min-height: 156px;
}

body.finance-center-route .metric-card strong,
body.finance-center-route .financial-live-card strong,
body.finance-center-route .mining-calc-result strong {
  font-weight: 460;
  letter-spacing: 0.012em;
}

body.finance-center-route .tool-strip,
body.finance-center-route .asset-tool-strip,
body.finance-center-route .mining-calc-currency,
body.finance-center-route .mining-calc-field > div,
body.finance-center-route .mining-calc-fee-control {
  border: 0;
  border-bottom: 1px solid var(--finance-canvas-line-strong);
  border-radius: 0;
  padding: 0 0 12px;
  background: transparent;
  box-shadow: none;
}

body.finance-center-route .tool-strip {
  gap: 16px;
}

body.finance-center-route .tool-strip .compact-field,
body.finance-center-route .tool-strip select,
body.finance-center-route .matrix-input,
body.finance-center-route .large-number-input,
body.finance-center-route .mining-calc-field input,
body.finance-center-route .mining-calc-field select,
body.finance-center-route .mining-calc-currency select,
body.finance-center-route .mining-calc-fee-control input[type="number"] {
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--finance-canvas-line-strong);
  border-radius: 0;
  padding: 0 5px;
  background: transparent;
  box-shadow: none;
}

body.finance-center-route .tool-strip .compact-field:focus,
body.finance-center-route .tool-strip select:focus,
body.finance-center-route .matrix-input:focus,
body.finance-center-route .large-number-input:focus,
body.finance-center-route .mining-calc-field input:focus,
body.finance-center-route .mining-calc-field select:focus,
body.finance-center-route .mining-calc-currency select:focus,
body.finance-center-route .mining-calc-fee-control input[type="number"]:focus {
  border-bottom-color: var(--finance-canvas-focus);
  box-shadow: 0 1px 0 var(--finance-canvas-focus);
  outline: none;
}

body.finance-center-route .asset-table input[readonly] {
  border-bottom-color: rgba(142, 203, 255, 0.34);
  background: transparent;
}

body.finance-center-route .donut-card {
  align-content: center;
  border: 0;
  padding: 0 0 0 24px;
}

body.finance-center-route .donut-center {
  border-color: var(--finance-canvas-line-strong);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.finance-center-route .donut-legend {
  padding-top: 12px;
  border-top: 1px solid var(--finance-canvas-line);
}

body.finance-center-route .finance-table {
  border-collapse: collapse;
  background: transparent;
}

body.finance-center-route .finance-table th,
body.finance-center-route .finance-table td {
  border-color: var(--finance-canvas-line);
  background: transparent;
}

body.finance-center-route .finance-table th {
  color: var(--finance-canvas-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  body.finance-center-route .section-head {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  body.finance-center-route .donut-card {
    padding: 0;
  }

  body.finance-center-route .tool-panel,
  body.finance-center-route .metric-card,
  body.finance-center-route .module-card,
  body.finance-center-route .data-card,
  body.finance-center-route .admin-panel,
  body.finance-center-route .financial-live-card,
  body.finance-center-route .donut-card,
  body.finance-center-route .mining-calc-card,
  body.finance-center-route .mining-calc-result {
    padding: 16px;
  }

  body.finance-center-route .asset-overview-grid,
  body.finance-center-route .mining-calc-shell,
  body.finance-center-route .financial-live-grid,
  body.finance-center-route .reinvestment-layout {
    gap: 16px;
  }
}

/* Workspace content starts with the active module, not a duplicated route header. */
.workspace-session-bar {
  position: relative;
  z-index: 4;
  display: flex;
  height: 0;
  justify-content: flex-end;
  pointer-events: none;
}

.workspace-session-bar .session-chip {
  position: absolute;
  top: 0;
  right: 0;
  pointer-events: auto;
}

.dashboard-view {
  padding-top: 0;
}

@media (max-width: 760px) {
  .workspace-session-bar {
    height: auto;
    margin-bottom: 18px;
  }

  .workspace-session-bar .session-chip {
    position: static;
    width: 100%;
  }
}

/* Theme token enforcement: no Dark Mode foregrounds may leak into light surfaces. */
.dashboard-body,
.dashboard-body input,
.dashboard-body select,
.dashboard-body textarea {
  color: var(--text-portal-primary);
}

.dashboard-body input,
.dashboard-body select,
.dashboard-body textarea,
.asset-table .matrix-input,
.treasury-table .matrix-input,
.large-number-input {
  border-color: var(--border-portal-hairline);
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
}

.dashboard-body input::placeholder,
.dashboard-body textarea::placeholder {
  color: var(--input-portal-placeholder);
  opacity: 1;
}

.dashboard-view label > span,
.dashboard-view .metric-card > span,
.dashboard-view .metric-card > small,
.dashboard-view .module-card > span,
.dashboard-view .module-card > small,
.dashboard-view .asset-table small,
.dashboard-view .treasury-table small,
.dashboard-view .price-source,
.dashboard-view .locked-note,
.dashboard-view .donut-legend li,
.dashboard-view .donut-center small,
.dashboard-view .mining-calc-field > span,
.dashboard-view .mining-calc-fee-row > span,
.dashboard-view .mining-calc-result > span,
.dashboard-view .mining-calc-result > small {
  color: var(--text-portal-muted);
}

.dashboard-view .metric-card strong,
.dashboard-view .module-card strong,
.dashboard-view .asset-table td strong,
.dashboard-view .treasury-table td strong,
.dashboard-view .donut-legend strong,
.dashboard-view .mining-calc-result strong,
.dashboard-view .panel-title strong {
  color: var(--text-portal-primary);
}

.soft-button {
  border-color: var(--border-portal-hairline);
  color: var(--text-portal-primary);
  background: var(--button-secondary-bg);
}

.danger-button {
  border-color: rgba(220, 38, 38, 0.32);
  color: var(--button-danger-text);
  background: rgba(220, 38, 38, 0.1);
}

.logout-button,
.tool-strip > button:not(.soft-button):not(.danger-button),
.mining-calc-run,
.settings-sudo-launch,
.account-sudo-primary,
.account-sudo-inline {
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
}

.dashboard-view .tool-strip .compact-field,
.dashboard-view .tool-strip select,
.dashboard-view .asset-table .matrix-input,
.dashboard-view .treasury-table .matrix-input,
.dashboard-view .ths-control .matrix-input {
  color: var(--input-portal-text);
  border-color: var(--border-portal-hairline);
  background: var(--input-portal-bg);
}

.dashboard-view .asset-table input[readonly] {
  color: var(--input-portal-text);
  border-color: var(--border-portal-hairline);
  background: var(--input-portal-bg);
}

body.finance-center-route .tool-strip .compact-field,
body.finance-center-route .tool-strip select,
body.finance-center-route .matrix-input,
body.finance-center-route .large-number-input,
body.finance-center-route .mining-calc-field input,
body.finance-center-route .mining-calc-field select,
body.finance-center-route .mining-calc-currency select,
body.finance-center-route .mining-calc-fee-control input[type="number"] {
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
}

:root[data-theme="light"] .donut-center span,
:root.theme-light .donut-center span {
  color: var(--text-portal-primary);
}

:root[data-theme="light"] .donut-track,
:root.theme-light .donut-track {
  stroke: var(--border-portal-hairline);
}

/* Native asset selectors receive explicit surfaces so browser option popups stay readable. */
#asset-catalog-select,
#asset-currency,
#asset-catalog-select option,
#asset-currency option {
  color: var(--text-portal-primary);
  background-color: var(--bg-card-surface);
}

:root.theme-dark #asset-catalog-select option,
:root.theme-dark #asset-currency option,
:root:not([data-theme="light"]) #asset-catalog-select option,
:root:not([data-theme="light"]) #asset-currency option {
  background-color: var(--bg-portal-canvas);
}

:root[data-theme="light"] #asset-catalog-select option,
:root[data-theme="light"] #asset-currency option,
:root.theme-light #asset-catalog-select option,
:root.theme-light #asset-currency option {
  background-color: var(--bg-card-surface);
}

/* Linked GoMining calculator widget: portable, token-driven and frame-free. */
.mining-calculator-dual {
  display: grid;
  gap: 32px;
}

.mining-mode-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding-top: 28px;
  border-top: 1px solid var(--border-portal-hairline);
}

.mining-mode-panel:first-child {
  padding-top: 0;
  border-top: 0;
}

.mining-mode-heading {
  display: grid;
  gap: 6px;
  max-width: 760px;
}

.mining-mode-heading > span {
  color: var(--text-portal-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mining-mode-heading > p {
  margin: 0;
  color: var(--text-portal-muted);
  font-size: 13px;
  line-height: 1.55;
}

.mining-network-yield-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  margin: 0;
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.mining-network-yield-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  content: "";
  flex: 0 0 auto;
}

.mining-network-yield-status.is-live::before {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08);
}

.gomining-live-widget {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.gomining-live-widget-status {
  min-height: 18px;
  color: var(--text-portal-muted);
  font-size: 12px;
  line-height: 1.4;
}

.gomining-live-controls {
  display: flex;
  align-items: end;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.gomining-live-service-override {
  display: grid;
  gap: 6px;
  width: min(100%, 320px);
  min-width: 0;
}

.gomining-live-service-override > span {
  color: var(--text-portal-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.gomining-live-service-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 2px;
  background: transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.gomining-live-service-input:focus-within {
  border-color: color-mix(in srgb, var(--text-portal-primary) 28%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-portal-primary) 7%, transparent);
}

.gomining-live-service-input input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--input-portal-text);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.gomining-live-service-input input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.gomining-live-service-input > em {
  padding: 0 12px;
  color: var(--text-portal-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.gomining-live-service-override > small {
  color: var(--text-portal-muted);
  font-size: 10px;
  line-height: 1.35;
}

.gomining-live-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.gomining-live-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 124px;
  padding: 18px;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.gomining-live-metric > span,
.gomining-live-metric > small {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.gomining-live-metric > small {
  align-self: end;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.gomining-live-metric > strong {
  overflow: hidden;
  color: var(--text-portal-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1rem, 1.55vw, 1.34rem);
  font-weight: 560;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gomining-live-metric > strong.is-positive {
  color: #34d399;
}

.gomining-live-metric > strong.is-negative,
.gomining-live-metric > strong.is-cost {
  color: #f59e0b;
}

.gomining-reward-chart-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-portal-hairline);
}

.gomining-reward-chart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.gomining-reward-chart-heading > div:first-child {
  display: grid;
  gap: 5px;
}

.gomining-reward-chart-heading span {
  color: var(--text-portal-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.gomining-reward-chart-heading small {
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.gomining-reward-chart-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-portal-hairline);
}

.gomining-reward-chart-tabs button {
  width: 34px;
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  padding: 0;
  color: var(--text-portal-muted);
  background: transparent;
  font-size: 11px;
  font-weight: 560;
  transition: color 180ms ease, background-color 180ms ease;
}

.gomining-reward-chart-tabs button:last-child {
  border-right: 0;
}

.gomining-reward-chart-tabs button:hover,
.gomining-reward-chart-tabs button:focus-visible,
.gomining-reward-chart-tabs button.is-active {
  color: var(--text-portal-primary);
  background: var(--portal-hover-surface);
  outline: none;
}

.gomining-reward-chart-stage {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  height: 380px;
  min-height: 380px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid var(--border-portal-hairline);
  border-right: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  border-left: 0;
  border-radius: 0;
}

.gomining-reward-chart {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: crosshair;
  touch-action: pan-y;
}

.gomining-reward-chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  min-height: 32px;
  margin: 0;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  padding: 8px 10px;
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
  background: color-mix(in srgb, var(--bg-portal-canvas) 92%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

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

@media (max-width: 1120px) {
  .gomining-live-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mining-calculator-dual {
    gap: 24px;
  }

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

  .gomining-live-metric {
    min-height: 112px;
    padding: 14px;
  }

  .gomining-reward-chart-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .gomining-reward-chart-tabs {
    align-self: flex-start;
  }

  .gomining-reward-chart-stage {
    height: 300px;
    min-height: 300px;
  }
}

/* The session utilities occupy their own stable header row instead of overlaying view content. */
.workspace-session-bar {
  display: flex;
  min-height: 60px;
  margin-bottom: 22px;
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: auto;
}

.workspace-session-bar .session-chip {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-width: 0;
  padding: 8px 10px;
}

.session-chip .portal-language-switcher,
.portal-live-clock,
.session-chip .logout-button {
  flex: 0 0 auto;
}

.session-chip .portal-language-switcher {
  margin: 0;
}

.session-chip #user-email {
  min-width: 0;
  max-width: 260px;
  margin: 0;
}

.portal-live-clock {
  width: 8ch;
  margin: 0;
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}

.portfolio-overview-hub {
  gap: 26px;
}

.portfolio-overview-hub .financial-hub-head {
  padding-bottom: 16px;
  border-color: var(--border-portal-hairline);
}

.portfolio-mining-widget-slot {
  min-width: 0;
}

.gomining-portfolio-widget {
  display: grid;
  gap: 14px;
  min-width: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.gomining-portfolio-widget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.gomining-portfolio-widget-head > span {
  color: var(--text-portal-primary);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.gomining-portfolio-widget-head > small {
  color: var(--text-portal-muted);
  font-size: 11px;
  white-space: nowrap;
}

.gomining-portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.gomining-portfolio-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 100px;
  padding: 16px 18px;
  border-right: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  background: transparent;
}

.gomining-portfolio-metric > span {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.gomining-portfolio-metric > strong {
  overflow: hidden;
  color: var(--text-portal-primary);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 300;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gomining-portfolio-metric > strong.is-positive {
  color: #34d399;
}

.gomining-portfolio-metric > strong.is-negative {
  color: #f59e0b;
}

.gomining-portfolio-metric > strong.is-difficulty-favorable {
  color: #34d399;
}

.gomining-portfolio-metric > strong.is-difficulty-adverse {
  color: #f87171;
}

.gomining-portfolio-difficulty > small {
  overflow: hidden;
  color: var(--text-portal-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0.72;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gomining-portfolio-integrity > strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.gomining-portfolio-integrity i {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  animation: gominingIntegrityPulse 1.8s ease-in-out infinite;
}

.gomining-portfolio-integrity.is-pending i {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  animation: none;
}

.gomining-portfolio-integrity b {
  color: inherit;
  font: inherit;
}

.portfolio-overview-hub .financial-live-grid {
  gap: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.portfolio-overview-hub .financial-live-card {
  border: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  padding: 20px;
}

@keyframes gominingIntegrityPulse {
  50% {
    opacity: 0.52;
    transform: scale(0.86);
  }
}

@media (max-width: 1080px) {
  .gomining-portfolio-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace-session-bar {
    min-height: 0;
    margin-bottom: 18px;
  }

  .workspace-session-bar .session-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
  }

  .session-chip #user-email {
    max-width: none;
  }

  .portal-live-clock {
    grid-column: 2;
    justify-self: start;
  }

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

  .gomining-portfolio-metric {
    border-bottom: 1px solid var(--border-portal-hairline);
  }

  .gomining-portfolio-widget-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.data-hub-view {
  display: grid;
  gap: 26px;
  min-width: 0;
  color: var(--text-portal-primary);
}

.data-hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-portal-hairline);
}

.data-hub-head .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}

.data-hub-head h2 {
  margin: 0;
  color: var(--text-portal-primary);
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  font-weight: 350;
  letter-spacing: 0.02em;
}

.data-hub-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--text-portal-muted);
  line-height: 1.6;
}

.data-hub-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-portal-primary);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-hub-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.data-hub-dropzone {
  display: grid;
  gap: 18px;
  min-height: 260px;
  padding: 24px;
  border: 1px dashed var(--border-portal-hairline);
  background: transparent;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.data-hub-dropzone.is-dragging {
  border-color: #60a5fa;
  background: color-mix(in srgb, #60a5fa 6%, transparent);
}

.data-hub-dropzone-main {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 28px;
  border: 0;
  background: transparent;
  color: var(--text-portal-primary);
  cursor: pointer;
  text-align: center;
}

.data-hub-dropzone-main:focus-visible {
  outline: 1px solid #60a5fa;
  outline-offset: 4px;
}

.data-hub-dropzone-main strong {
  font-size: 1.05rem;
  font-weight: 450;
}

.data-hub-dropzone-main small,
.data-hub-file-list small,
.data-hub-preview-head small {
  color: var(--text-portal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.data-hub-dropzone-icon {
  justify-self: center;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 50%;
  color: #60a5fa;
  font-size: 22px;
  font-weight: 300;
}

.data-hub-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-portal-hairline);
}

.data-hub-file-list > span:not(.data-hub-file-empty) {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border-portal-hairline);
}

.data-hub-file-list b {
  max-width: 260px;
  overflow: hidden;
  color: var(--text-portal-primary);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-hub-file-empty {
  color: var(--text-portal-muted);
  font-size: 12px;
}

.data-hub-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-portal-hairline);
}

.data-hub-actions button {
  min-width: 190px;
}

.data-hub-actions p {
  min-height: 1.4em;
  margin: 0;
  color: var(--text-portal-muted);
  font-size: 13px;
}

.data-hub-preview {
  min-width: 0;
  border-top: 1px solid var(--border-portal-hairline);
}

.data-hub-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.data-hub-preview-head > span {
  color: var(--text-portal-primary);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.data-hub-table-empty {
  padding: 28px 0;
  border-top: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-muted);
  font-size: 13px;
}

.data-hub-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.data-hub-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.data-hub-table th,
.data-hub-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-primary);
  font-size: 13px;
  text-align: left;
}

.data-hub-table th {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-hub-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .data-hub-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .data-hub-state {
    white-space: normal;
  }

  .data-hub-dropzone {
    padding: 16px;
  }

  .data-hub-actions,
  .data-hub-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-hub-actions button {
    width: 100%;
  }
}

/* Flat canvas and restrained executive motion */
:root {
  --portal-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --portal-hover-border: rgba(142, 203, 255, 0.2);
  --portal-hover-surface: rgba(142, 203, 255, 0.025);
}

:root[data-theme="light"],
:root.theme-light {
  --portal-hover-border: rgba(3, 105, 161, 0.22);
  --portal-hover-surface: rgba(3, 105, 161, 0.035);
}

@keyframes executiveCanvasEntry {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes executiveStatusBreath {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

.kinetic-view-enter {
  animation: executiveCanvasEntry 400ms var(--portal-motion-ease) both;
}

.data-hub-state i,
.status-dot,
.data-hub-actions p.is-processing {
  animation: executiveStatusBreath 2.2s ease-in-out infinite;
}

/* Germany tax workspace: one canvas, hairline structure. */
.tax-dashboard-head,
.tax-panel,
.tax-metric,
.tax-use-fund-metric,
.tax-month-card,
.tax-quarter-card,
.tax-review-table-wrapper,
.tax-law-info article,
.tax-elster-row,
.tax-rule-chip,
.live-market-panel,
.coingecko-price-row {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.tax-dashboard {
  gap: 20px;
}

.tax-dashboard-head {
  border: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  padding: 0 0 20px;
}

.tax-dashboard-head h3,
.tax-panel strong,
.tax-metric strong,
.tax-month-card strong,
.tax-quarter-card strong {
  color: var(--text-portal-primary);
}

.tax-dashboard-head p:not(.eyebrow),
.tax-panel p,
.tax-metric span,
.tax-metric small,
.tax-month-card span,
.tax-month-card small,
.tax-month-card em,
.tax-quarter-card span,
.tax-quarter-card small {
  color: var(--text-portal-muted);
}

.tax-panel {
  min-height: 0;
  border: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  padding: 20px 0 0;
}

.tax-live-cards,
.tax-month-grid,
.tax-quarter-grid,
.tax-use-of-funds-grid,
.coingecko-price-grid {
  gap: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-left: 1px solid var(--border-portal-hairline);
}

.tax-metric,
.tax-use-fund-metric,
.tax-month-card,
.tax-quarter-card,
.coingecko-price-row {
  border: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
}

.tax-metric.is-warning,
.tax-month-card.status-yellow,
.tax-quarter-card.status-yellow {
  border-color: rgba(251, 191, 36, 0.32);
  background: color-mix(in srgb, #fbbf24 3%, transparent) !important;
}

.tax-month-card.status-green,
.tax-quarter-card.status-green {
  border-color: rgba(52, 211, 153, 0.3);
  background: color-mix(in srgb, #34d399 3%, transparent) !important;
}

.tax-month-card.status-red,
.tax-quarter-card.status-red {
  border-color: rgba(248, 113, 113, 0.24);
}

.tax-control-stack select,
.tax-control-stack input,
.tax-review-form input:not([type="file"]),
.tax-balance-form input,
.tax-rate-control input {
  border: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  color: var(--input-portal-text);
  background: transparent;
  box-shadow: none;
}

.tax-control-stack select:focus,
.tax-control-stack input:focus,
.tax-review-form input:not([type="file"]):focus,
.tax-balance-form input:focus,
.tax-rate-control input:focus {
  border-bottom-color: var(--blue);
}

.tax-review-form textarea,
.tax-file-input,
.tax-file-state {
  border: 1px solid var(--border-portal-hairline);
  border-radius: 2px;
  color: var(--input-portal-text);
  background: transparent;
  box-shadow: none;
}

.tax-review-table-wrapper {
  border: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
}

.tax-review-table-wrapper .finance-table th {
  color: var(--text-portal-muted);
  background: var(--bg-portal-canvas);
  backdrop-filter: none;
}

.tax-review-table-wrapper .finance-table td {
  color: var(--text-portal-primary);
}

.tax-law-info article,
.tax-elster-row,
.tax-rule-chip {
  border-color: var(--border-portal-hairline);
  border-radius: 2px;
}

/* Settings and account management: preserve the modal boundary, flatten its internals. */
.settings-modal-panel {
  border-color: var(--border-portal-hairline);
  border-radius: 6px;
  background: var(--bg-portal-canvas);
  box-shadow: none;
  backdrop-filter: none;
}

.settings-modal-header,
.settings-tabs {
  border-color: var(--border-portal-hairline);
}

.settings-modal-header h2,
.settings-section-head span,
.settings-tab-button span,
.settings-tab-panel strong {
  color: var(--text-portal-primary);
}

.settings-modal-header span,
.settings-section-head p,
.settings-tab-button small,
.settings-tab-panel p,
.settings-tab-panel small {
  color: var(--text-portal-muted);
}

.settings-tab-button {
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  padding: 14px 10px;
  color: var(--text-portal-muted);
  background: transparent;
  box-shadow: none;
}

.settings-tab-button:hover,
.settings-tab-button.active {
  border-color: var(--border-portal-hairline);
  color: var(--text-portal-primary);
  background: var(--portal-hover-surface);
  box-shadow: inset 2px 0 0 var(--blue);
}

.settings-embedded-form,
.settings-security-layout .admin-panel,
.settings-analytics-panel,
.theme-settings-panel,
.profile-settings-form,
.credential-settings-panel,
.settings-sudo-launch-panel,
.settings-tab-panel .security-accordion,
.settings-tab-panel .compact-security-form,
.settings-tab-panel .two-factor-state,
.settings-tab-panel .credential-box,
.settings-tab-panel .signal-list div,
.settings-tab-panel .compact-signal-list div {
  border: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.profile-settings-form,
.theme-settings-panel,
.settings-sudo-launch-panel,
.settings-security-layout .admin-panel,
.settings-analytics-panel {
  max-width: none;
  padding: 18px 0 0;
}

.theme-choice-button {
  border-color: var(--border-portal-hairline);
  border-radius: 2px;
  color: var(--text-portal-primary);
  background: transparent;
  box-shadow: none;
}

.theme-choice-button:hover,
.theme-choice-button:focus-visible,
.theme-choice-button.active {
  border-color: var(--portal-hover-border);
  background: var(--portal-hover-surface);
  box-shadow: none;
}

.settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.settings-modal select,
.settings-modal textarea,
.profile-settings-form input,
.account-management-fullscreen input,
.account-management-fullscreen select,
.account-management-standalone input,
.account-management-standalone select {
  border: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  color: var(--input-portal-text);
  background: transparent;
  box-shadow: none;
}

.settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.settings-modal select:focus,
.settings-modal textarea:focus,
.profile-settings-form input:focus,
.account-management-fullscreen input:focus,
.account-management-fullscreen select:focus,
.account-management-standalone input:focus,
.account-management-standalone select:focus {
  border-bottom-color: var(--blue);
  outline: none;
}

.settings-modal input[type="checkbox"],
.settings-modal input[type="radio"] {
  accent-color: var(--blue);
}

body.account-management-route .portal-workspace {
  background: var(--bg-portal-canvas);
}

.account-management-fullscreen .admin-panel,
.account-management-standalone .admin-panel,
.account-management-fullscreen .audit-table-wrap,
.account-management-standalone .audit-table-wrap,
.account-management-session-chip {
  border: 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.account-management-fullscreen .admin-panel,
.account-management-standalone .admin-panel {
  padding: 20px 0 0;
}

/* Subtle interaction light without moving the surrounding layout. */
.tax-panel,
.tax-metric,
.tax-use-fund-metric,
.tax-month-card,
.tax-quarter-card,
.tax-review-table-wrapper .finance-table tbody tr,
body.finance-center-route .metric-card,
body.finance-center-route .module-card,
body.finance-center-route .data-card,
body.finance-center-route .financial-live-card,
body.finance-center-route .mining-calc-result,
body.finance-center-route .finance-table tbody tr,
.settings-tab-button,
.theme-choice-button {
  transition:
    border-color 300ms var(--portal-motion-ease),
    background-color 300ms var(--portal-motion-ease),
    box-shadow 300ms var(--portal-motion-ease),
    color 300ms var(--portal-motion-ease);
}

@media (hover: hover) {
  .tax-panel:hover,
  .tax-metric:hover,
  .tax-use-fund-metric:hover,
  .tax-month-card:hover,
  .tax-quarter-card:hover,
  body.finance-center-route .metric-card:hover,
  body.finance-center-route .module-card:hover,
  body.finance-center-route .data-card:hover,
  body.finance-center-route .financial-live-card:hover,
  body.finance-center-route .mining-calc-result:hover {
    border-color: var(--portal-hover-border);
    background: var(--portal-hover-surface) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-hover-border) 38%, transparent) !important;
  }

  .tax-review-table-wrapper .finance-table tbody tr:hover,
  body.finance-center-route .finance-table tbody tr:hover {
    background: var(--portal-hover-surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kinetic-view-enter,
  .data-hub-state i,
  .status-dot,
  .data-hub-actions p.is-processing,
  .gomining-portfolio-integrity i {
    animation: none !important;
  }

  .tax-panel,
  .tax-metric,
  .tax-use-fund-metric,
  .tax-month-card,
  .tax-quarter-card,
  .tax-review-table-wrapper .finance-table tbody tr,
  body.finance-center-route .metric-card,
  body.finance-center-route .module-card,
  body.finance-center-route .data-card,
  body.finance-center-route .financial-live-card,
  body.finance-center-route .mining-calc-result,
  body.finance-center-route .finance-table tbody tr,
  .settings-tab-button,
  .theme-choice-button {
    transition: none !important;
  }
}

/* Login luminance mesh and final interface convergence */
@keyframes luxuryMesh {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1.04) rotate(0.001deg);
  }

  25% {
    transform: translate3d(3%, -1%, 0) scale(1.08) rotate(0.001deg);
  }

  50% {
    transform: translate3d(2%, 3%, 0) scale(1.05) rotate(0.001deg);
  }

  75% {
    transform: translate3d(-2%, 2%, 0) scale(1.09) rotate(0.001deg);
  }

  100% {
    transform: translate3d(-3%, -2%, 0) scale(1.04) rotate(0.001deg);
  }
}

@keyframes loginSurfaceIn {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes loginControlIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

body.login-body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background: #0b0f17;
}

body.login-body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: -28%;
  pointer-events: none;
  opacity: 0.94;
  background:
    linear-gradient(118deg, rgba(30, 41, 59, 0.82) 0%, transparent 42%),
    linear-gradient(238deg, rgba(148, 163, 184, 0.12) 0%, transparent 38%),
    conic-gradient(from 210deg at 52% 48%, #0b0f17, #1e293b, #111827, #20252d, #0b0f17);
  background-size: 150% 150%, 160% 160%, 120% 120%;
  mask-image: none;
  animation: luxuryMesh 20s linear infinite;
  will-change: transform;
}

body.login-body::after {
  content: "";
  position: fixed;
  z-index: 0;
  inset: -22%;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(132deg, transparent 18%, rgba(226, 232, 240, 0.12) 48%, transparent 72%),
    linear-gradient(310deg, rgba(71, 85, 105, 0.28), transparent 54%);
  animation: luxuryMesh 20s linear infinite reverse;
  will-change: transform;
}

.login-body .portal-shell {
  position: relative;
  z-index: 1;
}

.login-body .login-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  background: rgba(9, 13, 21, 0.58);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px) saturate(1.04);
  animation: loginSurfaceIn 760ms var(--portal-motion-ease) both;
}

.login-body .brand-lockup,
.login-body .portal-language-switcher,
.login-body .login-copy,
.login-body .security-note,
.login-body #login-submit {
  opacity: 0;
  animation: loginControlIn 680ms var(--portal-motion-ease) both;
}

.login-body .brand-lockup {
  animation-delay: 120ms;
}

.login-body .portal-language-switcher {
  animation-delay: 190ms;
}

.login-body .login-copy {
  animation-delay: 250ms;
}

.login-body #login-submit {
  animation-delay: 490ms;
}

.login-body .security-note {
  animation-delay: 560ms;
}

/* Data Hub remains part of the shared canvas instead of a blue nested panel. */
body.data-hub-route .portal-workspace {
  border-color: var(--border-portal-hairline);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.data-hub-view,
.data-hub-dropzone,
.data-hub-dropzone-main,
.data-hub-preview,
.data-hub-table-wrap {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.data-hub-dropzone {
  border: 1px dashed var(--border-portal-hairline);
  border-radius: 0;
}

.data-hub-dropzone-main strong {
  color: var(--text-portal-primary);
  font-weight: 350;
  letter-spacing: 0.015em;
}

.data-hub-dropzone-main small,
.data-hub-file-empty {
  color: var(--text-portal-muted);
  font-weight: 350;
}

.data-hub-dropzone-icon {
  border-color: var(--border-portal-hairline);
  border-radius: 3px;
  color: var(--text-portal-muted);
}

.data-hub-dropzone.is-dragging {
  border-color: var(--text-portal-muted);
  background: color-mix(in srgb, var(--text-portal-primary) 2%, transparent);
}

.data-hub-dropzone-main:focus-visible {
  outline-color: var(--text-portal-muted);
}

/* The German tax mode is a fixed accounting context, not an interactive switch. */
.tax-static-control {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 104px;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-portal-hairline);
}

.tax-static-control span {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 520;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tax-static-control strong {
  color: var(--text-portal-primary);
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0.02em;
}

.tax-export-actions .ghost-link,
.tax-export-actions .tax-modal-action {
  min-height: 34px;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 4px;
  color: var(--text-portal-primary);
  background: transparent;
  box-shadow: none;
  transition:
    border-color 300ms var(--portal-motion-ease),
    background-color 300ms var(--portal-motion-ease),
    color 300ms var(--portal-motion-ease);
}

.tax-export-actions .ghost-link:hover,
.tax-export-actions .ghost-link:focus-visible,
.tax-export-actions .tax-modal-action:hover,
.tax-export-actions .tax-modal-action:focus-visible {
  border-color: var(--portal-hover-border);
  color: var(--text-portal-primary);
  background: var(--portal-hover-surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-hover-border) 30%, transparent);
  outline: none;
}

/* Settings labels must remain readable after every tenant and language refresh. */
.settings-tab-button span[data-no-i18n],
.settings-tab-button small[data-no-i18n] {
  display: block;
  min-width: 0;
  visibility: visible;
  opacity: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.settings-tab-button span[data-no-i18n] {
  color: var(--text-portal-primary);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.3;
}

.settings-tab-button small[data-no-i18n] {
  color: var(--text-portal-muted);
  font-size: 10.5px;
  font-weight: 380;
  line-height: 1.45;
}

.settings-tab-button:hover,
.settings-tab-button.active {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  body.login-body::before,
  body.login-body::after,
  .login-body .login-panel,
  .login-body .brand-lockup,
  .login-body .portal-language-switcher,
  .login-body .login-copy,
  .login-body .security-note,
  .login-body .credentials-step label,
  .login-body #login-submit {
    opacity: 1;
    animation: none !important;
    transform: none;
  }
}

/* Germany tax route: hydrate directly on the portal canvas without a nested workspace card. */
body.tax-tool-route {
  --tax-route-gutter: clamp(18px, 2.1vw, 30px);
}

body.tax-tool-route .portal-workspace {
  position: relative;
  min-height: 100vh;
  border: 0 !important;
  border-radius: 0 !important;
  padding: var(--tax-route-gutter);
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.tax-tool-route .workspace-session-bar {
  position: absolute;
  top: var(--tax-route-gutter);
  right: var(--tax-route-gutter);
  z-index: 8;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}

body.tax-tool-route .workspace-session-bar .session-chip {
  position: static;
  pointer-events: auto;
}

body.tax-tool-route .dashboard-view,
body.tax-tool-route .tax-tool-hub,
body.tax-tool-route .tax-dashboard,
body.tax-tool-route .tax-desktop-ledger {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.tax-tool-route .tax-tool-hub {
  gap: 16px;
  border: 0 !important;
  border-radius: 0 !important;
}

body.tax-tool-route .tax-tool-compact-head {
  min-height: 60px;
  margin: 0;
  padding: 8px min(660px, 54vw) 0 0;
  align-content: start;
  border: 0;
  border-radius: 0;
  background: transparent;
}

@media (min-width: 861px) {
  body.tax-tool-route .portal-dashboard-shell {
    gap: 0;
    padding: 0;
  }

  body.tax-tool-route .portal-sidebar {
    top: 0;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-right: 1px solid var(--border-portal-hairline);
    border-radius: 0;
  }
}

/* Secure tenant archive explorer */
.archive-explorer,
.archive-explorer *,
.archive-explorer *::before,
.archive-explorer *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

.archive-explorer {
  min-width: 0;
  color: var(--text-portal-primary);
  background: transparent;
}

.archive-explorer-head {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
}

.archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-portal-hairline);
}

.archive-toolbar button,
.archive-breadcrumbs button,
.archive-viewer button,
.archive-folder-dialog button,
.archive-rename-dialog button,
.archive-delete-dialog button {
  min-height: 34px;
  border: 1px solid var(--border-portal-hairline);
  color: var(--text-portal-primary);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.archive-toolbar button {
  padding: 0 13px;
  font-size: 12px;
}

.archive-toolbar button:first-child {
  width: 38px;
  padding: 0;
  font-size: 19px;
}

.archive-toolbar button:hover:not(:disabled),
.archive-toolbar button:focus-visible,
.archive-breadcrumbs button:hover,
.archive-breadcrumbs button:focus-visible,
.archive-viewer button:hover,
.archive-folder-dialog button:hover,
.archive-rename-dialog button:hover,
.archive-rename-dialog button:focus-visible,
.archive-delete-dialog button:hover,
.archive-delete-dialog button:focus-visible {
  border-color: color-mix(in srgb, var(--accent-portal-cyan) 60%, var(--border-portal-hairline));
  background: rgba(var(--accent-portal-cyan-rgb), 0.07);
  outline: none;
}

.archive-toolbar button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.archive-toolbar .archive-compile-action {
  border-color: color-mix(in srgb, var(--accent-portal-cyan) 48%, var(--border-portal-hairline));
  color: var(--text-portal-primary);
}

#btn-archive-rename:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent-portal-cyan) 34%, var(--border-portal-hairline));
  background: var(--input-portal-bg);
}

.archive-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-portal-hairline);
  white-space: nowrap;
  scrollbar-width: thin;
}

.archive-breadcrumbs button {
  min-height: 28px;
  padding: 0 7px;
  border-color: transparent;
  color: var(--text-portal-muted);
  font-size: 11px;
}

.archive-breadcrumbs button:last-child {
  color: var(--text-portal-primary);
}

.archive-breadcrumbs > span {
  color: var(--text-portal-muted);
  opacity: 0.65;
}

.archive-quota {
  display: grid;
  grid-template-columns: minmax(250px, auto) minmax(140px, 1fr);
  align-items: center;
  flex: 1 1 440px;
  gap: 12px;
  min-width: min(100%, 360px);
  max-width: 680px;
  margin-left: auto;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
}

.archive-quota-copy {
  color: var(--text-portal-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
}

.archive-quota-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: #1a222d;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
}

.archive-quota-fill {
  display: block;
  height: 100%;
  background: var(--accent-portal-cyan, #38bdf8);
  border-radius: 0 !important;
  transition: width 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-archive-pane,
.settings-archive-overview,
.settings-archive-actions,
.settings-archive-action,
.settings-archive-action button,
.settings-archive-password {
  border-radius: 0 !important;
}

.settings-archive-pane {
  color: var(--text-portal-primary);
}

.settings-archive-overview {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: baseline;
  margin: 24px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.settings-archive-overview span,
.settings-archive-action p,
.settings-archive-status {
  color: var(--text-portal-muted);
}

.settings-archive-overview strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
}

.settings-archive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-portal-hairline);
}

.settings-archive-action {
  min-width: 0;
  padding: 24px 24px 24px 0;
  background: transparent !important;
  border: 0 !important;
}

.settings-archive-action + .settings-archive-action {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--border-portal-hairline) !important;
}

.settings-archive-action h3 {
  margin: 0 0 8px;
  color: var(--text-portal-primary);
  font-size: 15px;
  font-weight: 500;
}

.settings-archive-action p {
  min-height: 44px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.55;
}

.settings-archive-action button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--text-portal-primary);
  background: transparent;
  border: 1px solid var(--border-portal-hairline);
  font: inherit;
  cursor: pointer;
}

.settings-archive-action button:hover:not(:disabled),
.settings-archive-action button:focus-visible {
  border-color: var(--accent-portal-cyan, #38bdf8);
}

.settings-archive-action button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.settings-archive-status {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 12px;
}

.settings-archive-password {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  overflow-wrap: anywhere;
  color: var(--text-portal-primary);
  background: var(--input-portal-bg);
  border: 1px solid var(--border-portal-hairline);
}

.settings-archive-password[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .archive-quota,
  .settings-archive-overview,
  .settings-archive-actions {
    grid-template-columns: 1fr;
  }

  .settings-archive-action,
  .settings-archive-action + .settings-archive-action {
    padding: 18px 0;
    border-left: 0 !important;
  }

  .settings-archive-action + .settings-archive-action {
    border-top: 1px solid var(--border-portal-hairline) !important;
  }
}

.archive-desktop {
  position: relative;
  min-height: clamp(420px, 62vh, 760px);
  overflow: auto;
  border-bottom: 1px solid var(--border-portal-hairline);
  background: linear-gradient(180deg, #07090b 0%, #0c0f13 100%) !important;
  background-image: linear-gradient(180deg, #07090b 0%, #0c0f13 100%) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  box-shadow: none;
  outline: none;
}

.archive-desktop:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(var(--accent-portal-cyan-rgb), 0.55);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-content: start;
  gap: 1px;
  min-height: 100%;
  padding: 16px;
}

.archive-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 64px minmax(16px, auto) minmax(13px, auto);
  gap: 7px;
  min-width: 0;
  min-height: 132px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid transparent;
  color: var(--text-portal-primary);
  background: rgba(255, 255, 255, 0.012);
  text-align: left;
  cursor: default;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.archive-tile:hover,
.archive-tile:focus-visible {
  border-color: color-mix(in srgb, var(--accent-portal-cyan) 44%, var(--border-portal-hairline));
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

.archive-tile.is-selected,
.archive-tile.selected-item-active {
  border-color: var(--accent-portal-cyan, #38bdf8);
  background: rgba(var(--accent-portal-cyan-rgb), 0.055);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-portal-cyan-rgb), 0.18);
}

.archive-tile:active {
  transform: translateY(1px);
}

.archive-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  width: 48px !important;
  height: 48px !important;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 !important;
}

.archive-tile-icon svg {
  display: block;
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px;
}

.archive-tile-icon img {
  display: block;
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
}

.archive-folder-tile .archive-tile-icon {
  color: #38a7e8;
}

.archive-type-csv .archive-tile-icon {
  color: #2fbf84;
}

.archive-type-pdf .archive-tile-icon {
  color: #e06a72;
}

.archive-tile strong {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0 4px;
  color: var(--text-portal-primary);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-tile small,
.archive-tile em {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0 4px;
  color: var(--text-portal-muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-tile em {
  color: #2fbf84;
  text-transform: uppercase;
}

.archive-drop-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: none;
  place-content: center;
  gap: 9px;
  border: 1px dashed var(--accent-portal-cyan);
  color: var(--text-portal-primary);
  background: rgba(7, 9, 11, 0.94);
  text-align: center;
  pointer-events: none;
}

.archive-drop-overlay strong {
  font-size: 18px;
  font-weight: 420;
}

.archive-drop-overlay small {
  color: var(--text-portal-muted);
}

.archive-desktop.is-dragging .archive-drop-overlay {
  display: grid;
}

.archive-empty {
  align-self: start;
  margin: 20px 0;
  color: var(--text-portal-muted);
  font-size: 12px;
}

.archive-empty.is-error {
  color: #e8878d;
}

.archive-empty.is-recoverable {
  color: var(--text-portal-muted);
}

.archive-progress {
  height: 2px;
  overflow: hidden;
  background: var(--border-portal-hairline);
}

.archive-progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--accent-portal-cyan);
  animation: archiveProgress 1.25s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes archiveProgress {
  from { transform: translateX(-110%); }
  to { transform: translateX(280%); }
}

.archive-statusbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
  padding: 10px 2px;
  color: var(--text-portal-muted);
  font-size: 10px;
}

.archive-viewer,
.archive-folder-dialog,
.archive-rename-dialog,
.archive-delete-dialog {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 5, 10, 0.82);
  backdrop-filter: blur(12px);
}

.archive-viewer[hidden],
.archive-folder-dialog[hidden],
.archive-rename-dialog[hidden],
.archive-delete-dialog[hidden] {
  display: none;
}

.archive-viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 96vw);
  height: min(820px, 90vh);
  border: 1px solid color-mix(in srgb, var(--accent-portal-cyan) 42%, var(--border-portal-hairline));
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
}

.archive-viewer-panel > header,
.archive-folder-dialog-panel > header,
.archive-rename-dialog-panel > header,
.archive-delete-dialog-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-portal-hairline);
}

.archive-viewer-panel h3,
.archive-folder-dialog-panel h3,
.archive-rename-dialog-panel h3,
.archive-delete-dialog-panel h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 430;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-viewer-panel header button,
.archive-folder-dialog-panel header button,
.archive-rename-dialog-panel header button {
  width: 34px;
  padding: 0;
  font-size: 20px;
}

.archive-viewer-body {
  display: grid;
  min-height: 0;
  overflow: auto;
  background: color-mix(in srgb, var(--bg-card-surface) 54%, transparent);
}

.archive-media-preview {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.archive-csv-wrap {
  min-width: 100%;
  overflow: auto;
}

.archive-csv-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  color: var(--text-portal-primary);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
}

.archive-csv-table th,
.archive-csv-table td {
  max-width: 360px;
  padding: 8px 10px;
  overflow: hidden;
  border-right: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-csv-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
  text-align: left;
}

.archive-folder-dialog-panel,
.archive-rename-dialog-panel {
  width: min(440px, 94vw);
  border: 1px solid color-mix(in srgb, var(--accent-portal-cyan) 42%, var(--border-portal-hairline));
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
  border-radius: 0 !important;
}

.archive-delete-dialog-panel {
  width: min(520px, 94vw);
  border: 1px solid color-mix(in srgb, var(--accent-portal-cyan) 42%, var(--border-portal-hairline));
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
  border-radius: 0 !important;
}

.archive-delete-dialog-panel > p {
  margin: 0;
  padding: 18px 22px 0;
  color: var(--text-portal-muted);
  font-size: 12px;
  line-height: 1.55;
}

.archive-delete-dialog-panel .archive-delete-summary {
  padding-top: 8px;
  color: var(--text-portal-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.archive-delete-dialog-panel > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
}

.archive-delete-dialog-panel > div button {
  min-height: 36px;
  padding: 0 15px;
}

.archive-delete-dialog-panel .archive-delete-confirm {
  border-color: rgba(224, 106, 114, 0.64);
  color: #f3a1a7;
}

.archive-folder-dialog-panel > label,
.archive-rename-dialog-panel > label {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--text-portal-muted);
  font-size: 11px;
}

.archive-folder-dialog-panel input,
.archive-rename-dialog-panel input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--border-portal-hairline);
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
  font: inherit;
}

.archive-folder-dialog-panel input:focus,
.archive-rename-dialog-panel input:focus {
  border-bottom-color: var(--accent-portal-cyan);
  outline: none;
}

.archive-folder-dialog-panel > div,
.archive-rename-dialog-panel > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 22px 22px;
}

.archive-folder-dialog-panel > div button,
.archive-rename-dialog-panel > div button {
  padding: 0 15px;
}

.archive-rename-status {
  min-height: 18px;
  margin: -8px 22px 12px;
  color: #e8878d;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .archive-toolbar {
    flex-wrap: wrap;
  }

  .archive-toolbar .archive-compile-action {
    margin-left: 0;
  }

  .archive-toolbar .archive-quota {
    grid-template-columns: 1fr;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
    padding: 10px 0 2px;
    border-left: 0;
    border-top: 1px solid var(--border-portal-hairline);
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .archive-viewer,
  .archive-folder-dialog,
  .archive-rename-dialog,
  .archive-delete-dialog {
    padding: 8px;
  }

  .archive-viewer-panel {
    width: 100%;
    height: 94vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-progress span {
    animation-duration: 3s;
  }
}

@media (max-width: 860px) {
  body.tax-tool-route {
    --tax-route-gutter: 16px;
  }

  body.tax-tool-route .portal-dashboard-shell {
    padding: 0;
  }

  body.tax-tool-route .portal-sidebar {
    margin-bottom: 0;
    border-radius: 0;
  }

  body.tax-tool-route .workspace-session-bar {
    position: static;
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
    pointer-events: auto;
  }

  body.tax-tool-route .workspace-session-bar .session-chip {
    width: 100%;
  }

  body.tax-tool-route .tax-tool-compact-head {
    min-height: auto;
    padding: 0;
  }
}

/* Bitcoin network intelligence: flat epoch metrics and one restrained chart surface. */
.network-intelligence-view {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.network-intelligence-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--text-portal-muted);
  font-size: 11px;
  font-weight: 480;
  letter-spacing: 0.04em;
}

.network-intelligence-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.42);
  animation: executiveStatusBreath 2.2s ease-in-out infinite;
}

.network-intelligence-view.is-stale .network-intelligence-status i {
  background: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.34);
}

.network-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-portal-hairline);
  border-bottom: 1px solid var(--border-portal-hairline);
}

.network-intelligence-stat {
  display: grid;
  align-content: center;
  gap: 11px;
  min-width: 0;
  min-height: 148px;
  padding: 24px;
  border-right: 1px solid var(--border-portal-hairline);
  background: transparent;
}

.network-intelligence-stat:last-child {
  border-right: 0;
}

.network-intelligence-stat > span {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-weight: 540;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.network-intelligence-stat strong {
  color: var(--text-portal-primary);
  font-size: clamp(1.25rem, 2.15vw, 2.15rem);
  font-weight: 380;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.network-intelligence-stat strong.is-positive {
  color: #34d399;
}

.network-intelligence-stat strong.is-negative {
  color: #f59e8b;
}

.network-intelligence-stat small {
  color: var(--text-portal-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.network-intelligence-forecast-stat {
  align-content: stretch;
}

.network-intelligence-forecast-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  min-width: 0;
}

.network-intelligence-forecast-values > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-right: 18px;
}

.network-intelligence-forecast-values > div + div {
  padding-right: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border-portal-hairline);
}

.network-intelligence-forecast-label {
  min-height: 2.8em;
  color: var(--text-portal-muted);
  font-family: inherit;
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.network-intelligence-forecast-absolute {
  color: var(--text-portal-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.4;
  opacity: 0.72;
  white-space: nowrap;
}

.network-intelligence-forecast-values strong {
  font-size: clamp(1.15rem, 1.7vw, 1.8rem);
}

.network-difficulty-chart-panel {
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

.network-difficulty-chart-heading,
.network-difficulty-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.network-difficulty-chart-heading span {
  color: var(--text-portal-primary);
  font-size: 14px;
  font-weight: 480;
}

.network-difficulty-chart-heading small,
.network-difficulty-legend {
  color: var(--text-portal-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.network-difficulty-chart-tools,
.network-difficulty-timeframes {
  display: flex;
  align-items: center;
}

.network-difficulty-chart-tools {
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.network-difficulty-timeframes {
  gap: 0;
  border: 1px solid var(--border-portal-hairline);
}

.network-difficulty-timeframes button {
  min-width: 52px;
  min-height: 32px;
  padding: 7px 11px;
  border: 0;
  border-right: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  color: var(--text-portal-muted);
  background: transparent;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.network-difficulty-timeframes button:last-child {
  border-right: 0;
}

.network-difficulty-timeframes button:hover,
.network-difficulty-timeframes button:focus-visible {
  color: var(--text-portal-primary);
  background: color-mix(in srgb, var(--text-portal-primary) 5%, transparent);
}

.network-difficulty-timeframes button.is-active {
  color: var(--bg-portal-canvas);
  background: var(--text-portal-primary);
}

.network-difficulty-chart {
  display: block;
  width: 100% !important;
  height: clamp(360px, 42vw, 520px);
  margin: 0;
  padding: 0;
  touch-action: pan-y;
}

.network-difficulty-chart-stage {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  cursor: crosshair;
}

.network-difficulty-chart-tooltip {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  max-width: min(360px, calc(100% - 16px));
  padding: 9px 11px;
  border: 1px solid var(--border-portal-hairline);
  border-radius: 0 !important;
  color: var(--text-portal-primary);
  background: var(--bg-portal-canvas);
  background: color-mix(in srgb, var(--bg-portal-canvas) 91%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  transform: translate3d(8px, 8px, 0);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  will-change: transform;
}

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

.network-difficulty-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-portal-hairline);
}

.network-difficulty-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.network-difficulty-legend i {
  width: 22px;
  height: 0;
  border-top: 1px solid var(--text-portal-primary);
}

.network-difficulty-legend i.is-prediction,
.network-difficulty-legend i.is-immediate {
  border-top-color: var(--blue);
  border-top-style: dashed;
}

.network-difficulty-legend i.is-extended {
  border-top-color: var(--blue);
  border-top-style: dotted;
  opacity: 0.68;
}

@media (max-width: 900px) {
  .network-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .network-intelligence-stat {
    min-height: 118px;
    border-right: 0;
    border-bottom: 1px solid var(--border-portal-hairline);
  }

  .network-intelligence-stat:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .network-difficulty-chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .network-difficulty-chart-tools {
    justify-content: space-between;
    width: 100%;
  }

  .network-difficulty-chart {
    height: 300px;
  }

  .network-difficulty-chart-heading,
  .network-difficulty-legend {
    padding-right: 14px;
    padding-left: 14px;
  }

  .network-difficulty-chart-tooltip {
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .network-intelligence-status i {
    animation: none;
  }
}

/* Interactive login controls must never inherit an animated hidden layer. */
.login-body .login-form label,
.login-body .login-form input {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
}

.login-body .login-form input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--input-portal-text);
  caret-color: var(--input-portal-text);
  background: var(--input-portal-bg);
  -webkit-text-fill-color: var(--input-portal-text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.login-body .login-form input:focus,
.login-body .login-form input:focus-visible,
.login-body .login-form input:active,
.login-body .login-form input:valid {
  opacity: 1 !important;
  visibility: visible !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--input-portal-text);
  background: var(--input-portal-bg);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.055), 0 10px 30px rgba(0, 0, 0, 0.12);
  outline: none;
  -webkit-text-fill-color: var(--input-portal-text);
}

.login-body .login-form input:-webkit-autofill,
.login-body .login-form input:-webkit-autofill:hover,
.login-body .login-form input:-webkit-autofill:focus,
.login-body .login-form input:-webkit-autofill:active {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: var(--input-portal-text) !important;
  -webkit-box-shadow: 0 0 0 1000px #151b24 inset !important;
  caret-color: var(--input-portal-text);
}

/* Every operational route shares one uninterrupted portal canvas. */
body:not(.portal-home-route) .portal-workspace,
body.data-hub-route .portal-workspace,
body.tax-tool-route .portal-workspace,
body.account-management-route .portal-workspace {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.data-hub-view,
.data-hub-dropzone,
.data-hub-preview,
.tax-tool-hub,
.tax-dashboard,
.settings-tab-panel,
.profile-settings-form,
.credential-settings-panel,
.settings-embedded-form {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.settings-modal-backdrop {
  background: rgba(2, 6, 12, 0.8);
  backdrop-filter: blur(14px) saturate(0.88);
}

.settings-modal-panel {
  border: 1px solid #2b3a4d !important;
  border-radius: 0 !important;
  color: #f8fafc;
  background: #0b0d10 !important;
  box-shadow: 0 30px 96px rgba(0, 0, 0, 0.52) !important;
  backdrop-filter: none !important;
}

.settings-modal-header,
.settings-tabs {
  border-color: #222a36;
}

.settings-modal button,
.settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.settings-modal select,
.settings-modal textarea {
  border-radius: 0 !important;
}

.settings-modal button {
  box-shadow: none;
}

.settings-modal-close {
  border: 1px solid #2b3a4d;
  color: #f8fafc;
  background: #11161d;
}

.settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.settings-modal select,
.settings-modal textarea {
  border: 1px solid #202a36 !important;
  border-bottom-color: #3c536d !important;
  color: #f8fafc;
  background: #0f1318 !important;
}

.settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.settings-modal select:focus,
.settings-modal textarea:focus {
  border-color: #4d6785 !important;
  border-bottom-color: #8ecbff !important;
  box-shadow: 0 0 0 1px rgba(142, 203, 255, 0.13) !important;
  outline: none;
}

.settings-modal .profile-form-grid label span {
  color: #cbd5e1;
  letter-spacing: 0.04em;
  text-transform: none;
}

.settings-modal .profile-actions button[type="submit"] {
  min-height: 44px;
  border: 1px solid #f8fafc;
  border-radius: 0 !important;
  padding: 0 22px;
  color: #0b0d10;
  background: #f8fafc;
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:root[data-theme="light"] .settings-modal-panel {
  border-color: #94a3b8 !important;
  color: #0f172a;
  background: #ffffff !important;
  box-shadow: 0 30px 96px rgba(15, 23, 42, 0.24) !important;
}

:root[data-theme="light"] .settings-modal-header,
:root[data-theme="light"] .settings-tabs {
  border-color: rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] .settings-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="light"] .settings-modal select,
:root[data-theme="light"] .settings-modal textarea {
  border-color: rgba(15, 23, 42, 0.2) !important;
  border-bottom-color: #64748b !important;
  color: #0f172a;
  background: #f8fafc !important;
}

:root[data-theme="light"] .settings-modal .profile-form-grid label span {
  color: #334155;
}

:root[data-theme="light"] .settings-modal .profile-actions button[type="submit"] {
  border-color: #0f172a;
  color: #ffffff;
  background: #0f172a;
}

@media (min-width: 861px) {
  body:not(.portal-home-route) .portal-dashboard-shell {
    gap: 0;
    padding: 0;
  }

  body:not(.portal-home-route) .portal-sidebar {
    top: 0;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-right: 1px solid var(--border-portal-hairline);
    border-radius: 0;
  }
}
