:root{
  --orange:#ff8c00;
  --deep-black:#02030a;
  --card:#0a0d1a;
  --muted:#a9b0c3;
  --text:#eef2ff;
  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 35px rgba(0,0,0,.35);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(255,140,0,.10), transparent 55%),
              radial-gradient(900px 500px at 90% 20%, rgba(255,140,0,.06), transparent 60%),
              var(--deep-black);
  color: var(--text);
  min-height: 100vh;
}

a{color:inherit; text-decoration:none}
.wrap{max-width:1100px; margin:0 auto; padding:16px}

.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 14px; border:1px solid var(--border); background: rgba(10,13,26,.7);
  border-radius: var(--radius); box-shadow: var(--shadow);
  position: sticky; top: 10px; backdrop-filter: blur(10px); z-index: 10;
}
.brand{display:flex; align-items:center; gap:10px}
.brand img{width:34px; height:34px; border-radius:12px}
.brand b{letter-spacing:.3px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px; border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.btn{
  border:0; cursor:pointer;
  background: linear-gradient(135deg, var(--orange), #ffb347);
  color:#120a00; font-weight:800;
  padding:10px 14px; border-radius: 14px;
}
.btn.ghost{
  background: transparent; color: var(--text); border:1px solid var(--border);
}
.grid{
  margin-top:16px;
  display:grid; grid-template-columns: 360px 1fr; gap:14px;
}
@media (max-width: 900px){
  .grid{grid-template-columns: 1fr; }
}

.card{
  border:1px solid var(--border);
  background: rgba(10,13,26,.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card-h{
  padding:14px 14px; display:flex; gap:12px; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--border);
}
.card-b{padding:14px}

.field{display:flex; flex-direction:column; gap:7px; margin-bottom:12px}
.field label{color: var(--muted); font-size:.9rem}
.field input, .field textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline:none;
}
.field input:focus, .field textarea:focus{border-color: rgba(255,140,0,.55)}
.err{display:none; padding:10px 12px; border-radius:14px; background: rgba(255,60,60,.15); border:1px solid rgba(255,60,60,.35)}

.user{
  display:flex; align-items:center; gap:10px;
  padding:12px; border-bottom:1px solid var(--border);
}
.user:hover{background: rgba(255,255,255,.02)}
.avatar{width:42px; height:42px; border-radius:14px; object-fit:cover; border:1px solid var(--border)}
.user .meta{flex:1}
.user .meta b{display:block}
.user .meta small{color:var(--muted)}
.dot{width:10px; height:10px; border-radius:50%}
.dot.on{background: #39ff88}
.dot.off{background: #6b7280}

.chatbox{
  height: calc(100vh - 230px);
  min-height: 420px;
  overflow:auto;
  padding: 14px;
  display:flex; flex-direction:column; gap:10px;
}
@media (max-width:900px){
  .chatbox{height: calc(100vh - 280px)}
}

.msg{max-width: 78%; padding:10px 12px; border-radius:16px; border:1px solid var(--border)}
.msg.in{background: rgba(255,255,255,.04); align-self:flex-start}
.msg.out{background: rgba(255,140,0,.15); border-color: rgba(255,140,0,.25); align-self:flex-end}
.msg small{display:block; margin-top:6px; color: var(--muted); font-size:.78rem}

.typing{
  display:flex; gap:10px; padding:12px; border-top:1px solid var(--border);
}
.typing input{flex:1}
.iconbtn{
  width:44px; height:44px; border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
}
.iconbtn:hover{border-color: rgba(255,140,0,.45)}

.modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: rgba(0,0,0,.6); padding:16px; z-index: 50;
}
.modal.on{display:flex}
.modal .inner{
  width:min(920px, 100%);
  border:1px solid var(--border);
  background: rgba(10,13,26,.92);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.callgrid{display:grid; grid-template-columns: 1fr 1fr; gap:10px; padding:14px}
@media (max-width:900px){ .callgrid{grid-template-columns: 1fr} }
video{
  width:100%; background:#000; border-radius: 16px; border:1px solid var(--border);
  aspect-ratio: 16/9; object-fit: cover;
}
.callbar{display:flex; gap:10px; justify-content:flex-end; padding:12px 14px; border-top:1px solid var(--border)}