/* =========================================================
   SMARTCODE PRO UI (Sidebar + Topbar + Premium Cards)
   Paste into: assets/style.css
   ========================================================= */

:root{
  --bg: #0a0f1f;
  --bg2:#0b1227;

  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --stroke: rgba(255,255,255,.10);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);

  --brand: #7c3aed;
  --brand2:#22c55e;
  --brand3:#38bdf8;

  --warn:#f59e0b;
  --danger:#ef4444;

  --radius: 18px;
  --radius2: 22px;

  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --shadow2: 0 10px 25px rgba(0,0,0,.40);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue";
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 14% 10%, rgba(124,58,237,.38), transparent 60%),
    radial-gradient(1200px 800px at 90% 14%, rgba(34,197,94,.22), transparent 62%),
    radial-gradient(900px 600px at 52% 110%, rgba(56,189,248,.14), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button{font-family:inherit}

.app{
  display:grid;
  grid-template-columns: 280px 1fr;
  min-height:100vh;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:18px;
  border-right:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  backdrop-filter: blur(12px);
}

.brandbox{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 14px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
}

.logo{
  width:42px;
  height:42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #3b82f6 60%, var(--brand2));
  box-shadow: 0 16px 45px rgba(124,58,237,.35);
}

.brandbox h1{
  font-size: 14px;
  margin:0;
  letter-spacing:.2px;
}

.brandbox p{
  margin:2px 0 0;
  font-size:12px;
  color:var(--muted);
}

.nav{
  margin-top:16px;
  display:grid;
  gap:10px;
}

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  transition: transform .12s ease, background .12s ease, border .12s ease;
  font-weight: 750;
  font-size: 13px;
  color: rgba(255,255,255,.86);
}

.nav a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.14);
}

.ico{
  width:34px;
  height:34px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.badge{
  margin-left:auto;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,.18);
  border:1px solid rgba(124,58,237,.30);
  font-size: 12px;
  font-weight: 850;
}

.main{
  padding:22px 22px 40px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
}

.topbar .title h2{
  margin:0;
  font-size:18px;
}

.topbar .title p{
  margin:4px 0 0;
  font-size:12px;
  color:var(--muted);
}

.tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.btn{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 850;
  font-size: 13px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
}

.btn-primary{
  border:0;
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  box-shadow: 0 16px 40px rgba(124,58,237,.25);
}

.btn-success{
  border:0;
  background: linear-gradient(135deg, var(--brand2), #16a34a);
  box-shadow: 0 16px 40px rgba(34,197,94,.18);
}

.btn-danger{
  background: rgba(239,68,68,.16);
  border-color: rgba(239,68,68,.35);
}

.section{
  margin-top:16px;
}

.kpi{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}

.kpi .card{
  padding:16px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}

.kpi .card::before{
  content:"";
  position:absolute;
  inset:-60px -60px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(124,58,237,.45), transparent 70%);
}

.kpi .card:nth-child(2)::before{
  background: radial-gradient(circle at 30% 30%, rgba(34,197,94,.30), transparent 70%);
}

.kpi .card:nth-child(3)::before{
  background: radial-gradient(circle at 30% 30%, rgba(245,158,11,.30), transparent 70%);
}

.kpi .card h3{
  margin:0;
  font-size:13px;
  color:rgba(255,255,255,.80);
  position:relative;
}

.kpi .card strong{
  display:block;
  margin-top:8px;
  font-size:22px;
  letter-spacing:.2px;
  position:relative;
}

.kpi .card span{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  position:relative;
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}

.cardlink{
  padding:16px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
  transition: transform .12s ease, background .12s ease, border .12s ease;
  position:relative;
  overflow:hidden;
}

.cardlink:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
}

.cardlink h3{
  margin:0 0 6px;
  font-size:16px;
}

.cardlink p{
  margin:0;
  font-size:13px;
  color:var(--muted);
  line-height:1.45;
}

.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(56,189,248,.12);
  border:1px solid rgba(56,189,248,.24);
  color: rgba(255,255,255,.88);
}

.panel{
  margin-top:14px;
  padding:16px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);
}

.form{
  display:grid;
  gap:10px;
  max-width: 720px;
}

label{
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,.86);
}

input{
  width:100%;
  padding: 12px 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.94);
  outline:none;
}

input::placeholder{
  color: rgba(255,255,255,.45);
}

input:focus{
  border-color: rgba(124,58,237,.65);
  box-shadow: 0 0 0 5px rgba(124,58,237,.18);
}

.tablewrap{
  overflow:hidden;
  border-radius: var(--radius2);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow2);
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  font-size: 13px;
  vertical-align:middle;
}

.table th{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-weight: 950;
}

.table tr:hover td{
  background: rgba(255,255,255,.04);
}

.avatar{
  width:44px;
  height:44px;
  border-radius: 16px;
  object-fit: cover;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}

.profile{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:14px;
}

.photobox{
  border-radius: var(--radius2);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow2);
}

.photo{
  width:100%;
  height: 340px;
  object-fit:cover;
}

.infobox{
  border-radius: var(--radius2);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow2);
  padding:16px;
}

.kv{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap:10px;
  padding:10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.kv:last-child{
  border-bottom:0;
}

.kv strong{
  color: rgba(255,255,255,.78);
}

.kv span{
  color: rgba(255,255,255,.95);
  font-weight: 700;
}

.codes{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:12px;
}

.codebox{
  border-radius: var(--radius2);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow2);
  padding:16px;
}

.codebox h3{
  margin:0 0 10px;
  font-size: 14px;
}

.small{
  font-size:12px;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.45;
}

/* Responsive */
@media (max-width: 980px){
  .app{
    grid-template-columns: 1fr;
  }
  .sidebar{
    position:relative;
    height:auto;
    border-right:0;
    border-bottom:1px solid var(--stroke);
  }
  .kpi{
    grid-template-columns: 1fr;
  }
  .grid{
    grid-template-columns: 1fr;
  }
  .profile{
    grid-template-columns: 1fr;
  }
  .codes{
    grid-template-columns: 1fr;
  }
  .photo{
    height: 280px;
  }
}

/* Print */
@media print{
  body{
    background:#fff;
    color:#111;
  }
  .sidebar, .topbar, .tools, .btn, .nav, .badge{
    display:none !important;
  }
  .main{
    padding:0;
  }
  .panel, .tablewrap, .infobox, .codebox, .photobox{
    border:1px solid #ddd !important;
    background:#fff !important;
    box-shadow:none !important;
    color:#111 !important;
  }
}
