/* ── Elyfunded terminal ─────────────────────────────────── */
body.term { background: #fff; }
.tnav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); border-bottom: 1px solid var(--line); }
.tnav-in { display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 18px; }
.tnav .act { display: flex; gap: 8px; }
.tnav .btn { height: 38px; padding: 0 16px; font-size: 14px; }
.acct-tabs { display: flex; gap: 6px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.acct-tabs button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font: 12.5px var(--mono); white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.acct-tabs button.on { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.acct-tabs i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); }
.acct-tabs i.p1 { background: #e0a100; }
.acct-tabs i.p2 { background: var(--up); }
.acct-tabs i.p3 { background: var(--down); }
.notice { background: var(--blush); color: var(--ink); text-align: center; padding: 9px 16px; font-size: 13.5px; }
.notice b { color: var(--pink-deep); font-weight: 500; }

.grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; min-height: calc(100vh - 60px); }
.mlist { border-right: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; max-height: calc(100vh - 60px); position: sticky; top: 60px; }
.mlist input { margin: 12px; height: 38px; border-radius: 999px; padding-left: 16px; border: 1px solid var(--line-2); background: var(--paper); padding: 0 12px; font: inherit; font-size: 14px; outline: none; }
.mlist input:focus { border-color: var(--ink); }
#mlist { overflow-y: auto; flex: 1; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; border-left: 2px solid transparent; }
.mrow:hover { background: rgba(255, 255, 255, 0.75); }
.mrow.on { background: #fff; border-left-color: var(--pink-deep); }
.mrow img, .mrow .lg { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); flex: none; display: inline-block; }
.mrow .nm { flex: 1; min-width: 0; }
.mrow .nm b { display: block; font-size: 13.5px; font-weight: 600; }
.mrow .nm small { color: var(--muted); font-size: 11.5px; }
.mrow .pr { text-align: right; font: 12.5px var(--mono); }
.mrow .pr small { display: block; font-size: 11px; }
.mrow .has { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.tcenter { min-width: 0; padding: 18px 22px 40px; }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.mhead .mk img, .mhead .mk .lg { width: 36px; height: 36px; }
.mhead .mk b { font: 500 20px/1.2 var(--sans); letter-spacing: -0.02em; }
.mstats { display: flex; gap: 28px; }
.mstats span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mstats b { font-size: 16px; font-weight: 500; }

.chart { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; height: 300px; position: relative; overflow: hidden; }
.chart svg { position: absolute; inset: 40px 0 0 0; width: 100%; height: calc(100% - 40px); }
.ch-tabs { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; z-index: 2; }
.ch-tabs button { height: 24px; padding: 0 8px; border-radius: 6px; border: 0; background: transparent; font: 12px var(--mono); color: var(--muted); }
.ch-tabs button.on { background: var(--blush); color: var(--ink); }
.ch-note { position: absolute; top: 13px; right: 14px; font: 11.5px var(--mono); color: var(--faint); }

.panel { margin-top: 18px; }
.card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h4 { margin: 0 0 12px; font: 600 14px var(--sans); display: flex; justify-content: space-between; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px; font: 500 12px var(--mono); }
.badge.p1 { background: rgba(224, 161, 0, 0.12); color: #8a6200; }
.badge.p2 { background: var(--up-bg); color: var(--up); }
.badge.p3 { background: var(--down-bg); color: var(--down); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpis span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.kpis b { font: 500 17px/1.4 var(--mono); }
.meter { margin-top: 18px; }
.meter .bar { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, rgba(209, 69, 47, 0.18), var(--blush) 33%, var(--blush) 66%, rgba(18, 135, 92, 0.18)); }
.meter .start { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--line-2); }
.meter .eq { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--pink-deep); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--pink-deep), var(--shadow); transform: translate(-50%, -50%); transition: left 0.4s; }
.meter .lbl { display: flex; justify-content: space-between; margin-top: 8px; font: 12px var(--mono); color: var(--muted); }
.days { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.days i { width: 18px; height: 6px; border-radius: 3px; background: rgba(12, 14, 19, 0.1); display: inline-block; }
.days i.on { background: var(--pink-deep); }
.acts { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.acts .why { font-size: 13px; color: var(--muted); }

.pos-wrap { overflow-x: auto; margin: 0 -4px; }
table.pos { width: 100%; border-collapse: collapse; white-space: nowrap; }
table.pos th { text-align: left; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 8px 10px; border-bottom: 1px solid var(--line); }
table.pos td { padding: 11px 8px; border-bottom: 1px solid var(--line); font: 13.5px var(--mono); }
table.pos tr:last-child td { border-bottom: 0; }
table.pos .r { text-align: right; }
table.pos .side { font: 600 12px var(--sans); padding: 3px 7px; border-radius: 6px; }
table.pos .side.L { background: var(--up-bg); color: var(--up); }
table.pos .side.S { background: var(--down-bg); color: var(--down); }
table.pos .btn { height: 28px; font-size: 12.5px; padding: 0 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }

.ticket { border-left: 1px solid var(--line); background: var(--paper); padding: 18px; position: sticky; top: 60px; max-height: calc(100vh - 60px); overflow-y: auto; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--blush); border-radius: 999px; padding: 3px; }
.seg button { height: 38px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on.L { background: var(--up); color: #fff; }
.seg button.on.S { background: var(--down); color: #fff; }
.fld { margin-top: 16px; }
.fld label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.inp { display: flex; align-items: center; height: 48px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; padding: 0 12px; }
.inp:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px var(--blush); }
.inp span { color: var(--muted); font: 15px var(--mono); }
.inp input { flex: 1; border: 0; background: transparent; outline: none; font: 500 17px var(--mono); padding: 0 6px; min-width: 0; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.quick button { height: 30px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font: 12px var(--mono); }
.quick button:hover { background: var(--blush); }
.summary { margin-top: 16px; border-top: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary span { color: var(--muted); }
.summary b { font: 500 13px var(--mono); }
.go-btn { width: 100%; height: 50px; margin-top: 16px; border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; color: #fff; }
.go-btn.L { background: var(--up); }
.go-btn.S { background: var(--down); }
.go-btn[disabled] { opacity: 0.45; cursor: default; }
.tnote { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pending { margin-top: 16px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); font-size: 13.5px; }
.pending b { font-weight: 600; }
.pending .acts { margin-top: 10px; }

.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.buy-grid .tier { padding: 18px; box-shadow: none; }
.buy-grid .tier .fee { font-size: 40px; margin-top: 12px; }
.buy-grid .tier dl { margin: 14px 0; }
.buy-grid .tier dt, .buy-grid .tier dd { padding: 7px 0; font-size: 13px; }
.hero-mini { padding: 6px 0 16px; }
.hero-mini h3 { margin: 0; font: 400 26px/1.2 var(--sans); letter-spacing: -0.035em; }
.hero-mini p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 1180px) {
  .grid { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  table.pos .mark { display: none; }
  table.pos td, table.pos th { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; }
  .mlist { position: static; max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ticket { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); order: 3; }
  .tcenter { padding: 16px; }
  .buy-grid { grid-template-columns: 1fr; }
  .acct-tabs { display: none; }
  .tnav .act { margin-left: auto; }
}
@media (max-width: 520px) {
  .wrap.wide { padding: 0 16px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .mstats { gap: 16px; }
  .hide-s { display: none; }
  .chart { height: 240px; }
}

.tnav-ca { margin-left: auto; }
.tnav-ca .ca-pill { font-size: 12px; }
@media (max-width: 1180px) { .tnav-ca { display: none; } }
