:root{
  --bg:#0b0f19;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.04);
  --stroke: rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.65);
  --brand:#6C5CE7;
  --brand2:#00D2D3;
  --shadow: 0 16px 50px rgba(0,0,0,.45);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 18% 0%, rgba(108,92,231,.22), transparent 55%),
    radial-gradient(900px 500px at 85% 10%, rgba(0,210,211,.18), transparent 55%),
    var(--bg);
}

a{color:inherit;text-decoration:none}
.wrap{max-width:1100px;margin:0 auto;padding:18px}
@media (max-width: 860px){ .wrap{padding:14px} }

.topbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.brand{
  display:flex;align-items:center;gap:10px;min-width:0;
}
.brand img{
  width:40px;height:40px;border-radius:14px;object-fit:cover;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.brand .name{font-weight:850;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand .sub{font-size:.92rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius: 999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size:.92rem;
}

.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:14px;
}
@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
}

.card{
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.card .hd{
  padding:14px 14px 10px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
}
.card .hd h1,.card .hd h2{
  margin:0;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing:.2px;
}
.card .hd p{margin:6px 0 0;color:var(--muted);line-height:1.5}
.card .bd{padding:0 14px 14px}
.hr{height:1px;border:none;background:var(--stroke);margin:12px 0}

.kpis{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
@media (max-width: 900px){ .kpis{grid-template-columns:1fr} }

.kpi{
  padding:12px;
  border:1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.kpi b{display:block;font-size:1.05rem;margin-bottom:4px}
.kpi span{color:var(--muted);font-size:.95rem;line-height:1.45}

.btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:12px 14px;border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--text);
  font-weight:750;
}
.btn:active{transform:scale(.99)}
.btn.primary{
  border:none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#081019;
}

.input{
  width:100%;
  padding:12px 14px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
.input::placeholder{color:rgba(234,240,255,.55)}
.input:focus{border-color: rgba(108,92,231,.55)}

.small{color:var(--muted);font-size:.95rem}

/* Chat */
.chat{
  height: calc(100vh - 240px);
  min-height: 340px;
  overflow:auto;
  padding:12px;
  border:1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(0,0,0,.18);
}
.msg{
  max-width: 82%;
  margin:10px 0;
  padding:10px 12px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.msg.me{margin-left:auto;background: rgba(108,92,231,.16)}
.msg .meta{margin-top:6px;color:rgba(234,240,255,.62);font-size:.85rem}
.msg img{
  width:100%;
  display:block;
  margin-top:8px;
  border-radius: 14px;
  border:1px solid var(--stroke);
}
.chatbar{
  display:flex;gap:10px;align-items:center;
  padding:12px;
  border-top:1px solid var(--stroke);
  background: rgba(11,15,25,.75);
  backdrop-filter: blur(12px);
}
.filebtn{
  width:46px;height:46px;border-radius:16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  display:flex;align-items:center;justify-content:center;
  user-select:none;
}
