/**
 * Fiscal.ai look-and-feel — scoped under `.fiscal-theme`.
 * Structural language: flat canvas, quiet chrome, no emoji, dense type.
 */

.fiscal-theme {
  --fiscal-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fiscal-font-mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;

  --fiscal-space-1: 8px;
  --fiscal-space-2: 12px;
  --fiscal-space-3: 16px;
  --fiscal-space-4: 20px;
  --fiscal-space-5: 28px;

  --fiscal-radius-xs: 4px;
  --fiscal-radius-sm: 8px;
  --fiscal-radius-md: 12px;

  /* Dark */
  --fiscal-bg: #1c1c21;
  --fiscal-surface: #2c2c35;
  --fiscal-surface-2: #40404f;
  --fiscal-text: #ffffff;
  --fiscal-text-muted: #9a9489;
  --fiscal-text-dimmed: #afafb6;
  --fiscal-border: #39393c;
  --fiscal-border-input: #5e5e74;
  --fiscal-positive: #3db356;
  --fiscal-negative: #ff6262;
  --fiscal-accent: #27aa43;
  --fiscal-primary: #5e5e74;
  --fiscal-primary-hover: #707287;
  --fiscal-header: #28282b;
  --fiscal-link: #89b1ff;

  --bg: var(--fiscal-bg);
  --bg-alt: var(--fiscal-surface);
  --surface: var(--fiscal-surface);
  --surface-muted: var(--fiscal-surface-2);
  --surface-raised: var(--fiscal-surface);
  --border: var(--fiscal-border);
  --text: var(--fiscal-text);
  --text-strong: var(--fiscal-text);
  --muted: var(--fiscal-text-muted);
  --accent: var(--fiscal-primary);
  --accent-hover: var(--fiscal-primary-hover);
  --positive: var(--fiscal-positive);
  --negative: var(--fiscal-negative);
  --danger: var(--fiscal-negative);
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-card: none;
  --shadow-accent: none;
  --shadow-inset: none;
  --input-placeholder: color-mix(in srgb, var(--fiscal-text-muted) 75%, transparent);

  color-scheme: dark;
  font-family: var(--fiscal-font-sans);
  font-size: 14px;
  line-height: 1.45;
  background: var(--fiscal-bg) !important;
  background-image: none !important;
  color: var(--fiscal-text);
  min-height: 100vh;
}

html.light .fiscal-theme,
.fiscal-theme.light {
  --fiscal-bg: #f9f8f6;
  --fiscal-surface: #ffffff;
  --fiscal-surface-2: #e8e6e3;
  --fiscal-text: #000000;
  --fiscal-text-muted: #777169;
  --fiscal-text-dimmed: #9a9489;
  --fiscal-border: #e8e6e3;
  --fiscal-border-input: #c9c6c0;
  --fiscal-positive: #1c6e4f;
  --fiscal-negative: #d4030f;
  --fiscal-accent: #27aa43;
  --fiscal-primary: #777169;
  --fiscal-primary-hover: #5f5a54;
  --fiscal-header: #28282b;
  --fiscal-link: #1f6bff;
  color-scheme: light;
}

/* —— Shell header (opaque, flat) —— */

.fiscal-theme header.fiscal-shell-header {
  background: var(--fiscal-header);
  border-bottom: 1px solid color-mix(in srgb, #ffffff 8%, transparent);
  backdrop-filter: none;
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  min-height: 56px;
}

.fiscal-theme .fiscal-shell-titleblock {
  display: grid;
  gap: 0.1rem;
}

.fiscal-theme .fiscal-shell-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 55%, transparent);
}

.fiscal-theme header.fiscal-shell-header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.fiscal-theme header.fiscal-shell-header .header-nav {
  gap: 1rem;
}

.fiscal-theme header.fiscal-shell-header .nav-link {
  color: color-mix(in srgb, #ffffff 58%, transparent);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.fiscal-theme header.fiscal-shell-header .nav-link:hover {
  color: #ffffff;
  background: transparent;
  border-bottom-color: color-mix(in srgb, #ffffff 35%, transparent);
  text-decoration: none;
}

/* Quiet appearance control — text button, not Blueprint switch */
.fiscal-theme .theme-toggle,
.fiscal-theme header.fiscal-shell-header .theme-toggle {
  display: inline-flex !important;
  margin: 0;
}

.fiscal-theme .fiscal-appearance-toggle {
  appearance: none;
  margin: 0;
  padding: 0.3rem 0.55rem;
  border: 1px solid color-mix(in srgb, #ffffff 16%, transparent);
  border-radius: var(--fiscal-radius-xs);
  background: transparent;
  color: color-mix(in srgb, #ffffff 72%, transparent);
  font-family: var(--fiscal-font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}

.fiscal-theme .fiscal-appearance-toggle:hover {
  color: #ffffff;
  border-color: color-mix(in srgb, #ffffff 28%, transparent);
  background: color-mix(in srgb, #ffffff 6%, transparent);
}

.fiscal-theme .fiscal-appearance-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, #ffffff 40%, transparent);
  outline-offset: 2px;
}

.fiscal-theme header.fiscal-shell-header .auth-signin-btn {
  background: transparent;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  color: #ffffff;
  border-radius: var(--fiscal-radius-sm);
  font-weight: 500;
  font-size: 0.82rem;
  box-shadow: none;
  transform: none;
}

.fiscal-theme header.fiscal-shell-header .auth-signin-btn:hover {
  background: color-mix(in srgb, #ffffff 10%, transparent);
  transform: none;
  box-shadow: none;
}

.fiscal-theme header.fiscal-shell-header .auth-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: transparent;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  box-shadow: none;
  transform: none;
}

.fiscal-theme header.fiscal-shell-header .auth-avatar:hover {
  transform: none;
  box-shadow: none;
  border-color: color-mix(in srgb, #ffffff 30%, transparent);
}

.fiscal-theme header.fiscal-shell-header .auth-avatar__icon svg {
  stroke: #ffffff;
}

.fiscal-theme header.fiscal-shell-header .auth-menu__dropdown {
  background: var(--fiscal-surface);
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
  color: var(--fiscal-text);
}

/* —— Vanilla nav sidebar (quiet, no Blueprint purple) —— */

.fiscal-theme .vnav-sidebar {
  background: var(--fiscal-header);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid color-mix(in srgb, #ffffff 8%, transparent);
  box-shadow: none;
  color: #ffffff;
  font-family: var(--fiscal-font-sans);
}

.fiscal-theme .vnav-brand-mark {
  background: color-mix(in srgb, #ffffff 12%, transparent);
  border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
  box-shadow: none;
  border-radius: var(--fiscal-radius-xs);
  font-weight: 600;
  color: #ffffff;
}

.fiscal-theme .vnav-brand-wordmark {
  color: color-mix(in srgb, #ffffff 88%, transparent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fiscal-theme .vnav-brand-link:focus-visible {
  outline-color: color-mix(in srgb, #ffffff 40%, transparent);
}

.fiscal-theme .vnav-close {
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  color: color-mix(in srgb, #ffffff 55%, transparent);
}

.fiscal-theme .vnav-close:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  color: #ffffff;
}

.fiscal-theme .vnav-cta {
  background: transparent;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
  color: #ffffff;
  font-weight: 500;
}

.fiscal-theme .vnav-cta:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  box-shadow: none;
}

.fiscal-theme .vnav-section-label {
  color: color-mix(in srgb, #ffffff 42%, transparent);
  font-weight: 500;
}

.fiscal-theme .vnav-item {
  color: color-mix(in srgb, #ffffff 58%, transparent);
  border-radius: var(--fiscal-radius-xs);
  border: none;
}

.fiscal-theme .vnav-item:hover {
  background: color-mix(in srgb, #ffffff 7%, transparent);
  color: #ffffff;
}

.fiscal-theme .vnav-item--active {
  color: #ffffff;
  background: color-mix(in srgb, #ffffff 10%, transparent);
  border: none;
  font-weight: 600;
}

.fiscal-theme .vnav-item--active::before {
  background: var(--fiscal-accent);
  width: 2px;
  border-radius: 0;
}

.fiscal-theme .vnav-footer {
  border-top-color: color-mix(in srgb, #ffffff 10%, transparent);
}

.fiscal-theme .vnav-footer-avatar {
  background: color-mix(in srgb, #ffffff 10%, transparent);
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  color: #ffffff;
  border-radius: var(--fiscal-radius-xs);
}

.fiscal-theme .vnav-footer-name {
  color: #ffffff;
}

.fiscal-theme .vnav-footer-sub {
  color: color-mix(in srgb, #ffffff 45%, transparent);
}

.fiscal-theme .vnav-icon-btn {
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  background: transparent;
  color: color-mix(in srgb, #ffffff 60%, transparent);
  box-shadow: none;
}

.fiscal-theme .vnav-icon-btn--danger:hover {
  background: color-mix(in srgb, var(--fiscal-negative) 14%, transparent);
  color: var(--fiscal-negative);
  border-color: color-mix(in srgb, var(--fiscal-negative) 30%, transparent);
}

.fiscal-theme .vnav-hamburger {
  background: var(--fiscal-header);
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  color: #ffffff;
  box-shadow: none;
  border-radius: var(--fiscal-radius-xs);
}

.fiscal-theme .vnav-hamburger:hover {
  background: color-mix(in srgb, var(--fiscal-header) 85%, #ffffff 15%);
}

/* —— React NavSidebar (KAN-44) — mirror .vnav-* onto .nav-sidebar__* —— */

.fiscal-theme .nav-sidebar {
  background: var(--fiscal-header);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid color-mix(in srgb, #ffffff 8%, transparent);
  box-shadow: none;
  color: #ffffff;
  font-family: var(--fiscal-font-sans);
}

.fiscal-theme .nav-sidebar__brand-mark {
  background: color-mix(in srgb, #ffffff 12%, transparent);
  border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
  background-image: none;
  box-shadow: none;
  border-radius: var(--fiscal-radius-xs);
  font-weight: 600;
  color: #ffffff;
}

.fiscal-theme .nav-sidebar__brand-wordmark {
  color: color-mix(in srgb, #ffffff 88%, transparent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fiscal-theme .nav-sidebar__brand-link:focus-visible {
  outline-color: color-mix(in srgb, #ffffff 40%, transparent);
}

.fiscal-theme .nav-sidebar__close {
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  color: color-mix(in srgb, #ffffff 55%, transparent);
  box-shadow: none;
}

.fiscal-theme .nav-sidebar__close:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  color: #ffffff;
}

.fiscal-theme .nav-sidebar__cta {
  background: transparent;
  background-image: none;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
  color: #ffffff;
  font-weight: 500;
}

.fiscal-theme .nav-sidebar__cta:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  background-image: none;
  box-shadow: none;
}

.fiscal-theme .nav-sidebar__section-label {
  color: color-mix(in srgb, #ffffff 42%, transparent);
  font-weight: 500;
}

.fiscal-theme .nav-sidebar__item {
  color: color-mix(in srgb, #ffffff 58%, transparent);
  border-radius: var(--fiscal-radius-xs);
  border: none;
}

.fiscal-theme .nav-sidebar__item:hover {
  background: color-mix(in srgb, #ffffff 7%, transparent);
  color: #ffffff;
}

.fiscal-theme .nav-sidebar__item--active {
  color: #ffffff;
  background: color-mix(in srgb, #ffffff 10%, transparent);
  border: none;
  font-weight: 600;
}

.fiscal-theme .nav-sidebar__item--active::before {
  background: var(--fiscal-accent);
  width: 2px;
  border-radius: 0;
}

.fiscal-theme .nav-sidebar__footer {
  border-top-color: color-mix(in srgb, #ffffff 10%, transparent);
}

.fiscal-theme .nav-sidebar__footer-avatar,
.fiscal-theme .nav-sidebar__avatar {
  background: color-mix(in srgb, #ffffff 10%, transparent);
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  color: #ffffff;
  border-radius: var(--fiscal-radius-xs);
  box-shadow: none;
}

.fiscal-theme .nav-sidebar__footer-name,
.fiscal-theme .nav-sidebar__user-name {
  color: #ffffff;
}

.fiscal-theme .nav-sidebar__footer-sub,
.fiscal-theme .nav-sidebar__user-sub {
  color: color-mix(in srgb, #ffffff 45%, transparent);
}

.fiscal-theme .nav-sidebar__icon-btn,
.fiscal-theme .react-hamburger {
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  background: transparent;
  color: color-mix(in srgb, #ffffff 60%, transparent);
  box-shadow: none;
}

.fiscal-theme .react-hamburger {
  background: var(--fiscal-header);
  color: #ffffff;
  border-radius: var(--fiscal-radius-xs);
}

.fiscal-theme .react-hamburger:hover {
  background: color-mix(in srgb, var(--fiscal-header) 85%, #ffffff 15%);
}

.fiscal-theme .react-hamburger svg {
  stroke: #ffffff;
}

/* —— React Header (KAN-44) —— */

.fiscal-theme header.react-header {
  background: var(--fiscal-header);
  color: #ffffff;
  border-bottom: 1px solid color-mix(in srgb, #ffffff 8%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  font-family: var(--fiscal-font-sans);
}

.fiscal-theme header.react-header .brand__name {
  color: #ffffff;
  font-weight: 600;
}

.fiscal-theme header.react-header .header-new-projection {
  background: transparent;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
  color: #ffffff;
  font-weight: 500;
}

.fiscal-theme header.react-header .header-new-projection:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  box-shadow: none;
}

.fiscal-theme header.react-header .auth-signin-btn,
.fiscal-theme header.react-header .react-avatar,
.fiscal-theme header.react-header .notification-bell {
  box-shadow: none;
  background-image: none;
}

.fiscal-theme header.react-header .auth-signin-btn {
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
  border-radius: var(--fiscal-radius-sm);
  background: transparent;
  color: #ffffff;
}

.fiscal-theme header.react-header .react-avatar {
  border-radius: var(--fiscal-radius-xs);
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  background: color-mix(in srgb, #ffffff 10%, transparent);
  backdrop-filter: none;
}

.fiscal-theme header.react-header .notification-bell {
  border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
  border-radius: var(--fiscal-radius-xs);
  background: transparent;
  color: #ffffff;
}

.fiscal-theme header.react-header .notification-badge {
  background: var(--fiscal-accent);
  color: #ffffff;
  box-shadow: none;
}

.fiscal-theme header.react-header .theme-toggle {
  display: block;
}

/*
 * Desktop: rail owns brand/nav/account — hide the sticky React header so we
 * don't double "Investor Blueprint". Light/Dark lives in the sidebar footer.
 * Mobile (<1200px): keep the header (hamburger + brand + Light).
 */
@media (min-width: 1200px) {
  body.fiscal-theme:has(.nav-sidebar) header.react-header {
    display: none;
  }
}

.fiscal-theme .nav-hamburger {
  border-color: color-mix(in srgb, #ffffff 14%, transparent);
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  border-radius: var(--fiscal-radius-xs);
}

.fiscal-theme .nav-hamburger:hover {
  background: color-mix(in srgb, #ffffff 8%, transparent);
  color: #ffffff;
}

.fiscal-theme .nav-hamburger svg {
  stroke: #ffffff;
}

.fiscal-theme .nav-sidebar__appearance,
.fiscal-theme .vnav-appearance {
  display: flex;
  margin-top: 0.35rem;
  padding: 0.45rem 0.15rem 0;
  border-top: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
}

.fiscal-theme .nav-sidebar__appearance .fiscal-appearance-toggle,
.fiscal-theme .vnav-appearance .fiscal-appearance-toggle {
  width: 100%;
  text-align: center;
}

/* —— Page canvas —— */

.fiscal-theme main.fiscal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.fiscal-theme.admin-holdings-page main.t212-admin-container {
  max-width: var(--page-content-max, none);
  width: 100%;
  margin: 0;
  padding: 1.5rem var(--page-content-pad-x, 16px) 3rem;
  box-sizing: border-box;
}

.fiscal-theme .fiscal-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.fiscal-theme .fiscal-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0 0 1.1rem;
  min-height: 0;
  position: static;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--fiscal-border);
  border-radius: 0;
  backdrop-filter: none;
  color: inherit;
  box-shadow: none;
}

.fiscal-theme .fiscal-panel__header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fiscal-text);
}

.fiscal-theme .fiscal-panel__subtitle {
  margin: 0.35rem 0 0;
  max-width: 36rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fiscal-text-muted);
  line-height: 1.5;
}

.fiscal-theme .fiscal-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  font-size: 0.8125rem;
  padding-top: 0.15rem;
}

.fiscal-theme .fiscal-status__label {
  color: var(--fiscal-text-muted);
  font-weight: 500;
}

.fiscal-theme .fiscal-status__value {
  color: var(--fiscal-text);
  font-weight: 600;
}

.fiscal-theme .fiscal-status__value[data-state="connected"] {
  color: var(--fiscal-positive);
}

.fiscal-theme .fiscal-status__value[data-state="error"] {
  color: var(--fiscal-negative);
}

.fiscal-theme .fiscal-status__value[data-state="empty"] {
  color: var(--fiscal-text-muted);
  font-weight: 500;
}

.fiscal-theme .fiscal-status__meta {
  color: var(--fiscal-text-muted);
  font-weight: 400;
}

.fiscal-theme main a:not(.t212-btn) {
  color: var(--fiscal-link);
  font-weight: 500;
  text-decoration: none;
}

.fiscal-theme main a:not(.t212-btn):hover {
  text-decoration: underline;
}

/* —— Form —— */

.fiscal-theme .t212-creds-form {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
}

.fiscal-theme .t212-input-group {
  display: grid;
  gap: 0.4rem;
}

.fiscal-theme .t212-input-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-input-label__text {
  flex: 1;
}

.fiscal-theme .t212-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.fiscal-theme .t212-input {
  flex: 1;
  height: 40px;
  padding: 0 4.25rem 0 0.85rem;
  border-radius: var(--fiscal-radius-sm);
  border: 1px solid var(--fiscal-border-input);
  background: var(--fiscal-surface);
  color: var(--fiscal-text);
  font-size: 0.875rem;
  font-family: var(--fiscal-font-mono);
  font-weight: 400;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
  outline: none;
  box-shadow: none;
}

html.light .fiscal-theme .t212-input,
.fiscal-theme.light .t212-input {
  background: var(--fiscal-bg);
}

.fiscal-theme .t212-input::placeholder {
  color: var(--fiscal-text-muted);
  opacity: 0.65;
  font-family: var(--fiscal-font-sans);
}

.fiscal-theme .t212-input:focus {
  border-color: var(--fiscal-text-dimmed);
  background: var(--fiscal-surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fiscal-text-dimmed) 45%, transparent);
}

.fiscal-theme .t212-input:not(:placeholder-shown) {
  border-color: var(--fiscal-border-input);
}

.fiscal-theme .t212-input-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  min-width: 3.25rem;
  height: 28px;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--fiscal-radius-xs);
  cursor: pointer;
  color: var(--fiscal-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--fiscal-font-sans);
}

.fiscal-theme .t212-input-toggle:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 55%, transparent);
  color: var(--fiscal-text);
}

.fiscal-theme .t212-input-toggle__icon {
  font-size: inherit;
  opacity: 1;
}

.fiscal-theme .t212-message {
  padding: 0.7rem 0.85rem;
  border-radius: var(--fiscal-radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.fiscal-theme .t212-message--error {
  background: color-mix(in srgb, var(--fiscal-negative) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--fiscal-negative) 28%, transparent);
  color: var(--fiscal-negative);
}

.fiscal-theme .t212-message--success {
  background: color-mix(in srgb, var(--fiscal-positive) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--fiscal-positive) 28%, transparent);
  color: var(--fiscal-positive);
}

.fiscal-theme .t212-creds-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.fiscal-theme .t212-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 0.95rem;
  border-radius: var(--fiscal-radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  font-family: var(--fiscal-font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
  transform: none;
  box-shadow: none;
}

.fiscal-theme .t212-btn--primary {
  background: var(--fiscal-primary);
  color: #ffffff;
}

.fiscal-theme .t212-btn--primary:hover {
  background: var(--fiscal-primary-hover);
  transform: none;
  box-shadow: none;
}

.fiscal-theme .t212-btn--primary:active {
  transform: none;
}

.fiscal-theme .t212-btn--primary:focus-visible {
  outline: 2px solid var(--fiscal-text-dimmed);
  outline-offset: 2px;
}

.fiscal-theme .t212-btn--secondary {
  background: transparent;
  color: var(--fiscal-text);
  border-color: var(--fiscal-border);
}

.fiscal-theme .t212-btn--secondary:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 40%, transparent);
  border-color: var(--fiscal-border-input);
}

/* —— Collapsed help —— */

.fiscal-theme .t212-guide {
  margin: 1.75rem 0 0;
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-md);
  background: var(--fiscal-surface);
  overflow: hidden;
}

.fiscal-theme .t212-guide__toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--fiscal-text);
  transition: background-color 0.1s ease;
}

.fiscal-theme .t212-guide__toggle::-webkit-details-marker {
  display: none;
}

.fiscal-theme .t212-guide__toggle:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 35%, transparent);
}

.fiscal-theme .t212-guide__title {
  flex: 1;
  font-size: inherit;
}

.fiscal-theme .t212-guide__arrow {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--fiscal-text-muted);
  border-bottom: 1.5px solid var(--fiscal-text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.8;
}

.fiscal-theme .t212-guide[open] .t212-guide__arrow {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}

.fiscal-theme .t212-guide__content {
  padding: 0 0.95rem 1rem;
  border-top: 1px solid var(--fiscal-border);
  animation: none;
}

.fiscal-theme .t212-guide__steps {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.5;
}

.fiscal-theme .t212-guide__step {
  margin-bottom: 1rem;
}

.fiscal-theme .t212-guide__step:last-child {
  margin-bottom: 0;
}

.fiscal-theme .t212-guide__step strong {
  color: var(--fiscal-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.fiscal-theme .t212-guide__step p {
  margin: 0.25rem 0 0;
  color: var(--fiscal-text-muted);
  font-size: 0.8125rem;
}

.fiscal-theme .t212-guide__step ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--fiscal-text-muted);
  font-size: 0.8125rem;
}

.fiscal-theme .t212-guide__permissions {
  list-style: none;
  padding-left: 0;
  margin-top: 0.55rem;
}

.fiscal-theme .t212-guide__permissions--checklist {
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  overflow: hidden;
  background: color-mix(in srgb, var(--fiscal-bg) 55%, var(--fiscal-surface));
}

.fiscal-theme .t212-guide__permissions--checklist .t212-perm {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--fiscal-border);
  font-family: inherit;
  background: transparent;
}

.fiscal-theme .t212-guide__permissions--checklist .t212-perm:last-child {
  border-bottom: none;
}

.fiscal-theme .t212-perm--on {
  background: transparent !important;
}

.fiscal-theme .t212-perm--off {
  background: transparent !important;
  opacity: 0.55;
}

.fiscal-theme .t212-perm__icon {
  font-size: 0.55rem;
  width: 0.75rem;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.fiscal-theme .t212-perm--on .t212-perm__icon {
  color: var(--fiscal-positive);
}

.fiscal-theme .t212-perm--off .t212-perm__icon {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-perm__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fiscal-text);
  flex-shrink: 0;
  min-width: 9.5rem;
}

.fiscal-theme .t212-perm--off .t212-perm__name {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-perm__note {
  font-size: 0.75rem;
  color: var(--fiscal-text-muted);
  opacity: 1;
  font-weight: 400;
}

.fiscal-theme .t212-guide__warning,
.fiscal-theme .t212-guide__note {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--fiscal-radius-sm);
  font-size: 0.8125rem;
  line-height: 1.45;
  border-left: 2px solid var(--fiscal-negative);
  background: color-mix(in srgb, var(--fiscal-negative) 8%, transparent);
  color: var(--fiscal-text);
}

.fiscal-theme .t212-guide__note {
  border-left-color: var(--fiscal-accent);
  background: color-mix(in srgb, var(--fiscal-accent) 8%, transparent);
}

.fiscal-theme .t212-guide__help {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--fiscal-radius-sm);
  background: color-mix(in srgb, var(--fiscal-bg) 65%, transparent);
  border: 1px solid var(--fiscal-border);
  font-size: 0.8125rem;
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-guide__help strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--fiscal-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.fiscal-theme .t212-guide__help ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.fiscal-theme .t212-guide__help li {
  margin: 0.25rem 0;
}

.fiscal-theme .t212-guide__on-hint {
  color: var(--fiscal-positive);
  font-weight: 600;
}

@media (max-width: 640px) {
  .fiscal-theme main.fiscal-page,
  .fiscal-theme.admin-holdings-page main.t212-admin-container {
    padding: 1.25rem 1rem 2.5rem;
  }

  .fiscal-theme .fiscal-panel__header {
    flex-direction: column;
  }

  .fiscal-theme .t212-perm__name {
    min-width: 0;
  }

  .fiscal-theme .t212-add-account__grid {
    grid-template-columns: 1fr;
  }
}

/* Kill Blueprint blue button glow from styles.css `button { box-shadow: …254… }` */
.fiscal-theme button,
.fiscal-theme button:hover,
.fiscal-theme button:focus,
.fiscal-theme button:active {
  box-shadow: none;
  transform: none;
  background-image: none;
}

.fiscal-theme button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fiscal-primary) 45%, transparent);
  outline-offset: 2px;
}

/* —— /t212-admin portfolio (flatten Blueprint dashboard chrome) —— */

.fiscal-theme .t212-dashboard-shell {
  margin-bottom: 1.75rem;
  padding: 0 0 1.25rem;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--fiscal-border);
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.fiscal-theme .t212-dashboard-shell::before {
  display: none;
}

.fiscal-theme .t212-dashboard-heading {
  margin-bottom: 1.1rem;
  gap: 0.75rem 1.25rem;
}

.fiscal-theme .t212-dashboard-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-dashboard-subtitle,
.fiscal-theme .t212-section-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fiscal-text-muted);
  line-height: 1.45;
}

.fiscal-theme .t212-section-subtitle a {
  color: var(--fiscal-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--fiscal-text-muted) 55%, transparent);
}

.fiscal-theme .t212-section-subtitle a:hover {
  color: var(--fiscal-text);
  text-decoration-color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-accounts-empty {
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-accounts-empty--error {
  color: var(--fiscal-negative);
}

.fiscal-theme .t212-accounts-table thead {
  background: color-mix(in srgb, var(--fiscal-bg) 70%, var(--fiscal-surface));
  border-bottom: 1px solid var(--fiscal-border);
}

.fiscal-theme .t212-accounts-table th {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-accounts-table__name {
  font-weight: 600;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-accounts-table__id {
  font-family: var(--fiscal-font-mono);
  font-size: 0.75rem;
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-accounts-table__email {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-accounts-table__email--warn {
  color: #d97706;
}

.fiscal-theme .t212-accounts-table__actions {
  text-align: right;
}

.fiscal-theme .t212-accounts-table__remove {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
}

.fiscal-theme .t212-dashboard-sync {
  padding-top: 0.35rem;
  font-size: 0.75rem;
  font-family: var(--fiscal-font-mono);
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-summary-total,
.fiscal-theme .t212-summary-metric {
  min-height: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--fiscal-radius-sm);
  border: 1px solid var(--fiscal-border);
  background: var(--fiscal-surface);
  box-shadow: none;
}

.fiscal-theme .t212-summary-total .label,
.fiscal-theme .t212-summary-metric .label {
  color: var(--fiscal-text-muted);
  letter-spacing: 0.06em;
}

.fiscal-theme .t212-summary-total .value,
.fiscal-theme .t212-summary-metric .value {
  font-family: var(--fiscal-font-mono);
  color: var(--fiscal-text);
}

.fiscal-theme .t212-summary-total .value.default,
.fiscal-theme .t212-summary-metric .value.default {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-summary-total .value.positive,
.fiscal-theme .t212-summary-metric .value.positive,
.fiscal-theme .t212-table td.positive {
  color: var(--fiscal-positive);
}

.fiscal-theme .t212-summary-total .value.negative,
.fiscal-theme .t212-summary-metric .value.negative,
.fiscal-theme .t212-table td.negative {
  color: var(--fiscal-negative);
}

.fiscal-theme .t212-summary-total .meta,
.fiscal-theme .t212-summary-metric .meta {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-chart-card {
  border-radius: var(--fiscal-radius-sm);
  border: 1px solid var(--fiscal-border);
  background: var(--fiscal-surface);
  box-shadow: none;
}

.fiscal-theme .t212-chart-card__title {
  color: var(--fiscal-text-muted);
  letter-spacing: 0.06em;
}

.fiscal-theme .t212-chart-canvas--empty,
.fiscal-theme .t212-alloc-chart-wrap.t212-chart-canvas--empty {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-allocation-legend-item {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-allocation-legend-value {
  color: var(--fiscal-text-muted);
  font-family: var(--fiscal-font-mono);
}

.fiscal-theme .t212-cred-banner {
  border-radius: var(--fiscal-radius-sm);
  font-size: 0.8125rem;
}

.fiscal-theme .t212-cred-banner--warn {
  background: color-mix(in srgb, #f59e0b 10%, transparent);
  border-color: color-mix(in srgb, #f59e0b 35%, transparent);
  color: #d97706;
}

html.light .fiscal-theme .t212-cred-banner--warn {
  color: #b45309;
}

.fiscal-theme .t212-cred-banner--shared {
  background: color-mix(in srgb, var(--fiscal-surface-2) 55%, transparent);
  border-color: var(--fiscal-border);
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-cred-banner__icon {
  display: none;
}

.fiscal-theme .t212-cred-banner__cta {
  color: inherit;
  font-weight: 500;
}

.fiscal-theme .t212-data-checklist {
  gap: 0.65rem 1.1rem;
  margin-bottom: 1rem;
}

.fiscal-theme .t212-data-check {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.35rem;
}

.fiscal-theme .t212-data-check--ok {
  color: var(--fiscal-positive);
  background: transparent;
  border: none;
}

.fiscal-theme .t212-data-check--fail {
  color: var(--fiscal-negative);
  background: transparent;
  border: none;
}

.fiscal-theme .t212-data-check--pending {
  color: #d97706;
  background: transparent;
  border: none;
}

.fiscal-theme .t212-data-check--idle {
  color: var(--fiscal-text-muted);
  background: transparent;
  border: none;
}

.fiscal-theme .t212-section {
  margin-bottom: 2rem;
  padding-top: 0.25rem;
}

.fiscal-theme .t212-section-header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--fiscal-border);
  align-items: flex-start;
}

.fiscal-theme .t212-section-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-filters {
  gap: 0.5rem;
}

.fiscal-theme .t212-filter-input,
.fiscal-theme .t212-add-account__field input {
  border-radius: var(--fiscal-radius-sm);
  border: 1px solid var(--fiscal-border-input);
  background: var(--fiscal-bg);
  color: var(--fiscal-text);
  font-family: var(--fiscal-font-sans);
  font-size: 0.8125rem;
  min-height: 36px;
  box-shadow: none;
}

.fiscal-theme .t212-filter-input:focus,
.fiscal-theme .t212-add-account__field input:focus {
  border-color: var(--fiscal-primary);
  background: var(--fiscal-bg);
  outline: 2px solid color-mix(in srgb, var(--fiscal-primary) 35%, transparent);
  outline-offset: 1px;
}

.fiscal-theme .t212-filter-button,
.fiscal-theme .t212-search-btn {
  border-radius: var(--fiscal-radius-sm);
  border: 1px solid var(--fiscal-border);
  background: transparent;
  color: var(--fiscal-text);
  font-family: var(--fiscal-font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: none;
  transform: none;
}

.fiscal-theme .t212-filter-button:hover,
.fiscal-theme .t212-search-btn:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 55%, transparent);
  border-color: var(--fiscal-border-input);
  transform: none;
}

.fiscal-theme .t212-filter-button.active {
  background: color-mix(in srgb, var(--fiscal-primary) 22%, transparent);
  border-color: var(--fiscal-primary);
  color: var(--fiscal-text);
}

.fiscal-theme .t212-filter-button--primary {
  background: var(--fiscal-primary);
  border-color: var(--fiscal-primary);
  color: #ffffff;
}

.fiscal-theme .t212-filter-button--primary:hover {
  background: var(--fiscal-primary-hover);
  border-color: var(--fiscal-primary-hover);
}

.fiscal-theme .t212-filter-button--danger {
  color: var(--fiscal-negative);
  border-color: color-mix(in srgb, var(--fiscal-negative) 35%, var(--fiscal-border));
}

.fiscal-theme .t212-search-group .t212-filter-input {
  border-radius: var(--fiscal-radius-sm) 0 0 var(--fiscal-radius-sm);
}

.fiscal-theme .t212-search-btn {
  border-radius: 0 var(--fiscal-radius-sm) var(--fiscal-radius-sm) 0;
  border-color: var(--fiscal-border);
  background: transparent;
}

.fiscal-theme .t212-table-container {
  background: var(--fiscal-surface);
  backdrop-filter: none;
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
}

.fiscal-theme .t212-table thead {
  background: color-mix(in srgb, var(--fiscal-bg) 55%, var(--fiscal-surface));
  border-bottom: 1px solid var(--fiscal-border);
}

.fiscal-theme .t212-table th {
  color: var(--fiscal-text-muted);
  font-weight: 500;
}

.fiscal-theme .t212-table tbody tr {
  border-bottom-color: var(--fiscal-border);
}

.fiscal-theme .t212-table tbody tr:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 35%, transparent);
}

.fiscal-theme .t212-table td {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-table td.ticker {
  font-family: var(--fiscal-font-mono);
  color: var(--fiscal-text);
}

.fiscal-theme .t212-table td.ticker .ticker-secondary {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-table td.ticker .ticker-link:focus-visible {
  outline-color: var(--fiscal-primary);
}

.fiscal-theme .t212-table td.neutral {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-badge {
  padding: 0.15rem 0.45rem;
  border-radius: var(--fiscal-radius-xs);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid var(--fiscal-border);
}

.fiscal-theme .t212-badge.buy {
  background: color-mix(in srgb, var(--fiscal-positive) 12%, transparent);
  color: var(--fiscal-positive);
  border-color: color-mix(in srgb, var(--fiscal-positive) 35%, transparent);
}

.fiscal-theme .t212-badge.sell {
  background: color-mix(in srgb, var(--fiscal-negative) 12%, transparent);
  color: var(--fiscal-negative);
  border-color: color-mix(in srgb, var(--fiscal-negative) 35%, transparent);
}

.fiscal-theme .t212-empty {
  color: var(--fiscal-text-muted);
  font-size: 0.875rem;
  padding: 1.75rem 1.25rem;
}

.fiscal-theme .t212-filter-input {
  flex: 0 0 auto;
  min-width: 0;
  transform: none;
  box-shadow: none;
}

.fiscal-theme .t212-add-account {
  margin-top: 0.5rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  background: var(--fiscal-surface);
}

.fiscal-theme .t212-add-account__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-add-account__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  align-items: start;
}

.fiscal-theme .t212-add-account__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fiscal-theme .t212-add-account__field label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--fiscal-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fiscal-theme .t212-add-account__hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  opacity: 0.85;
}

.fiscal-theme .t212-add-account__field input {
  /* Defeat styles.css `input[type=text] { flex: 1 1 220px }` in column flex fields */
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  transform: none;
  box-shadow: none;
}

/* Without .fiscal-theme, add-account still needs usable layout on this page */
.t212-add-account {
  margin-top: 0.5rem;
  padding: 1.1rem 1rem;
  border: 1px solid rgba(55, 78, 131, 0.5);
  border-radius: 16px;
  background: rgba(7, 17, 45, 0.7);
}

.t212-add-account__title {
  margin: 0 0 0.85rem;
  font-size: 15px;
  font-weight: 600;
}

.t212-add-account__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.t212-add-account__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.t212-add-account__field label {
  font-size: 10px;
  color: rgba(153, 169, 200, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.t212-add-account__field input {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #fff);
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  transform: none;
}

.t212-dashboard-subtitle,
.t212-section-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.t212-section-subtitle a {
  color: rgba(102, 126, 234, 0.9);
}

/* —— /t212-trade-events (KAN-46) —— */

.fiscal-theme .t212-events-shell {
  max-width: var(--page-content-max, none);
  width: 100%;
  padding: 1.25rem var(--page-content-pad-x, 16px) 2rem;
  box-sizing: border-box;
}

.fiscal-theme .t212-events-card {
  background: var(--fiscal-surface);
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  overflow: visible;
}

.fiscal-theme .t212-events-card::before {
  display: none;
}

.fiscal-theme .t212-events-header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--fiscal-border);
}

.fiscal-theme .t212-events-header h2,
.fiscal-theme .t212-events-section-title {
  font-family: var(--fiscal-font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-subtitle,
.fiscal-theme .t212-events-panel__header p {
  color: var(--fiscal-text-muted);
  font-size: 0.8125rem;
}

.fiscal-theme .t212-events-summary {
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  background: color-mix(in srgb, var(--fiscal-bg) 55%, var(--fiscal-surface));
  box-shadow: none;
  margin-bottom: 1rem;
}

.fiscal-theme .t212-events-pill {
  padding: 0.7rem 0.85rem;
  border-right-color: var(--fiscal-border);
}

.fiscal-theme .t212-events-pill__label {
  color: var(--fiscal-text-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.fiscal-theme .t212-events-pill__value {
  font-family: var(--fiscal-font-sans);
  font-weight: 600;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-pill__meta {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-panel {
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  background: transparent;
  box-shadow: none;
  padding: 1rem;
}

.fiscal-theme .t212-events-field label {
  color: var(--fiscal-text-muted);
  font-weight: 500;
}

.fiscal-theme .t212-events-field input,
.fiscal-theme .t212-events-field textarea,
.fiscal-theme .t212-events-field select,
.fiscal-theme .t212-events-subscriber-phone input {
  background: var(--fiscal-bg);
  border: 1px solid var(--fiscal-border-input);
  border-radius: var(--fiscal-radius-sm);
  color: var(--fiscal-text);
  font-family: var(--fiscal-font-sans);
  box-shadow: none;
}

.fiscal-theme .t212-events-field input:focus,
.fiscal-theme .t212-events-field textarea:focus,
.fiscal-theme .t212-events-field select:focus,
.fiscal-theme .t212-events-subscriber-phone input:focus {
  border-color: var(--fiscal-primary);
  background: var(--fiscal-bg);
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--fiscal-primary) 35%, transparent);
  outline-offset: 1px;
}

.fiscal-theme .t212-events-field small,
.fiscal-theme .t212-events-inline label {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-inline input[type="checkbox"],
.fiscal-theme .t212-events-subscriber-toggle input[type="checkbox"] {
  accent-color: var(--fiscal-primary);
}

.fiscal-theme .t212-events-button {
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  background: transparent;
  color: var(--fiscal-text);
  font-family: var(--fiscal-font-sans);
  font-weight: 500;
  box-shadow: none;
  transform: none;
}

.fiscal-theme .t212-events-button:hover {
  background: color-mix(in srgb, var(--fiscal-surface-2) 55%, transparent);
  border-color: var(--fiscal-border-input);
  box-shadow: none;
  transform: none;
}

.fiscal-theme .t212-events-button--primary {
  background: var(--fiscal-primary);
  border-color: var(--fiscal-primary);
  color: #ffffff;
  background-image: none;
}

.fiscal-theme .t212-events-button--primary:hover {
  background: var(--fiscal-primary-hover);
  border-color: var(--fiscal-primary-hover);
  color: #ffffff;
}

.fiscal-theme .t212-events-button--secondary {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-button--danger {
  color: var(--fiscal-negative);
  border-color: color-mix(in srgb, var(--fiscal-negative) 35%, var(--fiscal-border));
}

.fiscal-theme .t212-events-note {
  background: color-mix(in srgb, var(--fiscal-bg) 60%, var(--fiscal-surface));
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-note strong {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-note code {
  background: var(--fiscal-bg);
  border-radius: var(--fiscal-radius-xs);
  color: var(--fiscal-text);
  font-family: var(--fiscal-font-mono);
}

.fiscal-theme .t212-events-empty {
  border: 1px dashed var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  background: transparent;
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--fiscal-radius-xs);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--fiscal-border);
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-status[data-side="BUY"],
.fiscal-theme .t212-events-status[data-notification="delivered"],
.fiscal-theme .t212-events-status[data-notification="read"] {
  background: color-mix(in srgb, var(--fiscal-positive) 10%, transparent);
  border-color: color-mix(in srgb, var(--fiscal-positive) 35%, transparent);
  color: var(--fiscal-positive);
}

.fiscal-theme .t212-events-status[data-side="SELL"],
.fiscal-theme .t212-events-status[data-notification="failed"],
.fiscal-theme .t212-events-status[data-notification="partial_failed"] {
  background: color-mix(in srgb, var(--fiscal-negative) 10%, transparent);
  border-color: color-mix(in srgb, var(--fiscal-negative) 35%, transparent);
  color: var(--fiscal-negative);
}

.fiscal-theme .t212-events-status[data-notification="queued"],
.fiscal-theme .t212-events-status[data-notification="logged_only"],
.fiscal-theme .t212-events-status[data-notification="config_missing"],
.fiscal-theme .t212-events-status[data-notification="no_subscribers"] {
  background: transparent;
  border-color: var(--fiscal-border);
  color: #d97706;
}

.fiscal-theme .t212-events-subscriber-name {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-subscriber-toggle,
.fiscal-theme .t212-events-subscriber-meta,
.fiscal-theme .t212-events-day__count {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-day__title {
  color: var(--fiscal-text);
  font-weight: 600;
}

.fiscal-theme .t212-events-day-row td {
  border-top-color: var(--fiscal-border);
}

.fiscal-theme .t212-events-table th {
  color: var(--fiscal-text-muted);
  font-weight: 500;
}

.fiscal-theme .t212-events-table td {
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-table tr:not(.t212-events-day-row) td:first-child {
  font-family: var(--fiscal-font-mono);
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-table tr:not(.t212-events-day-row) td:nth-child(3) {
  font-family: var(--fiscal-font-mono);
  font-weight: 600;
  color: var(--fiscal-text);
}

.fiscal-theme .t212-events-table td small,
.fiscal-theme .t212-events-table tr:not(.t212-events-day-row) td:last-child {
  color: var(--fiscal-text-muted);
}

.fiscal-theme .t212-events-table .t212-table-container,
.fiscal-theme .t212-events-shell .t212-table-container {
  background: var(--fiscal-surface);
  border: 1px solid var(--fiscal-border);
  border-radius: var(--fiscal-radius-sm);
  box-shadow: none;
}
