/* jankollar.life — shared styles
   To switch to classic green/red: set --up:#0F7B45; --down:#C8202F (and the -soft values). */
:root{
  --ground:#EDF0F3; --surface:#FFFFFF; --ink:#142233; --muted:#4F5E6E;
  --line:#D5DCE3; --line-soft:#E6EAEE; --tint:#F0F2F5;
  --up:#2347E6; --down:#B8520D;
  --up-soft:rgba(35,71,230,.12); --down-soft:rgba(184,82,13,.12);
  --nav:#142233; --nav-muted:#B9C4D0;
  --font:'Archivo','Helvetica Neue',sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--ground);color:var(--ink);font-family:var(--font);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
a{color:var(--up)}
button{font-family:inherit}
:focus-visible{outline:3px solid var(--up);outline-offset:2px}
.up{color:var(--up)} .down{color:var(--down)} .muted{color:var(--muted)}

/* top bar */
.topbar{background:var(--nav);color:#fff}
.topbar-inner{max-width:1240px;margin:0 auto;padding:0 32px;display:flex;align-items:center;gap:4px;min-height:64px}
.brand{color:#fff;text-decoration:none;font-weight:700;font-stretch:112%;font-size:18px;letter-spacing:-.01em;padding:18px 24px 18px 0;white-space:nowrap}
.nav-links{display:flex;align-items:center;gap:4px;flex:1;overflow-x:auto;scrollbar-width:none}
.nav-links::-webkit-scrollbar{display:none}
.nav-link{color:var(--nav-muted);text-decoration:none;font-size:15px;padding:21px 14px 18px;border-bottom:3px solid transparent;white-space:nowrap}
.nav-link:hover{color:#fff}
.nav-link.active{color:#fff;font-weight:600;border-bottom-color:var(--up)}
.nav-right{display:flex;align-items:center;gap:12px;margin-left:auto}
.sync{font-size:13px;color:var(--nav-muted);white-space:nowrap}
.logout{color:#fff;text-decoration:none;font-size:14px;padding:8px 16px;border:1px solid #3A4B5E;border-radius:999px;white-space:nowrap}
.logout:hover{background:#22344A}

/* page */
.page{max-width:1240px;margin:0 auto;padding:40px 32px 64px;display:flex;flex-direction:column;gap:32px}
.page-title{margin:0;font-size:40px;font-weight:700;font-stretch:118%;letter-spacing:-.025em}
.row{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.grow{flex:999 1 560px;min-width:0}
.side{flex:1 1 340px;min-width:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:24px}
.card-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.card-head h2{margin:0;font-size:20px;font-weight:700}
.note{font-size:14px;color:var(--muted)}
.empty{padding:32px 8px;text-align:center;color:var(--muted);font-size:15px}
.error{color:var(--down);font-weight:600}

/* hero */
.hero{display:flex;flex-wrap:wrap;gap:32px;align-items:flex-end;justify-content:space-between}
.hero-left{display:flex;flex-direction:column;gap:6px}
.balance{font-size:96px;line-height:.95;font-weight:700;font-stretch:125%;letter-spacing:-.03em}
.hero-meta{display:flex;flex-wrap:wrap;gap:24px;font-size:15px;color:var(--muted);margin-top:8px}
.hero-meta strong{color:var(--ink)}
.ladder-wrap{flex:1 1 460px;max-width:620px;display:flex;flex-direction:column;gap:10px}
.ladder-head{display:flex;justify-content:space-between;font-size:14px;color:var(--muted)}
.ladder{position:relative;height:56px}
.ladder-track,.ladder-fill{position:absolute;top:18px;height:8px;border-radius:999px}
.ladder-track{left:0;right:0;background:var(--line)}
.ladder-fill{left:0;background:var(--up);transition:width .8s}
.ladder-dot{position:absolute;top:10px;width:24px;height:24px;margin-left:-12px;border-radius:999px;background:#fff;border:4px solid var(--up);transition:left .8s}
.ladder-tick{position:absolute;top:40px;font-size:12px;color:var(--muted);white-space:nowrap;transform:translateX(-50%)}
.ladder-tick:first-of-type{transform:none}
.ladder-tick.last{transform:translateX(-100%)}

/* stat tiles (buttons that open the overlay) */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.tile{font-family:inherit;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px 22px;min-height:120px;display:flex;flex-direction:column;justify-content:space-between;gap:12px;color:var(--ink);cursor:pointer;transition:border-color .15s,transform .15s}
.tile:hover{border-color:var(--up);transform:translateY(-1px)}
.tile[disabled]{cursor:default;transform:none;border-color:var(--line)}
.tile-label{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:15px;color:var(--muted)}
.tile-value{font-size:34px;font-weight:700;font-stretch:112%;letter-spacing:-.02em}
.tile-sub{font-size:13px;color:var(--muted)}
.tiles.small .tile{min-height:96px}
.tiles.small .tile-value{font-size:26px}

/* tables */
.table-box{overflow-x:auto}
table.data{width:100%;border-collapse:collapse;font-size:15px;min-width:520px}
table.data th{text-align:left;color:var(--muted);font-size:13px;font-weight:500;padding:8px 8px 12px}
table.data td{padding:14px 8px;border-top:1px solid var(--line-soft)}
table.data th:first-child,table.data td:first-child{padding-left:0}
table.data th:last-child,table.data td:last-child{padding-right:0}
table.data td.num,table.data th.num{text-align:right}
.chip{display:inline-block;font-size:13px;font-weight:600;padding:4px 10px;border-radius:999px}
.chip.buy{background:var(--up-soft);color:var(--up)}
.chip.sell{background:var(--down-soft);color:var(--down)}
.chip.demo{background:var(--tint);color:var(--muted);margin-left:8px}
.bar-label{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);margin-bottom:6px}
.bar{height:6px;border-radius:999px;background:var(--line-soft)}
.bar>i{display:block;height:6px;border-radius:999px}

/* pills & pager */
.pills{display:flex;flex-wrap:wrap;gap:8px}
.pill{font-size:14px;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;min-height:40px}
.pill.active{background:var(--ink);border-color:var(--ink);color:#fff}
.pager{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:16px;font-size:14px;color:var(--muted)}
.icon-btn{width:44px;height:44px;border-radius:999px;border:1px solid var(--line);background:var(--surface);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--ink)}
.icon-btn:disabled{opacity:.35;cursor:default}

/* month calendar */
.cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.cal-head h2{margin:0;font-size:20px;font-weight:700}
.cal-nav{display:flex;align-items:center;gap:8px}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;font-size:12px;color:var(--muted);text-align:center}
.cal .day{aspect-ratio:1;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:13px;border:0;padding:0;font-family:inherit;background:var(--tint);color:var(--muted)}
.cal .day.weekend,.cal .day.blank{background:transparent}
.cal .day.traded{font-weight:700;cursor:pointer}
.cal .day.today{outline:2px solid var(--ink);outline-offset:-2px;color:var(--ink)}
.cal .day small{font-size:10px;font-weight:600;opacity:.9}

/* year calendar (statistics) */
.year-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.month{font-family:inherit;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px;color:var(--ink);cursor:pointer;display:flex;flex-direction:column;gap:10px}
.month:hover{border-color:var(--up)}
.month-head{display:flex;justify-content:space-between;align-items:baseline;font-weight:700;font-size:15px}
.month .cal{gap:4px;font-size:10px}
.month .cal .day{font-size:11px;border-radius:6px}

/* line charts */
.chart{width:100%;display:block}

/* overlay */
.overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:24px}
.overlay[hidden]{display:none}
.overlay-backdrop{position:absolute;inset:0;border:0;padding:0;cursor:pointer;background:rgba(20,34,51,.62);backdrop-filter:blur(3px) grayscale(.6);-webkit-backdrop-filter:blur(3px) grayscale(.6);animation:fade .18s ease-out}
.dialog{position:relative;width:100%;max-width:560px;max-height:calc(100vh - 48px);overflow-y:auto;background:var(--surface);border-radius:22px;padding:32px;display:flex;flex-direction:column;gap:24px;box-shadow:0 30px 80px rgba(10,20,35,.35);animation:pop .2s ease-out}
.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.dialog-title{margin:0;font-size:18px;font-weight:600;color:var(--muted)}
.dialog-value{display:block;font-size:56px;line-height:1;font-weight:700;font-stretch:125%;letter-spacing:-.03em;margin:4px 0}
.dialog-sub{font-size:15px;color:var(--muted)}
.bars{display:flex;align-items:flex-end;gap:6px;height:110px;border-bottom:1px solid var(--line-soft);padding-bottom:4px}
.bars>div{flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%}
.bars i{display:block;width:100%;border-radius:6px 6px 2px 2px}
.bars span{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.facts{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px}
.facts>div{display:flex;justify-content:space-between;gap:12px;font-size:15px;border-bottom:1px solid var(--tint);padding-bottom:10px}
.facts dt{color:var(--muted)} .facts dd{margin:0;font-weight:600;text-align:right}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}

/* forms (security page) */
.form-card{max-width:440px}
.field{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.field label{font-size:14px;font-weight:600}
.input{font-family:inherit;font-size:16px;padding:14px 16px;border-radius:12px;border:1px solid #C4CDD6;background:#F6F8FA;color:var(--ink);width:100%}
.input:focus{border-color:var(--up);background:#fff}
.btn{font-family:inherit;font-size:16px;font-weight:700;min-height:52px;border:0;border-radius:12px;cursor:pointer;color:#fff;background:var(--up);width:100%}
.btn:disabled{opacity:.45;cursor:not-allowed}
.msg{font-size:14px;font-weight:600;padding:12px 14px;border-radius:10px;margin-bottom:18px}
.msg.err{background:var(--down-soft);color:var(--down)}
.msg.ok{background:var(--up-soft);color:var(--up)}

/* withdrawals */
.w-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px}
.w-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.w-name{font-size:20px;font-weight:700}
.status{font-size:13px;font-weight:600;padding:4px 12px;border-radius:999px}
.status.ok{background:var(--up-soft);color:var(--up)}
.status.wait{background:var(--tint);color:var(--muted)}
.w-balance{font-size:48px;font-weight:700;font-stretch:118%;letter-spacing:-.02em;margin:4px 0 16px}
.w-box{border-radius:14px;padding:16px 18px;margin-top:20px;background:var(--tint)}
.w-box.ok{background:var(--up-soft)}
.w-box .big{font-size:28px;font-weight:700;font-stretch:112%}

@media (max-width:720px){
  .topbar-inner{padding:0 16px;flex-wrap:wrap}
  .brand{padding:14px 12px 4px 0}
  .nav-right{order:2}
  .nav-links{order:3;flex-basis:100%}
  .nav-link{padding:12px 12px 10px}
  .sync{display:none}
  .page{padding:24px 16px 48px;gap:24px}
  .balance{font-size:64px}
  .page-title{font-size:32px}
  .dialog{padding:24px}
  .dialog-value{font-size:44px}
  .facts{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
