:root {
  --bg: #f4f6f8; --card: #fff; --border: #e3e7ec;
  --text: #1f2937; --muted: #6b7280;
  --accent: #2563eb; --up: #16a34a; --down: #dc2626;
  --hover: #f0f3f7;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  margin: 0; padding: 16px; font-size: 14px;
}
.num { font-variant-numeric: tabular-nums; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
}
.lbl {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin-bottom: 2px;
}
.up { color: var(--up); } .down { color: var(--down); }

input, button, select { font: inherit; color: var(--text); background: none; border: 0; }
button { cursor: pointer; }

/* ---- navigatie + cash-widget ---- */
.topnav { display: flex; align-items: center; gap: 4px; padding: 8px 16px; }
.topnav .brand { font-weight: 700; font-size: 16px; color: var(--text);
                 text-decoration: none; margin-right: 16px; }
.topnav .navlink { color: var(--muted); text-decoration: none;
                   padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.topnav .navlink:hover { background: var(--hover); }
.topnav .navlink.active { color: var(--accent); background: #eff4ff; }
.topnav .grow { flex: 1; }
.topnav .stat { text-align: right; margin-left: 20px; }
.topnav .stat b { font-size: 15px; }

/* ---- landing + auth (TradingSimulation-design: HTPS, teal, banner) ---- */
.site { --brand: #577F84; }
body.site { padding: 0; font-family: 'Inter', -apple-system, sans-serif; }

.siteheader { display: flex; align-items: center; height: 80px;
              background: #fff; padding: 0 40px 0 0; position: relative;
              z-index: 2; }
.htps { width: 150px; height: 80px; display: flex; align-items: center;
        justify-content: center; font-size: 1.8em; font-weight: 700;
        color: #000; cursor: pointer; text-decoration: none;
        font-family: 'Inter', sans-serif; }
.siteheader .navtext { color: #333; text-decoration: none; font-weight: 300;
                       font-size: 1.1em; padding: 6px 10px; }
.siteheader .navtext:hover { text-decoration: underline; }
/* gelijke visuele afstand tussen opeenvolgende navteksten */
.siteheader .navtext + .navtext { margin-left: 31px; }
.siteheader .headgrow { flex: 1; }
.sitebtn { width: 100px; height: 50px; display: flex; align-items: center;
           justify-content: center; font-size: 1.2em; font-weight: 300;
           color: #fff; background: var(--brand, #577F84); border: none;
           border-radius: 0.2em; cursor: pointer; text-decoration: none;
           margin-left: 12px; }
.sitebtn:hover { filter: brightness(1.08); }

/* landing-hero: foto full-bleed onder de header, met donkere gradient
   zodat de logobalk bovenaan leesbaar blijft */
.hero { position: relative; width: 100%; height: calc(100vh - 80px);
        min-height: 520px; overflow: hidden; }
.hero .heroimg { position: absolute; inset: 0; width: 100%; height: 100%;
                 object-fit: cover; object-position: center; }
.hero .heroshade { position: absolute; inset: 0;
                   background: linear-gradient(180deg,
                               rgba(10,22,26,.30) 0%,
                               rgba(10,22,26,.44) 34%,
                               rgba(10,22,26,.60) 100%); }
/* logobalk bovenaan, zodat de hoodie-logo's onderaan in beeld vrij blijven */
.hero .herologos { position: absolute; left: 0; right: 0; top: 0;
                   display: flex; align-items: center; justify-content: center;
                   padding: 20px 80px; background: rgba(8,18,22,.62);
                   border-bottom: 1px solid rgba(255,255,255,.15); }
.hero .herologos img { height: 24px; width: auto; display: block;
                       opacity: .95; }

/* auth-pagina's: banner als achtergrond met donkere overlay */
body.authpage { padding: 0; font-family: 'Inter', -apple-system, sans-serif;
                background: url('/static/images/banner_home.jpg') center/cover
                fixed; min-height: 100vh; }
body.authpage::before { content: ''; position: fixed; inset: 0;
                        background: rgba(0, 0, 0, 0.6); z-index: 0; }
.authlogo { position: relative; z-index: 1; width: 150px; height: 80px;
            display: flex; align-items: center; justify-content: center;
            background: #fff; font-size: 1.8em; font-weight: 700;
            color: #000; text-decoration: none; }
.authwrap { position: relative; z-index: 1; max-width: 500px;
            margin: 40px auto; padding: 0 16px; }
.authwrap .intro { color: #fff; opacity: .75; font-weight: 100;
                   font-size: 2em; text-align: center; margin: 0 0 30px; }
.authwrap input { display: block; width: 100%; height: 42px; margin: 10px 0;
                  padding: 0 12px; font: inherit; font-weight: 300;
                  background: rgba(255,255,255,.92); color: #000;
                  border: 1px solid rgba(0,0,0,.4); border-radius: 0.2em; }
.authbtn { display: block; width: 100%; height: 42px; margin: 18px 0 0;
           background: #577F84; color: #fff; border: none;
           border-radius: 0.2em; font: inherit; font-weight: 400;
           cursor: pointer; }
.authbtn:hover { filter: brightness(1.08); }
.autherror { background: rgba(220, 38, 38, .9); color: #fff;
             padding: 10px 12px; border-radius: 0.2em; font-size: 14px;
             margin: 0 0 6px; }
.authcheck { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0;
             color: #fff; opacity: .9; font-size: 13px; cursor: pointer; }
.authcheck input { accent-color: #577F84; width: 15px; height: 15px; }
.authinfo { background: rgba(87, 127, 132, .92); color: #fff;
            padding: 10px 12px; border-radius: 0.2em; font-size: 14px;
            margin: 0 0 6px; position: relative; z-index: 1; }
#suggest .opt small { color: var(--muted); margin-left: 6px; }
.authalt { color: #fff; opacity: .85; font-size: .8em; text-align: center;
           margin-top: 22px; }
.authalt a { color: #fff; }

/* oogje om het wachtwoord even zichtbaar te maken */
.pwwrap { position: relative; }
.pwwrap input { padding-right: 44px; }
.pweye { position: absolute; right: 4px; top: 10px; width: 36px; height: 42px;
         display: flex; align-items: center; justify-content: center;
         color: #555; background: none; border: 0; cursor: pointer; }
.pweye:hover { color: #000; }

/* ---- tweestapsverificatie ---- */
.mfacard { position: relative; z-index: 1; background: rgba(255,255,255,.94);
           border-radius: 0.2em; padding: 18px 20px; margin-bottom: 4px; }
.mfastep { margin: 0 0 10px; font-size: 14px; font-weight: 300; color: #1f2937; }
.mfaqr { display: flex; justify-content: center; margin: 4px 0 14px; }
/* 245px = de natuurlijke grootte (49 modules x 5px + rand): geen enkele
   herschaling, dus de scherpst mogelijke blokjes om te scannen. De viewBox
   in de SVG zorgt dat het ook bij een smal scherm netjes meeschaalt. */
.mfaqr svg { width: 245px; height: auto; max-width: 100%; }
.mfakey { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
          font-size: 14px; letter-spacing: .09em; text-align: center;
          background: #f0f3f7; border: 1px solid #e3e7ec; border-radius: 6px;
          padding: 9px 6px; margin: 0 0 14px; word-break: break-all;
          color: #1f2937; }
.mfainput { text-align: center; font-size: 22px !important;
            letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.mfahint { font-size: 12px; color: #6b7280; margin: -8px 0 14px;
           text-align: center; font-weight: 300; }
/* cijfers kleuren: wat zwart is, is per definitie een letter (base32 kent
   geen 0 en geen 1, maar O en 0 zien er in elk lettertype gelijk uit) */
.mfakey .dig, .mfahint .dig { color: #b45309; font-weight: 700; }

/* ---- posities/orders-tabs ---- */
.postabs { display: flex; gap: 28px; margin: -4px 0 14px;
           border-bottom: 1px solid var(--border); overflow-x: auto; }
.ptab { color: var(--muted); font-weight: 600; font-size: 12.5px;
        letter-spacing: .04em; text-transform: uppercase;
        padding: 10px 2px; margin-bottom: -1px;
        border-bottom: 2px solid transparent;
        white-space: nowrap; background: none; }
.ptab .cnt { color: var(--accent); font-weight: 700; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--text); border-bottom-color: var(--accent); }
.tabpane p.empty { color: var(--muted); font-size: 13.5px; margin: 8px 0; }

/* ---- hostpagina ---- */
.hostform { display: flex; gap: 14px; align-items: flex-end;
            flex-wrap: wrap; margin-top: 4px; }
.hostform .field { display: block; min-width: 220px; }

/* ---- leaderboard ---- */
.complist .comp { display: flex; align-items: center; gap: 16px;
                  padding: 12px 4px; border-top: 1px solid #f0f3f7;
                  cursor: pointer; }
.complist .comp:first-child { border-top: 0; }
.complist .comp:hover { background: var(--hover); }
.complist .comp b { font-size: 15px; }
.complist .meta { color: var(--muted); font-size: 12.5px; }
.badge { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
         padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.badge.running { background: #e8f7ee; color: var(--up); }
.badge.upcoming { background: #eff4ff; color: var(--accent); }
.badge.ended { background: var(--hover); color: var(--muted); }
.badge.unconfirmed { background: #fdf0f0; color: var(--down); }
.badge.mfaon { background: #e8f7ee; color: var(--up); border: 0;
               cursor: pointer; font-family: inherit; }
.badge.mfaon:hover { background: #fdf0f0; color: var(--down); }
.rank { width: 42px; color: var(--muted); font-weight: 600; }

/* ---- admin ---- */
.compbtns { display: flex; gap: 6px; margin-left: auto; }
.compbtn { border: 1px solid var(--border); border-radius: 6px;
           padding: 4px 12px; font-size: 12.5px; font-weight: 600;
           color: var(--accent); background: #fff; }
.compbtn:hover { background: #eff4ff; }
.compbtn.danger { color: var(--down); }
.compbtn.danger:hover { background: #fdf0f0; }
.xcol { width: 40px; }
.xdel { display: inline-flex; align-items: center; justify-content: center;
        width: 22px; height: 22px; border-radius: 50%; font-size: 15px;
        line-height: 1; color: var(--muted); }
.xdel:hover { background: #fdf0f0; color: var(--down); }
.adminmsg { background: #eff4ff; color: var(--accent); border-radius: 6px;
            padding: 8px 12px; font-size: 13px; margin: 0 0 10px; }

/* ---- pricing ---- */
.pricinghero { background: linear-gradient(135deg, #46686c, #577F84 55%, #6d989e);
               color: #fff; border-radius: 10px; padding: 44px 32px;
               margin-bottom: 14px; }
.pricinghero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; }
.pricinghero p { margin: 0; opacity: .85; font-size: 15px; max-width: 640px; }
.pricegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pricegrid .card { margin: 0; padding: 22px; display: flex;
                   flex-direction: column; }
.pricegrid h3 { margin: 0 0 2px; font-size: 15px; }
.pricegrid .bignum { font-size: 30px; font-weight: 700; color: #46686c;
                     margin: 10px 0 2px; }
.pricegrid .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
.pricegrid ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px;
                color: var(--text); }
.pricegrid li { padding: 7px 0; border-top: 1px solid #f0f3f7;
                display: flex; justify-content: space-between; gap: 12px; }
.pricegrid li b { font-weight: 600; white-space: nowrap; }
.pricenote { color: var(--muted); font-size: 13px; margin-top: 12px; }
@media (max-width: 900px) { .pricegrid { grid-template-columns: 1fr; } }

/* ---- cash-infowidget (accountstatistieken) ---- */
.acctbar { display: grid; grid-template-columns: repeat(8, 1fr);
           gap: 12px 18px; padding: 12px 16px; }
.acctbar .astat b { display: block; font-size: 14px; font-weight: 600;
                    margin-top: 1px; }
@media (max-width: 1100px) { .acctbar { grid-template-columns: repeat(4, 1fr); } }

/* ---- marktoverzicht: mini-grafiekjes ---- */
.overviewcard { position: relative; padding: 0; min-height: 34px; }
.ovtoggle { position: absolute; top: 8px; right: 8px; z-index: 2; }
.overview { display: grid; grid-template-columns: repeat(8, 1fr);
            gap: 8px 18px; padding: 10px 42px 10px 16px; }
.ovitem { display: flex; gap: 10px; align-items: center; cursor: pointer;
          min-width: 0; }
.ovitem:hover .ovlabel { text-decoration: underline; }
.ovtext { min-width: 0; }
.ovlabel { color: var(--accent); font-weight: 700; font-size: 13px;
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovvalue { font-weight: 600; font-size: 13.5px; }
.ovchange { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ovspark { flex: 0 0 auto; }
@media (max-width: 1200px) { .overview { grid-template-columns: repeat(4, 1fr); } }

/* countdown Amerikaanse beurs (rechtsboven in de navigatiebalk) */
.mktclock { font-size: 12px; color: var(--muted); }
.mktclock b { font-variant-numeric: tabular-nums; }
.mktclock.open b { color: var(--up); }
.topnav .mktclock { margin-right: 10px; white-space: nowrap; }

/* accounticoontje met hover-dropdown */
.acctmenu { position: relative; }
.accticon { display: flex; align-items: center; justify-content: center;
            width: 34px; height: 34px; border-radius: 50%;
            color: var(--muted); }
.acctmenu:hover .accticon, .acctmenu:focus-within .accticon {
  background: var(--hover); color: var(--text); }
/* Account zit in het dropdownmenu, dus geen navlink die actief kan staan:
   op /account markeren we daarom het icoontje zelf. */
.accticon.active { background: #eff4ff; color: var(--accent); }
.acctdrop { display: none; position: absolute; right: 0; top: 100%;
            min-width: 130px; padding: 6px; background: #fff;
            border: 1px solid var(--border); border-radius: 8px;
            box-shadow: 0 6px 18px rgba(0,0,0,.10); z-index: 30; }
.acctmenu:hover .acctdrop, .acctmenu:focus-within .acctdrop { display: block; }
.acctdrop a { display: block; padding: 8px 12px; border-radius: 6px;
              color: var(--text); text-decoration: none; font-size: 13.5px; }
.acctdrop a:hover { background: var(--hover); }

/* inklapbaar orderticket */
.ticket { display: flex; align-items: center; gap: 6px; }

/* ---- tekenen + orderlijnen op de grafiek ---- */
.chartwrap { position: relative; }
.chart-tall { height: calc(100vh - 150px); min-height: 480px; }
#drawsvg { position: absolute; inset: 0; width: 100%; height: 100%;
           pointer-events: none; z-index: 5; }
#drawsvg .tline, #drawsvg .hline { stroke: #b45309; stroke-width: 1.5; }
#drawsvg .tline.preview { stroke-dasharray: 4 3; opacity: .7; }
#drawcatch { position: absolute; inset: 0; display: none;
             cursor: crosshair; z-index: 6; }
#orderui { position: absolute; inset: 0; pointer-events: none; z-index: 7; }

/* verwijder-x die verschijnt bij het zweven over een getekende lijn */
.drawdel { position: absolute; display: none; align-items: center;
           justify-content: center; width: 16px; height: 16px;
           border-radius: 4px; background: #fff; border: 1px solid #b45309;
           color: #b45309; font-size: 12px; line-height: 1; padding: 0;
           pointer-events: auto; }
.drawdel:hover { background: #fdf0f0; color: var(--down);
                 border-color: var(--down); }
.olchip { position: absolute; left: 6px; display: flex; align-items: center;
          gap: 2px; pointer-events: auto; }
.olchip .ollabel { font-size: 10.5px; font-weight: 700; white-space: nowrap;
                   background: #fff; border: 1px solid var(--border);
                   border-radius: 4px; padding: 1px 5px; margin-right: 1px; }
.olchip .ollabel.buy { color: var(--accent); border-color: #bcd4f5; }
.olchip .ollabel.sell { color: var(--down); border-color: #f3c9c9; }
.olchip button { display: flex; align-items: center; justify-content: center;
                 width: 16px; height: 16px; border-radius: 4px;
                 background: #fff; border: 1px solid var(--border);
                 color: var(--muted); font-size: 11px; line-height: 1;
                 padding: 0; }
.olchip .olx:hover { background: #fdf0f0; color: var(--down);
                     border-color: var(--down); }
.olchip .oldots:hover { background: #eff4ff; color: var(--accent);
                        border-color: var(--accent); }
.olchip .olinput { width: 90px; height: 20px; padding: 0 6px; font-size: 12px;
                   background: #fff; border: 1px solid var(--accent);
                   border-radius: 4px; }
.olchip .olok { width: auto; padding: 0 6px; font-size: 10.5px;
                font-weight: 700; color: var(--accent); }

/* ---- chartkaart: infobalk + orderregel + chart ---- */
.chartcard { padding: 0; overflow: hidden; }

.infobar { display: flex; flex-wrap: wrap; gap: 10px 24px;
           align-items: center; padding: 10px 14px;
           border-bottom: 1px solid var(--border); }
.syminfo b { font-size: 17px; }
.syminfo .pct { font-weight: 600; font-size: 13px; margin-left: 8px; }
.syminfo .ba { color: var(--muted); font-size: 12px; margin-top: 1px; }
.infobar .stats { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.infobar .stat { text-align: right; font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 6px;
           padding: 6px 10px; border-bottom: 1px solid var(--border);
           flex-wrap: wrap; }
.toolbar .div { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.toolbar .grow { flex: 1; }

#tickerwrap { position: relative; }
#ticker { width: 130px; font-weight: 600; font-size: 15px;
          padding: 6px 8px; border-radius: 6px; }
#ticker:hover, #ticker:focus { background: var(--hover); outline: none; }
#suggest { position: absolute; left: 0; top: 100%; min-width: 160px;
           background: #fff; border: 1px solid var(--border);
           border-radius: 6px; z-index: 10; overflow: hidden;
           box-shadow: 0 4px 12px rgba(0,0,0,.08); }
#suggest .opt { padding: 7px 12px; cursor: pointer; }
#suggest .opt:hover, #suggest .opt.on { background: var(--hover); }

/* intervalkeuze: strak, zonder pijltje */
.tfsel { appearance: none; -webkit-appearance: none; -moz-appearance: none;
         padding: 6px 10px; border-radius: 6px; font-weight: 500;
         text-align: center; }
.tfsel:hover { background: var(--hover); }

/* icoonknop lijn/candles */
.togglebtn { display: inline-flex; align-items: center; justify-content: center;
             width: 32px; height: 30px; border-radius: 6px; color: var(--muted); }
.togglebtn:hover { background: var(--hover); }
.togglebtn.active { color: var(--accent); background: #eff4ff; }

/* ---- ordervelden ---- */
.field { border: 1px solid var(--border); border-radius: 6px;
         background: #fff; padding: 6px 8px; }
.field:disabled { background: var(--hover); color: var(--muted); }
#qty { width: 86px; } #price { width: 96px; }
select.field { padding: 6px 6px; font-weight: 500; }
.midlbl { display: inline-flex; align-items: center; gap: 5px;
          font-size: 13px; color: var(--muted); cursor: pointer; }
.midlbl input { accent-color: var(--accent); }

/* alle vier de knoppen op één rij: Buy Sell Short Cover */
.tradegrid { display: flex; gap: 4px; }
.tradegrid button { padding: 5px 14px; border-radius: 6px; color: #fff;
                    font-weight: 700; font-size: 12.5px;
                    text-transform: uppercase; letter-spacing: .03em; }
.tradegrid .b-buy { background: var(--accent); }
.tradegrid .b-sell { background: var(--down); }
.tradegrid button:hover { filter: brightness(1.1); }

#msg { font-size: 12.5px; max-width: 260px; }
#msg.ok { color: var(--up); } #msg.err { color: var(--down); }

.chart { width: 100%; height: 420px; }

/* draaiend laadsymbool midden in de grafiek */
.chartspin { position: absolute; inset: 0; display: flex; align-items: center;
             justify-content: center; z-index: 8; pointer-events: none; }
.chartspin .spin { width: 42px; height: 42px; border-radius: 50%;
                   border: 3px solid var(--border);
                   border-top-color: var(--accent);
                   animation: chartspin .8s linear infinite; }
@keyframes chartspin { to { transform: rotate(360deg); } }

/* periodeknoppen onder de chart */
.ranges { display: flex; gap: 2px; padding: 5px 10px;
          border-top: 1px solid var(--border); }
.ranges button { padding: 4px 10px; border-radius: 6px; font-size: 12.5px;
                 font-weight: 500; color: var(--muted); }
.ranges button:hover { background: var(--hover); }
.ranges button.active { color: var(--accent); background: #eff4ff; }

/* ---- tabellen ---- */
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
     color: var(--muted); margin: 0 0 8px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: right; padding: 6px 10px; font-size: 13px; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 11px;
     text-transform: uppercase; letter-spacing: .05em;
     border-bottom: 1px solid var(--border); }
tr + tr td { border-top: 1px solid #f0f3f7; }
