/* יומן מסחר — עיצוב כהה בלבד, מותאם לטלגרם באייפון (390px) */

:root {
  --bg: #0f1115;
  --bg-2: #15171c;
  --card: #1a1d23;
  --card-2: #20242b;
  --field: #121418;
  --line: #2a2e36;
  --line-soft: #23272e;
  --text: #f1f3f6;
  --text-2: #c3c8d1;
  --muted: #8d94a0;
  --dim: #626976;
  --blue: #4c9bff;
  --blue-strong: #1f7aff;
  --blue-soft: rgba(76, 155, 255, 0.15);
  --green: #4fd19b;
  --green-soft: rgba(79, 209, 155, 0.13);
  --red: #f2767b;
  --red-soft: rgba(242, 118, 123, 0.13);
  --amber: #f0b53d;
  --amber-soft: rgba(240, 181, 61, 0.13);
  --purple: #b9a2ff;
  --purple-soft: rgba(160, 130, 255, 0.15);
  --r-card: 22px;
  --r-ctl: 14px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Rubik", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
html.sheet-open body {
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  text-align: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

/* מספרים: משמאל לימין, מבודדים, רוחב ספרות קבוע */
.num {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pos {
  color: var(--green);
}
.neg {
  color: var(--red);
}
.zero {
  color: var(--text-2);
}
.dim {
  color: var(--dim);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
  color: var(--muted);
}
.center {
  text-align: center;
}
.warn-text {
  color: var(--amber);
  font-size: 0.8em;
  font-weight: 600;
}
.live {
  color: var(--blue);
  font-weight: 600;
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- מעטפת ---------- */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  overflow-x: clip;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-top) + 10px) 16px 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2f8bff, #1a5fd1);
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 122, 255, 0.28);
}
.brand b {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.brand small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(240, 181, 61, 0.3);
  padding: 5px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.live-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 1px solid var(--line);
  flex: none;
  transition: background 0.15s, transform 0.12s;
}
.icon-btn.ghost {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
}
.icon-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.08);
}

/* סינון גלובלי — נדבק למעלה */
.filterbar {
  position: sticky;
  top: var(--safe-top);
  z-index: 20;
  padding: 0 16px;
  margin-top: 8px;
  transition: background 0.2s, box-shadow 0.2s;
}
.filterbar-in {
  padding: 8px 0 10px;
}
.filterbar.stuck {
  background: rgba(15, 17, 21, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line-soft), 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* בקר מקטעים */
.seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  background: #1d2027;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  isolation: isolate;
}
.seg-ind {
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / var(--n));
  transform: translateX(calc(var(--i) * -100%));
  border-radius: 12px;
  background: #101216;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.32s var(--ease);
  z-index: -1;
}
.seg-btn {
  height: 40px;
  border-radius: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.seg-btn.on {
  color: var(--text);
  font-weight: 600;
}

.acc-chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -16px;
  padding-inline: 16px;
}
.acc-chips::-webkit-scrollbar {
  display: none;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 14px;
  padding-inline: 8px 12px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.acc-chip.on {
  background: #1c2738;
  border-color: #33507d;
  color: var(--text);
}
.acc-chip[aria-disabled="true"] {
  cursor: default;
}
.chip-check {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

/* אות החשבון */
.badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  background: #262a31;
  color: #cfd5de;
}
.badge.sm {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 12px;
}
.badge.lg {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 19px;
}
.acc-vantage {
  background: #1f2d47;
  color: #8fb4ff;
}
.acc-bybit {
  background: #3a2f17;
  color: #f0b53d;
}
.acc-startrader {
  background: #2d2542;
  color: #c0a6ff;
}

/* ---------- לשוניות תוכן ---------- */
.view.enter {
  animation: viewIn 0.24s var(--ease) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.hero {
  padding: 14px 20px 6px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--muted);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}
.hero-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 6px;
  line-height: 1.15;
}
.hero-sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.hero-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
}
.hero-meta .ico {
  width: 17px;
  height: 17px;
}

.period-bar {
  margin: 12px 16px 0;
}
.range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 20px 2px;
  font-size: 14px;
  color: var(--muted);
}
.range .ico {
  width: 18px;
  height: 18px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 22px 20px 0;
}

/* כרטיסים */
.card {
  margin: 12px 16px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  position: relative;
}
.card.flush-x {
  padding-inline: 0;
  padding-bottom: 0;
  overflow: hidden;
}
.pad-x {
  padding-inline: 18px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-titles {
  min-width: 0;
}
.eyebrow {
  font-size: 13.5px;
  color: var(--muted);
}
.card-title {
  font-size: 21px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.25;
}
.sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}
.label {
  font-size: 14px;
  color: var(--muted);
}
.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 18px 0 14px;
}

.tile {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.tile .ico {
  width: 22px;
  height: 22px;
}
.tile.sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.tile.sm .ico {
  width: 17px;
  height: 17px;
}
.tile-blue {
  background: var(--blue-soft);
  color: #6aa8ff;
}
.tile-purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.tile-green {
  background: var(--green-soft);
  color: var(--green);
}
.tile-amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.tile-gray {
  background: #262a31;
  color: #c0c6d0;
}

/* כרטיס משולב */
.combo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.combo-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-weight: 700;
}
.num.lg,
.combo-total .num {
  font-size: 21px;
}
.acc-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.acc-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.acc-col-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-col-val {
  font-size: 16.5px;
  font-weight: 700;
}
.acc-col-sub {
  font-size: 12px;
  color: var(--dim);
}

/* כרטיס יתרה */
.card.balance {
  background: linear-gradient(165deg, #1a2a44 0%, #152238 55%, #121c2c 100%);
  border-color: #27405f;
}
.bal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bal-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #8fb4ff;
  font-weight: 500;
}
.bal-big {
  font-size: 44px;
  font-weight: 700;
  color: #a9c8ff;
  letter-spacing: -0.02em;
  margin-top: 8px;
  line-height: 1.1;
}
.bal-big.md {
  font-size: 36px;
}
.bal-sub {
  font-size: 13.5px;
  color: #8da0bb;
  margin-top: 6px;
}
.bal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #9fb0c8;
}
.bal-foot b,
.acc-sub b {
  color: var(--text);
  font-weight: 600;
  margin-inline-start: 4px;
}
.vsep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
}
.bal-rows {
  margin: 14px -18px -18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.bal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.bal-row:first-child {
  border-top: 0;
}
.bal-row:active {
  background: rgba(255, 255, 255, 0.04);
}
.bal-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bal-row-main b {
  font-size: 15.5px;
  font-weight: 600;
}
.bal-row-main small {
  font-size: 12.5px;
  color: #8da0bb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bal-row-val {
  font-size: 17px;
  font-weight: 700;
  color: #cfe0ff;
}

/* כרטיסי סטטיסטיקה */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 16px 0;
}
.card.stat {
  margin: 0;
  padding: 15px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.3;
}
.stat-big {
  font-size: 28px;
  font-weight: 700;
  margin: 12px 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.stat-big.fit {
  font-size: 21px;
}
.stat-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: auto;
}
.stat-wl {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  margin-top: auto;
  padding-top: 4px;
}

.result-big {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
  line-height: 1.15;
}

/* פס רווח/הפסד */
.plbar {
  margin-top: 12px;
}
.plbar-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.plbar-labels .num {
  font-weight: 600;
  margin-inline-start: 4px;
}
.plbar-track {
  display: flex;
  gap: 4px;
  height: 8px;
  margin-top: 10px;
}
.plbar-track i {
  display: block;
  border-radius: 99px;
  min-width: 8px;
  transition: flex-basis 0.4s var(--ease);
}
.plbar-g {
  background: var(--green);
}
.plbar-r {
  background: var(--red);
}
.plbar-track.is-empty i {
  background: #2a2e36;
}

/* עקומה */
.chart {
  margin-top: 10px;
}
.eq-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.eq-zero {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-dasharray: 3 5;
  stroke-width: 1;
}
.eq-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.eq-line.pos {
  stroke: var(--green);
}
.eq-line.neg {
  stroke: var(--red);
}
.eq-dot.pos,
.eq-halo.pos {
  fill: var(--green);
}
.eq-dot.neg,
.eq-halo.neg {
  fill: var(--red);
}
.eq-dot.zero,
.eq-halo.zero {
  fill: var(--text-2);
}
.eq-halo {
  opacity: 0.22;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dim);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.chart-empty {
  padding: 22px 0 8px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% + 36px);
  margin: 18px -18px -18px;
  min-height: 52px;
  border-top: 1px solid var(--line-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
  border-radius: 0 0 var(--r-card) var(--r-card);
  transition: background 0.15s;
}
.card-link:active {
  background: rgba(76, 155, 255, 0.06);
}
.card-link .ico {
  width: 18px;
  height: 18px;
}

/* תובנות */
.insights li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.insights li + li {
  border-top: 1px solid var(--line-soft);
}
.insights li:first-child {
  padding-top: 0;
}
.insights li:last-child {
  padding-bottom: 0;
}
.insights .bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
  flex: none;
  margin-top: 9px;
  margin-inline: 4px 2px;
}

/* מצב ריק */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 10px 16px;
  gap: 8px;
}
.empty-ico {
  width: 54px;
  height: 54px;
  padding: 14px;
  border-radius: 18px;
  background: #22262d;
  color: var(--muted);
  margin-bottom: 6px;
}
.empty-title {
  font-size: 18px;
  font-weight: 600;
}
.empty-text {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 290px;
}

/* ---------- עסקאות ---------- */
.trades-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 16px 0;
}
.ttabs {
  display: flex;
  gap: 4px;
}
.ttab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}
.ttab .count {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 12.5px;
  background: #22262d;
  color: var(--muted);
}
.ttab.on {
  color: var(--blue);
  font-weight: 600;
}
.ttab.on .count {
  background: var(--blue-soft);
  color: var(--blue);
}
.ttabs {
  flex: none;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  flex: 1;
  min-width: 0;
  max-width: 190px;
  color: var(--muted);
  transition: border-color 0.15s;
}
.search:focus-within {
  border-color: #3d6fb8;
}
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder {
  color: var(--dim);
}
.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.day {
  margin: 18px 16px 0;
}
.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 8px;
}
.day-name {
  font-size: 15px;
  font-weight: 600;
}
.day-name .muted {
  font-weight: 400;
  font-size: 13.5px;
  margin-inline-start: 4px;
}
.day-sum {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.tlist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.tlist.flush {
  margin: 0 -18px -18px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--r-card) var(--r-card);
  background: transparent;
}
.trow {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  transition: background 0.15s;
}
.trow:first-child {
  border-top: 0;
}
.trow:active {
  background: rgba(255, 255, 255, 0.035);
}
.trow-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.trow-sym {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trow-sym b {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  direction: ltr;
  unicode-bidi: isolate;
}
.trow-acc {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trow-time {
  font-size: 13px;
  color: var(--dim);
}
.trow-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: end;
}
.trow-pnl {
  font-size: 16.5px;
  font-weight: 700;
}
.trow-lots {
  font-size: 13px;
  color: var(--muted);
}
.trow-pos {
  font-size: 12px;
  color: var(--dim);
}
.trow-end .live {
  font-size: 12px;
}
.trow-chev {
  width: 16px;
  height: 16px;
  color: var(--dim);
}

/* צד העסקה */
.side {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
.side .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.3;
}
.side.buy {
  background: #1d2a42;
  color: #8fb4ff;
}
.side.sell {
  background: #2a2340;
  color: #bba3ff;
}

/* אייקון נכס */
.asset {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 700;
  flex: none;
  line-height: 1;
}
.asset .ico {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
}
.asset.lg {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 27px;
}
.asset-fx {
  background: #1f2c44;
  color: #8fb4ff;
}
.asset-gold {
  background: #3a301d;
  color: #e9c46a;
}
.asset-silver {
  background: #2a2e35;
  color: #c9d1db;
}
.asset-btc {
  background: #fbeed6;
  color: #e6912b;
}
.asset-eth {
  background: #262a48;
  color: #a5b0ff;
}
.asset-crypto {
  background: #1f3433;
  color: #7fd3c4;
}
.asset-gen {
  background: #262a31;
  color: #cfd5de;
}

/* ---------- דוחות ---------- */
.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.mcell {
  background: var(--card-2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.mcell .k {
  font-size: 13px;
  color: var(--muted);
}
.mcell .v {
  font-size: 19px;
  font-weight: 700;
}
.mcell .s {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.4;
}

.brows {
  display: flex;
  flex-direction: column;
}
.brow {
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.brow:first-child {
  border-top: 0;
  padding-top: 0;
}
.brow:last-child {
  padding-bottom: 0;
}
.brow-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brow-lbl {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}
.brow-meta {
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
  min-width: 124px;
  text-align: end;
}
.brow-val {
  font-size: 15px;
  font-weight: 700;
  text-align: end;
  flex: none;
}
.brow-lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brow-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}
.brow-track {
  flex: 1;
  height: 6px;
  background: #23272e;
  border-radius: 99px;
  overflow: hidden;
}
.brow-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
}
.brow-track i.pos {
  background: var(--green);
}
.brow-track i.neg {
  background: var(--red);
}
.brow-track i.zero {
  background: #4a505b;
}
.foot-note {
  margin-top: 12px;
}
.pad-y {
  padding: 6px 0;
}

/* היומן היומי */
.daily {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.daily th {
  background: var(--card-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
  text-align: start;
  padding: 12px 8px;
  line-height: 1.3;
}
.daily td {
  padding: 13px 8px;
  border-top: 1px solid var(--line-soft);
  text-align: start;
}
.daily th:first-child,
.daily td:first-child {
  padding-inline-start: 18px;
}
.daily th:last-child,
.daily td:last-child {
  padding-inline-end: 18px;
}
.daily td.d {
  color: var(--blue);
}
.daily tr.is-today td {
  background: rgba(76, 155, 255, 0.06);
}
.daily-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- טפסים ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.field-label small {
  font-weight: 400;
  color: var(--dim);
}
.input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  background: var(--field);
  border: 1px solid #2c313a;
  border-radius: var(--r-ctl);
  font-size: 18px;
  color: var(--text);
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder {
  color: var(--dim);
  font-weight: 400;
}
.input:focus {
  border-color: #3d79d6;
  box-shadow: 0 0 0 3px rgba(76, 155, 255, 0.16);
}
.num-in,
.sym-in {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: left;
}
.sym-in {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.input.area {
  height: auto;
  min-height: 92px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.grid3 .input {
  font-size: 16px;
  padding: 0 10px;
  height: 48px;
}

.chips {
  display: flex;
  gap: 8px;
}
.chips.wrap {
  flex-wrap: wrap;
}
.chips.scroll {
  overflow-x: auto;
  scrollbar-width: none;
  margin: 10px -18px 0;
  padding: 0 18px;
}
.chips.scroll::-webkit-scrollbar {
  display: none;
}
.chips.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.chips.quick .chip {
  padding: 0 4px;
  font-size: 14px;
  min-width: 0;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid #2c3139;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.chip::after {
  content: "";
  position: absolute;
  inset: -3px -2px;
}
.chip:active {
  transform: scale(0.96);
}
.chip.on {
  background: rgba(76, 155, 255, 0.16);
  border-color: #3d6fb8;
  color: #d6e6ff;
}
.chip.yes.on {
  background: var(--green-soft);
  border-color: rgba(79, 209, 155, 0.5);
  color: var(--green);
}
.chip.no.on {
  background: var(--red-soft);
  border-color: rgba(242, 118, 123, 0.5);
  color: var(--red);
}
.chip .ico {
  width: 16px;
  height: 16px;
}
.chip.static {
  cursor: default;
  height: 34px;
  font-size: 14px;
}
.chip.static.warn {
  background: var(--amber-soft);
  border-color: rgba(240, 181, 61, 0.3);
  color: #f3cf86;
}

.side-box {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px dashed #2f343d;
  border-radius: var(--r-ctl);
  overflow: hidden;
}
.side-box .side {
  height: 28px;
  padding: 0 10px;
  font-size: 14px;
}
.side-box small {
  font-size: 12px;
  white-space: nowrap;
}

.risk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.risk-row .chips {
  flex: 1;
  gap: 6px;
}
.risk-row .chip {
  flex: 1;
  padding: 0 6px;
}
.custom-risk {
  position: relative;
  width: 82px;
  flex: none;
}
.custom-risk .input {
  height: 42px;
  font-size: 16px;
  padding: 0 24px 0 10px;
  text-align: center;
  border-radius: 12px;
}
.custom-risk span {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  font-size: 14px;
  pointer-events: none;
}
.custom-risk.on .input {
  border-color: #3d6fb8;
  background: rgba(76, 155, 255, 0.1);
}
.calc-form > .field-label {
  margin-top: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.toggle-text b {
  font-size: 16px;
  font-weight: 600;
}
.toggle-text small {
  font-size: 13px;
  color: var(--muted);
}
.switch {
  width: 52px;
  height: 32px;
  border-radius: 99px;
  background: #2f343d;
  position: relative;
  flex: none;
  transition: background 0.22s;
}
.switch i {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.26s var(--ease);
}
.switch.on {
  background: var(--green);
}
.switch.on i {
  transform: translateX(-20px);
}

/* כרטיס תוצאה במחשבון */
.hint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.hint-card .ico {
  width: 26px;
  height: 26px;
  color: var(--blue);
}
.rc.is-bad {
  border-color: rgba(242, 118, 123, 0.35);
}
.rc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rc-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rc-name b {
  font-size: 16px;
  font-weight: 600;
}
.rc-name small {
  font-size: 12.5px;
  color: var(--muted);
}
.rc-sym {
  margin-inline-start: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--card-2);
  border-radius: 8px;
  padding: 5px 9px;
}
.rc-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.rc-lots {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rc-big {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.rc-big small {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  margin-inline-start: 8px;
  letter-spacing: 0;
}
.rc-big.neg .num {
  color: var(--red);
}
.rc-main .side {
  height: 28px;
  padding: 0 10px;
  font-size: 14px;
  margin-bottom: 8px;
}
.rc-rows {
  margin-top: 14px;
  background: var(--card-2);
  border-radius: 14px;
  padding: 2px 14px;
}
.rc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.rc-row:first-child {
  border-top: 0;
}
.rc-row .k {
  font-size: 14px;
  color: var(--muted);
}
.rc-row .k small {
  font-size: 12.5px;
  color: var(--dim);
}
.rc-row .v {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15.5px;
  font-weight: 700;
}
.rc-row .v.neg {
  color: var(--red);
}
.rc-row .sep {
  color: var(--dim);
  font-weight: 400;
}
.rc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.rc-stats > div {
  background: var(--card-2);
  border-radius: 14px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.rc-stats .k {
  font-size: 12px;
  color: var(--muted);
}
.rc-stats .v {
  font-size: 15.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-stats .s {
  font-size: 12.5px;
  color: var(--muted);
}
.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
}
.tag.ok {
  background: var(--green-soft);
  color: var(--green);
}
.rc-tp {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  padding: 11px 12px;
  background: rgba(79, 209, 155, 0.08);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-2);
}
.rc-tp b {
  margin-inline-start: 4px;
}
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
}
.alert .ico {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.alert.warn {
  background: var(--amber-soft);
  border: 1px solid rgba(240, 181, 61, 0.28);
  color: #f3cf86;
}
.alert.bad {
  background: var(--red-soft);
  border: 1px solid rgba(242, 118, 123, 0.32);
  color: #ffb7ba;
}
.alert .num {
  font-weight: 700;
  color: inherit;
}

/* כפתורים */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border-radius: var(--r-ctl);
  font-size: 16px;
  font-weight: 600;
  background: #252a32;
  border: 1px solid #2f353e;
  color: var(--text);
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn .ico {
  width: 19px;
  height: 19px;
}
.btn.primary {
  background: var(--blue-strong);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(31, 122, 255, 0.28);
}
.btn.ghost {
  background: transparent;
}
.btn.block {
  width: 100%;
  margin-top: 14px;
}
.btn.done {
  background: var(--green-soft);
  border-color: rgba(79, 209, 155, 0.35);
  color: var(--green);
  box-shadow: none;
}
.btn:disabled {
  opacity: 0.6;
}
.btn.busy {
  opacity: 0.7;
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-row .btn {
  flex: 1;
}

/* ---------- יתרות ---------- */
.acc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.acc-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-name b {
  font-size: 18px;
  font-weight: 700;
}
.acc-name small {
  font-size: 13px;
  color: var(--muted);
}
.acc-month {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 16px;
  font-weight: 700;
}
.acc-big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.acc-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}
.acc-upd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.acc-upd .ico {
  width: 15px;
  height: 15px;
}
.bal-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.bal-form > .muted {
  margin-top: 8px;
}
.form-err {
  margin-top: 8px;
  color: var(--red);
  font-size: 14px;
}
.cash-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.cash-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.cash-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.cash-ico.pos {
  background: var(--green-soft);
}
.cash-ico.neg {
  background: var(--red-soft);
}
.cash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cash-main b {
  font-size: 15px;
  font-weight: 600;
}
.cash-main small {
  font-size: 13px;
  color: var(--muted);
}
.cash-amt {
  font-size: 16px;
  font-weight: 700;
}
.usage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px 16px 0;
  font-size: 13px;
  color: var(--dim);
}
.usage .ico {
  width: 15px;
  height: 15px;
}

/* ---------- סרגל לשוניות ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 560px);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(21, 23, 28, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid #24272d;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #858c98;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.15s;
}
.tab .ico {
  width: 25px;
  height: 25px;
  stroke-width: 1.8;
  transition: transform 0.18s var(--ease);
}
.tab:active .ico {
  transform: scale(0.88);
}
.tab.on {
  color: var(--blue);
}
.tab.on span {
  font-weight: 600;
}

/* ---------- גיליון תחתון ---------- */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  transition: opacity 0.28s;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  max-height: calc(100dvh - var(--safe-top) - 36px);
  display: flex;
  flex-direction: column;
  background: #171a1f;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  transform: translateY(100%);
  transition: transform 0.38s var(--ease);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
  padding-bottom: var(--safe-bottom);
}
.sheet-wrap.open .sheet {
  transform: translateY(0);
}
.sheet-wrap.open .sheet-backdrop {
  opacity: 1;
}
.sheet-grab {
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  touch-action: none;
}
.sheet-grab span {
  width: 40px;
  height: 5px;
  border-radius: 99px;
  background: #3a3f48;
}
.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 18px 26px;
}
.sh-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}
.sh-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
}
.sh-title p {
  font-size: 14px;
  margin-top: 3px;
}
.sh-pnl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.sh-pnl .result-big {
  font-size: 34px;
  margin: 2px 0 0;
}
.rpill {
  font-size: 17px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 11px;
}
.rpill.pos {
  background: var(--green-soft);
}
.rpill.neg {
  background: var(--red-soft);
}
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kv {
  background: var(--card);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.kv .k {
  font-size: 12.5px;
  color: var(--muted);
}
.kv .v {
  font-size: 15px;
  font-weight: 600;
}
.sh-sec {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.sheet-body .field-label {
  margin: 16px 0 8px;
}
.notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notes li {
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.notes small {
  color: var(--dim);
  font-size: 12px;
  flex: none;
}
.sheet-body .btn.block {
  margin-top: 18px;
}
.sheet-body > .muted.small {
  margin-top: 10px;
}

/* ---------- הודעה קצרה ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  transform: translate(-50%, 16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 12px 16px;
  background: #262b33;
  border: 1px solid #353b45;
  border-radius: 15px;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.3s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.ok .ico {
  color: var(--green);
}
.toast.err .ico {
  color: var(--red);
}

/* ---------- מסכי מצב ---------- */
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 28px;
  text-align: center;
}
.screen-ico {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: #6aa8ff;
  margin-bottom: 4px;
}
.screen-ico .ico {
  width: 34px;
  height: 34px;
}
.screen-title {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.3;
}
.screen-text {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 310px;
}
.screen .btn {
  margin-top: 8px;
  min-width: 200px;
}
.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #2a2f38;
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (hover: hover) {
  .trow:hover,
  .bal-row:hover {
    background: rgba(255, 255, 255, 0.03);
  }
  .chip:hover {
    border-color: #3a404a;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 359px) {
  .hero-title {
    font-size: 28px;
  }
  .stat-big {
    font-size: 24px;
  }
  .bal-big {
    font-size: 38px;
  }
  .rc-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- כניסה מהדפדפן (Face ID / קוד בטלגרם) ---------- */
.login-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  margin-top: 8px;
}
.login-box [hidden] {
  display: none !important;
}
#lg-codebox:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn.big {
  min-height: 52px;
  font-size: 16px;
}
.login-label {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.login-code {
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font: 600 24px/1 "Rubik", system-ui, sans-serif;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-code:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
#lg-msg {
  min-height: 20px;
  margin: 2px 0 0;
}
.login-demo {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-top: 6px;
}

/* ---------- גרסה 0.2: תוכנית, סיגנלים, כללים, הפקדות ---------- */
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.add-btn {
  height: 44px;
  padding: 0 14px 0 16px;
  gap: 6px;
  flex: none;
  background: var(--blue-soft);
  border-color: rgba(76, 155, 255, 0.35);
  color: #d6e6ff;
}
.plan-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  flex: none;
}
.plan-mark .ico {
  width: 13px;
  height: 13px;
}
.grid2.tight,
.grid2.flat {
  margin-top: 0;
}
.sheet-body .grid2 .field-label {
  margin: 0;
}
.sheet-body form .grid2 {
  margin-top: 14px;
}

/* גודל הפוזיציה */
.expo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--card);
  font-size: 14.5px;
  color: var(--text-2);
}
.expo .ico {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--muted);
}
.expo .num {
  font-weight: 700;
  color: var(--text);
}
.expo small {
  display: block;
  font-size: 12.5px;
  margin-top: 2px;
  opacity: 0.85;
}
.expo.bad {
  background: var(--red-soft);
  border: 1px solid rgba(242, 118, 123, 0.32);
  color: #ffb7ba;
}
.expo.bad .ico,
.expo.bad .num {
  color: var(--red);
}

/* מול התוכנית */
.plan-box {
  margin-top: 12px;
  padding: 4px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.pl-src {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}
.pl-src .ico {
  width: 17px;
  height: 17px;
}
.pl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.pl-row .k {
  color: var(--muted);
}
.pl-row .v {
  font-weight: 600;
  text-align: end;
}
.sep {
  font-style: normal;
  color: var(--dim);
  margin: 0 6px;
}
.pl-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card-2);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
}
.pl-note .ico {
  width: 18px;
  height: 18px;
  flex: none;
}
.pl-note .num {
  font-weight: 700;
}
.pl-note.neg {
  background: var(--red-soft);
  color: #ffb7ba;
}
.pl-note.pos {
  background: var(--green-soft);
  color: var(--green);
}
.pl-note.warn {
  background: var(--amber-soft);
  color: #f3cf86;
}

/* פוזיציות של עסקה */
.legs {
  margin-top: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 2px 14px;
}
.leg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.leg:first-child {
  border-top: 0;
}
.leg-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.leg-main b {
  font-size: 15px;
  font-weight: 600;
}
.leg-px {
  font-size: 14px;
  color: var(--text-2);
  text-align: right;
  unicode-bidi: isolate;
}
.leg-main small {
  font-size: 12.5px;
  color: var(--muted);
}
.leg-pnl {
  font-size: 15.5px;
  font-weight: 700;
  flex: none;
}

/* גרפים */
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb img:not([src]) {
  visibility: hidden;
}
.thumb.failed::after {
  content: "לא נטען";
  font-size: 12px;
  color: var(--dim);
}
.thumb.failed img {
  display: none;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 12px) 8px calc(var(--safe-bottom) + 12px);
  overflow: auto;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}
.lightbox-x {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}
.lightbox-x .ico {
  width: 22px;
  height: 22px;
}

/* פעולות בתחתית הגיליון */
.sh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.sh-actions .btn {
  flex: 1 1 150px;
  height: 46px;
  padding: 0 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.btn.danger {
  color: var(--red);
  border-color: rgba(242, 118, 123, 0.3);
}
.btn.danger.armed {
  background: var(--red);
  border-color: transparent;
  color: #fff;
  flex-basis: 100%;
}
.move-box {
  margin-top: 4px;
}
.sh-head.no-ico {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.dt-in {
  font-size: 16px;
  padding: 0 10px;
  min-width: 0;
  text-align: left;
  color-scheme: dark;
}
input.dt-in::-webkit-date-and-time-value {
  text-align: left;
}

/* אזהרת מינוף בסקירה */
.lev-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--red-soft);
  border: 1px solid rgba(242, 118, 123, 0.32);
  color: #ffb7ba;
  font-size: 14.5px;
  line-height: 1.45;
  text-align: start;
}
.lev-warn > span {
  flex: 1;
  min-width: 0;
}
.lev-warn .num {
  font-weight: 700;
}
.lev-warn .ico {
  width: 19px;
  height: 19px;
  flex: none;
}
.lev-warn .lev-chev {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* סיגנלים */
.sg {
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.sg:first-child {
  border-top: 0;
  padding-top: 0;
}
.sg:last-child {
  padding-bottom: 0;
}
.sg-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sg-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sg-sym {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sg-sym b {
  font-size: 16.5px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
.sg-main small {
  font-size: 13px;
  color: var(--muted);
}
.sg-del,
.row-del {
  color: var(--muted);
}
.sg-del .ico,
.row-del .ico {
  width: 18px;
  height: 18px;
}
.icon-btn.armed {
  width: auto;
  padding: 0 12px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.sg-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.sg-px {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--card-2);
  font-size: 14.5px;
  font-weight: 600;
  min-width: 0;
}
.sg-px small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.sg-px .num {
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.tag:not(.ok) {
  white-space: nowrap;
}

/* דוחות: דפוסים, מול הסיגנלים, סיכום שבועי */
.patterns li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.patterns li:first-child {
  border-top: 0;
  padding-top: 0;
}
.patterns li:last-child {
  padding-bottom: 0;
}
.pt-text {
  flex: 1;
  min-width: 0;
}
.pt-cost {
  flex: none;
  font-weight: 700;
  font-size: 15.5px;
}
.ok-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
}
.ok-line .ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--green);
  margin-top: 2px;
}
.mgrid.flat {
  margin-top: 0;
}
.exits-label {
  margin-top: 16px;
}
.exits li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--text-2);
}
.exits li:first-child {
  border-top: 0;
}
.exits li:last-child {
  padding-bottom: 0;
}
.exits li span {
  flex: 1;
}
.exits li b {
  font-size: 16px;
  color: var(--text);
}
.exits .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}
.exits .dot.pos {
  background: var(--green);
}
.exits .dot.neg {
  background: var(--red);
}
.rv-headline {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.55;
}
.rv-h {
  display: block;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.rv-list li {
  position: relative;
  padding: 6px 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.rv-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}
.rv-list.good li::before {
  background: var(--green);
}
.rv-list.warn li::before {
  background: var(--amber);
}
.rv-fix {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--blue-soft);
  border: 1px solid rgba(76, 155, 255, 0.28);
}
.rv-fix .rv-h {
  margin-top: 0;
  color: var(--blue);
}
.rv-fix p {
  margin-top: 4px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
}
.rv-vs {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.rv-old {
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.rv-old summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  font-size: 14.5px;
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.rv-old summary::-webkit-details-marker {
  display: none;
}
.rv-old summary .ico {
  width: 16px;
  height: 16px;
  color: var(--dim);
  transition: transform 0.2s;
}
.rv-old[open] summary .ico {
  transform: rotate(-90deg);
}
.rv-old-body {
  padding-bottom: 6px;
}
.ico.spin {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.export-btn {
  width: auto;
  margin: 16px 16px 0;
  display: flex;
}
.export-note {
  margin: 8px 16px 0;
}

/* יתרות: הפקדות, חיבור, כללים */
.acc-dep {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--card-2);
  font-size: 14px;
  color: var(--muted);
}
.acc-dep b {
  color: var(--text);
  font-weight: 600;
  margin-inline-start: 4px;
}
.acc-dep b .num.pos {
  color: var(--green);
}
.acc-dep b .num.neg {
  color: var(--red);
}
.acc-dep small {
  margin-inline-start: 6px;
  font-size: 12.5px;
}
.conn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.conn .ico {
  width: 15px;
  height: 15px;
}
.conn.on {
  color: var(--green);
}
.cash-ico.credit {
  background: var(--amber-soft);
  color: var(--amber);
}
.cash-main b {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.cash-amt.credit {
  color: var(--amber);
}
.cash-row .row-del {
  margin-inline-start: -4px;
}
.cash-form {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}
.cash-form .field-label,
.ml-add .chips {
  margin: 14px 0 8px;
}
.cash-form .grid2 .field-label {
  margin: 0;
}
.cash-form .grid2 {
  margin-top: 14px;
}
.kind-hint {
  margin-top: 8px;
}
.unit-in {
  position: relative;
  display: block;
}
.unit-in i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  color: var(--dim);
  pointer-events: none;
}
.unit-in .input {
  padding-right: 34px;
}
.rule-wide {
  margin: 12px 0 8px;
}
.rules-sub {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-weight: 600;
  color: var(--text-2);
}
.ml-list {
  margin-top: 6px;
}
.ml-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.ml-row:first-child {
  border-top: 0;
}
.ml-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ml-main b {
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}
.ml-main small {
  font-size: 12.5px;
  color: var(--muted);
}
.ml-lots {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ml-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 52px;
  gap: 8px;
}
.ml-add-row .input {
  font-size: 16px;
  padding: 0 12px;
}
.ml-add-row .btn {
  height: 52px;
  padding: 0;
}
.chip:disabled {
  opacity: 0.5;
}
.asset.sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
}
.asset.sm .ico {
  width: 22px;
  height: 22px;
}
.grid2.tight {
  margin-top: 12px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}
.stack .field-label {
  margin: 0;
}
.stack .dt-in {
  width: 100%;
  font-size: 17px;
  padding: 0 14px;
}
.trow-r {
  font-size: 12.5px;
  font-weight: 600;
}
.cash-main small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cash-note {
  color: var(--dim) !important;
  font-size: 12px !important;
  text-align: right;
}
.cash-row {
  gap: 10px;
}

/* ---------- לטיפול ---------- */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.todo {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.todo-verify,
.todo-question {
  border-color: rgba(245, 180, 70, 0.35);
}
.todo-claude {
  border-color: rgba(160, 130, 255, 0.35);
}
.todo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.todo-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-2);
}
.todo-kind .ico,
.todo-kind svg {
  width: 15px;
  height: 15px;
}
.todo-title {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  line-height: 1.45;
}
.todo-how {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.todo-detail {
  margin: 2px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  direction: rtl;
  font: 13px/1.5 "Rubik", system-ui, sans-serif;
  color: var(--text-2);
  background: #15181d;
  border-radius: 10px;
  padding: 8px 10px;
  max-height: 160px;
  overflow: auto;
}
.todo-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
}
.todo-btns .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}
.todo-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.todo-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.todo-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font: 16px/1.5 "Rubik", system-ui, sans-serif;
  padding: 10px 12px;
  resize: vertical;
}

/* ---------- מחשבון: כמה יעדים וחלוקה ---------- */
.tps-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 12px;
}
.tps-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tp-in {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 4px 0 10px;
}
.tp-in > .num {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.tp-in .input {
  border: 0;
  background: transparent;
  min-width: 0;
  flex: 1;
  padding-inline: 4px;
}
.tp-in .icon-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: none;
}
.tps-box .btn.small {
  align-self: flex-start;
  min-height: 38px;
  font-size: 14px;
}
.split {
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.split-head .btn.small {
  min-height: 34px;
  font-size: 13px;
  padding: 0 10px;
}
.split-row {
  display: grid;
  grid-template-columns: 1fr 92px 1fr;
  align-items: center;
  gap: 8px;
}
.split-row.bad {
  opacity: 0.7;
}
.split-tp {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 14px;
}
.split-tp small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.split-in {
  text-align: center;
  min-height: 44px;
  font-size: 16px;
}
.split-in.warn {
  border-color: var(--amber, #f5b446);
}
.split-out {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-weight: 600;
}
.split-out small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.split-sum,
.split-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.split-sum.neg {
  color: var(--red, #f07178);
}
.split-total {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.split-total small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  text-align: left;
}

/* ---------- תצוגה מקדימה: צבע לכל קבוצה (FFA ירוק, THOMAS לבן). רק עם ?look=groups עד שיגאל מאשר ---------- */
html.look-groups {
  --ffa: #34d399;
  --ffa-soft: rgba(52, 211, 153, 0.14);
  --ffa-line: rgba(52, 211, 153, 0.55);
  --thomas: #f4f6fa;
  --thomas-soft: rgba(244, 246, 250, 0.12);
  --thomas-line: rgba(244, 246, 250, 0.6);
}
/* אות החשבון: לפי הקבוצה */
html.look-groups .badge.acc-vantage,
html.look-groups .badge.acc-bybit {
  background: var(--ffa-soft);
  color: var(--ffa);
  box-shadow: inset 0 0 0 1px var(--ffa-line);
}
html.look-groups .badge.acc-startrader {
  background: var(--thomas-soft);
  color: var(--thomas);
  box-shadow: inset 0 0 0 1px var(--thomas-line);
}
/* בורר הקבוצה למעלה */
html.look-groups .seg-btn[data-v="FFA"] {
  color: var(--ffa);
}
html.look-groups .seg-btn[data-v="THOMAS"] {
  color: var(--thomas);
}
html.look-groups .seg-btn[data-v="FFA"].on {
  text-shadow: 0 0 14px rgba(52, 211, 153, 0.45);
}
html.look-groups .acc-chip:has(.acc-vantage, .acc-bybit).on {
  border-color: var(--ffa-line);
  background: var(--ffa-soft);
}
html.look-groups .acc-chip:has(.acc-startrader).on {
  border-color: var(--thomas-line);
  background: var(--thomas-soft);
}
/* פס צבע בצד של כל כרטיס ושורה ששייכים לחשבון */
html.look-groups .trow[data-grp="FFA"],
html.look-groups .sg[data-grp="FFA"],
html.look-groups .card:has(> .rc-head .acc-vantage, > .rc-head .acc-bybit),
html.look-groups .sg:has(.acc-vantage, .acc-bybit),
html.look-groups .bal-row:has(.acc-vantage, .acc-bybit) {
  box-shadow: inset -3px 0 0 var(--ffa);
}
html.look-groups .trow[data-grp="THOMAS"],
html.look-groups .sg[data-grp="THOMAS"],
html.look-groups .card:has(> .rc-head .acc-startrader),
html.look-groups .sg:has(.acc-startrader),
html.look-groups .bal-row:has(.acc-startrader) {
  box-shadow: inset -3px 0 0 var(--thomas);
}
html.look-groups .grp-ffa {
  color: var(--ffa);
  font-weight: 600;
}
html.look-groups .grp-thomas {
  color: var(--thomas);
  font-weight: 600;
}
.look-banner {
  position: sticky;
  bottom: 84px;
  margin: 12px 16px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #1e2a24;
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #d8f5e9;
  font-size: 14px;
  text-align: center;
  z-index: 5;
}

/* ---------- ⓘ הסברים במחשבון ---------- */
.toggle-row .toggle-text b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.info-btn {
  width: 30px;
  height: 30px;
  margin: -6px 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
}
.info-btn svg {
  width: 17px;
  height: 17px;
}
.toggle-row .switch {
  flex: none;
  cursor: pointer;
  position: relative;
}
.toggle-row .switch::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.info-sheet h2 {
  margin: 4px 0 12px;
  font-size: 20px;
}
.info-sheet h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}
.info-sheet p {
  margin: 0 0 10px;
  line-height: 1.6;
  color: var(--text-2);
  font-size: 15px;
}
.info-sheet p b {
  color: var(--text);
}
.info-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-2);
}
.info-list li b {
  color: var(--text);
  font-size: 14px;
}
.info-now {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blue-soft);
}
.info-tip {
  font-size: 16px !important;
}

/* ---------- טעות הקלדה במחיר ---------- */
.slip-card {
  border-color: rgba(242, 118, 123, 0.4);
}
.slip-card .info-list {
  margin-top: 12px;
}
.slip-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slip-actions .btn {
  width: 100%;
  justify-content: center;
}

/* שגיאת טעינה (שומר ב-index.html) */
.boot-err {
  font-size: 13px;
  opacity: 0.7;
  word-break: break-word;
  max-width: 320px;
  margin: 0 auto 16px;
}

/* ---------- המחשבון במק (?widget=1): חלון קטן, בלי לשוניות ---------- */
.widget .app {
  padding-bottom: 84px;
}
.widget .hero {
  display: none;
}
.widget .icon-btn.on {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: transparent;
}
.sig-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--text);
  font-size: 14px;
}
.sig-banner svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex: none;
}
.sig-banner span {
  flex: 1;
}
.link-btn {
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 6px;
}

.w-strip {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: rgba(15, 17, 21, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
.w-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
}
.w-item b {
  font-size: 18px;
}
.w-item small {
  color: var(--muted);
  font-size: 12px;
}
.w-item.bad b {
  color: var(--red);
}
.w-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-size: 14px;
}
.w-note svg {
  width: 16px;
  height: 16px;
}

/* ---------- אופן החלוקה בין היעדים ---------- */
.split-modes .split-head {
  margin-bottom: 10px;
}
.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mode-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px 10px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  color: var(--text);
}
.mode-btn b {
  font-size: 15px;
}
.mode-btn small {
  color: var(--muted);
  font-size: 12px;
}
.mode-btn.on {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.rec-tag {
  position: absolute;
  top: -9px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--green, #3ecf8e);
  color: #08110c;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.split-why {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.split-why svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--amber, #f5b942);
}
.split-modes .alert {
  margin-top: 10px;
}

/* ---------- כמה כסף בכל חשבון (במחשבון) ---------- */
.bal-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 12px 16px 0;
}
.bal-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  min-width: 0;
}
.bt-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: -0.2px;
  color: var(--text-2);
  min-width: 0;
}
.bt-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.bt-head small {
  font-size: 10.5px;
  color: var(--muted);
}
.bt-amt {
  font-size: 16px;
  direction: ltr;
  text-align: end;
  white-space: nowrap;
}
.bal-tile small {
  font-size: 11.5px;
  color: var(--muted);
}
.bal-tile.stale small::after {
  content: " · ישן";
  color: var(--amber);
}

/* המלצה באפור במשבצות החלוקה */
.split-in::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.split-row.sugg .split-out {
  opacity: 0.55;
}
.split-ok {
  margin: 10px 0 4px;
}

/* ---------- יחס עם הסבר: נקודות מתחת, מעבר עכבר = בועה, לחיצה = הסבר ---------- */
.tip {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.tip:focus-visible {
  outline: 2px solid var(--blue);
  border-radius: 4px;
}
.tip-pop {
  position: fixed;
  z-index: 200;
  padding: 9px 11px;
  border-radius: 10px;
  background: #2b3039;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.tip-pop[hidden] {
  display: none;
}
.info-list li b.neg {
  color: var(--red);
}
.info-list li b.pos {
  color: var(--green);
}

/* ---------- חץ רווח/הפסד ליד היתרה ---------- */
.chg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 8px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.chg svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}
.chg.pos {
  color: var(--green);
  background: var(--green-soft);
}
.chg.neg {
  color: var(--red);
  background: var(--red-soft);
}
.bal-row-val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.bal-row-val .chg {
  margin: 0;
}
.bal-big .chg {
  font-size: 14px;
  padding: 3px 9px 3px 7px;
}

/* ---------- הרווח היומי ---------- */
.bal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.daily-pill svg {
  width: 15px;
  height: 15px;
}
.daily-pill span:not(.num) {
  font-weight: 500;
  opacity: 0.85;
}
.daily-pill.pos {
  color: var(--green);
  background: var(--green-soft);
}
.daily-pill.neg {
  color: var(--red);
  background: var(--red-soft);
}
.dbars {
  direction: ltr;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 120px;
  padding: 6px 4px 24px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--card-2);
}
.dbar {
  position: relative;
  flex: 1;
  max-width: 34px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.dbar i {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
}
.dbar.pos i {
  background: var(--green);
}
.dbar.neg i {
  background: var(--red);
}
.dbar small {
  position: absolute;
  bottom: -19px;
  font-size: 10.5px;
  color: var(--muted);
}
.info-list li small {
  font-size: 12px;
  color: var(--muted);
}

.bal-top .bal-label {
  white-space: nowrap;
}
.bal-top .daily-pill {
  padding: 6px 10px;
  font-size: 12.5px;
}
