:root {
  color: #241c16;
  background: #efe5d7;
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --bg: #efe5d7;
  --surface: rgba(255, 250, 242, 0.74);
  --surface-strong: rgba(255, 253, 248, 0.92);
  --line: rgba(121, 94, 65, 0.18);
  --text: #241c16;
  --muted: #756756;
  --accent: #177a63;
  --accent-dark: #0f5f4d;
  --blue: #2f73d8;
  --imi: #2f73d8;
  --lena: #8b5cf6;
  --danger: #b42318;
  --shadow: 0 20px 55px rgba(83, 58, 28, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(135deg, #f5ecdf 0%, #ead9c5 45%, #f6efe5 100%);
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px;
  background: rgba(255, 250, 242, 0.7);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.25);
}

.brand {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.brand-logo {
  display: block;
  width: min(100%, 218px);
  aspect-ratio: 1;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(49, 39, 81, .16), inset 0 1px 0 rgba(255,255,255,.35);
}

.side-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.side-actions .sync-state,
.side-actions .button {
  width: 100%;
}

.side-action-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.side-action-row .icon-button {
  width: 100%;
  min-width: 0;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #514336;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 750;
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  filter: saturate(0.92);
  box-shadow: inset 0 0 0 1px rgba(121, 94, 65, 0.12);
}

.nav-item.active, .nav-item:hover {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 20px rgba(83,58,28,.08);
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  filter: saturate(1.08) contrast(1.03);
  box-shadow: 0 8px 18px rgba(83, 58, 28, 0.14);
}

.content { min-width: 0; padding: 24px 28px 40px; }

.topbar {
  display: block;
  margin-bottom: 16px;
}

.topbar h1 { margin: 0; font-size: 30px; line-height: 1.12; }
.topbar p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.sync-state, .status-line, .side-info {
  color: var(--accent-dark);
  background: rgba(255, 250, 242, 0.7);
  border: 1px solid rgba(20, 122, 99, 0.22);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 22px rgba(83,58,28,.06);
}

.sync-state { align-self: start; padding: 9px 12px; }
.status-line { display: inline-flex; margin-bottom: 16px; padding: 8px 10px; }
.side-info {
  width: 100%;
  padding: 9px 10px;
  color: #5c4f40;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.page-stack { display: grid; gap: 16px; }
.quick-actions { display: flex; justify-content: flex-end; gap: 10px; }

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.button.primary {
  color: #fff;
  background: linear-gradient(145deg, #19856c, #0f6b55);
  border-color: rgba(15, 95, 77, 0.55);
  box-shadow: 0 12px 22px rgba(20, 122, 99, 0.2), inset 0 1px 0 rgba(255,255,255,0.28);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 250, 242, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 22px rgba(83,58,28,0.08);
}

.button.danger {
  color: #fff;
  background: linear-gradient(145deg, #c2412e, #8f2d20);
  border-color: rgba(143, 45, 32, 0.52);
  box-shadow: 0 12px 22px rgba(194,65,46,.18), inset 0 1px 0 rgba(255,255,255,.24);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 20px;
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.button.disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(.25);
}

.edit-pencil {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  color: var(--accent-dark);
  background: rgba(255,255,255,.62);
}

.edit-pencil svg {
  width: 18px;
  height: 18px;
}

.icon-only {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255,255,255,.58);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.image-button {
  display: grid;
  place-items: center;
}

.image-button img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  object-fit: cover;
  filter: saturate(1.05);
}

.image-button.primary img {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.stat-card, .section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.18);
}

.stat-card { display: grid; gap: 8px; min-height: 104px; padding: 18px; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 850; }
.stat-card strong {
  color: var(--text);
  font-size: 26px;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.owner-value.imi { color: #124f9f; }
.owner-value.lena { color: #6d28d9; }

.positive { color: var(--accent); font-weight: 850; }
.negative, .form-error { color: var(--danger); font-weight: 850; }

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

.dashboard-grid .section:first-child {
  grid-column: 1 / -1;
}

.operation-focus {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.operation-picker {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
}

.operation-choice-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.54);
}

.operation-choice-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.operation-choice-group div {
  display: grid;
  gap: 6px;
}

.operation-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255,255,255,.58);
  box-shadow: 0 6px 14px rgba(71,52,28,.06), inset 0 1px 0 rgba(255,255,255,.68);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.operation-choice img {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 12px rgba(83,58,28,.10);
}

.operation-choice strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operation-choice.active {
  border-color: rgba(20,122,99,.42);
  color: #fff;
  background: linear-gradient(145deg, #147a63, #0f6a56);
  box-shadow: 0 12px 22px rgba(20,122,99,.18), inset 0 1px 0 rgba(255,255,255,.28);
}

.operation-choice.active img {
  box-shadow: 0 8px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.45);
}

.operation-focus-panel {
  min-width: 0;
}

.operation-focus-panel .section-body {
  padding: 14px;
}

.section { min-width: 0; overflow: hidden; }
.section-head { min-height: 56px; padding: 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.22); }
.section h2 { margin: 0; font-size: 16px; }
.section-body { padding: 18px; }

.settings-page > [id] {
  scroll-margin-top: 16px;
}

.settings-jumpbar {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(121,94,65,.14);
  border-radius: 14px;
  background: rgba(248,240,226,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 12px 26px rgba(83,58,28,.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.settings-jumpbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255,255,255,.46);
  box-shadow: inset 0 0 0 1px rgba(20,122,99,.12);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.instrument-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.instrument-toolbar > div {
  display: grid;
  gap: 4px;
}

.instrument-toolbar strong {
  color: var(--text);
  font-size: 15px;
}

.instrument-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.instrument-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.instrument-table-wrap table {
  min-width: 1280px;
}

.instrument-table-wrap td {
  vertical-align: top;
}

.instrument-table-wrap td:nth-child(9) {
  min-width: 180px;
}

.instrument-table-wrap td:nth-child(9) .table-input {
  display: block;
  width: 100%;
  margin-bottom: 4px;
}

.statistics-page {
  gap: 18px;
}

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

.insight-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 14px 28px rgba(83,58,28,.08);
}

.insight-card.hero {
  background:
    linear-gradient(145deg, rgba(20,122,99,.14), rgba(255,255,255,.38)),
    rgba(255,255,255,.36);
  border-color: rgba(20,122,99,.22);
}

.insight-card span,
.stats-copy-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.insight-card strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.insight-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

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

.stats-panel-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.stats-donut-panel {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.stats-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--stats-donut);
  box-shadow: inset 0 2px 8px rgba(255,255,255,.56), inset 0 -6px 16px rgba(44,32,20,.16), 0 16px 28px rgba(83,58,28,.10);
}

.stats-donut::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: rgba(248,240,226,.94);
  box-shadow: inset 0 2px 7px rgba(83,58,28,.13);
}

.stats-donut strong {
  position: relative;
  z-index: 1;
  max-width: 76px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.stats-donut-legend,
.stats-copy-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.stats-donut-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.stats-donut-legend b {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.stats-copy-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(121,94,65,.11);
}

.stats-copy-list strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.stat-bar-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(78px, .75fr) minmax(72px, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.stat-bar-row div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.stat-bar-row strong,
.stat-bar-row em {
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.stat-bar-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-bar-row em {
  justify-self: end;
  white-space: nowrap;
}

.stat-bar-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.stat-bar-row i {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(121,94,65,.13);
  box-shadow: inset 0 2px 5px rgba(92,73,51,.18), inset 0 -1px 0 rgba(255,255,255,.72);
}

.stat-bar-row i::after {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: max(3px, var(--w));
  border-radius: inherit;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 5px rgba(0,0,0,.12);
}

.monthly-profit-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 230px;
  padding-top: 8px;
}

.month-column {
  display: grid;
  grid-template-rows: 150px auto auto;
  align-items: end;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.month-column i {
  align-self: end;
  justify-self: center;
  width: 34px;
  height: var(--h);
  min-height: 8px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #42c5a9, #147a63);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -3px 6px rgba(0,0,0,.12), 0 10px 18px rgba(83,58,28,.08);
}

.month-column.negative i {
  background: linear-gradient(180deg, #f87171, #b42318);
}

.month-column strong {
  color: var(--text);
  font-size: 11px;
}

.owner-split { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 24px; }
.donut { width: 160px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--imi) 0 var(--split), var(--lena) var(--split) 100%); position: relative; box-shadow: inset 0 0 22px rgba(0,0,0,.05); }
.donut::after { content: ""; position: absolute; inset: 50px; border-radius: 50%; background: var(--surface-strong); }

.legend-list { display: grid; gap: 12px; }
.legend-row { display: grid; grid-template-columns: 12px 70px minmax(0, 1fr); align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.legend-dot { width: 10px; height: 10px; border-radius: 99px; }
.legend-dot.green, .legend-dot.blue, .legend-dot.imi { background: var(--imi); }
.legend-dot.lena { background: var(--lena); }

.owner-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.owner-badge.imi {
  color: #0f3c7d;
  background: rgba(47,115,216,.14);
  box-shadow: inset 0 0 0 1px rgba(47,115,216,.22);
}

.owner-badge.lena {
  color: #5b21b6;
  background: rgba(139,92,246,.16);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.24);
}

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

.dashboard-currency-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(42px, 1fr));
  justify-self: end;
  gap: 3px;
  width: fit-content;
  margin: 0 0 10px auto;
  padding: 4px;
  border: 1px solid rgba(121, 94, 65, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 16px rgba(83,58,28,.06);
}

.dashboard-currency-switch button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.dashboard-currency-switch button.active {
  color: #fff;
  background: linear-gradient(145deg, #147a63, #0f6a56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 8px 16px rgba(20,122,99,.16);
}

.account-wealth-grid,
.performance-list,
.active-position-groups {
  display: grid;
  gap: 12px;
}

.account-wealth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.wealth-card,
.performance-row,
.active-position-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 12px 26px rgba(83,58,28,.07);
}

.wealth-card {
  padding: 10px;
}

.wealth-card-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
}

.wealth-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.wealth-owner-head,
.performance-row-head,
.active-position-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.wealth-card-head {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.wealth-owner-head {
  align-items: center;
}

.wealth-card-head strong,
.active-position-head strong {
  color: var(--text);
  font-size: 14px;
}

.wealth-card-head span,
.performance-values span,
.performance-values em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.wealth-total {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.wealth-total > strong {
  font-size: 16px;
}

.all-currency-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.all-currency-values span {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.48);
  box-shadow: inset 0 0 0 1px rgba(121,94,65,.10);
}

.wealth-owner-list {
  display: grid;
  gap: 7px;
}

.wealth-owner-row {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(121,94,65,.12);
}

.status-3d-bar {
  position: relative;
  height: 24px;
  overflow: visible;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(92,73,51,.17), rgba(255,255,255,.64) 48%, rgba(92,73,51,.13));
  box-shadow: inset 0 2px 7px rgba(92,73,51,.22), inset 0 -1px 0 rgba(255,255,255,.75), 0 12px 20px rgba(83,58,28,.10);
}

.wealth-owner-row .status-3d-bar {
  width: min(100%, 280px);
  min-width: 160px;
  height: 12px;
}

.wealth-owner-row .status-3d-bar::before {
  inset: 2px 8px auto 8px;
  height: 2px;
}

.wealth-owner-row .status-fill {
  inset: 2px;
}

.wealth-donut-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.wealth-donut {
  display: grid;
  place-items: center;
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--donut);
  box-shadow: inset 0 2px 8px rgba(255,255,255,.55), inset 0 -5px 12px rgba(44,32,20,.16), 0 14px 24px rgba(83,58,28,.10);
  position: relative;
}

.wealth-donut::after {
  content: "";
  position: absolute;
  inset: 19px;
  border-radius: 50%;
  background: rgba(248,240,226,.94);
  box-shadow: inset 0 2px 7px rgba(83,58,28,.12);
}

.wealth-donut strong {
  position: relative;
  z-index: 1;
  max-width: 64px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

.empty-donut {
  background: rgba(121,94,65,.12);
}

.wealth-donut-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 900;
}

.wealth-donut-legend span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.52);
}

.wealth-donut-legend .imi { color: #0f3c7d; }
.wealth-donut-legend .lena { color: #5b21b6; }

.status-3d-bar::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 3px 12px auto 12px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  pointer-events: none;
}

.status-fill {
  position: absolute;
  inset: 3px;
  display: flex;
  width: min(var(--fill), 160%);
  max-width: 160%;
  overflow: hidden;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48), inset 0 -2px 5px rgba(0,0,0,.14);
}

.status-fill i {
  width: var(--segment);
  min-width: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -2px 5px rgba(0,0,0,.10);
}

.deposit-marker {
  position: absolute;
  z-index: 4;
  top: -5px;
  bottom: -5px;
  left: var(--deposit);
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7d6, #b8871c);
  box-shadow: 0 0 0 2px rgba(255,255,255,.72), 0 5px 12px rgba(83,58,28,.20);
}

.deposit-marker::after {
  content: "befizetés";
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 999px;
  color: #6b4a13;
  background: rgba(255,248,220,.92);
  box-shadow: 0 4px 10px rgba(83,58,28,.10);
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.status-3d-bar.loss-reference {
  background: linear-gradient(180deg, rgba(185,28,28,.16), rgba(255,255,255,.64) 48%, rgba(185,28,28,.12));
}

.status-3d-bar.imi .cash,
.status-legend.imi .cash { background: #91c9ff; }
.status-3d-bar.imi .positions,
.status-legend.imi .positions { background: #2f73d8; }
.status-3d-bar.imi .dividends,
.status-legend.imi .dividends { background: #1756b3; }
.status-3d-bar.imi .interest,
.status-legend.imi .interest { background: #0a326e; }

.status-3d-bar.lena .cash,
.status-legend.lena .cash { background: #dcc9ff; }
.status-3d-bar.lena .positions,
.status-legend.lena .positions { background: #8b5cf6; }
.status-3d-bar.lena .dividends,
.status-legend.lena .dividends { background: #6d28d9; }
.status-3d-bar.lena .interest,
.status-legend.lena .interest { background: #4c1d95; }

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-legend b {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.performance-values {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.performance-values strong {
  font-size: 17px;
}

.performance-row.imi { border-color: rgba(47,115,216,.20); }
.performance-row.lena { border-color: rgba(139,92,246,.22); }

.compact-position-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.compact-position-table th,
.compact-position-table td {
  padding: 7px 6px;
  border-top: 1px solid rgba(121,94,65,.13);
  text-align: left;
  vertical-align: middle;
}

.compact-position-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.compact-position-table th:nth-child(1),
.compact-position-table td:nth-child(1) { width: 20%; }
.compact-position-table th:nth-child(2),
.compact-position-table td:nth-child(2) { width: 22%; }

.owner-performance-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 12px 26px rgba(83,58,28,.07);
}

.owner-performance-card.imi { border-color: rgba(47,115,216,.22); }
.owner-performance-card.lena { border-color: rgba(139,92,246,.24); }

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

.owner-profit {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.owner-profit strong {
  font-size: 20px;
}

.owner-profit span,
.owner-account-table td > span {
  font-size: 12px;
  font-weight: 900;
}

.owner-metric-bars {
  display: grid;
  gap: 7px;
}

.owner-metric-bars label {
  display: grid;
  grid-template-columns: 92px minmax(90px, 1fr) 92px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.owner-metric-bars i {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(92, 73, 51, 0.16), rgba(255,255,255,0.5) 45%, rgba(92,73,51,0.12));
  box-shadow: inset 0 2px 5px rgba(92,73,51,.2), inset 0 -1px 0 rgba(255,255,255,.7), 0 8px 15px rgba(83,58,28,.08);
}

.owner-metric-bars i::before,
.split-3d-bar::before {
  content: "";
  position: absolute;
  inset: 2px 8px auto 8px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.56);
  pointer-events: none;
  z-index: 2;
}

.owner-metric-bars i::after {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(180deg, #42c5a9 0%, var(--accent) 52%, #0d5849 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -2px 4px rgba(0,0,0,.16), 0 7px 13px rgba(20,122,99,.18);
}

.owner-performance-card.lena .owner-metric-bars i::after {
  background: linear-gradient(180deg, #b79aff 0%, #8b5cf6 52%, #4f2ab7 100%);
}

.owner-metric-bars strong {
  justify-self: end;
  color: var(--text);
  font-size: 12px;
}

.owner-currency-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-currency-matrix > div {
  display: grid;
  gap: 5px;
}

.owner-currency-matrix > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.currency-amount-strip {
  display: grid;
  gap: 3px;
}

.currency-amount-strip > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
}

.currency-amount-strip em,
.currency-code-head {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.currency-amount-strip strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.currency-amount-strip.compact {
  grid-template-columns: 1fr;
}

.currency-amount-strip.compact > span {
  padding: 1px 0;
}

.owner-account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.owner-account-table th,
.owner-account-table td {
  padding: 6px 5px;
  border-top: 1px solid rgba(121, 94, 65, 0.14);
  vertical-align: top;
  text-align: left;
}

.owner-account-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.owner-account-table td:last-child {
  min-width: 92px;
  font-weight: 900;
}

.owner-account-table td:last-child span {
  display: block;
}

.cash-position-chart {
  display: grid;
  gap: 12px;
}

.split-chart-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66), 0 10px 22px rgba(83,58,28,.06);
}

.split-chart-head,
.split-chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.split-chart-head strong {
  font-size: 16px;
}

.split-3d-bar {
  position: relative;
  width: var(--w);
  min-width: 52px;
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(92,73,51,.16), rgba(255,255,255,.56) 48%, rgba(92,73,51,.14));
  box-shadow: inset 0 2px 7px rgba(92,73,51,.22), inset 0 -1px 0 rgba(255,255,255,.72), 0 12px 20px rgba(83,58,28,.10);
}

.split-3d-bar i {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #2f73d8 0 var(--cash), #8b5cf6 var(--cash) calc(var(--cash) + var(--position)), rgba(121,94,65,.18) 0),
    linear-gradient(180deg, rgba(255,255,255,.38), rgba(0,0,0,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 5px rgba(0,0,0,.14);
}

.split-chart-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.split-chart-legend b {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

.split-chart-legend b.cash { background: #2f73d8; }
.split-chart-legend b.position { background: #8b5cf6; }

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

.owner-currency-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.32);
}

.owner-currency-card > span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.currency-summary-list { display: grid; gap: 7px; }
.currency-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.currency-summary-row strong { color: var(--text); }

.currency-dashboard {
  display: grid;
  gap: 16px;
}

.currency-owner-table {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(121,94,65,.14);
}

.currency-owner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.currency-owner-table table {
  table-layout: fixed;
  font-size: 12px;
}

.currency-owner-table th:first-child,
.currency-owner-table td:first-child {
  width: 48%;
}

.currency-owner-table th,
.currency-owner-table td {
  padding: 9px 8px;
}

.currency-owner-table td:not(:first-child),
.currency-owner-table th:not(:first-child) {
  text-align: right;
}

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

.currency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.currency-badge img {
  width: 30px;
  height: 24px;
  border-radius: 7px;
  object-fit: contain;
  box-shadow: 0 3px 9px rgba(44,32,20,.12);
}

.currency-badge.text-only {
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,.46);
}

.bar-chart { display: grid; align-items: end; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 14px; min-height: 220px; padding-top: 8px; }
.bar-item { display: grid; gap: 8px; align-items: end; height: 210px; }
.bar { min-height: 8px; border-radius: 9px 9px 0 0; background: linear-gradient(180deg, #1c8b70, #13755e); }
.bar-label { color: var(--muted); text-align: center; font-size: 12px; font-weight: 850; }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 10px 10px; border-bottom: 1px solid rgba(121,94,65,.12); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: rgba(255,255,255,.34); font-size: 12px; font-weight: 900; }

.ticker { color: var(--accent-dark); font-weight: 900; }

.form-grid, .compact-form { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; }
.compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-form .button, .form-error { grid-column: 1 / -1; }
.focus-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.focus-form .field { gap: 5px; }
.focus-form input, .focus-form select { min-height: 34px; }
.focus-form .button {
  justify-self: start;
  min-height: 36px;
}

.transaction-calculator {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(20,122,99,.22);
  border-radius: 12px;
  color: var(--accent-dark);
  background: linear-gradient(145deg, rgba(255,255,255,.48), rgba(232,222,205,.58));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.58);
}

.transaction-calculator span {
  font-size: 12px;
  font-weight: 900;
}

.transaction-calculator strong {
  font-size: 18px;
  font-weight: 950;
}

.transaction-calculator small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 900; }

input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.68);
  outline: none;
}

textarea { min-height: 420px; padding: 14px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,122,99,.12); }

.fallback-logo, .security-logo {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--accent-dark);
  background: rgba(255,255,255,.72);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.security-cell { display: flex; align-items: center; gap: 10px; }
.security-logo { object-fit: cover; }
.security-name { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.ticker-edit-cell {
  display: grid;
  gap: 7px;
  min-width: 145px;
}

.ticker-edit-cell .security-cell { min-width: 0; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.mini-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.table-input, .table-select {
  min-width: 74px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}
.table-input.short { min-width: 72px; }
.editable-table td { padding: 9px 8px; }
.deduction-cell { color: var(--muted); font-size: 11px; line-height: 1.35; min-width: 110px; }
.movement-cell {
  min-width: 190px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.3;
}
.movement-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--accent-dark);
  font-weight: 950;
}
.movement-currency {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(20,122,99,.10);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(121,94,65,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.filter-bar input,
.filter-bar select {
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.closed-card-list {
  display: grid;
  gap: 14px;
}

.closed-compact-list,
.closed-owner-block {
  display: grid;
  gap: 12px;
}

.closed-owner-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.34);
  box-shadow: 0 14px 30px rgba(86,63,35,.08), inset 0 1px 0 rgba(255,255,255,.58);
}

.closed-owner-block.imi { border-color: rgba(47,115,216,.20); }
.closed-owner-block.lena { border-color: rgba(139,92,246,.22); }

.closed-owner-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.closed-owner-block-head > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.closed-compact-table {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.closed-compact-head,
.closed-compact-row summary {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) .55fr .8fr .8fr minmax(145px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
}

.closed-compact-head {
  padding: 6px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.closed-compact-row {
  border: 1px solid rgba(121,94,65,.12);
  border-radius: 11px;
  background: rgba(255,255,255,.38);
  overflow: hidden;
}

.closed-compact-row summary {
  position: relative;
  min-height: 42px;
  padding: 8px 10px 8px 34px;
  cursor: pointer;
  list-style: none;
}

.closed-compact-row summary::-webkit-details-marker { display: none; }

.closed-compact-row summary::after {
  content: "+";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 950;
}

.closed-compact-row[open] summary::after { content: "-"; }

.closed-compact-row summary > strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.closed-compact-row summary > strong.positive,
.closed-row-details strong.positive {
  color: #0f7a45;
}

.closed-compact-row summary > strong.negative,
.closed-row-details strong.negative {
  color: #b42318;
}

.closed-row-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 10px;
  border-top: 1px solid rgba(121,94,65,.12);
  background: rgba(248,240,226,.46);
}

.closed-row-details label {
  display: grid;
  gap: 4px;
}

.closed-row-details label span,
.closed-dividend-lines > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.closed-row-details label strong {
  font-size: 12px;
}

.closed-dividend-lines {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.closed-dividend-lines span:not(:first-child) {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.56);
  box-shadow: inset 0 0 0 1px rgba(121,94,65,.10);
}

.closed-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.34);
  box-shadow: 0 14px 30px rgba(86,63,35,.10), inset 0 1px 0 rgba(255,255,255,.55);
}

.closed-card-main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.closed-owner {
  display: grid;
  gap: 3px;
  color: var(--text);
  font-weight: 900;
}

.closed-owner span,
.closed-pl span,
.closed-node span,
.closed-details label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.closed-pl {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.closed-pl strong { font-size: 20px; }

.closed-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.closed-line {
  height: 2px;
  border-radius: 99px;
  background: rgba(20,122,99,.35);
}

.closed-node {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(121,94,65,.12);
}

.closed-node strong .table-input { max-width: 150px; }
.closed-node small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.closed-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.closed-details label {
  display: grid;
  gap: 5px;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 32, 21, .38);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(860px, 100%);
  max-height: min(88vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 16px;
  background: rgba(248, 240, 226, .92);
  box-shadow: 0 30px 80px rgba(53, 39, 23, .34), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(24px) saturate(1.12);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
}

.modal-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.modal-actions > span { grid-column: 2; }
.modal-actions .button.danger { grid-column: 1; }
.modal-actions .button.secondary { grid-column: 3; }
.modal-actions .button.primary { grid-column: 4; }

.notice { margin: 0; color: #5c4f40; font-size: 14px; line-height: 1.55; }
.empty { color: var(--muted); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-actions { margin-top: 16px; }
  .side-actions { grid-template-columns: 1fr 1fr; align-items: center; }
  .side-actions .sync-state { grid-column: 1 / -1; }
  .nav-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content { padding: 18px 14px 32px; }
  .sync-state { justify-self: start; }
  .stats-grid, .dashboard-grid, .operations-grid, .form-grid, .compact-form, .owner-split, .owner-performance-grid, .account-wealth-grid, .wealth-card-head, .performance-row-head, .stats-insight-grid, .statistics-grid, .stats-panel-grid { grid-template-columns: 1fr; }
  .owner-currency-grid, .owner-currency-matrix, .closed-card-main, .closed-timeline, .closed-details { grid-template-columns: 1fr; }
  .wealth-card-head, .performance-row-head { flex-direction: column; }
  .wealth-card-head, .performance-row-head { align-items: flex-start; }
  .wealth-card-compact { grid-template-columns: 1fr; }
  .wealth-donut-wrap { justify-items: start; }
  .wealth-total, .performance-values { justify-items: start; text-align: left; }
  .compact-position-table { min-width: 720px; }
  .active-position-group { overflow-x: auto; }
  .closed-owner-block { overflow-x: auto; }
  .closed-compact-table { min-width: 820px; }
  .closed-row-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-donut-panel { justify-items: start; }
  .stat-bar-row { grid-template-columns: 1fr; }
  .monthly-profit-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-metric-bars label { grid-template-columns: 82px minmax(70px, 1fr); }
  .owner-metric-bars strong { grid-column: 2; justify-self: start; }
  .currency-amount-strip { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-layer { padding: 12px; }
  .closed-line { height: 18px; width: 2px; justify-self: center; }
  .closed-pl { justify-items: start; }
  .operation-focus { grid-template-columns: 1fr; }
  .operation-picker { position: static; }
  .operation-choice-group div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions { justify-content: stretch; }
  .quick-actions .button { flex: 1; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
