:root {
  --bg: #07080d;
  --panel: #101119;
  --panel-soft: #151620;
  --line: #242737;
  --text: #f4f7ff;
  --muted: #727992;
  --gold: #f5b933;
  --green: #71f08a;
  --red: #ff7676;
  --blue: #6caeff;
  --cyan: #4de1da;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -16%, rgba(118, 129, 155, 0.2), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(245, 185, 51, 0.06), transparent 24%),
    linear-gradient(180deg, #17191f 0%, #0c0d12 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}

.auth-checking .dashboard,
.auth-required .dashboard {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 8%, rgba(245, 185, 51, 0.18), transparent 28%),
    rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(16px);
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  width: min(430px, 100%);
  display: grid;
  gap: 13px;
  padding: 24px;
  border: 1px solid rgba(245, 185, 51, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(24, 26, 33, 0.98), rgba(8, 9, 14, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.auth-card p {
  margin: 0;
  color: #aab2c6;
  line-height: 1.45;
  font-size: 13px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: #d7dff1;
  font-size: 12px;
  font-weight: 700;
}

.auth-card input,
.auth-card select {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(3, 5, 10, 0.82);
  color: #f8fbff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.auth-card button,
.security-user-form button,
.security-device-list button {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd66b, #f5b933);
  color: #121318;
  font-weight: 850;
  cursor: pointer;
}

.auth-status {
  min-height: 20px;
  color: #ffd66b !important;
}

.hidden {
  display: none !important;
}

body[data-theme="midnight"] {
  --panel: #0f1322;
  --panel-soft: #171d31;
  --line: #2b3554;
  --gold: #8fb6ff;
  --green: #77e8b0;
  --red: #ff8da1;
  --blue: #7aa7ff;
  --cyan: #78e7ff;
  background:
    radial-gradient(circle at 80% -10%, rgba(143, 182, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #131827 0%, #0a0d15 100%);
}

body[data-theme="emerald"] {
  --panel: #0e1815;
  --panel-soft: #16241f;
  --line: #263f35;
  --gold: #ffcf70;
  --green: #76f7a4;
  --red: #ff8b8b;
  --blue: #74c3ff;
  --cyan: #54ead9;
  background:
    radial-gradient(circle at 12% 0%, rgba(118, 247, 164, 0.13), transparent 36%),
    linear-gradient(180deg, #121b18 0%, #090e0c 100%);
}

body[data-theme="graphite"] {
  --panel: #121316;
  --panel-soft: #1a1c20;
  --line: #343740;
  --gold: #e8d7a0;
  --green: #b4e39c;
  --red: #eaa0a0;
  --blue: #a9c3e8;
  --cyan: #a7dfd9;
  background:
    radial-gradient(circle at 50% -20%, rgba(232, 215, 160, 0.12), transparent 32%),
    linear-gradient(180deg, #18191d 0%, #0d0e11 100%);
}

.dashboard {
  width: min(100%, 2040px);
  margin: 0 auto;
  padding: 14px 10px 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 0;
}

.workspace-tabs {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 38px;
  margin: 2px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(39, 41, 48, 0.98), rgba(16, 17, 22, 0.98)),
    #111217;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-tab {
  min-width: max-content;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(40, 42, 49, 0.92), rgba(18, 19, 24, 0.95));
  color: #f2f5ff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workspace-tab:hover {
  background:
    linear-gradient(180deg, rgba(54, 57, 67, 0.96), rgba(24, 25, 31, 0.98));
  color: #ffe8a7;
}

.workspace-tab.active {
  color: #ffe7a8;
  background:
    linear-gradient(180deg, rgba(61, 63, 72, 0.98), rgba(20, 21, 27, 0.98));
  box-shadow: inset 0 -2px 0 rgba(245, 185, 51, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.workspace-view {
  display: none;
}

.workspace-view.active {
  display: block;
}

.workspace-placeholder {
  min-height: 360px;
  margin-top: 10px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 185, 51, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(22, 24, 31, 0.96), rgba(12, 13, 18, 0.98));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.workspace-placeholder h2 {
  margin: 0 0 8px;
  color: #ffe2a0;
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

.workspace-placeholder p {
  margin: 0;
  color: #9ba3b8;
  font-size: 13px;
  font-weight: 800;
}

.workspace-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(24, 26, 33, 0.98), rgba(11, 12, 17, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.workspace-page-head h2 {
  margin: 0 0 5px;
  color: #ffe2a0;
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

.workspace-page-head p {
  margin: 0;
  color: #9ba3b8;
  font-size: 13px;
  font-weight: 800;
}

.workspace-page-head > span,
.workspace-page-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(245, 185, 51, 0.26);
  border-radius: 10px;
  background: rgba(245, 185, 51, 0.09);
  color: #ffe2a0;
  font-size: 12px;
  font-weight: 950;
}

.add-workspace-grid,
.delete-workspace-grid,
.block-workspace-grid,
.system-grid {
  display: grid;
  gap: 14px;
}

.add-workspace-grid {
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.45fr) minmax(300px, 0.9fr);
}

.delete-workspace-grid {
  grid-template-columns: minmax(280px, 0.75fr) minmax(430px, 1.25fr) minmax(260px, 0.65fr);
}

.block-workspace-grid {
  grid-template-columns: minmax(520px, 1fr) minmax(280px, 0.35fr);
}

.system-grid {
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1fr) minmax(280px, 0.65fr);
}

.add-card,
.danger-card,
.block-list-card,
.block-summary-card,
.system-card,
.delete-preview-card,
.appearance-color-panel,
.appearance-swatch-board {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 185, 51, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(24, 26, 34, 0.98), rgba(10, 11, 16, 0.98));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.add-card,
.danger-card,
.system-card,
.delete-preview-card,
.appearance-color-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.add-card-head,
.danger-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.add-card-head > span,
.danger-card-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 185, 51, 0.24);
  border-radius: 10px;
  background: rgba(245, 185, 51, 0.1);
  color: #ffe2a0;
  font-weight: 950;
}

.add-card h3,
.danger-card h3,
.system-card h3,
.delete-preview-card h3,
.appearance-color-panel h3,
.appearance-swatch-board h3,
.block-list-head span {
  margin: 0;
  color: #f3f6ff;
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.add-card p,
.danger-card p,
.system-card p,
.appearance-color-panel p,
.block-summary-card p {
  margin: 4px 0 0;
  color: #9ba3b8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

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

.delete-form-grid label:last-child {
  grid-column: 1 / -1;
}

.add-card button,
.danger-card button,
.block-list-head button,
.system-backup-actions button,
.block-list-row button {
  border-color: rgba(245, 185, 51, 0.36);
  background: linear-gradient(180deg, #ffd36d, #f1af24);
  color: #12100a;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(245, 185, 51, 0.18);
}

.danger-card button,
.block-list-row button {
  border-color: rgba(255, 111, 111, 0.36);
  background: linear-gradient(180deg, #ff6f78, #c91f2e);
  color: #fff4f4;
}

.add-bank-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.add-bank-preview > span,
.add-vault-row span,
.delete-preview-card span,
.block-summary-card span,
.system-facts span {
  color: #8d96b0;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.add-bank-preview div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-vault-overview,
#deleteWorkspacePreview,
#systemFacts {
  display: grid;
  gap: 8px;
}

.add-vault-row,
#deleteWorkspacePreview > div,
#systemFacts > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.add-vault-row b,
#deleteWorkspacePreview strong,
#systemFacts strong {
  color: #ffffff;
  font-weight: 950;
}

.block-list-card {
  overflow: hidden;
}

.block-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.block-list-rows {
  display: grid;
  padding: 12px;
}

.block-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.55fr) 82px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.block-list-row:last-child {
  border-bottom: 0;
}

.block-list-money {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
}

.block-list-money span {
  color: #ffe2a0;
  font-weight: 950;
}

.block-summary-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.block-summary-card strong {
  color: #ffe2a0;
  font-size: 28px;
  font-weight: 950;
}

.appearance-workspace {
  min-height: 0;
}

.appearance-swatch-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding: 18px;
}

.appearance-swatch-board section {
  display: grid;
  gap: 10px;
}

.appearance-swatch-row {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.appearance-color-panel {
  margin-top: 14px;
}

.appearance-vault-colors {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.system-workspace {
  margin-top: 10px;
}

.system-live-status {
  margin-top: 0;
}

.system-iban-widget {
  grid-template-columns: auto minmax(260px, 1fr) auto;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f7ff;
}

.system-iban-widget .iban-result {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.06);
  color: #aeb8d2;
}

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

.hidden-audit {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
}

.top-actions .menu-toggle {
  margin-left: auto;
}

.iban-widget {
  display: grid;
  grid-template-columns: auto minmax(260px, 340px) auto minmax(240px, 360px);
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid rgba(26, 31, 44, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.68);
  color: #111827;
  box-shadow: 0 12px 28px rgba(20, 24, 35, 0.12);
}

.iban-widget strong {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.iban-widget input {
  min-height: 34px;
  height: 34px;
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: uppercase;
}

.iban-widget button {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, #21c7d8, #0a9bb3);
  color: #ffffff;
  box-shadow: none;
  font-size: 10px;
}

.iban-result {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.07);
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
}

.iban-result b {
  color: #111827;
  font-size: 11px;
}

.iban-result span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iban-result.valid {
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
}

.iban-result.pending {
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
}

.iban-result.invalid {
  background: rgba(217, 45, 32, 0.12);
  color: #b42318;
}

.system-iban-card {
  overflow: hidden;
}

.system-iban-widget {
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f7ff;
}

.system-iban-widget .iban-result {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.06);
  color: #aeb8d2;
}

.system-iban-widget input {
  min-width: 0;
}

.live-status {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 185, 129, 0.32);
  border-radius: 8px;
  background: rgba(24, 185, 129, 0.12);
  color: #064e3b;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 85, 67, 0.12);
}

.live-status small {
  grid-column: 2 / -1;
  margin-top: -5px;
  color: rgba(6, 78, 59, 0.72);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.live-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.16);
}

.live-status time {
  color: #0f766e;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.live-status.waiting {
  border-color: rgba(245, 185, 51, 0.36);
  background: rgba(245, 185, 51, 0.14);
  color: #7a4b00;
}

.live-status.waiting span {
  background: #f5b933;
  box-shadow: 0 0 0 5px rgba(245, 185, 51, 0.16);
}

.live-status.stale {
  border-color: rgba(245, 185, 51, 0.42);
  background: rgba(245, 185, 51, 0.16);
  color: #7a4b00;
}

.live-status.stale span {
  background: #f5b933;
  box-shadow: 0 0 0 5px rgba(245, 185, 51, 0.16);
}

.live-status.danger {
  border-color: rgba(217, 45, 32, 0.35);
  background: rgba(217, 45, 32, 0.12);
  color: #9f1c12;
}

.live-status.danger span {
  background: #d92d20;
  box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.14);
}

.theme-picker {
  display: grid;
  gap: 4px;
  color: #8f98b4;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-picker select {
  height: 34px;
  min-width: 118px;
  border: 1px solid rgba(245, 185, 51, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 238, 244, 0.95));
  color: #111827;
  font-weight: 850;
  outline: 0;
  box-shadow: 0 10px 24px rgba(20, 24, 35, 0.16);
}

.vault-style-picker select {
  min-width: 150px;
}

.theme-picker option {
  background: #111219;
  color: #ffffff;
}

.menu-toggle,
.menu-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #f4f7ff;
  box-shadow: none;
}

.menu-toggle {
  width: 46px;
  height: 42px;
  gap: 4px;
  padding: 0;
  border-color: rgba(245, 185, 51, 0.25);
  background:
    linear-gradient(180deg, rgba(35, 38, 48, 0.98), rgba(13, 15, 21, 0.98));
  color: #f4f7ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.drawer-iban-panel {
  display: grid;
  gap: 8px;
}

.drawer-iban-widget {
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: #f4f7ff;
  box-shadow: none;
}

.drawer-iban-widget .iban-result {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.06);
  color: #9aa5bf;
}

.drawer-iban-widget .iban-result b {
  color: #f4f7ff;
}

.drawer-iban-widget input {
  background: rgba(7, 9, 14, 0.74);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.appearance-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 14px;
  margin-top: 20px;
}

.appearance-picker select {
  min-width: 220px;
  background: linear-gradient(180deg, rgba(30, 34, 44, 0.98), rgba(14, 16, 22, 0.98));
  color: #f4f7ff;
}

.system-live-status {
  width: min(520px, 100%);
  margin-top: 20px;
  color: #c7f9e5;
}

.system-live-status small,
.system-live-status time {
  color: rgba(199, 249, 229, 0.75);
}

.menu-close {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(18px, 1.45vw, 25px);
  font-weight: 850;
  letter-spacing: 0;
}

h1 span {
  color: var(--gold);
}

.control-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  width: min(520px, calc(100vw - 24px));
  gap: 14px;
  margin: 0;
  padding: 0 18px 18px;
  border-left: 1px solid rgba(245, 185, 51, 0.22);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(24, 22, 28, 0.96), rgba(10, 12, 19, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(245, 185, 51, 0.14), transparent 38%);
  backdrop-filter: blur(22px);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.48);
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.19, 1, 0.22, 1);
}

.drawer-open .control-panel {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(5, 6, 10, 0.56);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-open .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.account-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(4, 5, 10, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.account-detail-open .account-detail-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.account-detail-panel {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 25;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(520px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 24px));
  padding: 14px;
  border: 1px solid rgba(245, 185, 51, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 0%, rgba(245, 185, 51, 0.18), transparent 34%),
    linear-gradient(150deg, #13151f, #080a11);
  color: #f4f7ff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.account-detail-open .account-detail-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.account-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 185, 51, 0.18);
}

.account-detail-head span {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: #cbbdff;
  font-size: 9px;
  font-weight: 950;
}

.account-detail-head h2 {
  color: #fff5cc;
  font-size: 16px;
  line-height: 1.1;
  text-transform: uppercase;
}

.account-detail-head p {
  margin-top: 5px;
  color: #8fb6ff;
  font-size: 12px;
  font-weight: 900;
}

.account-detail-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(108, 174, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(108, 174, 255, 0.12), rgba(255, 255, 255, 0.035));
}

.account-detail-balance span,
.account-stat-card span,
.account-detail-history h3 {
  color: #9aa5c2;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-detail-balance strong {
  color: #ffffff;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(108, 174, 255, 0.24);
}

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

.account-stat-card {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.account-stat-card.total {
  border-color: rgba(245, 185, 51, 0.25);
  background: rgba(245, 185, 51, 0.1);
}

.account-stat-card strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.account-stat-card em,
.account-stat-card small {
  color: #c7d2fe;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.account-stat-card small {
  color: #7e879f;
}

.account-detail-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.account-detail-history-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.account-detail-history-list::-webkit-scrollbar {
  width: 6px;
}

.account-detail-history-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(108, 174, 255, 0.32);
}

.account-history-row {
  display: grid;
  grid-template-columns: 54px 70px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-left: 2px solid rgba(108, 174, 255, 0.54);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.042);
}

.account-history-row time,
.account-history-row span,
.account-history-row em {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.account-history-row time {
  color: #8d96b3;
  font-size: 9px;
  font-weight: 850;
}

.account-history-row strong {
  min-width: 0;
  color: #fff5cc;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-history-row span {
  color: #e7ecfb;
  font-size: 10px;
  font-weight: 850;
}

.account-history-row em {
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.account-history-row em.positive {
  color: var(--green);
}

.account-history-row em.negative {
  color: var(--red);
}

.detail-skeleton,
.detail-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  color: #8d96b3;
  font-weight: 850;
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -18px;
  padding: 18px;
  border-bottom: 1px solid rgba(245, 185, 51, 0.2);
  background: linear-gradient(180deg, rgba(13, 14, 21, 0.98), rgba(13, 14, 21, 0.88));
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.22);
}

.drawer-head h2 {
  color: var(--gold);
  font-size: 17px;
  text-transform: uppercase;
}

.drawer-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.drawer-status-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 185, 51, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(245, 185, 51, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drawer-status-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.drawer-status-card span {
  color: #9aa2ba;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-status-card strong {
  color: #fff0c4;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-status-card strong.positive {
  color: var(--green);
}

.drawer-status-card strong.negative {
  color: var(--red);
}

.command-menu {
  display: grid;
  gap: 9px;
}

.command-section {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.command-section-toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(245, 185, 51, 0.12), rgba(255, 255, 255, 0.025));
  color: #f4f7ff;
  text-align: left;
  box-shadow: none;
}

.command-section-toggle::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(245, 185, 51, 0.24);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 950;
}

.command-section.open .command-section-toggle::after {
  content: "-";
}

.command-section-toggle span,
.command-section-toggle small {
  grid-column: 1;
}

.command-section-toggle span {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.command-section-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.command-section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 0;
  padding: 0 10px;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.26s ease, opacity 0.2s ease, padding 0.2s ease;
}

.command-section.open .command-section-body {
  max-height: 420px;
  padding: 10px;
  opacity: 1;
}

.tab-button,
.view-shortcut {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: #cfd6ec;
  box-shadow: none;
  font-weight: 900;
}

.view-shortcut:hover {
  border-color: rgba(245, 185, 51, 0.38);
  background: rgba(245, 185, 51, 0.1);
  color: #ffe2a0;
}

.tab-button.active {
  border-color: rgba(245, 185, 51, 0.55);
  background: rgba(245, 185, 51, 0.13);
  color: #ffe2a0;
}

.tab-button.danger.active {
  border-color: rgba(255, 118, 118, 0.5);
  background: rgba(255, 118, 118, 0.12);
  color: #ffb8b8;
}

.drawer-theme-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.drawer-theme-preview p {
  color: #9aa2ba;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.theme-swatch,
.vault-swatch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 5, 9, 0.42);
  color: #d8def2;
  box-shadow: none;
  font-size: 10px;
  font-weight: 900;
}

.theme-swatch span,
.vault-swatch span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.theme-swatch.active,
.vault-swatch.active {
  border-color: rgba(245, 185, 51, 0.62);
  color: #ffe3a3;
  background: rgba(245, 185, 51, 0.12);
}

.theme-swatch.aurora span {
  background: linear-gradient(135deg, #f5b933, #4de1da);
}

.theme-swatch.graphite span {
  background: linear-gradient(135deg, #e8d7a0, #343740);
}

.theme-swatch.midnight span {
  background: linear-gradient(135deg, #8fb6ff, #0f1322);
}

.theme-swatch.emerald span {
  background: linear-gradient(135deg, #76f7a4, #0e1815);
}

.vault-swatch.obsidian span {
  background: linear-gradient(135deg, #1f2937, #8b5cf6);
}

.vault-swatch.slate span {
  background: linear-gradient(135deg, #32465c, #9db1c7);
}

.vault-swatch.royal span {
  background: linear-gradient(135deg, #f2c976, #172139);
}

.vault-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.vault-color-control {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(4, 5, 9, 0.42);
  text-transform: none;
}

.vault-color-control span {
  min-width: 0;
  color: #d8def2;
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-color-control input {
  width: 38px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(245, 185, 51, 0.24);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.vault-color-control input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.vault-color-control input::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.tool-form {
  display: none;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(245, 185, 51, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tool-form.active {
  display: grid;
}

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

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

.tool-form > div {
  align-self: center;
}

.tool-form h2 {
  font-size: 13px;
  color: var(--gold);
  text-transform: uppercase;
}

.tool-form p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.drawer-events {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(2, 4, 8, 0.28);
}

.drawer-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-events h3 {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
}

.drawer-events-head span {
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid rgba(113, 240, 138, 0.24);
  border-radius: 999px;
  color: var(--green);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.drawer-events-list {
  display: grid;
  gap: 7px;
}

.drawer-event {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 2px solid rgba(245, 185, 51, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.drawer-event span {
  color: #f4f7ff;
  font-size: 11px;
  font-weight: 900;
}

.drawer-event small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.drawer-event.muted {
  color: var(--muted);
  font-weight: 850;
}

label {
  display: grid;
  gap: 6px;
  color: #858ca4;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select,
textarea,
button {
  min-height: 38px;
  border-radius: 6px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 8, 13, 0.72);
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 185, 51, 0.12);
}

textarea {
  min-height: 120px;
  padding: 10px 11px;
  resize: vertical;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  text-transform: none;
}

.json-field {
  text-transform: uppercase;
}

button {
  border: 0;
  padding: 0 14px;
  background: linear-gradient(180deg, #ffd66d, var(--gold));
  color: #161103;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(245, 185, 51, 0.14);
}

button:hover {
  filter: brightness(1.08);
}

.danger-submit {
  background: linear-gradient(180deg, #ff9a9a, var(--red));
  color: #240708;
  box-shadow: 0 10px 24px rgba(255, 118, 118, 0.14);
}

.report-panel {
  align-items: stretch;
}

.report-card {
  position: relative;
  margin-top: 4px;
  padding: 16px 16px 28px;
  border-radius: 8px;
  background: #162332;
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
}

.report-brand {
  color: #9b75ff;
  font-weight: 900;
}

.report-title {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 900;
}

.report-rule {
  height: 2px;
  margin: 10px 0 12px;
  background: repeating-linear-gradient(90deg, #ffffff 0 16px, transparent 16px 22px);
}

.report-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.report-meta strong {
  font-size: 12px;
}

.report-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 24px;
  margin: 0;
}

.report-card dt {
  color: #67b5df;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
}

.report-card dd {
  margin: 0;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(108, 174, 255, 0.22);
}

.report-card time {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: #6d9dbc;
  font-size: 12px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(330px, 1fr));
  align-items: start;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.report-history-section {
  margin-top: 10px;
  border: 1px solid #242635;
  border-radius: 8px;
  background: #111219;
  overflow: hidden;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #242635;
}

.section-title h2 {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
}

.ghost-button {
  height: 34px;
  border: 1px solid #303443;
  background: #171923;
  color: #cdd3e7;
  box-shadow: none;
}

.ghost-button.closed {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
}

.report-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px;
}

.empty-history {
  padding: 18px;
  border: 1px dashed #303443;
  border-radius: 8px;
  color: #8d94ad;
}

.history-card {
  position: relative;
  padding: 14px;
  border: 1px solid #243142;
  border-radius: 8px;
  background: #162332;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #ffffff;
}

.history-head span {
  color: #9ea7bf;
}

.history-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.history-card dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.history-card dt {
  color: #67b5df;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.history-card dd {
  margin: 0;
  color: #ffffff;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(108, 174, 255, 0.2);
}

.history-card time {
  display: block;
  margin-top: 10px;
  color: #6d9dbc;
  text-align: right;
  font-size: 12px;
}

.reconciliation-section {
  position: relative;
  margin-top: 16px;
  border: 1px solid rgba(201, 161, 88, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(246, 203, 116, 0.13), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(77, 177, 223, 0.13), transparent 26%),
    linear-gradient(135deg, rgba(18, 23, 32, 0.98), rgba(11, 14, 20, 0.98) 52%, rgba(20, 23, 31, 0.98)),
    #11151d;
  color: #f6f1e6;
  overflow: hidden;
  box-shadow: 0 34px 95px rgba(8, 12, 18, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reconciliation-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(244, 196, 93, 0.12), transparent 28%, transparent 72%, rgba(72, 187, 221, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px);
  opacity: 0.55;
  pointer-events: none;
}

.reconciliation-section > * {
  position: relative;
  z-index: 1;
}

.reconciliation-section .section-title {
  align-items: center;
  min-height: 78px;
  border-bottom: 1px solid rgba(212, 171, 94, 0.2);
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.82), rgba(17, 24, 34, 0.68)),
    rgba(5, 7, 11, 0.6);
  color: #ffe9a7;
}

.reconciliation-section .section-title > div {
  display: grid;
  gap: 4px;
}

.reconciliation-section .section-title p {
  color: #9faabd;
  font-size: 11px;
  font-weight: 800;
}

.reconciliation-section .section-title h2::after {
  content: "FORMÜL";
  display: inline-block;
  margin-left: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(246, 223, 157, 0.42);
  border-radius: 999px;
  color: #f4e2ae;
  background: linear-gradient(180deg, rgba(246, 223, 157, 0.12), rgba(255, 255, 255, 0.035));
  font-size: 8px;
  vertical-align: middle;
}

.reconciliation-formula-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 0;
}

.reconciliation-formula-band div {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(246, 223, 157, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(246, 223, 157, 0.1), rgba(255, 255, 255, 0.026)),
    rgba(11, 15, 23, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 34px rgba(0, 0, 0, 0.18);
}

.reconciliation-formula-band span {
  display: block;
  margin-bottom: 7px;
  color: #8da0b8;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.reconciliation-formula-band strong {
  display: block;
  color: #ffe8a8;
  font: 950 13px "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  line-height: 1.35;
}

.reconciliation-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(60, 214, 156, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(60, 214, 156, 0.13), rgba(60, 214, 156, 0.045));
  color: #bce9d8;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.reconciliation-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d394;
  box-shadow: 0 0 0 5px rgba(53, 211, 148, 0.12);
}

.reconciliation-grid {
  display: grid;
  grid-template-columns: minmax(760px, 1.4fr) minmax(380px, 0.72fr);
  gap: 16px;
  padding: 16px 18px 18px;
}

.reconciliation-table-wrap,
.block-panel {
  min-height: 0;
  border: 1px solid rgba(232, 202, 143, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(13, 18, 27, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 22px 56px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.reconciliation-table tbody tr:hover th,
.reconciliation-table tbody tr:hover td {
  background-image: linear-gradient(90deg, rgba(246, 223, 157, 0.1), rgba(255, 255, 255, 0.02));
}

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

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(232, 202, 143, 0.12);
  background:
    linear-gradient(90deg, rgba(232, 202, 143, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.026);
}

.ledger-head strong {
  color: #f9dfa0;
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.ledger-head span {
  color: #98a4b8;
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

.reconciliation-table {
  min-width: 790px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #f0f4fb;
}

.reconciliation-table th,
.reconciliation-table td {
  height: 40px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(142, 153, 171, 0.095);
  color: #f0f4fb;
  font-size: 12.5px;
  font-weight: 900;
  text-align: left;
}

.reconciliation-table th:first-child,
.reconciliation-table td:first-child,
.reconciliation-table th:nth-child(2),
.reconciliation-table td:nth-child(2),
.reconciliation-table th:last-child,
.reconciliation-table td:last-child {
  width: 25%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  text-transform: none;
}

.reconciliation-table thead th {
  height: 38px;
  color: #b9c4d6;
  background: linear-gradient(180deg, rgba(32, 39, 52, 0.98), rgba(21, 27, 37, 0.98));
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.reconciliation-table thead th:nth-child(2) {
  color: #9af3c0;
}

.reconciliation-table thead th:nth-child(3) {
  color: #ffaaaa;
}

.reconciliation-table thead th:nth-child(4) {
  color: #87dcff;
}

.reconciliation-table tbody tr:nth-child(even) th,
.reconciliation-table tbody tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.016);
}

.reconciliation-table tbody th {
  position: relative;
  padding-left: 18px;
  color: #ffd38a;
  background: linear-gradient(90deg, rgba(214, 147, 71, 0.18), rgba(214, 147, 71, 0.045));
  border-left: 4px solid rgba(244, 181, 108, 0.82);
  text-transform: none;
}

.reconciliation-table tbody th::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.reconciliation-table .rec-row-borcDusum th,
.reconciliation-table .rec-row-borcDusum td:nth-child(4) {
  color: #ffb0b8;
  background: linear-gradient(90deg, rgba(255, 85, 99, 0.18), rgba(255, 85, 99, 0.055));
  border-left-color: rgba(255, 85, 99, 0.72);
}

.reconciliation-table .rec-row-alacak th,
.reconciliation-table .rec-row-alacak td:nth-child(4) {
  color: #f5d778;
  background: linear-gradient(90deg, rgba(245, 215, 120, 0.17), rgba(245, 215, 120, 0.055));
  border-left-color: rgba(245, 215, 120, 0.72);
}

.reconciliation-table td:nth-child(2) {
  background: linear-gradient(90deg, rgba(45, 198, 121, 0.14), rgba(45, 198, 121, 0.04));
}

.reconciliation-table td:nth-child(3) {
  background: linear-gradient(90deg, rgba(206, 42, 44, 0.16), rgba(206, 42, 44, 0.04));
}

.reconciliation-table td:nth-child(4) {
  background: linear-gradient(90deg, rgba(49, 177, 220, 0.15), rgba(49, 177, 220, 0.04));
}

.reconciliation-table input,
.block-row input {
  width: 100%;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #f7f3ea;
  font: 950 13px "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  outline: 0;
}

.reconciliation-table input {
  padding: 0 11px 0 27px;
  text-align: right;
}

.money-input-cell {
  position: relative;
}

.money-input-cell::before {
  content: "₺";
  position: absolute;
  left: 15px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #f1cd79;
  font: 950 11px "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  opacity: 0;
  pointer-events: none;
}

.money-input-cell.has-value::before,
.money-input-cell:focus-within::before {
  opacity: 1;
}

.reconciliation-table input:not([readonly]):focus,
.block-row input:focus {
  border-color: rgba(246, 223, 157, 0.45);
  background: rgba(8, 12, 18, 0.86);
  box-shadow: 0 0 0 3px rgba(246, 223, 157, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.reconciliation-table input.auto-cell {
  border-color: rgba(241, 205, 121, 0.16);
  background:
    linear-gradient(90deg, rgba(241, 205, 121, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 3px 0 0 rgba(241, 205, 121, 0.72);
  color: #f7f3ea;
  cursor: default;
}

.block-panel {
  align-self: start;
  margin: 0;
}

.block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 50px;
  margin: 8px 10px 0;
  overflow: hidden;
  border: 1px solid rgba(232, 202, 143, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(232, 202, 143, 0.09), rgba(255, 255, 255, 0.018)),
    rgba(15, 20, 29, 0.9);
}

.block-row > input,
.block-money input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.block-row > input:first-child {
  border-left: 4px solid rgba(246, 223, 157, 0.68);
  color: #ffe7a7;
  font-weight: 950;
}

.block-money {
  position: relative;
  display: grid;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.045);
}

.block-money span {
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #f1cd79;
  font: 950 11px "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  opacity: 0;
  pointer-events: none;
}

.block-money.has-value span,
.block-money:focus-within span {
  opacity: 1;
}

.block-money input {
  text-align: right;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  color: #f7f3ea;
  padding-left: 26px;
  background: transparent;
}

.mini-danger {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: rgba(255, 85, 99, 0.105);
  color: #ff8d98;
  box-shadow: none;
  font-size: 10px;
}

.block-panel > .ghost-button {
  width: calc(100% - 20px);
  min-height: 44px;
  margin: 10px;
  border: 1px solid rgba(246, 223, 157, 0.64);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe18d, #d4a348);
  color: #171104;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.block-total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 16px;
  border-top: 1px solid rgba(246, 223, 157, 0.28);
  background:
    linear-gradient(90deg, rgba(246, 223, 157, 0.13), rgba(246, 223, 157, 0.035)),
    rgba(246, 223, 157, 0.06);
  color: #f6df9d;
  font-weight: 950;
  text-transform: uppercase;
}

.block-total strong {
  color: #f7f3ea;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
}

.ledger-audit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.ledger-audit div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
}

.ledger-audit span {
  display: block;
  margin-bottom: 7px;
  color: #8792a5;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.ledger-audit strong {
  color: #f0f4fb;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.block-row input::placeholder {
  color: #667286;
  opacity: 1;
}

.reconciliation-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  padding: 18px 18px 6px;
  overflow-x: auto;
}

.reconciliation-summary .summary-card {
  position: relative;
  min-width: 124px;
  min-height: 86px;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid rgba(246, 223, 157, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.024)),
    #171d28;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 18px 38px rgba(0, 0, 0, 0.22);
}

.reconciliation-summary .summary-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 9px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.summary-primary,
.summary-result {
  grid-column: auto;
  min-width: 178px;
}

.summary-primary {
  background:
    linear-gradient(135deg, rgba(80, 211, 148, 0.18), rgba(255, 255, 255, 0.028)),
    #17231e;
}

.summary-panel {
  background:
    linear-gradient(135deg, rgba(255, 83, 93, 0.18), rgba(255, 255, 255, 0.026)),
    #24181d;
}

.summary-debt,
.summary-expense,
.summary-target {
  background:
    linear-gradient(135deg, rgba(61, 180, 224, 0.14), rgba(255, 255, 255, 0.024)),
    #16212b;
}

.summary-balance {
  background:
    linear-gradient(135deg, rgba(148, 164, 190, 0.14), rgba(255, 255, 255, 0.024)),
    #171d27;
}

.summary-result {
  background:
    linear-gradient(135deg, rgba(246, 223, 157, 0.2), rgba(255, 255, 255, 0.03)),
    #241f16;
}

.reconciliation-summary span,
.reconciliation-summary strong {
  display: block;
  color: #9ca8bd;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.reconciliation-summary strong {
  margin-top: 10px;
  color: #f7f3ea;
  text-transform: none;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.reconciliation-summary .positive {
  color: #83e4ae;
}

.reconciliation-summary .negative {
  color: #ff9aa4;
}

.charts-section {
  margin-top: 10px;
  border: 1px solid rgba(36, 38, 53, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 18px 52px rgba(32, 38, 55, 0.14);
  overflow: hidden;
}

.charts-section .section-title {
  background: linear-gradient(90deg, #111219, #202737);
}

.chart-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 14px;
  padding: 14px;
}

.chart-card {
  min-height: 280px;
  padding: 14px;
  border: 1px solid rgba(21, 27, 38, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f1f3f7);
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(30, 34, 46, 0.12);
}

.chart-card h3 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.audit-section {
  display: none !important;
}

.audit-section .section-title {
  background: linear-gradient(90deg, #111219, #202737);
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 14px;
  padding: 14px;
}

.audit-card {
  min-height: 230px;
  padding: 14px;
  border: 1px solid rgba(21, 27, 38, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f1f3f7);
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(30, 34, 46, 0.12);
}

.audit-card h3 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.audit-list {
  display: grid;
  gap: 9px;
  max-height: 320px;
  overflow: auto;
}

.audit-item {
  padding: 10px;
  border: 1px solid rgba(22, 26, 38, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
}

.audit-item time {
  display: block;
  margin-bottom: 4px;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}

.audit-item strong {
  display: block;
  margin-bottom: 5px;
  color: #111827;
  font-size: 12px;
  font-weight: 950;
}

.audit-item p {
  color: #303746;
  font-size: 11px;
  line-height: 1.45;
}

.closure-item b {
  color: #111827;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-weight: 950;
}

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

.closure-summary span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.8);
  color: #374151;
  font-size: 10px;
  font-weight: 850;
}

.closure-summary span:last-child {
  grid-column: 1 / -1;
}

.closure-summary .positive b {
  color: #079455;
}

.closure-summary .negative b {
  color: #d92d20;
}

.pie-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
}

.cash-pie {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  box-shadow: inset -14px -18px 26px rgba(0, 0, 0, 0.18), 0 18px 25px rgba(0, 0, 0, 0.22);
}

.pie-center {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 10px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #263244;
  font-size: 11px;
  font-weight: 850;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.chart-legend b {
  margin-left: auto;
  color: #111827;
  white-space: nowrap;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 220px;
  padding: 12px 8px 4px;
  border-left: 1px solid #c7ccd6;
  border-bottom: 1px solid #c7ccd6;
  background:
    linear-gradient(#dfe3ea 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
}

.bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 4px;
  min-height: 206px;
  text-align: center;
}

.bar-track {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  height: 165px;
}

.bar-track span {
  display: block;
  width: 28px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #2896d3, #1f6eb7);
  box-shadow: inset 0 -18px 0 rgba(231, 47, 54, 0.72), 0 9px 15px rgba(20, 42, 70, 0.18);
}

.bar-item strong {
  color: #111827;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.bar-item em {
  color: #374151;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.charts-section {
  border-color: rgba(245, 185, 51, 0.15);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 185, 51, 0.1), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(77, 225, 218, 0.08), transparent 26%),
    linear-gradient(145deg, rgba(19, 21, 28, 0.98), rgba(8, 10, 15, 0.99));
  color: #f4f7ff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.charts-section .section-title {
  min-height: 70px;
  background:
    linear-gradient(90deg, rgba(6, 8, 13, 0.92), rgba(22, 25, 34, 0.72));
}

.charts-section .section-title p {
  margin-top: 4px;
  color: #8d97b1;
  font-size: 11px;
  font-weight: 850;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  padding: 16px 16px 2px;
}

.analytics-kpi {
  min-height: 86px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    #171b24;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 36px rgba(0, 0, 0, 0.22);
}

.analytics-kpi span {
  display: block;
  color: #8e9ab4;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.analytics-kpi strong {
  display: block;
  margin-top: 12px;
  color: #ffffff;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  font-weight: 950;
}

.analytics-kpi-panel { border-color: rgba(255, 118, 118, 0.22); }
.analytics-kpi-cash { border-color: rgba(113, 240, 138, 0.18); }
.analytics-kpi-vault { border-color: rgba(108, 174, 255, 0.2); }
.analytics-kpi-ok strong { color: #8df0ac; }
.analytics-kpi-danger strong { color: #ff9aa4; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 14px;
  padding: 16px;
}

.charts-section .chart-card {
  min-height: 320px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    rgba(15, 18, 25, 0.94);
  color: #f4f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 46px rgba(0, 0, 0, 0.25);
}

.chart-card-wide {
  grid-column: span 2;
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.charts-section .chart-card h3 {
  margin: 0;
  color: #fff0bc;
  font-size: 14px;
  text-align: left;
}

.chart-card-head span {
  color: #8793ad;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.line-chart {
  min-height: 300px;
}

.trend-svg {
  width: 100%;
  min-height: 260px;
  overflow: visible;
}

.trend-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--line-color), transparent 68%));
}

.trend-svg text {
  fill: #8f9ab3;
  font: 850 10px "Segoe UI", Arial, sans-serif;
}

.chart-mini-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.chart-mini-legend span,
.flow-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aab4c9;
  font-size: 11px;
  font-weight: 850;
}

.chart-mini-legend i,
.flow-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-mini-legend b {
  margin-left: auto;
  color: #ffffff;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.gap-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(18, minmax(12px, 1fr));
  align-items: center;
  gap: 7px;
  min-height: 250px;
  padding: 28px 4px 24px;
}

.gap-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.gap-item {
  position: relative;
  display: grid;
  align-items: center;
  height: 210px;
}

.gap-item span {
  display: block;
  align-self: center;
  min-height: 8px;
  border-radius: 999px;
  background: #71f08a;
  box-shadow: 0 0 18px rgba(113, 240, 138, 0.2);
}

.gap-item.negative span {
  background: #ff7676;
  box-shadow: 0 0 18px rgba(255, 118, 118, 0.22);
}

.gap-item em {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%) rotate(-36deg);
  color: #7e8aa5;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.flow-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(38px, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 300px;
}

.flow-group {
  display: grid;
  gap: 8px;
  align-items: end;
  min-height: 260px;
}

.flow-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  height: 220px;
  padding: 8px 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.flow-bars span {
  width: 10px;
  min-height: 5px;
  border-radius: 999px 999px 0 0;
}

.flow-invest { background: linear-gradient(180deg, #70f0a0, #1f9f62); }
.flow-withdraw { background: linear-gradient(180deg, #ff8b92, #cf2f3b); }
.flow-commission { background: linear-gradient(180deg, #ffd56a, #b57913); }

.flow-group em {
  color: #7e8aa5;
  font-size: 9px;
  font-style: normal;
  text-align: center;
}

.flow-legend {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.leader-list,
.bank-performance-list {
  display: grid;
  gap: 9px;
}

.leader-row,
.bank-performance-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.036);
}

.leader-row > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(245, 185, 51, 0.12);
  color: #ffe2a0;
  font-weight: 950;
}

.leader-row strong,
.bank-performance-row strong {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.leader-row small,
.bank-performance-row span {
  display: block;
  margin-top: 2px;
  color: #8793ad;
  font-size: 10px;
  font-weight: 850;
}

.leader-row i,
.bank-performance-row i {
  display: block;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5b933, #4de1da);
}

.leader-row b,
.bank-performance-row b {
  color: #f4f7ff;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.bank-performance-row {
  grid-template-columns: minmax(150px, 0.9fr) minmax(90px, 0.55fr) minmax(180px, 1fr) auto;
}

.bank-performance-row div {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bank-performance-row i {
  height: 100%;
  margin: 0;
}

.charts-section .pie-center {
  background: rgba(8, 10, 15, 0.92);
  color: #ffffff;
}

.charts-section .chart-legend span,
.charts-section .chart-legend b,
.charts-section .bar-item strong {
  color: #f4f7ff;
}

.charts-section .chart-legend span,
.charts-section .bar-item em {
  color: #aab4c9;
}

.charts-section .bar-chart {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.vault {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #242635;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  isolation: isolate;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.vault.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.vault::before {
  content: "";
  position: absolute;
  top: 58px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.vault-green { color: var(--green); }
.vault-red { color: var(--red); }
.vault-blue { color: var(--blue); }
.vault-cyan { color: var(--cyan); }

body[data-vault-style="obsidian"] .vault {
  border-color: rgba(184, 255, 190, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(166, 255, 141, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(18, 26, 22, 0.98), rgba(9, 11, 16, 0.99) 60%, rgba(12, 14, 21, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-vault-style="slate"] .vault {
  border-color: rgba(129, 157, 184, 0.28);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(44, 53, 64, 0.95), rgba(18, 22, 29, 0.98)),
    linear-gradient(90deg, rgba(91, 141, 188, 0.08), transparent);
  box-shadow: 0 20px 58px rgba(9, 15, 24, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body[data-vault-style="royal"] .vault {
  border-color: rgba(232, 190, 99, 0.33);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% -10%, rgba(230, 177, 76, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(10, 18, 36, 0.99), rgba(7, 10, 20, 0.99) 62%, rgba(25, 18, 12, 0.96));
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 232, 173, 0.12);
}

body[data-vault-style="obsidian"] .vault::before {
  left: 14px;
  right: 14px;
  top: 66px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

body[data-vault-style="slate"] .vault::before {
  top: 63px;
  background: linear-gradient(90deg, rgba(156, 188, 224, 0.2), rgba(156, 188, 224, 0.72), rgba(156, 188, 224, 0.2));
}

body[data-vault-style="royal"] .vault::before {
  top: 66px;
  background: linear-gradient(90deg, transparent, rgba(242, 201, 118, 0.95), transparent);
}

.vault-green {
  background:
    linear-gradient(180deg, rgba(38, 62, 48, 0.34), rgba(16, 17, 25, 0.96)),
    linear-gradient(180deg, var(--panel-soft), var(--panel));
}

.vault-red {
  background:
    linear-gradient(180deg, rgba(74, 38, 48, 0.36), rgba(16, 17, 25, 0.96)),
    linear-gradient(180deg, var(--panel-soft), var(--panel));
}

.vault-blue {
  background:
    linear-gradient(180deg, rgba(37, 51, 83, 0.38), rgba(16, 17, 25, 0.96)),
    linear-gradient(180deg, var(--panel-soft), var(--panel));
}

.vault-cyan {
  background:
    linear-gradient(180deg, rgba(31, 68, 70, 0.34), rgba(16, 17, 25, 0.96)),
    linear-gradient(180deg, var(--panel-soft), var(--panel));
}

.vault.custom-vault-bg,
body[data-vault-style="obsidian"] .vault.custom-vault-bg,
body[data-vault-style="slate"] .vault.custom-vault-bg,
body[data-vault-style="royal"] .vault.custom-vault-bg {
  border-color: color-mix(in srgb, var(--vault-custom) 52%, rgba(255, 255, 255, 0.16));
  background:
    radial-gradient(circle at 14% 3%, color-mix(in srgb, var(--vault-custom) 52%, transparent), transparent 34%),
    linear-gradient(155deg,
      color-mix(in srgb, var(--vault-custom) 72%, #111827) 0%,
      color-mix(in srgb, var(--vault-custom) 54%, #0f1722) 48%,
      color-mix(in srgb, var(--vault-custom) 38%, #070a10) 100%);
}

.vault.custom-vault-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--vault-custom) 28%, transparent), transparent 48%),
    radial-gradient(circle at 88% 96%, color-mix(in srgb, var(--vault-custom) 34%, transparent), transparent 32%);
  pointer-events: none;
}

.vault-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 20px;
  cursor: grab;
}

.vault-head:active {
  cursor: grabbing;
}

body[data-vault-style="obsidian"] .vault-head,
body[data-vault-style="royal"] .vault-head {
  padding: 16px 14px 23px;
}

body[data-vault-style="slate"] .vault-head {
  padding: 13px 12px 19px;
}

.vault-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.vault-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

body[data-vault-style="obsidian"] .vault-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(185, 255, 180, 0.2);
  border-radius: 13px;
  background: rgba(7, 8, 12, 0.64);
}

body[data-vault-style="slate"] .vault-avatar {
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(5, 10, 18, 0.22);
}

body[data-vault-style="royal"] .vault-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(242, 201, 118, 0.35);
  border-radius: 50%;
  background: rgba(6, 8, 14, 0.62);
}

.vault-avatar img,
.vault-avatar svg {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

body[data-vault-style="obsidian"] .vault-avatar img,
body[data-vault-style="obsidian"] .vault-avatar svg,
body[data-vault-style="royal"] .vault-avatar img,
body[data-vault-style="royal"] .vault-avatar svg {
  width: 40px;
  height: 40px;
  border-radius: inherit;
}

.vault-head h2 {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.12;
}

body[data-vault-style="obsidian"] .vault-head h2 {
  color: currentColor;
  font-size: 14px;
  text-shadow: 0 0 18px rgba(185, 255, 180, 0.22);
}

body[data-vault-style="slate"] .vault-head h2 {
  color: #dce7f7;
  font-size: 12px;
  letter-spacing: 0;
}

body[data-vault-style="royal"] .vault-head h2 {
  color: #f7d98d;
  font-size: 14px;
  text-shadow: 0 0 18px rgba(242, 201, 118, 0.22);
}

.vault-head span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: #202331;
  color: currentColor;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

body[data-vault-style="obsidian"] .vault-head > span,
body[data-vault-style="royal"] .vault-head > span {
  border-radius: 9px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.07);
}

body[data-vault-style="royal"] .vault-head > span {
  border-color: rgba(242, 201, 118, 0.28);
  color: #f7d98d;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--text);
}

th:first-child,
td:first-child {
  width: 28%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 39%;
}

th:last-child,
td:last-child {
  width: 33%;
}

thead th {
  padding: 0 10px 6px;
  color: #7b8299;
  font-size: 9px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

table:not(.reconciliation-table) thead th:first-child {
  background: rgba(77, 225, 218, 0.12);
  color: #8df1ea;
}

table:not(.reconciliation-table) thead th:nth-child(2) {
  background: rgba(245, 185, 51, 0.13);
  color: #f7d98d;
}

table:not(.reconciliation-table) thead th:last-child {
  background: rgba(108, 174, 255, 0.13);
  color: #a9ceff;
}

thead th:last-child,
tbody td:last-child {
  text-align: right;
}

tbody tr {
  min-height: 28px;
  background: rgba(255, 255, 255, 0.006);
  border-top: 1px solid rgba(255, 255, 255, 0.025);
}

tbody tr:nth-child(even) {
  background: rgba(255, 80, 80, 0.035);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.055);
}

td {
  padding: 0 8px;
  font-size: 10px;
  font-weight: 850;
  color: #f4f8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table:not(.reconciliation-table) tbody td:first-child {
  background: linear-gradient(90deg, rgba(42, 182, 178, 0.24), rgba(42, 182, 178, 0.08));
  border-left: 2px solid rgba(77, 225, 218, 0.2);
}

table:not(.reconciliation-table) tbody td:nth-child(2) {
  background: linear-gradient(90deg, rgba(245, 185, 51, 0.22), rgba(245, 185, 51, 0.07));
  border-left: 1px solid rgba(245, 185, 51, 0.18);
}

table:not(.reconciliation-table) tbody td:last-child {
  background: linear-gradient(90deg, rgba(108, 174, 255, 0.2), rgba(108, 174, 255, 0.07));
  border-left: 1px solid rgba(108, 174, 255, 0.18);
}

.bank-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.bank-name {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
}

td:nth-child(2) {
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  word-break: keep-all;
}

.owner-cell {
  font-weight: 950;
  cursor: context-menu;
}

.owner-style-0 { color: #f6d36f; }
.owner-style-1 { color: #9bd7ff; }
.owner-style-2 { color: #a7f3c2; }
.owner-style-3 { color: #ffb4c1; }
.owner-style-4 { color: #cab8ff; }
.owner-style-5 { color: #ffd3a3; }
.owner-style-6 { color: #84f1e8; }
.owner-style-7 { color: #d7f58d; }
.owner-style-8 { color: #ff9db6; }
.owner-style-9 { color: #b8c7ff; }
.owner-style-10 { color: #ffc870; }
.owner-style-11 { color: #92e0a6; }

.owner-group-start td {
  border-top-width: 3px;
  border-top-style: solid;
}

.owner-group-start.owner-style-0 td { border-top-color: #f6d36f; }
.owner-group-start.owner-style-1 td { border-top-color: #9bd7ff; }
.owner-group-start.owner-style-2 td { border-top-color: #a7f3c2; }
.owner-group-start.owner-style-3 td { border-top-color: #ffb4c1; }
.owner-group-start.owner-style-4 td { border-top-color: #cab8ff; }
.owner-group-start.owner-style-5 td { border-top-color: #ffd3a3; }
.owner-group-start.owner-style-6 td { border-top-color: #84f1e8; }
.owner-group-start.owner-style-7 td { border-top-color: #d7f58d; }
.owner-group-start.owner-style-8 td { border-top-color: #ff9db6; }
.owner-group-start.owner-style-9 td { border-top-color: #b8c7ff; }
.owner-group-start.owner-style-10 td { border-top-color: #ffc870; }
.owner-group-start.owner-style-11 td { border-top-color: #92e0a6; }

tbody tr.owner-group-start:first-child td {
  border-top-width: 0;
}

.owner-style-1,
.owner-style-4,
.owner-style-7,
.owner-style-10 {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

.owner-style-2,
.owner-style-5,
.owner-style-8,
.owner-style-11 {
  letter-spacing: 0.2px;
}

td:last-child strong {
  display: block;
  white-space: nowrap;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(108, 174, 255, 0.24);
}

.balance-cell {
  min-width: 118px;
  padding-left: 6px;
  padding-right: 6px;
  cursor: text;
  border-radius: 6px;
  overflow: visible;
  text-overflow: clip;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.balance-cell:hover {
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

td em {
  display: block;
  margin-top: 2px;
  color: #81879e;
  font-size: 9px;
  font-style: normal;
  text-transform: none;
}

.balance-editor {
  width: 100%;
  min-width: 128px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(245, 185, 51, 0.45);
  background: rgba(245, 185, 51, 0.08);
  color: #ffffff;
  text-align: right;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 950;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(245, 185, 51, 0.1);
}

.bank-logo {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-right: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: #171b25;
  color: #263044;
  vertical-align: middle;
  overflow: hidden;
  flex: 0 0 auto;
}

.bank-logo img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.bank-logo-ing svg {
  width: 28px;
  height: 18px;
  display: block;
}

.bank-logo.logo-missing {
  display: none;
}

.empty {
  height: 80px;
  color: var(--muted);
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  margin: 10px 12px 10px;
  padding-top: 9px;
  border-top: 1px solid currentColor;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
}

footer span {
  color: #b9c0d4;
}

footer strong {
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 18%, transparent);
  color: currentColor;
  font-size: 12px;
  font-weight: 950;
  text-shadow: 0 0 14px color-mix(in srgb, currentColor 36%, transparent);
}

body[data-vault-style="obsidian"] .vault {
  outline: 1px solid rgba(255, 255, 255, 0.035);
}

body[data-vault-style="obsidian"] .vault-title {
  gap: 11px;
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) thead th {
  background: rgba(6, 9, 13, 0.62);
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) thead th:first-child {
  color: #8df6db;
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) thead th:nth-child(2) {
  color: #f7da8f;
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) thead th:last-child {
  color: #c5deff;
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) tbody td:first-child {
  background: linear-gradient(90deg, rgba(18, 93, 84, 0.46), rgba(18, 93, 84, 0.14));
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) tbody td:nth-child(2) {
  background: linear-gradient(90deg, rgba(91, 74, 28, 0.48), rgba(45, 49, 31, 0.18));
}

body[data-vault-style="obsidian"] table:not(.reconciliation-table) tbody td:last-child {
  background: linear-gradient(90deg, rgba(48, 70, 88, 0.74), rgba(30, 42, 58, 0.7));
  border-radius: 0 9px 9px 0;
}

body[data-vault-style="obsidian"] footer {
  margin-top: 16px;
  border-top-color: color-mix(in srgb, currentColor 76%, transparent);
}

body[data-vault-style="obsidian"] footer strong {
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 31%, #1f2937), rgba(28, 42, 35, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.26);
}

body[data-vault-style="slate"] .vault {
  outline: 1px solid rgba(171, 196, 222, 0.06);
}

body[data-vault-style="slate"] table:not(.reconciliation-table) thead th {
  background: rgba(25, 34, 45, 0.78);
  color: #b8c7d8;
}

body[data-vault-style="slate"] table:not(.reconciliation-table) tbody tr {
  border-top-color: rgba(174, 196, 220, 0.07);
}

body[data-vault-style="slate"] table:not(.reconciliation-table) tbody tr:nth-child(even) {
  background: rgba(139, 160, 184, 0.055);
}

body[data-vault-style="slate"] table:not(.reconciliation-table) tbody td:first-child {
  background: linear-gradient(90deg, rgba(36, 54, 66, 0.72), rgba(29, 39, 50, 0.38));
  border-left-color: rgba(137, 171, 203, 0.26);
}

body[data-vault-style="slate"] table:not(.reconciliation-table) tbody td:nth-child(2) {
  background: linear-gradient(90deg, rgba(49, 57, 64, 0.74), rgba(30, 39, 49, 0.42));
  border-left-color: rgba(202, 212, 224, 0.13);
}

body[data-vault-style="slate"] table:not(.reconciliation-table) tbody td:last-child {
  background: linear-gradient(90deg, rgba(38, 62, 84, 0.76), rgba(24, 36, 50, 0.74));
  border-left-color: rgba(137, 171, 203, 0.22);
}

body[data-vault-style="slate"] footer {
  border-top-color: rgba(171, 196, 222, 0.58);
}

body[data-vault-style="slate"] footer strong {
  border: 1px solid rgba(171, 196, 222, 0.22);
  background: linear-gradient(180deg, rgba(49, 66, 84, 0.9), rgba(29, 42, 57, 0.9));
  color: #e8f1ff;
}

body[data-vault-style="royal"] .vault {
  outline: 1px solid rgba(242, 201, 118, 0.07);
}

body[data-vault-style="royal"] .vault-title {
  gap: 12px;
}

body[data-vault-style="royal"] table:not(.reconciliation-table) thead th {
  background: rgba(15, 18, 27, 0.78);
}

body[data-vault-style="royal"] table:not(.reconciliation-table) thead th:first-child,
body[data-vault-style="royal"] table:not(.reconciliation-table) thead th:nth-child(2),
body[data-vault-style="royal"] table:not(.reconciliation-table) thead th:last-child {
  color: #f7d98d;
}

body[data-vault-style="royal"] table:not(.reconciliation-table) tbody td:first-child {
  background: linear-gradient(90deg, rgba(22, 40, 68, 0.76), rgba(17, 26, 45, 0.46));
  border-left-color: rgba(242, 201, 118, 0.2);
}

body[data-vault-style="royal"] table:not(.reconciliation-table) tbody td:nth-child(2) {
  background: linear-gradient(90deg, rgba(78, 55, 21, 0.58), rgba(35, 30, 22, 0.36));
  border-left-color: rgba(242, 201, 118, 0.2);
}

body[data-vault-style="royal"] table:not(.reconciliation-table) tbody td:last-child {
  background: linear-gradient(90deg, rgba(24, 43, 73, 0.76), rgba(19, 30, 52, 0.76));
  border-left-color: rgba(242, 201, 118, 0.18);
}

body[data-vault-style="royal"] td:last-child strong {
  color: #fff4ce;
  text-shadow: 0 0 14px rgba(242, 201, 118, 0.24);
}

body[data-vault-style="royal"] footer {
  border-top-color: rgba(242, 201, 118, 0.75);
}

body[data-vault-style="royal"] footer span {
  color: #f0e3bf;
}

body[data-vault-style="royal"] footer strong {
  border: 1px solid rgba(242, 201, 118, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(135, 95, 32, 0.72), rgba(58, 42, 22, 0.88));
  color: #ffe9a9;
  box-shadow: inset 0 1px 0 rgba(255, 244, 205, 0.16), 0 12px 28px rgba(0, 0, 0, 0.3);
}

.custom-vault-bg table:not(.reconciliation-table) thead th:first-child,
.custom-vault-bg table:not(.reconciliation-table) thead th:nth-child(2),
.custom-vault-bg table:not(.reconciliation-table) thead th:last-child,
body[data-vault-style="obsidian"] .custom-vault-bg table:not(.reconciliation-table) thead th,
body[data-vault-style="slate"] .custom-vault-bg table:not(.reconciliation-table) thead th,
body[data-vault-style="royal"] .custom-vault-bg table:not(.reconciliation-table) thead th {
  background: color-mix(in srgb, var(--vault-custom) 48%, rgba(5, 8, 13, 0.72));
  color: color-mix(in srgb, var(--vault-custom) 12%, #f5f8ff);
}

.custom-vault-bg table:not(.reconciliation-table) tbody td:first-child,
body[data-vault-style="obsidian"] .custom-vault-bg table:not(.reconciliation-table) tbody td:first-child,
body[data-vault-style="slate"] .custom-vault-bg table:not(.reconciliation-table) tbody td:first-child,
body[data-vault-style="royal"] .custom-vault-bg table:not(.reconciliation-table) tbody td:first-child {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--vault-custom) 70%, rgba(8, 24, 30, 0.76)),
    color-mix(in srgb, var(--vault-custom) 42%, rgba(8, 24, 30, 0.48)));
  border-left-color: color-mix(in srgb, var(--vault-custom) 70%, rgba(255, 255, 255, 0.16));
}

.custom-vault-bg table:not(.reconciliation-table) tbody td:nth-child(2),
body[data-vault-style="obsidian"] .custom-vault-bg table:not(.reconciliation-table) tbody td:nth-child(2),
body[data-vault-style="slate"] .custom-vault-bg table:not(.reconciliation-table) tbody td:nth-child(2),
body[data-vault-style="royal"] .custom-vault-bg table:not(.reconciliation-table) tbody td:nth-child(2) {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--vault-custom) 60%, rgba(38, 34, 22, 0.72)),
    color-mix(in srgb, var(--vault-custom) 34%, rgba(20, 26, 24, 0.5)));
  border-left-color: color-mix(in srgb, var(--vault-custom) 50%, rgba(255, 255, 255, 0.12));
}

.custom-vault-bg table:not(.reconciliation-table) tbody td:last-child,
body[data-vault-style="obsidian"] .custom-vault-bg table:not(.reconciliation-table) tbody td:last-child,
body[data-vault-style="slate"] .custom-vault-bg table:not(.reconciliation-table) tbody td:last-child,
body[data-vault-style="royal"] .custom-vault-bg table:not(.reconciliation-table) tbody td:last-child {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--vault-custom) 54%, rgba(26, 49, 68, 0.78)),
    color-mix(in srgb, var(--vault-custom) 38%, rgba(17, 31, 45, 0.78)));
  border-left-color: color-mix(in srgb, var(--vault-custom) 42%, rgba(255, 255, 255, 0.12));
}

.set-details-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.28fr) minmax(520px, 1fr) minmax(340px, 0.48fr);
  gap: 14px;
  align-items: start;
}

.set-details-layout:not(.details-open) {
  grid-template-columns: minmax(340px, 760px);
}

.set-details-layout:not(.details-open) .set-details-card,
.set-details-layout:not(.details-open) .identity-card {
  display: none;
}

.set-details-sidebar,
.set-details-card,
.identity-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 0%, rgba(245, 185, 51, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(22, 24, 31, 0.97), rgba(10, 11, 16, 0.98));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.set-details-sidebar,
.identity-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.set-details-selects {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.set-details-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.set-details-sidebar label,
.set-detail-grid label,
.secret-field {
  display: grid;
  gap: 8px;
  color: #9ea8bf;
  font-size: 10px;
  font-weight: 620;
  text-transform: uppercase;
}

.set-details-sidebar select,
.set-detail-grid input,
.secret-field input,
.block-list-row input {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(3, 5, 10, 0.64);
  color: #f7f9ff;
  font-size: 13px;
  font-weight: 560;
  outline: none;
}

.set-details-sidebar select,
.set-detail-grid input,
.secret-field input {
  padding: 0 12px;
}

.set-details-summary {
  display: grid;
  gap: 8px;
}

.set-owner-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.set-owner-item {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    rgba(6, 8, 13, 0.62);
  color: #f7f9ff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.set-owner-item:hover {
  border-color: rgba(245, 185, 51, 0.28);
  background:
    linear-gradient(135deg, rgba(245, 185, 51, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(9, 11, 17, 0.76);
  transform: translateY(-1px);
}

.set-owner-item.active {
  border-color: rgba(245, 185, 51, 0.48);
  box-shadow: inset 0 0 0 1px rgba(245, 185, 51, 0.14), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.set-owner-item .vault-avatar,
body[data-vault-style="obsidian"] .set-owner-item .vault-avatar,
body[data-vault-style="slate"] .set-owner-item .vault-avatar,
body[data-vault-style="royal"] .set-owner-item .vault-avatar,
.set-selected-card .vault-avatar,
body[data-vault-style="obsidian"] .set-selected-card .vault-avatar,
body[data-vault-style="slate"] .set-selected-card .vault-avatar,
body[data-vault-style="royal"] .set-selected-card .vault-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
}

.set-owner-item .vault-avatar img,
.set-selected-card .vault-avatar img,
.set-owner-item .vault-avatar svg,
body[data-vault-style="obsidian"] .set-owner-item .vault-avatar img,
body[data-vault-style="obsidian"] .set-owner-item .vault-avatar svg,
body[data-vault-style="slate"] .set-owner-item .vault-avatar img,
body[data-vault-style="slate"] .set-owner-item .vault-avatar svg,
body[data-vault-style="royal"] .set-owner-item .vault-avatar img,
body[data-vault-style="royal"] .set-owner-item .vault-avatar svg,
.set-selected-card .vault-avatar svg,
body[data-vault-style="obsidian"] .set-selected-card .vault-avatar img,
body[data-vault-style="obsidian"] .set-selected-card .vault-avatar svg,
body[data-vault-style="slate"] .set-selected-card .vault-avatar img,
body[data-vault-style="slate"] .set-selected-card .vault-avatar svg,
body[data-vault-style="royal"] .set-selected-card .vault-avatar img,
body[data-vault-style="royal"] .set-selected-card .vault-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.set-owner-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.set-owner-item strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-owner-item small {
  overflow: hidden;
  color: #8d98b5;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-owner-item b {
  color: #9cf3b0;
  font-size: 12px;
  font-weight: 720;
}

.set-selected-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(245, 185, 51, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 185, 51, 0.18), transparent 45%),
    rgba(255, 255, 255, 0.04);
}

.set-selected-card div {
  display: grid;
  gap: 3px;
}

.set-selected-card small {
  color: #95a0ba;
  font-size: 11px;
  font-weight: 560;
}

.set-details-prompt {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed rgba(245, 185, 51, 0.26);
  border-radius: 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 185, 51, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.set-details-prompt span {
  color: #8c96b1;
  font-size: 10px;
  font-weight: 640;
  text-transform: uppercase;
}

.set-details-prompt strong {
  color: #ffe2a0;
  font-size: 13px;
  font-weight: 680;
}

.set-details-summary > div,
.system-status {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.set-details-summary span,
.system-status span {
  color: #8c96b1;
  font-size: 10px;
  font-weight: 640;
  text-transform: uppercase;
}

.set-details-summary strong,
.system-status strong {
  color: #fff;
  font-size: 12px;
  font-weight: 720;
}

.set-detail-section {
  display: grid;
  gap: 12px;
}

.set-detail-section h3,
.identity-card h3 {
  margin: 0;
  color: #ffe2a0;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

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

.secret-field {
  grid-template-columns: minmax(130px, 0.5fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.secret-field > span {
  align-self: center;
  color: #e5ebff;
  font-size: 12px;
  font-weight: 660;
  text-transform: none;
}

.set-detail-grid .secret-field {
  grid-template-columns: 1fr auto;
}

.set-detail-grid .secret-field > span {
  grid-column: 1 / -1;
}

.set-detail-grid .secret-field input {
  grid-column: auto;
}

.secret-field button,
.identity-actions button,
.identity-drop span {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(245, 185, 51, 0.28);
  border-radius: 9px;
  background: rgba(245, 185, 51, 0.1);
  color: #ffe1a0;
  font-size: 11px;
  font-weight: 650;
}

.set-bank-passwords {
  display: grid;
  gap: 8px;
}

.bank-secret-row {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.identity-grid {
  display: grid;
  gap: 14px;
}

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

.identity-upload > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.identity-upload strong {
  color: #f6f8ff;
  font-size: 12px;
  font-weight: 700;
}

.identity-upload span {
  color: #8c96b1;
  font-size: 11px;
  font-weight: 550;
}

.identity-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px dashed rgba(245, 185, 51, 0.34);
  border-radius: 12px;
  background: rgba(245, 185, 51, 0.06);
  cursor: pointer;
}

.identity-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.identity-upload img {
  display: none;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
}

.identity-upload img.has-image {
  display: block;
}

.identity-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.identity-actions button:last-child {
  border-color: rgba(255, 118, 118, 0.25);
  background: rgba(255, 118, 118, 0.1);
  color: #ffb7b7;
}

.system-status-grid {
  display: grid;
  gap: 8px;
}

.security-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #cbd4e9;
  font-weight: 650;
}

.security-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.security-user-form {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(110px, 0.5fr) minmax(120px, 0.55fr);
  gap: 8px;
}

.security-user-form input,
.security-user-form select {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.24);
  color: #f5f7ff;
  padding: 0 10px;
}

.security-user-list,
.security-device-list,
.security-events {
  display: grid;
  gap: 8px;
}

.security-user,
.security-device,
.security-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.security-user.pending,
.security-device.pending {
  border-color: rgba(245, 185, 51, 0.28);
  background: rgba(245, 185, 51, 0.08);
}

.security-user strong,
.security-device strong,
.security-event strong {
  color: #f7f9ff;
  font-weight: 760;
}

.security-user span,
.security-device span,
.security-event span {
  color: #8d96b0;
  font-size: 11px;
}

.security-user-actions,
.security-device-actions {
  display: flex;
  gap: 6px;
}

.security-summary button,
.security-user-list button,
.security-device-list button.revoke {
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  font-weight: 850;
  cursor: pointer;
}

.security-summary button {
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe6ff;
}

.security-user-list button {
  height: 34px;
  background: linear-gradient(180deg, #ffd66b, #f5b933);
  color: #121318;
}

.security-user-list button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.security-user-list button.revoke,
.security-device-list button.revoke {
  background: linear-gradient(180deg, #ff7b83, #d33342);
  color: #fff;
}

.system-status.ok {
  border-color: rgba(113, 240, 138, 0.2);
  background: rgba(113, 240, 138, 0.07);
}

.system-status.danger {
  border-color: rgba(255, 118, 118, 0.22);
  background: rgba(255, 118, 118, 0.08);
}

.system-status.ok strong {
  color: #9cf3b0;
}

.system-status.danger strong {
  color: #ffb2b2;
}

body {
  font-weight: 500;
}

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

.workspace-tab,
.workspace-page-head h2,
.vault-head h2,
.vault-title,
.report-card .report-title,
.reconciliation-head h2 {
  font-weight: 760;
}

.workspace-page-head p,
.workspace-placeholder p,
.system-card p,
.add-card p,
.danger-card p,
label,
input,
select,
textarea,
.owner-cell,
.bank-name {
  font-weight: 540;
}

.balance-cell strong,
footer strong,
.summary-card strong,
.report-card dd {
  font-weight: 760;
}

@media (max-width: 1280px) {
  .top-actions {
    flex-wrap: wrap;
  }

  .iban-widget {
    grid-template-columns: auto minmax(240px, 1fr) auto minmax(210px, 320px);
    flex: 1 1 620px;
  }

  .vault-grid {
    grid-template-columns: repeat(2, minmax(420px, 1fr));
  }

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

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

  .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

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

  .chart-card-wide {
    grid-column: auto;
  }

  .bank-performance-row {
    grid-template-columns: minmax(140px, 1fr) minmax(80px, auto) minmax(160px, 1fr) auto;
  }

  .reconciliation-formula-band {
    grid-template-columns: 1fr;
  }

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

  .block-panel {
    margin: 0 16px;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding: 18px 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
  }

  .iban-widget {
    grid-template-columns: auto minmax(150px, 1fr) auto;
    width: 100%;
    flex-basis: 100%;
  }

  .iban-result {
    grid-column: 1 / -1;
  }

  .analytics-kpi-grid,
  .appearance-controls,
  .appearance-swatch-board,
  .appearance-swatch-row,
  .appearance-vault-colors,
  .add-workspace-grid,
  .delete-workspace-grid,
  .block-workspace-grid,
  .system-grid,
  .add-form-grid,
  .delete-form-grid,
  .block-list-row,
  .chart-mini-legend {
    grid-template-columns: 1fr;
  }

  .set-detail-grid,
  .secret-field,
  .set-detail-grid .secret-field {
    grid-template-columns: 1fr;
  }

  .set-detail-grid .secret-field input {
    grid-column: auto;
  }

  .analytics-grid {
    padding: 10px;
  }

  .flow-chart,
  .gap-chart {
    overflow-x: auto;
  }

  .bank-performance-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .control-panel,
  .tool-form,
  .tool-form.wide,
  .tool-form.delete-form {
    grid-template-columns: 1fr;
  }

  .drawer-status-card,
  .command-section-body,
  .swatch-row,
  .vault-color-grid,
  .account-detail-stats {
    grid-template-columns: 1fr;
  }

  .account-history-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .vault-grid {
    grid-template-columns: repeat(4, minmax(390px, 1fr));
  }

  td,
  thead th {
    padding-left: 10px;
    padding-right: 10px;
  }
}
