/* GRUPURI — listă + pagina unui grup */
.content-wide:not([hidden]) { display: block; }
.content-wide { padding: 32px 52px 120px; }
.content-wide > * { width: 100%; }
:root { --green: #22c55e; --green-strong: #16a34a; --red: #ef4444; --red-strong: #dc2626; }

/* Casete statistici (compacte, lipite de lista de dedesubt) */
.g-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.g-stat { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 26px 22px; border: 1px solid var(--border-strong); border-radius: 16px;
          background: radial-gradient(120% 140% at 0% 0%, var(--surface-raised) 0%, var(--surface) 60%); box-shadow: var(--shadow); }
.g-stat::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgb(255 255 255 / 6%), transparent 40%); }
.g-stat.is-green { border-color: rgb(34 197 94 / 45%); box-shadow: 0 0 0 1px rgb(34 197 94 / 10%), 0 18px 50px rgb(34 197 94 / 8%); }
.ring { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-soft); box-shadow: 0 0 0 5px rgb(127 127 127 / 6%); }
.ring svg { width: 23px; height: 23px; }
.is-green .ring { color: var(--green); border-color: rgb(34 197 94 / 50%); box-shadow: 0 0 0 5px rgb(34 197 94 / 8%); }
.g-stat h3 { margin: 0 0 5px; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.g-stat p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.g-stat .num { margin-left: auto; padding-left: 18px; border-left: 1px solid var(--border); font-size: 40px; font-weight: 780; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.g-stat .num small { color: var(--muted); font-size: 22px; font-weight: 600; }
.is-green .num { color: var(--green); }

/* Panou listă */
.g-panel { overflow: hidden; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.g-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.g-search { flex: 0 1 380px; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--bg); color: var(--muted); }
.g-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.g-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; outline: none; }
.g-chips { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; }
.g-chips button { padding: 7px 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.g-chips button.on { background: var(--accent); color: var(--accent-contrast); }
.g-refresh { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); color: var(--text-soft); font-size: 13px; font-weight: 650; cursor: pointer; }
@media (hover: hover) { .g-refresh:hover { background: var(--surface-soft); } }
.g-refresh svg { width: 16px; height: 16px; }
.g-refresh.is-busy svg { animation: spin .9s linear infinite; }

.g-thead, .g-row { display: grid; grid-template-columns: 96px minmax(220px, 1.3fr) minmax(260px, 1.7fr) 150px 140px; align-items: center; gap: 16px; padding: 0 22px; }
.g-thead { min-height: 44px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: .12em; }
.g-thead .c { text-align: center; }
.g-row { min-height: 80px; padding-block: 12px; border-bottom: 1px solid var(--border); transition: background-color .15s; }
.g-row:last-child { border-bottom: 0; }
@media (hover: hover) { .g-row:hover { background: var(--surface-raised); } }
.g-row > .edit-c, .g-row > .read { justify-self: center; }
.state { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-size: 13px; font-weight: 650; }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgb(34 197 94 / 15%); }
.state.off { color: var(--red); }
.state.off i { background: var(--red); box-shadow: 0 0 0 4px rgb(239 68 68 / 15%); }
.grp { display: flex; align-items: center; gap: 14px; min-width: 0; }
.grp > div { min-width: 0; }
.ava { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; object-fit: cover; color: #fff; font-size: 16px; font-weight: 800; }
.ava.lg { width: 64px; height: 64px; border-radius: 17px; font-size: 22px; }
.grp b { display: block; overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.grp small { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.tg-link { color: #38bdf8; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .tg-link:hover { text-decoration: underline; } }
.type { padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.kw { display: flex; flex-wrap: wrap; gap: 5px; }
.kw span { padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-soft); color: var(--text-soft); font-size: 11px; font-weight: 650; }
.kw .more { border-style: dashed; color: var(--muted); }
.g-edit { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 650; cursor: pointer; }
@media (hover: hover) { .g-edit:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); } }
.g-edit svg { width: 15px; height: 15px; }
.read { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; }
.read.on span { color: var(--green); }
.read.off span { color: var(--red); }
.g-note { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 48px 22px; color: var(--muted); font-size: 14px; text-align: center; }
.g-note.is-error { color: var(--error); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* Comutator: verde = pornit. La Pornit/Oprit al grupului, oprit = roșu. */
.switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 99px; background: var(--border-strong); cursor: pointer; transition: background-color .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); transition: left .18s; }
.switch[aria-checked="true"] { background: var(--green-strong); }
.switch[aria-checked="true"]::after { left: 23px; }
.read .switch[aria-checked="false"], .switch.rg[aria-checked="false"] { background: var(--red-strong); }
.switch:disabled { opacity: .6; cursor: wait; }

/* Pagina unui grup */
.g-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .g-back:hover { color: var(--text); } }
.g-back svg { width: 18px; height: 18px; }
.g-card { margin-bottom: 16px; padding: 22px 24px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.g-head { display: flex; align-items: center; gap: 18px; background: radial-gradient(120% 160% at 0% 0%, var(--surface-raised) 0%, var(--surface) 55%); }
.g-head-txt { min-width: 0; flex: 1; }
.g-head h1 { margin: 0 0 6px; overflow: hidden; font-size: 24px; font-weight: 740; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.g-head p { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; }
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-grid > .g-card { margin-bottom: 0; }
.g-grid + .g-card { margin-top: 16px; }
.g-card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 16px; font-weight: 720; }
.g-card h2 svg { width: 19px; height: 19px; color: var(--muted); }

.fld { position: relative; display: grid; gap: 7px; margin-top: 16px; min-width: 0; }
.lbl { display: flex; align-items: center; gap: 4px; color: var(--text-soft); font-size: 13px; font-weight: 700; }
.tipwrap { position: relative; display: inline-flex; }
.info-btn { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: help; }
.info-btn svg { width: 15px; height: 15px; }
.tip { position: absolute; z-index: 20; top: calc(100% + 8px); left: -4px; display: none; width: min(380px, 78vw); padding: 12px 14px; border: 1px solid var(--border-strong); border-left: 3px solid var(--text-soft);
       border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow); color: var(--text-soft); font-size: 12.5px; font-weight: 500; line-height: 1.6; white-space: normal; }
@media (hover: hover) { .tipwrap:hover .tip { display: block; } }
.tipwrap:focus-within .tip, .tipwrap.tip-on .tip { display: block; }
@media (hover: hover) { .tipwrap:hover .info-btn { background: var(--surface-soft); color: var(--text); } }
.tipwrap:focus-within .info-btn, .tipwrap.tip-on .info-btn { background: var(--surface-soft); color: var(--text); }

/* Rânduri „ⓘ Etichetă: [casetă] [comutator]” — caseta lipită de etichetă */
.fgrid { display: grid; gap: 12px; margin-top: 18px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; }
.frow > .lbl { color: var(--text); font-size: 14px; }
.frow .switch { margin-left: 4px; }
.frow .tp-grid { flex: 1 1 100%; }
@media (min-width: 1025px) and (pointer: fine), (min-width: 1401px) { .frow .tp-grid { flex: 0 1 auto; } }

.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); cursor: text; }
.tags:focus-within { border-color: var(--text-soft); }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 8px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-soft); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.tags.is-ign .tag { border-color: rgb(239 68 68 / 35%); color: #fca5a5; }
:root[data-theme="light"] .tags.is-ign .tag { color: var(--red-strong); }
.tag button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
@media (hover: hover) { .tag button:hover { background: var(--border-strong); color: var(--text); } }
.tag svg { width: 11px; height: 11px; }
.tags input { flex: 1; min-width: 140px; min-height: 28px; border: 0; background: none; font-size: 12.5px; text-transform: uppercase; outline: none; }
.tags input::placeholder { color: var(--muted-2); text-transform: none; }

.inp { display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); }
.inp:focus-within { border-color: var(--text-soft); }
.inp input { width: auto; min-width: 0; padding: 0; border: 0; background: none; font-size: 14px; font-variant-numeric: tabular-nums; outline: none; }
.inp em { margin-left: 5px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; }
.sel { min-height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; font-weight: 650; }

.tp-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid rgb(34 197 94 / 35%); border-radius: 12px; background: var(--surface-raised); }
.tp b { min-width: 30px; font-size: 12.5px; font-weight: 760; font-variant-numeric: tabular-nums; }
.tp .inp { min-height: 34px; }
.tp-del { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
@media (hover: hover) { .tp-del:hover { background: rgb(239 68 68 / 15%); color: var(--red); } }
.tp-del svg { width: 14px; height: 14px; }
.tp-add { display: grid; place-items: center; width: 44px; height: 44px; border: 1px dashed var(--text-soft); border-radius: 12px; background: none; cursor: pointer; }
@media (hover: hover) { .tp-add:hover { border-style: solid; background: var(--accent); color: var(--accent-contrast); } }
.tp-add svg { width: 18px; height: 18px; }

.g-example { border-color: rgb(34 197 94 / 35%); background: radial-gradient(120% 160% at 100% 0%, rgb(34 197 94 / 7%) 0%, var(--surface) 55%); }
.g-example p { margin: 10px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.g-example .buy { color: var(--green); }
.g-example .sell { color: var(--red); }
.g-example .ex-zone { color: var(--text-soft); }
.g-example .ex-sum { color: var(--muted); font-size: 12.5px; }

.g-dirty { flex: 1; color: var(--muted); font-size: 13px; }
.g-dirty.is-dirty { color: #f59e0b; font-weight: 650; }
.btn-sec { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft); }
@media (hover: hover) { .btn-sec:hover { background: var(--surface-soft); } }

.s-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.s-empty.is-error { color: var(--error); }

/* Telefon */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  .content-wide { padding: 16px 16px 110px; }
  .g-stats { grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
  .g-stat { padding: 12px 14px; }
  .g-stat p { display: none; }
  .g-stat h3 { margin: 0; font-size: 14px; }
  .ring { width: 38px; height: 38px; }
  .ring svg { width: 18px; height: 18px; }
  .g-stat .num { font-size: 26px; }
  .g-stat .num small { font-size: 15px; }
  .g-toolbar { flex-wrap: wrap; padding: 14px; }
  .g-search { flex: 1 1 100%; }
  .g-refresh { padding: 0 12px; }
  .g-refresh span { display: none; }
  .g-thead { display: none; }
  .g-row { grid-template-columns: 1fr auto; grid-template-areas: "grp read" "kw kw" "state edit"; gap: 12px; padding: 16px 14px; }
  .g-row > .state { grid-area: state; }
  .g-row > .grp { grid-area: grp; }
  .g-row > .kw { grid-area: kw; }
  .g-row > .edit-c { grid-area: edit; justify-self: end; }
  .g-row > .read { grid-area: read; justify-self: end; }
  .g-row .read span { display: none; }
  .g-head { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .ava.lg { width: 56px; height: 56px; border-radius: 15px; }
  .g-head h1 { font-size: 20px; white-space: normal; }
  .g-head .read { width: 100%; padding-top: 12px; border-top: 1px solid var(--border); }
  .g-grid { grid-template-columns: 1fr; gap: 0; }
  .g-grid > .g-card { margin-bottom: 16px; }
  .g-grid + .g-card { margin-top: 0; }
  .g-card { padding: 18px; }
    .g-dirty { flex-basis: 100%; }
  }

/* Bara grupului: stare + Setări implicite + Salvează, aliniate pe mijloc în dreapta */
.g-head-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.g-head-act .button { min-height: 42px; }
.g-head-act .g-dirty { flex: 0 1 auto; font-size: 12.5px; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-head-act { width: 100%; justify-content: stretch; } .g-head-act .button { flex: 1; } .g-head-act .g-dirty { flex-basis: 100%; } }
/* Telefon: 3 casete mici pe un rând (titlu sus, număr jos) */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  .g-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .g-stat { flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px 8px; text-align: center; }
  .g-stat .ring { display: none; }
  .g-stat h3 { font-size: 12px; line-height: 1.25; }
  .g-stat .num { margin: 0; padding: 0; border: 0; font-size: 26px; }
  .g-stat .num small { font-size: 15px; }
}
.g-hit { margin: 4px 0 0; font-size: 11.5px; font-weight: 700; }
.g-hit.tp { color: #4ade80; }
.g-hit.sl { color: #f87171; }
.g-card > .g-hit { margin-top: 12px; font-size: 12.5px; }

/* Protecție generală (toate grupurile) */
.g-acc { margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.g-acc-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.g-acc-h b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.g-acc-h b svg { width: 18px; height: 18px; }
.g-acc-h small { color: var(--muted); font-size: 12.5px; }
.g-acc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
.g-acc-f { display: flex; flex-direction: column; gap: 6px; }
.g-acc-f > span { color: var(--text-soft); font-size: 12.5px; font-weight: 700; }
.g-acc-f > div { display: flex; align-items: center; gap: 8px; }
.g-acc-f input { width: 110px; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.g-acc-f em { color: var(--muted); font-style: normal; font-weight: 700; }
.g-acc .button { min-height: 38px; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-acc-f { flex: 1 1 100%; } .g-acc-f input { flex: 1; width: auto; } .g-acc .button { width: 100%; } }
.g-row .g-hit, .grp .g-hit { display: block; margin: 4px 0 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: 11.5px; line-height: 1.35; }

/* Funcții care nu sunt în planul activ */
.g-lock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px dashed var(--border-strong); border-radius: 99px; color: var(--muted); font-size: 11.5px; font-weight: 700; cursor: not-allowed; }
.g-lock svg { width: 14px; height: 14px; }
.g-lock small { font-size: 11px; }
.g-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-live { color: var(--accent, #1a73f0); font-weight: 800; }
/* V2.9.5: comutatorul MT5 1 ↔ MT5 2 din antetul grupului, sub „Pornit” (bulina arată contul ales; deasupra: contul și tipul) */
.g-acctsw { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
.g-acctsw span { color: var(--muted); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.g-acctsw.is-live span { color: #c62828; }
.g-accttog { position: relative; width: 56px; height: 28px; padding: 0; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface-raised); cursor: pointer; }
.g-accttog i { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.g-accttog i:first-child { left: 9px; } .g-accttog i:last-child { right: 9px; }
.g-accttog::after { content: attr(data-n); position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #1a73f0; color: #fff;
  font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 1px 4px rgb(0 0 0 / 25%); transition: left .15s; }
.g-accttog[aria-checked="true"]::after { left: 30px; }
.g-acctsw.is-live .g-accttog::after { background: #d93025; }
.g-head.has-acct { flex-wrap: wrap; }   /* ecran mare: butoanele pe rândul lor, numele grupului întreg */
.g-head.has-acct .g-head-act { flex-basis: 100%; }
.g-mode-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.g-mode-btn > svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; color: var(--muted); }
.g-mode-btn b { flex: 1; font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.g-mode-dot { width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid var(--border-strong); border-radius: 50%; }
.g-mode-btn.on { border-color: var(--green) !important; box-shadow: 0 0 0 1px var(--green) inset !important; }
.g-mode-btn.on b, .g-mode-btn.on > svg { color: var(--green); }
.g-mode-btn.on .g-mode-dot { border-color: var(--green); background: radial-gradient(circle, var(--green) 0 4px, transparent 5px); }
.g-mode-note { margin: 4px 0 10px; font-size: 12.5px; color: var(--muted); }
#g-auto .fgrid + .g-mode-note { margin: 12px 0 0; }
.g-inst .g-inst-h { margin: 4px 0 8px; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-lock small { display: none; } }

/* Protecție generală compactă: TP și SL pe același rând, $ în casetă, fără „Salvează” */
.g-acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-acc-f { flex: none !important; min-width: 0; }
.g-acc-in { display: flex; align-items: center; gap: 8px; }
.g-acc-box { position: relative; flex: 1; min-width: 0; }
.g-acc-box input { width: 100% !important; height: 40px; padding: 0 26px 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.g-acc-box em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-style: normal; font-weight: 700; pointer-events: none; }
.g-acc-in .switch { flex: 0 0 auto; }
.g-acc-h small { display: block; width: 100%; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-acc { padding: 14px; } .g-acc-row { gap: 10px; } .g-acc-f > span { font-size: 11.5px; } }


/* Protecție generală: casetă care se deschide cu săgeata */
.g-acc-fold > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.g-acc-fold > summary::-webkit-details-marker { display: none; }
.g-acc-fold > summary b { flex: 1; }
.g-acc-st { padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 99px; color: var(--muted); font-size: 11px; font-weight: 800; }
.g-acc-st.on { border-color: rgb(74 222 128 / 55%); background: rgb(34 197 94 / 14%); color: #4ade80; }
.g-acc-arrow { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.g-acc-fold[open] .g-acc-arrow { transform: rotate(180deg); }
.g-acc-txt { display: block; margin: 10px 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Setări mai compacte: rânduri apropiate, casete pe măsura sumei */
.fgrid { gap: 4px; margin-top: 10px; }
.frow { min-height: 34px; gap: 6px; }
.inp { min-height: 32px; padding: 0 8px; border-radius: 9px; }
.tp .inp { min-height: 30px; }
.g-card { padding: 16px 18px; margin-bottom: 12px; }
.g-card h2 { margin-bottom: 2px; font-size: 15px; }
.g-acc-row { display: flex !important; flex-wrap: wrap; gap: 10px 22px; }
.g-acc-box { flex: 0 0 auto !important; }
.g-acc-box input { width: 120px !important; height: 34px; font-size: 15px; }
.g-acc-txt { margin: 6px 0 10px; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-card { padding: 14px; } .g-acc-row { gap: 8px 16px; } .g-acc-box input { width: 104px !important; } }

/* TP-uri: casete mici, imediat după „Take profit:”, cresc odată cu suma */
.frow .tp-grid { flex: 0 1 auto !important; }
.tp-grid { gap: 5px; }
.tp { gap: 3px; padding: 2px 2px 2px 7px; border-radius: 9px; }
.tp b { min-width: 0; font-size: 12px; }
.tp .inp { min-height: 26px !important; padding: 0 5px; border-radius: 7px; }
.tp .inp em { margin-left: 2px; font-size: 11px; }
.tp-del { width: 20px; height: 20px; padding: 0; }
.tp-del svg { width: 12px; height: 12px; }
.tp-add { width: 32px; height: 32px; border-radius: 9px; }
.tp-add svg { width: 15px; height: 15px; }

/* Instrumente urmărite: bifă (urmărește) + nume (deschide setările lui) */
.g-inst { padding-block: 12px; }
.g-inst-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; }
.g-inst-h > svg { width: 19px; height: 19px; color: var(--muted); }
.g-ichips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-ichip { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-soft); overflow: hidden; }
.g-ichip.cur { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.g-ichk { width: 34px; height: 36px; border: 0; border-right: 1px solid var(--border-strong); background: none; color: transparent; font-size: 15px; font-weight: 900; cursor: pointer; }
.g-ichip.on .g-ichk { background: rgb(34 197 94 / 18%); color: #4ade80; }
.g-iname { height: 36px; padding: 0 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.g-ichip.cur .g-iname { background: none; color: var(--green); }
.g-iadd { position: relative; }
.g-iadd select { height: 38px; padding: 0 12px; border: 1px dashed var(--text-soft); border-radius: 11px; background: none; color: var(--text-soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; appearance: none; -webkit-appearance: none; }
.g-inst-cur { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
/* lista grupurilor: „Urmărește: AUR · BTC” */
.g-fol { color: var(--muted); font-size: 11.5px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* „+ Adaugă”: casetă proprie, doar simboluri, 7 rânduri vizibile + derulare */
.g-iadd { position: relative; }
.g-iadd > button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px dashed var(--text-soft); border-radius: 11px; background: none;
  color: var(--text-soft); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.g-iadd > button svg { width: 15px; height: 15px; }
.g-iadd > button[aria-expanded="true"] { border-style: solid; color: var(--text); }
.g-ipop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 170px; max-height: calc(7 * 38px + 8px); overflow-y: auto; padding: 4px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 36px rgb(0 0 0 / 45%); overscroll-behavior: contain; }
.g-ipop button { display: block; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .02em; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .g-ipop button:hover { background: var(--surface-raised); outline: none; } }
.g-ipop button:focus-visible { background: var(--surface-raised); outline: none; }
.g-iname { letter-spacing: .02em; }
.g-ipop { left: auto; right: 0; }

/* centrat: butoanele instrumentelor, mesajul de sub ele și „Urmărește: …” din listă */
.g-inst-h { justify-content: center; }
.g-ichips { justify-content: center; }
.g-inst-cur { text-align: center; }
.g-row > .kw { justify-content: center; align-items: center; }

/* lista: „URMĂREȘTE:” în stânga, instrumentele pe mijloc */
.g-row > .kw { justify-content: flex-start !important; flex-wrap: nowrap; }
.g-folc { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 5px; }
/* × mic pe butonul instrumentului */
.g-idel { display: grid; place-items: center; width: 26px; height: 36px; padding: 0; border: 0; border-left: 1px solid var(--border-strong); background: none; color: var(--muted); cursor: pointer; }
.g-idel svg { width: 12px; height: 12px; }
@media (hover: hover) { .g-idel:hover { color: #f87171; } }
/* explicația ⓘ de la „Instrumente urmărite” rămâne în ecran */
.g-inst-h .tip { left: 50%; transform: translateX(-50%); width: min(340px, 86vw); }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-inst-h .tipwrap { position: static; } .g-inst-h { position: relative; } .g-inst-h .tip { left: 0; right: 0; transform: none; width: auto; } }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) { .g-card h2 { position: relative; } .g-card h2 .tipwrap { position: static; } .g-card h2 .tip { left: 0; right: 0; transform: none; width: auto; font-weight: 400; } }

/* „URMĂREȘTE: AUR BTC …” — etichetele imediat după „:”, fără casetă în jur */
.g-row > .kw { align-items: center; gap: 6px; }
.g-folc { display: flex; flex: 0 1 auto !important; flex-wrap: wrap; justify-content: flex-start !important; gap: 5px; padding: 0; border: 0; background: none; }

/* Casete care se deschid cu săgeata: Filtre, Zile de tranzacționare */
.g-fold > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.g-fold > summary::-webkit-details-marker { display: none; }
.g-fold > summary h2 { margin: 0; }
.g-fold-sum { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12.5px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.g-fold > summary > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.g-fold[open] > summary > svg { transform: rotate(180deg); }
.g-fold[open] > summary { margin-bottom: 6px; }
.g-dbtns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.g-dbtn { height: 38px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; background: none; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.g-dbtn.on { border-color: rgb(74 222 128 / 55%); background: rgb(34 197 94 / 15%); color: #4ade80; }
.g-hseg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-raised); }
.g-hseg button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.g-hseg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / 30%); }
.g-hrs { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; }
.g-hrs label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.g-hrs input { height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface-raised); color: var(--text);
  font: inherit; font-size: 14px; color-scheme: dark; }
:root[data-theme="light"] .g-hrs input { color-scheme: light; }
.g-days-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

/* Mobil: comutatorul Pornit / Oprit sus în dreapta, lângă numele grupului */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  .g-head { position: relative; }
  .g-head-txt { padding-right: 96px; }
  .g-head #g-active { position: absolute; top: 18px; right: 18px; width: auto; padding: 0; border: 0; flex-direction: column-reverse; gap: 4px; }
  .g-head #g-active span { font-size: 11.5px; }
  .g-head .g-acctsw { position: absolute; top: 76px; right: 18px; }   /* sub „Pornit” */
  .g-head.has-acct .g-head-txt { min-height: 118px; }
}

/* Închidere parțială: exemplu / avertisment sub rând */
.g-pc-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.g-pc-note:empty { display: none; }
.g-pc-note.warn { color: #fbbf24; }
/* lista de grupuri: 10 rânduri vizibile, restul cu derulare în casetă (înălțimea o pune groups.js) */
#g-rows { position: relative; overflow-y: auto; overscroll-behavior: contain; }
/* Acordul „Trimite textele către Runner Prime” (grupul privat de analiză) */
.g-share { display: flex; align-items: center; gap: 18px; }
.g-share-main { margin-bottom: 14px; }
.g-share-main[hidden] { display: none; }
.g-share-txt { display: grid; gap: 6px; min-width: 0; flex: 1; }
.g-share-txt b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.g-share-txt b svg { width: 18px; height: 18px; flex: none; }
.g-share-txt small { color: var(--text-soft); font-size: 13px; line-height: 1.45; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  .g-share { flex-wrap: wrap; gap: 12px; }
  .g-share .read { width: 100%; padding-top: 12px; border-top: 1px solid var(--border); }
}

/* V2.9.0: butoanele $ / % (și Fix / % risc la lot) pe fiecare rând */
.g-upill { display: inline-flex; align-items: center; padding: 1px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 99px; background: rgb(255 255 255 / 4%); }
.g-upill button { min-width: 24px; height: 20px; padding: 0 7px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 800; line-height: 20px; white-space: nowrap; cursor: pointer; }
.g-upill button[aria-checked="true"] { background: #2f8cff; color: #fff; }
:root[data-theme="light"] .g-upill { background: rgb(0 0 0 / 4%); border-color: rgb(0 0 0 / 12%); }
.frow .g-upill + .tp-grid { flex-basis: 100%; }
.g-amt { color: #4ade80; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-amt.neg { color: #f87171; }
.g-amt:empty { display: none; }
#g-pct-note[hidden] { display: none; }
/* V2.9.0: fereastra „Copiază setările la alte grupuri” */
.g-copy-ov { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 55%); }
.g-copy { width: min(520px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.g-copy h2 { margin: 0; font-size: 16px; }
.g-copy-lbl { margin: 0; color: var(--muted); font-size: 12.5px; }
.g-copy-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.g-copy-parts button { height: 32px; padding: 0 12px; border: 1px solid rgb(47 140 255 / 45%); border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.g-copy-parts button[aria-pressed="true"] { border-color: rgb(74 222 128 / 60%); background: rgb(34 197 94 / 16%); color: #bbf7d0; }
:root[data-theme="light"] .g-copy-parts button[aria-pressed="true"] { color: #166534; }
.g-copy-q { width: 100%; height: 38px; padding: 0 12px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 10px; background: rgb(0 0 0 / 18%); color: inherit; font: inherit; }
.g-copy-list { flex: 1; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; }
.g-copy-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 2px; border-bottom: 1px solid rgb(255 255 255 / 7%); font-size: 14px; cursor: pointer; }
.g-copy-row input { width: 18px; height: 18px; accent-color: #2f8cff; }
.g-copy-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-copy-row small { color: #4ade80; font-size: 11.5px; font-weight: 700; }
.g-copy-all { border-bottom-width: 2px; }
.g-copy-kw { margin: 0; color: var(--muted); font-size: 12px; }
.g-copy-act { display: flex; gap: 8px; }
.g-copy-act .button-primary { flex: 1; }
.g-copy-act .is-off { opacity: .55; }

/* V2.9.0: pagina grupului mai aerisită — eticheta +1 punct, iar casetele TP1, ON / OFF și $ / % cât înălțimea textului */
:root body #page-group .fgrid .frow > .lbl { font-size: 15px; }
:root body #page-group .frow .sel { min-height: 0; height: 21px; padding: 0 4px 0 7px; border-radius: 7px; font-size: 12.5px; line-height: 1; }
:root body #page-group .frow .switch, :root body #page-group .frow .switch[aria-checked="true"],
:root body #page-group .frow .switch.rg[aria-checked="false"] { width: 44px; height: 19px; margin-left: 2px; }
:root body #page-group .frow .switch::after { width: 25px; height: 14px; font-size: 7.5px; }
:root body #page-group .frow .switch[aria-checked="true"]::after { left: calc(100% - 27px); }
:root body #page-group .g-upill button { min-width: 20px; height: 17px; padding: 0 6px; font-size: 10.5px; line-height: 17px; }
@media (max-width: 700px) {
  :root body #page-group .fgrid .frow > .lbl { font-size: 14px; }
  :root body #page-group .frow .sel { height: 22px; font-size: 13px; }
}
/* V2.9.0: GRUPURI → filtrele mai strânse + comutatorul ON / OFF ALL lângă ele (toate grupurile odată) */
:root body #page-groups .g-chips { gap: 0; padding: 2px; }
:root body #page-groups .g-chips button { padding: 5px 9px; }
.g-allsw { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; }
.g-allsw b { font-size: 11.5px; font-weight: 850; letter-spacing: .06em; color: var(--muted); }
.g-allsw.on b { color: #4ade80; }
.g-allsw .switch:disabled { opacity: .5; }
.g-allsw-t { font-size: 12.5px; font-weight: 750; white-space: nowrap; }
.g-allsw.on .g-allsw-t { color: #fca5a5; }
.g-allsw.off .g-allsw-t { color: #4ade80; }
@media (max-width: 700px) {   /* pe telefon: „Pornește / Oprește toate grupurile” și „TP | SL general” pe rânduri separate, înguste */
  :root body #page-groups .g-toolbar { flex-wrap: wrap; }
  :root body #page-groups .g-chips button { padding: 5px 11px; }
  :root body #page-groups .g-allsw { order: 9; flex: 1 1 100%; justify-content: center; gap: 10px; min-height: 30px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 10px; background: rgb(255 255 255 / 3%); }
  :root body #page-groups .g-allsw.on { border-color: rgb(239 68 68 / 40%); background: rgb(239 68 68 / 6%); }
  :root body #page-groups .g-allsw.off { border-color: rgb(74 222 128 / 35%); }
  :root body #page-groups .g-tpsl:not([hidden]) { order: 10; flex: 1 1 100%; justify-content: center; min-height: 30px; border-radius: 10px; }
  :root body #page-groups .g-allsw-t { font-size: 13px; }
  :root body #page-groups .g-toolbar .g-tpsl > span { display: flex; flex-direction: row; align-items: baseline; gap: 6px; }
  :root body #page-groups .g-toolbar .g-tpsl > span > b, :root body #page-groups .g-toolbar .g-tpsl > span > small { display: inline; margin: 0; }
  :root body #page-groups .g-toolbar .g-chips { flex: 0 0 auto; width: auto; }
  :root body #page-groups .g-toolbar .g-chips button { flex: 0 0 auto; padding: 5px 12px; }
  :root body #page-groups .g-refresh { margin-left: auto; }
}

/* V2.8.9: culori mai puternice (roșu / verde) la „Toate grupurile”; „Take Profit și Stop Loss general” scris întreg pe telefon */
.g-tpsl-long { display: none; font-style: normal; }
.g-allsw.on .g-allsw-t { color: #4ade80; }
.g-allsw.off .g-allsw-t { color: #f87171; }
:root[data-theme="light"] .g-allsw.on .g-allsw-t { color: #15803d; }
:root[data-theme="light"] .g-allsw.off .g-allsw-t { color: #b91c1c; }
@media (max-width: 700px) {
  :root body #page-groups .g-allsw.on { border: 1.5px solid #22c55e; background: rgb(34 197 94 / 18%); }
  :root body #page-groups .g-allsw.off { border: 1.5px solid #ef4444; background: rgb(239 68 68 / 18%); }
  :root[data-theme="light"] body #page-groups .g-allsw.on { background: #dcfce7; border-color: #16a34a; }
  :root[data-theme="light"] body #page-groups .g-allsw.off { background: #fee2e2; border-color: #dc2626; }
  :root body #page-groups .g-toolbar .g-tpsl > span > b, :root body #page-groups .g-toolbar .g-tpsl > span > small { display: none; }
  :root body #page-groups .g-toolbar .g-tpsl .g-tpsl-long { display: inline; font-size: 12.5px; font-weight: 800; }
  :root body #page-groups .g-tpsl:not([hidden]) { border: 1.5px solid #3b82f6; background: rgb(59 130 246 / 14%); color: #93c5fd; }
  :root[data-theme="light"] body #page-groups .g-tpsl:not([hidden]) { background: #dbeafe; border-color: #2563eb; color: #1d4ed8; }
}

/* V2.9.1 (varianta A, telefon): pagina unui grup mai compactă — spații mici între casete, casetele cu sume cât textul,
   capul grupului și butoanele pe mai puțin loc; în lista GRUPURI, ON / OFF centrat deasupra lui „Modifică” */
@media (max-width: 700px) {
  html:root body #page-groups .g-row .g-side { align-items: center; }
  html:root body #page-group .g-back { margin-bottom: 6px; font-size: 13px; }
  html:root body #page-group .g-card { margin-bottom: 7px; padding: 10px 12px; border-radius: 14px; }
  html:root body #page-group .g-head { gap: 8px; padding: 10px 12px; }
  html:root body #page-group .g-head .ava, html:root body #page-group .g-head .g-ava { width: 40px; height: 40px; }
  html:root body #page-group .g-head h1 { margin-bottom: 1px; font-size: 17px; }
  html:root body #page-group .g-head p { font-size: 12.5px; }
  html:root body #page-group .g-head #g-active { top: 6px; right: 12px; }   /* „Pornit” mai sus */
  html:root body #page-group .g-head .g-acctsw { top: 50px; right: 12px; flex-direction: row-reverse; gap: 6px; }   /* „MT5 2 · Live [1 2]” pe un rând, sub „Pornit” */
  html:root body #page-group .g-head .g-accttog { width: 46px; height: 22px; }
  html:root body #page-group .g-head .g-accttog::after { width: 18px; height: 18px; font-size: 11px; line-height: 18px; }
  html:root body #page-group .g-head .g-accttog[aria-checked="true"]::after { left: 24px; }
  html:root body #page-group .g-head .g-accttog i { font-size: 10px; } html:root body #page-group .g-head .g-accttog i:first-child { left: 7px; } html:root body #page-group .g-head .g-accttog i:last-child { right: 7px; }
  html:root body #page-group .g-head.has-acct .g-head-txt { min-height: 58px; }
  html:root body #page-group .g-head.has-acct { align-items: flex-start; }   /* poza grupului rămâne sus, lângă nume */
  html:root body #page-group .g-head-act { gap: 6px; }
  html:root body #page-group .g-head-act .g-dirty { font-size: 11.5px; }
  /* cu două conturi: „Ai modificări nesalvate / Toate setările sunt salvate” urcă pe rândul cu „MT5 2 · Live”, în stânga (caseta mai scundă) */
  html:root body #page-group .g-head.has-acct .g-head-act .g-dirty { position: absolute; top: 54px; left: 14px; right: 150px; flex: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 18px; }
  html:root body #page-group .g-head-act .button { min-height: 32px; height: 32px; padding: 0 8px; border-radius: 10px; font-size: 12.5px; }
  html:root body #page-group .g-head-act .button svg { width: 15px; height: 15px; }
  html:root body #page-group .g-head-act #g-save { flex: 1 1 100%; min-height: 36px; }
  html:root body #page-group .g-modes { gap: 7px; margin-bottom: 7px; }
  html:root body #page-group .g-mode-btn { min-height: 36px; padding: 0 12px; border-radius: 12px; }
  html:root body #page-group .g-mode-btn b { font-size: 13px; }
  html:root body #page-group .g-fold { padding-block: 8px; }
  html:root body #page-group .g-fold > summary h2, html:root body #page-group .g-card h2 { font-size: 14.5px; }
  html:root body #page-group .g-card h2 svg { width: 17px; height: 17px; }
  html:root body #page-group .g-fold-sum { font-size: 12px; }
  html:root body #page-group .fgrid { gap: 2px; }
  html:root body #page-group .frow { min-height: 28px; gap: 6px; }
  html:root body #page-group .inp, html:root body #page-group .sel { min-height: 0 !important; height: 24px; padding: 0 7px; border-radius: 8px; }
  html:root body #page-group .inp input { line-height: 22px; }
  html:root body #page-group .tp .inp { min-height: 0 !important; height: 22px; }
  html:root body #page-group .tp { padding: 3px 3px 3px 9px; border-radius: 10px; }
  html:root body #page-group .tp-add { width: 34px; height: 34px; border-radius: 10px; }
  html:root body #page-group .g-grid > .g-card { margin-bottom: 7px; }
  html:root body #page-group .g-mode-note, html:root body #page-group .g-pc-note { margin: 6px 0 0; font-size: 12px; }
}

/* V2.9.1: explicația care rămâne pe ecran până la × (Fix / % risc, $ / %, MANUAL / AUTO) */
.g-info-note { position: fixed; z-index: 110; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); transform: translateX(-50%);
  display: flex; align-items: flex-start; gap: 10px; width: min(560px, calc(100% - 24px)); padding: 12px 10px 12px 14px;
  border: 1.5px solid #3b82f6; border-radius: 14px; background: #0f172a; color: #e2e8f0; box-shadow: 0 14px 36px rgb(0 0 0 / 45%); }
.g-info-note p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.45; }
.g-info-note button { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: rgb(255 255 255 / 10%); color: #e2e8f0; cursor: pointer; }
.g-info-note button svg { width: 14px; height: 14px; }
:root[data-theme="light"] .g-info-note { background: #eff6ff; color: #1e293b; border-color: #2563eb; box-shadow: 0 12px 30px rgb(15 23 42 / 18%); }
:root[data-theme="light"] .g-info-note button { background: rgb(37 99 235 / 12%); color: #1e3a8a; }
@media (min-width: 1025px) and (pointer: fine) { .g-info-note { bottom: 24px; } }
.g-lock[data-lock] { cursor: pointer; }
@media (hover: hover) { .g-lock[data-lock]:hover { border-style: solid; color: var(--text); } }

/* V2.10.0: MT5 1 / MT5 2 cu setări separate — lista (butoane mici, verde = pornit, roșu = oprit) + casetele din pagina grupului */
.g-accs { display: flex; flex-direction: column; justify-content: center; gap: 6px; align-self: stretch; flex: none; padding: 0 6px; border-left: 1px solid var(--border); }
.g-accs button { height: 24px; padding: 0 6px; border: 1.5px solid; border-radius: 9px; font: inherit; font-size: 10.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.g-accs button.on { border-color: #22a559; background: #f0fbf4; color: #137a3e; }
.g-accs button.off { border-color: #e5484d; background: #fff5f5; color: #b42328; }
html:root body #page-groups .g-row.has-accs .g-edit svg:last-child { display: none; }   /* „Modifică” fără săgeată: încape mai mult din nume */
html:root body #page-groups .g-row.has-accs .g-edit { height: 24px; min-height: 0; padding: 0 8px; font-size: 11.5px; gap: 4px; }
html:root body #page-groups .g-row.has-accs .g-edit svg { width: 13px; height: 13px; }
html:root body #page-groups .g-row.has-accs .g-side { gap: 6px; justify-content: center; }
.g-accbox { padding: 12px; }
.g-acctabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-acctabs button { padding: 8px 6px; border: 2px solid; border-radius: 14px; background: var(--surface); font: inherit; text-align: center; cursor: pointer; }
.g-acctabs button b { display: block; font-size: 16px; font-weight: 900; }
.g-acctabs button small { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; }
.g-acctabs button.on { border-color: #22a559; color: #137a3e; }
.g-acctabs button.off { border-color: #e5484d; color: #b42328; }
.g-acctabs button.sel { box-shadow: 0 0 0 3px rgb(26 115 240 / 25%); background: rgb(26 115 240 / 6%); }
.g-accon { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-weight: 700; font-size: 13.5px; }
.g-accnote { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
html:root body #page-groups .g-row.has-accs { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: none; column-gap: 6px; }
html:root body #page-groups .g-row.has-accs > .g-side { border-left: 1px solid var(--border); padding-left: 6px; align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; }
html:root body #page-group .g-acctabs button { border: 2px solid; box-shadow: none; }
html:root body #page-group .g-acctabs button.on { border-color: #22a559; color: #137a3e; background: #f0fbf4; }
html:root body #page-group .g-acctabs button.off { border-color: #e5484d; color: #b42328; background: #fff5f5; }
html:root body #page-group .g-acctabs button.sel { box-shadow: 0 0 0 3px rgb(26 115 240 / 30%); }
html:root body #page-groups .g-accs button { border: 1.5px solid; box-shadow: none; }
html:root body #page-groups .g-accs button.on { border-color: #22a559; background: #f0fbf4; color: #137a3e; }
html:root body #page-groups .g-accs button.off { border-color: #e5484d; background: #fff5f5; color: #b42328; }

/* V2.10.0: casetele MT5 1 / MT5 2 deasupra MANUAL / AUTO, la fel de mari; verde = pornit, roșu = oprit, comutatorul în casetă */
html:root body #page-group .g-acc-btn { justify-content: space-between; }
html:root body #page-group .g-acc-btn b { display: flex; align-items: baseline; gap: 6px; flex: 1; }
html:root body #page-group .g-acc-btn b small { font-size: 10.5px; font-weight: 700; letter-spacing: 0; opacity: .75; }
html:root body #page-group .g-acc-btn .read { display: inline-flex; padding: 0; border: 0; background: none; }
html:root body #page-group .g-acc-btn.is-on { border-color: #22a559 !important; box-shadow: 0 0 0 1px #22a559 inset !important; }
html:root body #page-group .g-acc-btn.is-on b { color: #137a3e; }
html:root body #page-group .g-acc-btn.is-off { border-color: #e5484d !important; box-shadow: 0 0 0 1px #e5484d inset !important; }
html:root body #page-group .g-acc-btn.is-off b { color: #b42328; }
html:root body #page-group .g-acc-btn.sel { box-shadow: 0 0 0 1px currentColor inset, 0 0 0 3px rgb(26 115 240 / 30%) !important; }
html:root body #page-group .g-acc-btn.is-on.sel { box-shadow: 0 0 0 1px #22a559 inset, 0 0 0 3px rgb(26 115 240 / 30%) !important; }
html:root body #page-group .g-acc-btn.is-off.sel { box-shadow: 0 0 0 1px #e5484d inset, 0 0 0 3px rgb(26 115 240 / 30%) !important; }
html:root body #page-group .g-accmodes { margin-bottom: 4px; }
html:root body #page-group .g-accnote { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; text-align: center; }
html:root body #page-group .g-accmodes { align-items: stretch; }
html:root body #page-group .g-acc-btn { box-sizing: border-box; min-height: 36px; height: auto; align-self: stretch; }
/* V3.0.0: „Setările de mai jos sunt doar pentru MT5 n” — să sară în ochi (galben) */
html:root body #page-group .g-accnote { margin: 2px 0 8px; text-align: center; }
html:root body #page-group .g-accnote span { display: inline-block; padding: 4px 12px; border: 1.5px solid #f5b400; border-radius: 99px; background: #fff6d6; color: #8a5a00; font-size: 12px; font-weight: 800; }
:root[data-theme="dark"] body #page-group .g-accnote span { background: rgb(245 180 0 / 16%); color: #ffd666; }

/* V3.0.0: Copiază setările / Setări implicite: pe ce cont (MT5 1 / MT5 2 / Ambele) + „Copiază de la MT5 1” */
.g-copy-accs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.g-copy-accs button { min-height: 32px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.g-copy-accs button[aria-pressed="true"] { border-color: #1a73f0; background: #1a73f0; color: #fff; }
.g-copy-accnote { margin: 2px 0 8px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
html:root body #page-group .g-acc-from1 { display: block; margin: 6px auto 0; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface); color: #1a73f0; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
/* V3.0.1: „Tot” = toată pagina contului (toate părțile) */
html:root body .g-copy-parts .g-copy-allparts { font-weight: 900; }
html:root body .g-copy-parts .g-copy-allparts[aria-pressed="true"] { border-color: #1a73f0; background: #1a73f0; color: #fff; }

/* V3.0.2: Copiază setările → 3 rânduri „Importă la MT5 1 / MT5 2 / ambele”; grupurile se deschid sub rândul apăsat */
.g-imp { display: grid; gap: 8px; margin: 6px 0 4px; }
.g-imp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px;
  border: 1.5px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.g-imp-row b { font-weight: 900; }
.g-imp-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(90deg); transition: transform .15s; }
.g-imp-row[aria-expanded="true"] { border-color: #1a73f0; background: #1a73f0; color: #fff; }
.g-imp-row[aria-expanded="true"] svg { transform: rotate(-90deg); }
.g-imp-slot:empty { display: none; }
.g-imp-slot .g-copy-body { display: grid; gap: 6px; padding: 8px 2px 4px; }
.g-copy-body[hidden] { display: none !important; }
.g-copy-body [data-copygo] { width: 100%; min-height: 44px; }
.g-copy-row em { color: #1a73f0; font-style: normal; font-weight: 800; }
html:root body .g-imp-slot .g-copy-list { max-height: 30vh; overflow-y: auto; }   /* toate 3 rândurile rămân la vedere */
/* V3.0.3: pe MT5 2 filtrele (comune grupului) sunt blocate, cu notă */
.g-shared-note { display: none; margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff6d6; color: #8a5a00; font-size: 12px; font-weight: 700; }
html:root body #page-group.is-slot2 .g-shared-note { display: block; }
html:root body #page-group.is-slot2 :is(#g-kw, #g-ignore) { pointer-events: none; opacity: .55; }
html:root body #page-group.is-slot2 [data-k="complete_after"] { pointer-events: none; opacity: .55; }
:root[data-theme="dark"] body .g-shared-note { background: rgb(245 180 0 / 16%); color: #ffd666; }

/* V3.0.4: TP / SL general cu 2 conturi: titlul fiecărui cont deasupra rândului lui */
.g-acc-acct { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 4px; }
.g-acc-acct b { padding: 2px 8px; border-radius: 8px; background: #1a73f0; color: #fff; font-size: 12px; font-weight: 900; }
.g-acc-acct small { color: var(--muted); font-size: 11px; font-weight: 700; }

/* ---------- V3.1.0: GRUPURI — „Grupuri pornite” pe MT5 1 / MT5 2, TP / SL general pe cont, fereastra de oprire ---------- */
.g-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.g-slots.n1 { grid-template-columns: minmax(0, 1fr); }
.g-slot { min-width: 0; padding: 7px 10px 8px 14px; border: 2px solid color-mix(in srgb, var(--green) 45%, var(--border)); border-radius: 16px; background: var(--surface); }
.g-slot.off { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.g-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 24px; }
.g-slot-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.g-slot .read { flex: 0 0 auto; margin-right: -8px; transform: scale(.72); transform-origin: right center; }
.g-slot-v { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; margin-top: 1px; }
.g-slot-v b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--green); font-variant-numeric: tabular-nums; }
.g-slot.off .g-slot-v b { color: var(--red); }
.g-slot-v b small { color: var(--muted); font-size: 12px; font-weight: 700; }
.g-slot-v > span { font-size: 13.5px; font-weight: 800; }
.g-slot-v em { align-self: center; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; font-style: normal; font-weight: 850; letter-spacing: .04em; }
.g-slot-v em.live { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.g-slot-v em.demo { background: color-mix(in srgb, #3b82f6 14%, transparent); color: #3b82f6; }

.g-acc.g-card { padding: 10px; margin-bottom: 14px; }
.g-tc-title { display: flex; align-items: center; gap: 6px; margin: 0 2px 8px; font-size: 14px; font-weight: 780; }
.g-tc-title svg { width: 16px; height: 16px; }
.g-tcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-tcs.n1 { grid-template-columns: minmax(0, 1fr); }
.g-tc { min-width: 0; display: block; padding: 8px 10px; border: 1.5px solid var(--border-strong); border-radius: 14px; background: var(--surface-raised); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.g-tc.on { border-color: color-mix(in srgb, #3b82f6 45%, var(--border)); }
.g-tc-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.g-tc-h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
.g-tc-h small { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.g-tc-h i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.g-tc.on .g-tc-h i { background: var(--green); }
.g-tc-a { display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.g-tc-a em, .g-split b, .g-pnl b { font-style: normal; font-weight: 800; }
.pos { color: var(--green); } .neg { color: var(--red); }
@media (hover: hover) { .g-tc:hover { background: var(--surface-soft); } }

.ask-card.g-accm, .ask-card.g-stopm { width: min(420px, 100%); max-height: calc(var(--vh, 100vh) - 32px); overflow: auto; }
.g-accm h3, .g-stopm h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.ask-card .g-accm-sub { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.g-accm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.g-accm-tabs button { padding: 8px; border: 2px solid var(--border-strong); border-radius: 14px; background: var(--surface-raised); color: var(--text); font: inherit; cursor: pointer; }
.g-accm-tabs button.on { border-color: #3b82f6; background: color-mix(in srgb, #3b82f6 10%, var(--surface)); color: #3b82f6; }
.g-accm-tabs b { display: block; font-size: 14px; font-weight: 800; } .g-accm-tabs .live { color: var(--red); }
.g-accm-tabs small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 600; }
.g-pnl { margin: 0 0 10px; padding: 10px; border-radius: 16px; text-align: center; background: color-mix(in srgb, var(--green) 12%, var(--surface)); }
.g-pnl.neg { background: color-mix(in srgb, var(--red) 12%, var(--surface)); }
.g-pnl small { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-soft); }
.g-pnl b { display: block; font-size: 30px; letter-spacing: -.02em; color: var(--green); }
.g-pnl.neg b { color: var(--red); }
.g-accm-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; font-weight: 700; }
.g-accm-row > span:first-child { flex: 1; }
.g-accm-row .g-acc-box { flex: 0 0 110px !important; }
.g-accm-row .g-acc-box input { width: 110px !important; height: 34px; font-size: 15px; }
.ask-card .g-accm-rule { margin: 10px 0 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.g-accm .button, .g-stopm .g-stop-cancel { width: 100%; margin-top: 8px; }
.g-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.g-split div { padding: 8px; border: 1.5px solid var(--border); border-radius: 14px; text-align: center; font-size: 12.5px; font-weight: 700; }
.g-split b { display: block; margin-top: 2px; font-size: 16px; }
.g-stopb { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 11px 14px; border: 1.5px solid var(--border-strong);
  border-radius: 14px; background: var(--surface-raised); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 750; text-align: left; cursor: pointer; }
.g-stopb small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; opacity: .85; }
.g-stopb em { flex: 0 0 auto; font-size: 12px; font-style: normal; font-weight: 700; opacity: .85; }
.g-stopb.red { border-color: var(--red); background: var(--red); color: #fff; }
.g-stopb.green { border-color: var(--green); background: var(--green); color: #fff; }
.g-stopb.dark { border-color: #1f2937; background: #1f2937; color: #fff; }
.g-stopb:disabled { opacity: .4; cursor: not-allowed; }
.ask-card .g-stop-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; }
.ask-card .g-accm-acct { margin: 6px 0 0; }
.g-accm-acct b { font-size: 15px; font-weight: 800; } .g-accm-acct .live { color: var(--red); } .g-accm-acct .demo { color: #3b82f6; }
.g-accm-acct small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* V3.1.0 (pagina nouă, admin): casetele mai apropiate; căutarea mică, pe un rând cu „Toate / Pornite / Oprite” în dreapta */
:root body #page-groups.g-new .g-stats { gap: 6px; margin-bottom: 6px; }
:root body #page-groups.g-new .g-stat { padding: 6px 6px; }
:root body #page-groups.g-new .g-stat .num { font-size: 20px; }
:root body #page-groups.g-new .g-slots { gap: 6px; margin-bottom: 6px; }
:root body #page-groups.g-new .g-slot { padding: 5px 10px 6px 12px; }
:root body #page-groups.g-new .g-acc.g-card { margin-bottom: 6px; padding: 7px 8px 8px; }
:root body #page-groups.g-new .g-tc-title { margin: 0 2px 6px; font-size: 13px; }
:root body #page-groups.g-new .g-tcs { gap: 6px; }
:root body #page-groups.g-new .g-tc { padding: 6px 9px; }
:root body #page-groups.g-new .g-panel { margin-bottom: 6px; }
:root body #page-groups.g-new .g-toolbar { flex-wrap: nowrap; gap: 6px; padding: 6px; }
:root body #page-groups.g-new .g-search { flex: 1 1 auto; min-width: 0; min-height: 30px; padding: 0 9px; gap: 6px; }
:root body #page-groups.g-new .g-search input { font-size: 13px; }
:root body #page-groups.g-new .g-search svg { width: 14px; height: 14px; }
:root body #page-groups.g-new .g-toolbar .g-chips { flex: 0 0 auto; width: auto; padding: 2px; }
:root body #page-groups.g-new .g-toolbar .g-chips button { flex: 0 0 auto; padding: 4px 7px; font-size: 11.5px; }
:root body #page-groups.g-new .g-refresh { flex: 0 0 auto; margin-left: 0; min-height: 30px; width: 30px; padding: 0; justify-content: center; }
:root body #page-groups.g-new .g-refresh span { display: none; }

/* V3.1.0: bulina TP / SL general, ca bulina LIVE de la STATISTICI: OPRIT = roșie, fixă; PORNIT = verde, pâlpâie (cerc care se lărgește) */
.g-tc-h i { width: 9px !important; height: 9px !important; border-radius: 50%; background: #ef4444 !important; box-shadow: 0 0 0 3px rgb(239 68 68 / 22%); animation: none; }
.g-tc.on .g-tc-h i { background: #22c55e !important; box-shadow: 0 0 0 0 rgb(34 197 94 / 60%); animation: g-dot 1.6s infinite; }
@keyframes g-dot { 0% { box-shadow: 0 0 0 0 rgb(34 197 94 / 60%); } 70% { box-shadow: 0 0 0 8px rgb(34 197 94 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0%); } }
@media (prefers-reduced-motion: reduce) { .g-tc.on .g-tc-h i { animation: none; } }

/* V3.1.0: TP / SL GENERAL — titlul pe mijloc între două scuturi; casete ACTIV (verde) / OPRIT (roșu) */
#g-acc .g-tc-title { display: none; }
.g-tc-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; text-align: center; }
.g-tc-top > svg { flex: 0 0 auto; width: 22px; height: 22px; padding: 4px; border-radius: 9px; box-sizing: content-box; }
.g-tc-top > svg:first-child { color: #22c55e; background: color-mix(in srgb, #22c55e 14%, transparent); }
.g-tc-top > svg:last-child { color: #ef4444; background: color-mix(in srgb, #ef4444 14%, transparent); }
.g-tc-top b { display: block; font-size: 14px; font-weight: 850; letter-spacing: -.01em; }
.g-tc-top small { display: block; margin-top: 1px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
#g-acc .g-tc { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 7px; border: 1.5px solid color-mix(in srgb, #22c55e 45%, var(--border)); border-radius: 14px;
  background: color-mix(in srgb, #22c55e 7%, var(--surface)); }
#g-acc .g-tc.off { border-color: color-mix(in srgb, #ef4444 40%, var(--border)); background: color-mix(in srgb, #ef4444 6%, var(--surface)); }
#g-acc .g-tc-h b { font-size: 14px; }
.g-tc-st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-style: normal; font-weight: 850; letter-spacing: .05em;
  color: #16a34a; background: color-mix(in srgb, #22c55e 16%, transparent); }
.g-tc.off .g-tc-st { color: #dc2626; background: color-mix(in srgb, #ef4444 14%, transparent); }
#g-acc .g-tc-st i { width: 7px !important; height: 7px !important; }
.g-tc-b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; font-weight: 600; }
#g-acc .g-tc-a { justify-content: space-between; margin-top: 3px; padding-top: 5px; border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); color: var(--text); font-size: 12px; }
#g-acc .g-tc-a b { font-weight: 800; }
.g-tc-go { width: 100%; text-align: center; color: var(--muted); font-weight: 650; }
:root[data-theme="dark"] .g-tc-st, :root:not([data-theme="light"]) .g-tc-st { color: #4ade80; }
:root[data-theme="dark"] .g-tc.off .g-tc-st, :root:not([data-theme="light"]) .g-tc.off .g-tc-st { color: #f87171; }
:root[data-theme="light"] .g-tc-st { color: #16a34a; } :root[data-theme="light"] .g-tc.off .g-tc-st { color: #dc2626; }

/* V3.1.0: ambele scuturi verzi; rezultatul de azi în dreapta, sub ACTIV / OPRIT */
.g-tc-top > svg:last-child { color: #22c55e; background: color-mix(in srgb, #22c55e 14%, transparent); }
#g-acc .g-tc-b { display: flex; justify-content: space-between; gap: 6px; }
#g-acc .g-tc-b > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-tc-pnl { flex: 0 0 auto; color: var(--muted); font-weight: 650; }
.g-tc-pnl em { font-style: normal; font-weight: 850; font-size: 12.5px; }
/* comutatorul „Grupuri pornite”: interiorul în culoarea temei (deschisă = alb, închisă = negru, temele colorate = a lor),
   puțin mai la stânga, pe același rând cu „Grupuri pornite” */
:root body #page-groups .g-slot .switch, :root body #page-groups .g-slot .switch[aria-checked="true"], :root body #page-groups .g-slot .read .switch[aria-checked="false"] {
  background: var(--surface); border-color: var(--border-strong); box-shadow: inset 0 2px 4px rgb(0 0 0 / 18%); }
:root body #page-groups .g-slot .read { margin-right: 0; transform: scale(.74); transform-origin: right center; display: flex; align-items: center; }
:root body #page-groups .g-slot-top { align-items: center; height: 22px; }

/* V3.1.0: bara licenței (prima sus, pagina nouă) */
.g-lim { margin: 0 0 6px; }
.g-lim-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
.g-lim-t { flex: 0 0 auto; color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.g-lim-t b { color: var(--text); font-weight: 850; }
.g-lim-bar { flex: 1; min-width: 40px; height: 7px; border-radius: 99px; overflow: hidden; background: var(--surface-soft); box-shadow: inset 0 1px 2px rgb(0 0 0 / 12%); }
.g-lim-bar i { display: block; height: 100%; border-radius: 99px; background: #22c55e; transition: width .3s; }
.g-lim-n { flex: 0 0 auto; font-size: 13px; font-weight: 850; white-space: nowrap; }
.g-lim-row.warn { border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); } .g-lim-row.warn .g-lim-bar i { background: #f59e0b; } .g-lim-row.warn .g-lim-n { color: #d97706; }
.g-lim-row.full { border-color: color-mix(in srgb, #ef4444 50%, var(--border)); background: color-mix(in srgb, #ef4444 6%, var(--surface)); }
.g-lim-row.full .g-lim-bar i { background: #ef4444; } .g-lim-row.full .g-lim-n { color: #ef4444; }
.g-lim-note { margin: 4px 2px 0; color: #ef4444; font-size: 11.5px; font-weight: 650; }
.g-lim-row.inf { justify-content: space-between; } .g-lim-row.inf .g-lim-n { color: #16a34a; }
:root:not([data-theme="light"]) .g-lim-row.inf .g-lim-n { color: #4ade80; }

/* V3.1.0: umbrele casetelor noi, ca la grupuri și la căutare (efectul „metal” al aplicației) */
body.metal #page-groups .g-lim-row { border: 2px solid transparent; background: var(--silver) padding-box, var(--chrome) border-box;
  box-shadow: inset 0 2px 2px rgb(255 255 255 / 90%), inset 0 -4px 8px rgb(0 0 0 / 8%), 0 8px 18px rgb(0 0 0 / 18%); }
body.metal #page-groups .g-lim-row.full { background: color-mix(in srgb, #ef4444 8%, var(--silver)) padding-box, linear-gradient(135deg, #fca5a5, #dc2626) border-box; }
body.metal #page-groups .g-lim-row.warn { background: var(--silver) padding-box, linear-gradient(135deg, #fcd34d, #d97706) border-box; }
body.metal #page-groups .g-slot { background: var(--silver);
  box-shadow: inset 0 2px 2px rgb(255 255 255 / 90%), inset 0 -4px 8px rgb(0 0 0 / 8%), 0 8px 18px rgb(0 0 0 / 18%); }
body.metal #page-groups #g-acc .g-tc { box-shadow: inset 0 2px 2px rgb(255 255 255 / 70%), inset 0 -3px 6px rgb(0 0 0 / 6%), 0 4px 10px rgb(0 0 0 / 12%); }
:root:not([data-theme="light"]) body.metal #page-groups .g-lim-row, :root:not([data-theme="light"]) body.metal #page-groups .g-slot {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), inset 0 -4px 10px rgb(0 0 0 / 40%), 0 0 0 1px rgb(255 255 255 / 5%), 0 10px 22px rgb(0 0 0 / 55%); }
:root:not([data-theme="light"]) body.metal #page-groups #g-acc .g-tc {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), inset 0 -3px 8px rgb(0 0 0 / 35%), 0 6px 14px rgb(0 0 0 / 40%); }

/* V3.1.0: banda MT5 1 / MT5 2 sub fiecare grup (pagina nouă, două conturi) */
.g-band-hint { margin: 2px 4px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
#page-groups .g-list .g-row > .g-band { grid-column: 1 / -1 !important; grid-row: auto; }
.g-band { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-band button { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-soft); font: inherit; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.g-band button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-band button em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12px; font-weight: 850; color: var(--muted); }
.g-band button em i { width: 8px; height: 8px; border-radius: 50%; background: #9aa3ad; }
.g-band button.on { border-color: color-mix(in srgb, #22c55e 60%, var(--border)); background: color-mix(in srgb, #22c55e 7%, var(--surface)); color: var(--text); }
.g-band button.on em { color: #16a34a; } :root:not([data-theme="light"]) .g-band button.on em { color: #4ade80; }
.g-band button.on em i { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 22%); }
.g-band button:disabled { opacity: .6; cursor: wait; }

/* V3.1.0: cardul grupului cu banda MT5 1 / MT5 2 — fără ON-ul grupului, „AUR” lângă @nume, mai scund */
#page-groups .g-list .g-row.g-row-band { padding: 9px 12px 10px; gap: 8px 10px; }
#page-groups .g-row-band .grp .ava { width: 42px; height: 42px; }
#page-groups .g-row-band .g-sub { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 1px; }
#page-groups .g-row-band .g-sub small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-groups .g-row-band .g-sub .kw { margin: 0 !important; flex: 0 0 auto; }
#page-groups .g-row-band .g-side { align-self: center; }
#page-groups .g-row-band .g-band button { height: 28px; }

/* V3.1.0: DEMO / LIVE pe același rând (centrat) cu „59/59 MT5 1”; comutatorul puțin mai jos, pe rând cu „Grupuri Pornite” */
:root body #page-groups .g-slot-v { align-items: center; }
:root body #page-groups .g-slot-v em { align-self: center; }
:root body #page-groups .g-slot .read { transform: translateY(3px) scale(.74); }
/* căutarea: mai îngustă, mai aproape de caseta de sus; lista vine mai sus */
:root body #page-groups.g-new .g-panel { margin: 0 0 6px; }
:root body #page-groups.g-new .g-toolbar { padding: 4px 5px; }
:root body #page-groups.g-new .g-search { min-height: 28px; }
:root body #page-groups.g-new .g-toolbar .g-chips button { padding: 3px 7px; }
:root body #page-groups.g-new .g-refresh { min-height: 28px; width: 28px; }
:root body #page-groups.g-new .g-list { gap: 7px; }
/* umbre mai puternice la căutare (pe Arctic Glass conturul nu se vedea) */
:root body #page-groups.g-new .g-search { border: 1.5px solid color-mix(in srgb, var(--text) 22%, transparent);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 14%), 0 1px 0 rgb(255 255 255 / 55%); }
:root body #page-groups.g-new .g-panel { box-shadow: 0 6px 16px rgb(0 0 0 / 16%), 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); }
/* numele grupului = link spre Telegram, scris tot negru, cu logo TG mic */
.g-tl { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: inherit !important; text-decoration: none; }
.g-tl b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.g-tgi { flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 18%)); }
@media (hover: hover) { .g-tl:hover b { text-decoration: underline; } }
/* V3.1.0: cât cauți, lista își păstrează înălțimea (pagina nu sare), dar grupurile găsite stau SUS, cu înălțimea lor
   (fără asta, singurul grup găsit se întindea pe toată înălțimea și ajungea centrat sub ecran → părea că nu caută) */
#page-groups #g-rows { align-content: start; grid-auto-rows: max-content; }

/* V3.1.0: „Modifică” — casetele MT5 1 / MT5 2 (cont, DEMO / LIVE, broker, ON / OFF); verde = pornit, roșu = oprit; cel ales evidențiat */
.g-acc2s { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.g-acc2 { min-width: 0; padding: 8px 11px 9px; border: 2px solid color-mix(in srgb, #22c55e 55%, var(--border)); border-radius: 16px; background: var(--surface); cursor: pointer;
  box-shadow: 0 2px 0 rgb(0 0 0 / 6%), 0 6px 14px rgb(0 0 0 / 8%); opacity: .72; transition: opacity .15s, box-shadow .15s, transform .15s; }
.g-acc2.off { border-color: color-mix(in srgb, #ef4444 55%, var(--border)); }
.g-acc2.is-sel { opacity: 1; transform: translateY(-1px); background: color-mix(in srgb, #22c55e 7%, var(--surface)); box-shadow: 0 0 0 3px rgb(34 197 94 / 22%), 0 8px 18px rgb(0 0 0 / 12%); }
.g-acc2.off.is-sel { background: color-mix(in srgb, #ef4444 6%, var(--surface)); box-shadow: 0 0 0 3px rgb(239 68 68 / 20%), 0 8px 18px rgb(0 0 0 / 12%); }
.g-acc2-t { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 15.5px; font-weight: 900; }
.g-acc2-t > span:first-child { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.g-acc2-t em { padding: 1px 7px; border-radius: 99px; font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .04em; }
.g-acc2-t em.demo { background: color-mix(in srgb, #3b82f6 15%, transparent); color: #2563eb; }
.g-acc2-t em.live { background: color-mix(in srgb, #ef4444 15%, transparent); color: #dc2626; }
.g-acc2-st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 900; color: #16a34a; background: color-mix(in srgb, #22c55e 15%, transparent); }
.g-acc2-st i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.g-acc2.off .g-acc2-st { color: #dc2626; background: color-mix(in srgb, #ef4444 13%, transparent); } .g-acc2.off .g-acc2-st i { background: #ef4444; }
:root:not([data-theme="light"]) .g-acc2-st { color: #4ade80; } :root:not([data-theme="light"]) .g-acc2.off .g-acc2-st { color: #f87171; }
.g-acc2-b { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 600; }

/* V3.1.0: MANUAL / AUTO — carduri cu iconiță; modul folosit în culoarea temei (+ „✓ FOLOSIT”), celălalt liber */
.g-modes .g-mode2 { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 11px; border-radius: 16px; cursor: pointer; text-align: left;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; box-shadow: 0 2px 0 rgb(0 0 0 / 5%), 0 6px 14px rgb(0 0 0 / 7%); }
.g-mode2-ic { flex: 0 0 auto; width: 34px; height: 34px; color: var(--muted); }
.g-mode2 b { display: block; font-size: 15px; font-weight: 850; letter-spacing: .04em; }
.g-mode2 small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.g-modes .g-mode2.on { border-color: var(--k-acc2, #1d6ff2); background: color-mix(in srgb, var(--k-acc2, #1d6ff2) 8%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-acc2, #1d6ff2) 18%, transparent), 0 6px 14px rgb(0 0 0 / 8%); }
.g-mode2.on .g-mode2-ic, .g-mode2.on b { color: var(--k-acc2, #1d6ff2); }
.g-mode2-used { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 850; color: #fff;
  background: var(--k-acc2, #1d6ff2); box-shadow: 0 2px 6px rgb(0 0 0 / 15%); }
/* contul ales „umflat” (3D): ridicat, cu lumină sus și umbră mare; celălalt plat, „apăsat” */
.g-acc2s { margin-bottom: 12px; }
.g-acc2 { transform: none; opacity: .68; box-shadow: inset 0 2px 5px rgb(0 0 0 / 10%); }
.g-acc2.is-sel { opacity: 1; transform: translateY(-3px) scale(1.03);
  background: linear-gradient(180deg, color-mix(in srgb, #fff 65%, transparent), transparent 55%), color-mix(in srgb, #22c55e 9%, var(--surface));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 85%), inset 0 -3px 6px rgb(0 0 0 / 6%), 0 10px 20px rgb(0 0 0 / 16%), 0 3px 6px rgb(0 0 0 / 10%); }
.g-acc2.off.is-sel { background: linear-gradient(180deg, color-mix(in srgb, #fff 65%, transparent), transparent 55%), color-mix(in srgb, #ef4444 8%, var(--surface)); }
:root:not([data-theme="light"]) .g-acc2.is-sel { background: linear-gradient(180deg, rgb(255 255 255 / 10%), transparent 55%), color-mix(in srgb, #22c55e 10%, var(--surface)); }
:root:not([data-theme="light"]) .g-acc2.off.is-sel { background: linear-gradient(180deg, rgb(255 255 255 / 10%), transparent 55%), color-mix(in srgb, #ef4444 10%, var(--surface)); }

/* V3.1.0: „Modifică” mai strâns (pagina nouă): „Înapoi” mai sus, mai gros, în culoarea temei; casete mai joase, spații mai mici */
html:root body #page-group.g-new .g-back { margin: -6px 0 4px; gap: 6px; color: var(--k-acc2, #1d6ff2); font-size: 14px; font-weight: 800; }
html:root body #page-group.g-new .g-back svg { width: 20px; height: 20px; stroke-width: 3; }
html:root body #page-group.g-new .g-acc2s { gap: 8px; margin: 6px 0 8px; }
html:root body #page-group.g-new .g-acc2 { padding: 5px 10px 6px; border-radius: 14px; }
html:root body #page-group.g-new .g-acc2-t { font-size: 14.5px; }
html:root body #page-group.g-new .g-acc2-b { margin-top: 0; font-size: 11.5px; }
html:root body #page-group.g-new .g-modes { gap: 8px; margin-bottom: 8px; }
html:root body #page-group.g-new .g-modes .g-mode2 { padding: 6px 10px; gap: 8px; border-radius: 14px; }
html:root body #page-group.g-new .g-mode2-ic { width: 28px; height: 28px; }
html:root body #page-group.g-new .g-mode2 b { font-size: 14px; }
html:root body #page-group.g-new .g-mode2 small { font-size: 11px; }
html:root body #page-group.g-new .g-mode2-used { top: -8px; font-size: 9.5px; }
html:root body #page-group.g-new .g-fold > summary { padding-top: 0; padding-bottom: 0; }
html:root body #page-group.g-new details.g-card.g-fold { padding-top: 9px; padding-bottom: 9px; }
html:root body #page-group.g-new .g-card { margin-bottom: 7px; }

/* V3.1.0: caseta grupului mică — poza, numele (link TG), starea salvării, ON / OFF; dedesubt Copiază · Implicite · 💾 */
html:root body #page-group.g-new .g-head2 { padding: 9px 11px 10px; margin-bottom: 8px; }
.g-head2-top { display: flex; align-items: center; gap: 10px; }
.g-head2-top .ava { width: 42px !important; height: 42px !important; flex: 0 0 auto; }
.g-head2-t { flex: 1; min-width: 0; }
.g-head2-t .g-tl b, .g-head2-t > b { font-size: 15.5px; font-weight: 850; }
.g-head2-t .g-dirty { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 650; color: #16a34a; }
.g-head2-t .g-dirty.is-dirty { color: #d97706; }
.g-head2-top .read { flex: 0 0 auto; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.g-head2-top .read > span { font-size: 11px; font-weight: 800; }
.g-head2-btns { display: grid; grid-template-columns: 1fr 1fr 46px; gap: 6px; margin-top: 8px; }
.g-hb { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 8px; border-radius: 11px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; }
.g-hb svg { width: 16px; height: 16px; }
.g-hb.save { border-color: var(--k-acc2, #1d6ff2); background: var(--k-acc2, #1d6ff2); color: #fff; box-shadow: 0 4px 10px color-mix(in srgb, var(--k-acc2, #1d6ff2) 35%, transparent); }
.g-hb.save svg { width: 20px; height: 20px; stroke-width: 2.2; }
.g-hb:disabled { opacity: .55; cursor: wait; }

/* V3.1.0: „Modifică” actualizat (pagina nouă): aceleași casete și setări, aspect mai curat —
   titluri cu iconiță în pătrățel colorat, rânduri despărțite de linii fine, controalele aliniate la dreapta, exemplu ca o notă */
html:root body #page-group.g-new .g-card > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 15px; font-weight: 850; }
html:root body #page-group.g-new .g-card > h2 > svg, html:root body #page-group.g-new .g-fold > summary h2 > svg {
  box-sizing: content-box; width: 17px; height: 17px; padding: 6px; border-radius: 10px; flex: 0 0 auto;
  color: var(--k-acc2, #1d6ff2); background: color-mix(in srgb, var(--k-acc2, #1d6ff2) 12%, transparent); }
html:root body #page-group.g-new .g-fold > summary h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 850; }
html:root body #page-group.g-new .g-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
html:root body #page-group.g-new .fgrid { display: block; }
html:root body #page-group.g-new .fgrid .frow { display: flex; align-items: center; gap: 6px; min-height: 40px; margin: 0; padding: 3px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
html:root body #page-group.g-new .fgrid .frow:last-child { border-bottom: 0; }
html:root body #page-group.g-new .fgrid .frow > .lbl { flex: 1 1 auto; min-width: 0; font-weight: 750; }
html:root body #page-group.g-new .fgrid .frow > .lbl + * { margin-left: auto; }
html:root body #page-group.g-new .frow .inp { border-radius: 10px; background: var(--bg); }
html:root body #page-group.g-new .frow .tp-grid { flex-basis: 100%; }
html:root body #page-group.g-new .fgrid .frow:has(.tp-grid) { flex-wrap: wrap; padding-bottom: 8px; }
html:root body #page-group.g-new .g-example { border-style: dashed; background: color-mix(in srgb, var(--k-acc2, #1d6ff2) 4%, var(--surface)); }
html:root body #page-group.g-new .g-example > h2 > svg { color: #ca8a04; background: color-mix(in srgb, #eab308 16%, transparent); }
