:root{
  --bg:#f3f5f9;
  --sidebar:#ffffff;
  --surface:#ffffff;
  --surface2:#fbfcff;

  --text:#0b1220;
  --muted:rgba(11,18,32,.62);

  --line:rgba(15,23,42,.10);
  --shadow:0 16px 40px rgba(15,23,42,.10);
  --shadow2:0 10px 22px rgba(15,23,42,.08);

  --primary:#2b67ff;
  --primary2:#1f4bd1;

  --success:#1aa168;
  --danger:#d63a4a;

  --radius:18px;
  --radius2:22px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 40% -10%, rgba(43,103,255,.12), transparent 70%),
    radial-gradient(700px 380px at 95% 15%, rgba(26,161,104,.08), transparent 60%),
    linear-gradient(180deg, #f7f8fc 0%, var(--bg) 55%, #f7f8fc 100%);
}

a{ color:inherit; }

code{
  font-family:var(--mono);
  background: rgba(43,103,255,.07);
  border:1px solid rgba(43,103,255,.16);
  padding: 2px 7px;
  border-radius:999px;
}

/* Layout */
.app{ display:grid; grid-template-columns:284px 1fr; min-height:100vh; }
.sidebar{
  position: sticky; top:0; height:100vh;
  padding:16px 14px;
  background: rgba(255,255,255,.94);
  border-right:1px solid var(--line);
  backdrop-filter: blur(10px);
}
.main{ padding:18px 20px 36px; }

/* Brand */
.brand{ display:flex; align-items:center; gap:12px; padding:10px 10px 14px; }
.brand-mark{
  width:44px; height:44px;
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 14px 28px rgba(43,103,255,.18);
  border:1px solid rgba(43,103,255,.18);
  background:#fff;
  display:flex; align-items:center; justify-content:center;
}
.brand-mark img{ width:44px; height:44px; display:block; }
.brand .name{ display:flex; flex-direction:column; line-height:1.08; }
.brand .name b{ font-size:14px; letter-spacing:.28px; }
.brand .name span{ font-size:12px; color:var(--muted); }

.nav-title{
  margin:10px 10px 8px;
  font-size:11px;
  letter-spacing:.16em;
  font-weight:1000;
  color: rgba(11,18,32,.45);
  text-transform: uppercase;
}

.nav{ margin-top:6px; display:grid; gap:6px; }
.nav a{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 10px;
  border-radius:16px; text-decoration:none;
  color: rgba(11,18,32,.86);
  border:1px solid transparent;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.nav a:hover{ background: rgba(43,103,255,.06); border-color: rgba(43,103,255,.14); }
.nav a:active{ transform: translateY(1px); }
.nav a.active{ background: rgba(43,103,255,.10); border-color: rgba(43,103,255,.22); }
.nav .left{ display:flex; align-items:center; gap:10px; }
.nav .icon{
  width:34px; height:34px;
  border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-size:16px;
  border:1px solid var(--line);
  background: rgba(11,18,32,.03);
}
.nav a.active .icon{ background: rgba(43,103,255,.12); border-color: rgba(43,103,255,.20); }
.nav .hint{ font-size:12px; color: rgba(11,18,32,.42); font-weight:900; }

/* Topbar */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:14px 16px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.90);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.topbar .left{ display:flex; flex-direction:column; gap:4px; }
.topbar .right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.h1{ font-size:22px; margin:0; letter-spacing:.2px; }
.h2{ font-size:15px; margin:0; letter-spacing:.15px; color: rgba(11,18,32,.92); }
.kicker{ font-size:12px; color: var(--muted); margin-top:4px; }
.muted{ color: var(--muted); font-size:13px; }

.card{
  border-radius: var(--radius2);
  border:1px solid var(--line);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow2);
  padding: 16px;
}
.card-header{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; margin-bottom:12px;
}

.big-balance{
  font-size:36px;
  font-weight:1000;
  letter-spacing:.3px;
  color: rgba(11,18,32,.95);
}

.badge{
  padding:8px 10px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  color: rgba(11,18,32,.70);
  font-size:12px;
  font-weight:1000;
}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(11,18,32,.04);
  border:1px solid var(--line);
  color: rgba(11,18,32,.72);
  font-size:12px;
  font-weight:900;
}
.pill.good{ color: var(--success); border-color: rgba(26,161,104,.22); background: rgba(26,161,104,.10); }
.pill.bad{ color: var(--danger); border-color: rgba(214,58,74,.22); background: rgba(214,58,74,.10); }

.btn, button{
  appearance:none; border:none; cursor:pointer;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  color:white;
  font-weight:1000;
  letter-spacing:.2px;
  border:1px solid rgba(43,103,255,.25);
  box-shadow: 0 14px 24px rgba(43,103,255,.14);
  transition: transform .06s ease, filter .15s ease;
  text-decoration:none;
  display:inline-flex; align-items:center; gap:10px;
}
.btn:hover, button:hover{ filter: brightness(1.03); }
.btn:active, button:active{ transform: translateY(1px); }

.btn.secondary, button.secondary{
  background: rgba(11,18,32,.04);
  color: rgba(11,18,32,.88);
  border: 1px solid var(--line);
  box-shadow:none;
}
.btn.ghost{
  background: transparent;
  color: rgba(11,18,32,.78);
  border:1px solid var(--line);
  box-shadow:none;
}

/* LOCKED BUTTON (visible but not clickable) */
.btn.locked{
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

label{ display:grid; gap:7px; font-size:13px; color: rgba(11,18,32,.72); }
input, select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.94);
  color: rgba(11,18,32,.92);
  outline:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
input::placeholder{ color: rgba(11,18,32,.35); }
input:focus, select:focus{
  border-color: rgba(43,103,255,.45);
  box-shadow: 0 0 0 4px rgba(43,103,255,.12);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(255,255,255,.94);
}
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  font-size:13px;
}
.table th{
  text-align:left;
  color: rgba(11,18,32,.78);
  font-weight:1000;
  letter-spacing:.2px;
  background: rgba(11,18,32,.03);
}
.table tr:last-child td{ border-bottom:none; }
.right{ text-align:right; }

.alert, .success{
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid;
  margin: 14px 0;
}
.alert{ border-color: rgba(214,58,74,.30); background: rgba(214,58,74,.10); }
.success{ border-color: rgba(26,161,104,.28); background: rgba(26,161,104,.10); }

.hr{ height:1px; background: var(--line); margin:12px 0; }
.grid{ display:grid; gap:12px; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.grid3{ display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:14px; }
.split{ display:grid; grid-template-columns:1.1fr .9fr; gap:14px; }

@media(max-width:1100px){
  .split{ grid-template-columns:1fr; }
  .grid3{ grid-template-columns:1fr; }
}
@media(max-width:900px){
  .app{ grid-template-columns:1fr; }
  .sidebar{ height:auto; position:relative; }
  .grid2{ grid-template-columns:1fr; }
}

/* Login */
.login-wrap{
  min-height: 100vh;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
}
@media(max-width:980px){
  .login-wrap{ grid-template-columns: 1fr; }
}
.login-left{
  padding: 44px 36px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.login-hero{
  width: min(760px, 100%);
  border-radius: 28px;
  border:1px solid rgba(43,103,255,.14);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(43,103,255,.18), transparent 60%),
    radial-gradient(700px 400px at 80% 20%, rgba(26,161,104,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  box-shadow: var(--shadow);
  padding: 28px;
  overflow:hidden;
  position:relative;
}
.login-hero::after{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-140px;
  width:420px;
  height:420px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(43,103,255,.18), transparent 62%);
}
.hero-top{ display:flex; align-items:center; gap:12px; }
.hero-top img{
  width:56px; height:56px;
  border-radius:18px;
  box-shadow: 0 14px 28px rgba(43,103,255,.16);
  border:1px solid rgba(43,103,255,.18);
  background:#fff;
}
.hero-title{ display:flex; flex-direction:column; line-height:1.05; }
.hero-title b{ font-size:18px; letter-spacing:.28px; }
.hero-title span{ font-size:12px; color: var(--muted); margin-top:4px; }
.hero-main{ margin-top:18px; font-size:32px; font-weight:1000; letter-spacing:.2px; }
.hero-sub{ margin-top:10px; color: var(--muted); max-width:54ch; line-height: 1.5; }
.hero-pills{ margin-top:18px; display:flex; gap:10px; flex-wrap:wrap; }
.hero-pills .pill{ background: rgba(255,255,255,.70); }

.login-right{
  padding: 44px 22px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.login-card{
  width: min(420px, 100%);
  border-radius: 24px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  padding: 18px;
}
.login-card h1{ margin: 8px 0 4px; font-size: 22px; letter-spacing:.2px; }
.login-card .sub{ color: var(--muted); font-size: 13px; margin-bottom: 14px; }
