* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #0b0c10;
    color: #eaeaea;
    margin: 0;
    padding: 0;
}
a{color:inherit;}
.container { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.auth-box {
    max-width: 400px;
    margin: 60px auto;
    background: #1a1d24;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
h2 { color: #f5c518; }
label { display: block; margin: 14px 0 6px; font-size: 14px; color: #ccc; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
    width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #333;
    background: #0f1115; color: #eee; font-size: 15px; font-family: inherit;
}
textarea{resize:vertical;}
button, .btn {
    display: inline-block; margin-top: 18px; padding: 10px 18px;
    background: #f5c518; color: #111; border: none; border-radius: 6px;
    font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px;
}
.btn-secondary { background: #333; color: #eee; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-small { padding: 6px 10px; font-size: 12px; margin-top: 0; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.alert-error { background: #4a1c1c; color: #ff8a8a; }
.alert-success { background: #1c3a24; color: #7ee08c; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin: 20px 0; }
.card { background: #1a1d24; padding: 16px; border-radius: 10px; border-left: 3px solid #333; }
.card h4 { margin: 0 0 8px; font-size: 13px; color: #999; font-weight: 500; }
.card p { margin: 0; font-size: 20px; font-weight: 700; color: #f5c518; }
.card.highlight { border: 1px solid #f5c518; border-left: 3px solid #f5c518; }
.cards .card:nth-child(6n+1){ border-left-color:#e8b64a; }
.cards .card:nth-child(6n+2){ border-left-color:#4ade80; }
.cards .card:nth-child(6n+3){ border-left-color:#60a5fa; }
.cards .card:nth-child(6n+4){ border-left-color:#c084fc; }
.cards .card:nth-child(6n+5){ border-left-color:#f87171; }
.cards .card:nth-child(6n+6){ border-left-color:#38bdf8; }
.actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #2a2d34; }
.table th { color: #999; font-weight: 600; }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.badge-green { background: #1c3a24; color: #7ee08c; }
.badge-gray { background: #333; color: #ccc; }
.hint { color: #999; font-size: 13px; }

/* ---------- APP SHELL WITH SIDEBAR ---------- */
.app-shell{display:flex; min-height:100vh;}
.sidebar{
    width:250px; flex-shrink:0; background:#12141a; border-right:1px solid #23262e;
    padding:22px 0; position:sticky; top:0; height:100vh; overflow-y:auto;
}
.sidebar-brand{
    font-weight:700; font-size:16px; color:#f5c518; padding:0 20px 20px;
    border-bottom:1px solid #23262e; margin-bottom:14px;
}
.sidebar-brand small{color:#888; font-weight:400; font-size:12px; display:block; margin-top:2px;}
.brand-dot{display:inline-block; width:8px; height:8px; border-radius:50%; background:#f5c518; margin-right:6px;}
.sidebar-nav{display:flex; flex-direction:column; gap:2px; padding:0 10px;}
.nav-link{
    display:block; padding:11px 14px; border-radius:8px; color:#ccc; font-size:14px;
    font-weight:500; text-decoration:none;
}
.nav-link:hover{background:#1c1f27; color:#fff;}
.nav-link.active{background:#2a2410; color:#f5c518;}
.nav-link.logout{color:#e08080; margin-top:12px;}
.nav-group{margin:2px 0;}
.nav-group-toggle{
    width:100%; text-align:left; background:none; border:none; color:#ccc; font-size:14px;
    font-weight:500; padding:11px 14px; border-radius:8px; cursor:pointer; font-family:inherit;
    display:flex; justify-content:space-between; align-items:center;
}
.nav-group-toggle:hover{background:#1c1f27; color:#fff;}
.nav-group .chev{transition:transform .2s; font-size:16px;}
.nav-group.open .chev{transform:rotate(90deg);}
.nav-group-items{display:none; flex-direction:column; padding-left:12px; margin-top:2px;}
.nav-group.open .nav-group-items{display:flex;}
.nav-group-items .nav-link{font-size:13.5px; padding:9px 14px; color:#aaa;}
.sidebar-toggle-mobile{display:none;}
.main-content{flex:1; padding:32px; max-width:1100px;}

@media (max-width: 900px){
    .sidebar{position:fixed; left:-270px; z-index:200; top:0; transition:left .25s; box-shadow:2px 0 20px rgba(0,0,0,0.5);}
    .sidebar.open{left:0;}
    .sidebar-toggle-mobile{
        display:block; position:fixed; top:14px; left:14px; z-index:210;
        background:#f5c518; color:#111; border:none; padding:10px 14px; border-radius:8px;
        font-weight:600; font-size:14px;
    }
    .main-content{padding:70px 16px 32px;}
}

/* ---------- PASSWORD EYE TOGGLE ---------- */
.pw-field{position:relative;}
.pw-field input{padding-right:42px;}
.pw-toggle{
    position:absolute; right:10px; top:50%; transform:translateY(calc(-50% + 7px));
    background:none; border:none; color:#999; cursor:pointer; font-size:16px; padding:4px; margin:0;
}

/* ---------- COPY BUTTON ---------- */
.copy-row{display:flex; gap:8px;}
.copy-row input{flex:1;}
.copy-btn{margin-top:0; white-space:nowrap;}

/* ---------- HOMEPAGE POPUP ---------- */
.site-popup-overlay{
    position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:999;
    display:flex; align-items:center; justify-content:center; padding:20px;
}
.site-popup{
    background:#181b22; border:1px solid #f5c518; border-radius:14px; padding:30px;
    max-width:420px; width:100%; text-align:center; position:relative;
}
.site-popup h3{color:#f5c518; font-size:20px; margin-bottom:12px;}
.site-popup p{color:#ccc; font-size:14.5px; line-height:1.6; margin-bottom:20px;}
.site-popup .close-x{
    position:absolute; top:12px; right:14px; background:none; border:none; color:#999;
    font-size:20px; cursor:pointer; margin:0;
}

/* ---------- TRADING PROOF MARQUEE ---------- */
.proof-ribbon{overflow:hidden; padding:36px 0; background:#12141a; border-top:1px solid #23262e; border-bottom:1px solid #23262e;}
.proof-track{display:flex; gap:18px; width:max-content; animation:scrollProof 30s linear infinite;}
.proof-track img{height:150px; width:auto; border-radius:10px; border:1px solid #262a34;}
@keyframes scrollProof{ from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* ---------- FOOTER HIGHLIGHT LINKS ---------- */
.footer-links-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin:24px 0;}
.footer-link-btn{
    display:block; padding:14px 18px; border-radius:10px; font-weight:600; font-size:14px;
    text-align:center; border:1px solid transparent; transition:transform .15s;
}
.footer-link-btn:hover{transform:translateY(-2px);}
.fl-1{background:#e8b64a; color:#141414;}
.fl-2{background:#4ade80; color:#0a1f10;}
.fl-3{background:#60a5fa; color:#0a1a30;}
.fl-4{background:#f87171; color:#2a0a0a;}
.fl-5{background:#c084fc; color:#1f0a2a;}
.fl-6{background:#38bdf8; color:#04202c;}
.fl-7{background:#94a3b8; color:#0f172a;}
.fl-8{background:#34d399; color:#04241a;}

/* ---- Sidebar Navigation ---- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: #1a1d24;
  border-right: 1px solid #262b36;
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 0 20px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #eaeaea;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #262b36;
  margin-bottom: 10px;
}
.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #f5c518;
  display: inline-block;
}
.sidebar-brand small { color: #999; font-weight: 400; margin-left: 4px; }

.sidebar-nav { display: flex; flex-direction: column; padding: 0 12px; }

.nav-link {
  display: block;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: 8px;
  color: #cfd3da;
  text-decoration: none;
  font-size: 14px;
}
.nav-link:hover { background: #20242e; color: #fff; }
.nav-link.active { background: #f5c518; color: #111; font-weight: 600; }

.nav-group { margin: 2px 0; }
.nav-group-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent !important;
  color: #cfd3da !important;
  border: none !important;
  padding: 10px 14px;
  margin: 0 !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.nav-group-toggle:hover { background: #20242e; }

.chev {
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s;
  margin-left: 8px;
}
.nav-group.open .chev { transform: rotate(45deg); }

.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  display: flex;
  flex-direction: column;
  padding-left: 8px;
}
.nav-group.open .nav-group-items { max-height: 500px; }
.nav-group-items .nav-link { font-size: 13px; padding: 8px 14px; color: #9aa0aa; }

.nav-link.logout {
  margin-top: 16px;
  color: #ff8a8a;
  border-top: 1px solid #262b36;
  padding-top: 14px;
  border-radius: 0;
}

.main-content { flex: 1; padding: 24px 28px; }

.sidebar-toggle-mobile { display: none; }

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 999; transition: left .25s; }
  .sidebar.open { left: 0; }
  .sidebar-toggle-mobile { display: inline-block; margin: 12px; }
  .main-content { padding: 16px; }
}

.footer-links-grid .footer-link-btn:last-child {
    font-weight: 700;
}
