/* Voxta Social — Twitter/X-ish UI */
:root{
  --bg:#0b0f14;
  --panel:#0f1520;
  --panel2:#0d121b;
  --text:#e6edf3;
  --muted:#9aa6b2;
  --line:#1e2a3a;
  --brand:#1d9bf0;
  --brand2:#62b6ff;
  --danger:#ff4d4d;
  --ok:#1db954;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --max:1200px;
  --col-gap:18px;
  --feed-w: 640px;
}

html.light{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel2:#ffffff;
  --text:#0b1220;
  --muted:#546276;
  --line:#e8edf4;
  --shadow: 0 12px 26px rgba(10,20,30,.10);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 30% -20%, rgba(29,155,240,.22), transparent 55%),
              radial-gradient(900px 600px at 90% 10%, rgba(98,182,255,.18), transparent 60%),
              var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
code{background:rgba(255,255,255,.06); padding:.15rem .35rem; border-radius:8px; border:1px solid rgba(255,255,255,.08)}
html.light code{background:rgba(10,20,30,.04); border-color:rgba(10,20,30,.06)}

.app{
  max-width:var(--max);
  margin:0 auto;
  display:grid;
  grid-template-columns: 270px minmax(0,var(--feed-w)) 1fr;
  gap:var(--col-gap);
  padding:18px;
  align-items:start;
}

@media (max-width: 1050px){
  .app{grid-template-columns: 250px 1fr; }
  .rightbar{display:none}
}
@media (max-width: 820px){
  .app{grid-template-columns: 1fr; }
  .sidebar{position:sticky; top:0; z-index:10}
  .rightbar{display:none}
}

.sidebar{
  position:sticky;
  top:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 65%);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
}

.brand{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 10px 14px 10px;
  border-bottom:1px solid var(--line);
  margin-bottom:12px;
}
.brand a{
  font-weight:800;
  letter-spacing:.2px;
}
.toggle{
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}

.nav{display:flex; flex-direction:column; gap:6px}
.nav a{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  position:relative;
}
.nav-badge{
  margin-left:auto;
  background:rgba(29,155,240,.18);
  border:1px solid rgba(29,155,240,.35);
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  color:var(--text);
}
.nav a:hover{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.06);
}
.nav a.active{
  background:rgba(29,155,240,.14);
  border-color:rgba(29,155,240,.35);
}
.nav span{font-weight:650}

.sidebox{
  margin-top:14px;
  padding:12px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:var(--radius);
}

.feed{
  min-height: calc(100vh - 36px);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:rgba(255,255,255,.02);
  box-shadow:var(--shadow);
}

.feed-header{
  padding:14px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), transparent);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
}
.feed-header h1{font-size:18px; margin:0}
.badge{font-size:12px; color:var(--muted); border:1px solid var(--line); padding:6px 10px; border-radius:999px}

.rightbar{
  position:sticky;
  top:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.card{
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:12px;
  box-shadow:var(--shadow);
}
.card-title{font-weight:800; margin-bottom:10px}
.trend{padding:8px 10px; border-radius:12px; border:1px solid transparent}
.trend:hover{background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.06)}

.flash{margin:12px; padding:10px 12px; border-radius:14px; border:1px solid var(--line)}
.flash.ok{border-color:rgba(29,185,84,.35); background:rgba(29,185,84,.10)}
.flash.err{border-color:rgba(255,77,77,.35); background:rgba(255,77,77,.10)}

.compose{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.02);
}
textarea, input, select{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.15);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}
html.light textarea, html.light input, html.light select{background:rgba(10,20,30,.03)}
textarea{min-height:90px; resize:vertical}
.hidden{display:none}

.compose-tools{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.compose-tools .tool{
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-weight:850;
}
.compose-tools .tool:disabled{opacity:.45; cursor:not-allowed}
.compose-tools .tool:hover{background:rgba(255,255,255,.05)}
.compose-tools .spacer{flex:1}
.compose-tools .filehint{color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px}

.notif{
  display:flex;
  gap:12px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
}
.notif:hover{background:rgba(255,255,255,.03)}

.userlist{display:flex; flex-direction:column; gap:8px}
.userrow{display:flex; gap:10px; align-items:center; padding:10px; border-radius:14px; border:1px solid var(--line); background:rgba(255,255,255,.02)}
.userrow:hover{background:rgba(255,255,255,.04)}
.userrow .body{flex:1; min-width:0}

.link{color:var(--brand2)}
.link:hover{text-decoration:underline}
.row{display:flex; gap:10px; align-items:center}
.row > *{flex:1}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:10px 14px;
  border:1px solid transparent;
  font-weight:750;
  cursor:pointer;
  user-select:none;
}
.btn.primary{background:var(--brand); color:white}
.btn.primary:hover{background:var(--brand2)}
.btn.ghost{background:rgba(255,255,255,.03); border-color:var(--line)}
.btn.ghost:hover{background:rgba(255,255,255,.05)}
.btn.danger{background:rgba(255,77,77,.16); border-color:rgba(255,77,77,.35)}
.small{font-size:12px}
.muted{color:var(--muted)}
.sep{height:1px; background:var(--line); margin:10px 0}

.post{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex; gap:12px;
}
.avatar{
  width:44px; height:44px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(29,155,240,.6), rgba(98,182,255,.35));
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}
.avatar img.avatar-in{width:100%;height:100%;object-fit:cover;border-radius:14px;display:block}
.avatar.sm{width:34px;height:34px;border-radius:12px}
.avatar.sm img.avatar-in{border-radius:12px}

.avatar-img{width:68px;height:68px;border-radius:18px;border:1px solid var(--line);object-fit:cover;display:block;background:rgba(255,255,255,.03)}
.avatar-img.placeholder{display:flex;align-items:center;justify-content:center;font-weight:900;color:var(--muted)}

.inline{display:inline}
.iconbtn.danger{background:rgba(255,77,77,.14);border-color:rgba(255,77,77,.35)}

.media{margin:10px 0;display:grid;gap:10px}
.media-img{width:100%;border-radius:16px;border:1px solid var(--line);display:block}
.media-vid{width:100%;border-radius:16px;border:1px solid var(--line);background:black}

.repost-box{margin:8px 0 10px 0;padding:10px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03)}
.repost-content{margin-top:6px;white-space:pre-wrap;line-height:1.35}

.comment{padding:12px 16px;border-bottom:1px solid var(--line);display:flex;gap:12px}
.comment .body{flex:1;min-width:0}
.post .body{flex:1; min-width:0}
.post .meta{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.post .user{font-weight:850}
.post .time{color:var(--muted); font-size:12px}
.post .content{margin:6px 0 10px 0; white-space:pre-wrap; line-height:1.35}
.actions{display:flex; gap:8px; flex-wrap:wrap}
.iconbtn{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  cursor:pointer;
}
.iconbtn.active{border-color:rgba(29,155,240,.5); background:rgba(29,155,240,.10)}
.iconbtn:hover{background:rgba(255,255,255,.05)}
.kpi{color:var(--muted); font-size:12px}

.form-card{
  margin:12px;
  padding:14px;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
}
.form-card h2{margin:0 0 10px 0; font-size:16px}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width:520px){.grid2{grid-template-columns:1fr}}
.label{font-size:12px; color:var(--muted); margin:6px 0}

.profile-hero{
  padding:16px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg, rgba(29,155,240,.12), transparent 60%);
}
.profile-cover{
  height:140px;
  border-radius:18px;
  border:1px solid var(--line);
  margin-bottom:12px;
  background:rgba(255,255,255,.03);
  background-size:cover;
  background-position:center;
}
.profile-hero .top{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap}
.profile-hero h2{margin:0; font-size:18px}
.pill{display:inline-flex; gap:8px; align-items:center; border:1px solid var(--line); padding:6px 10px; border-radius:999px; color:var(--muted); font-size:12px}

.dm-list a{
  display:block;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.dm-list a:hover{background:rgba(255,255,255,.04)}
.dm-msg{
  padding:10px 14px;
  border-bottom:1px solid var(--line);
}
.dm-msg.me{background:rgba(29,155,240,.06)}
.dm-audio{margin-top:8px}


/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  background:rgba(0,0,0,.75);
  border:1px solid rgba(255,255,255,.12);
  padding:10px 14px;
  border-radius:999px;
  color:#fff;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:9999;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-4px)}

/* Search autocomplete */
.searchbox{position:relative}
.suggest{
  position:absolute;
  top:44px;
  left:0;
  right:0;
  background:rgba(10,12,14,.98);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  z-index:2000;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}
html.light .suggest{background:rgba(255,255,255,.98)}
.sug-row{display:flex; gap:10px; padding:10px 12px; align-items:center}
.sug-row:hover{background:rgba(255,255,255,.04)}
.sug-av{width:34px; height:34px; border-radius:50%; object-fit:cover; border:1px solid var(--line)}
.sug-av.ph{display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.06); color:var(--muted); font-weight:800}
.sug-user{font-weight:850}
.sug-body{min-width:0}
.one-line{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

/* Composer preview + counter */
.compose-preview{
  margin-top:10px;
  border:1px dashed var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.02);
}
.compose-preview.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
}
.compose-preview .pv-item{border-radius:14px; overflow:hidden; border:1px solid var(--line);}
.compose-preview .pv-item img,
.compose-preview .pv-item video{width:100%; height:auto; display:block;}
.compose-preview-img{max-width:100%; border-radius:14px; display:block}
.compose-preview-vid{width:100%; border-radius:14px; display:block}
.compose-kpis{display:flex; align-items:center; gap:10px}
.compose-count{color:var(--muted); font-size:12px}
.compose.drag{outline:2px dashed rgba(29,155,240,.55); outline-offset:6px}

.newposts{position:sticky; top:10px; z-index:5; display:flex; justify-content:center; margin:10px 0}

/* DMs 2-column */
.dm-shell{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:0;
  min-height: calc(100vh - 72px);
}
@media (max-width: 920px){
  .dm-shell{grid-template-columns:1fr}
  .dm-left{border-right:none}
}
.dm-left{
  border-right:1px solid var(--line);
  background:rgba(255,255,255,.01);
}
.dm-left-head{padding:12px; border-bottom:1px solid var(--line)}
.dm-new{display:flex; gap:8px}
.dm-threadlist{display:flex; flex-direction:column}
.dm-thread{
  display:flex;
  gap:10px;
  padding:12px;
  border-bottom:1px solid var(--line);
  align-items:center;
}
.dm-thread:hover{background:rgba(255,255,255,.04)}
.dm-thread.active{background:rgba(29,155,240,.08)}
.dm-thread-body{min-width:0; flex:1}
.dm-thread-top{display:flex; justify-content:space-between; gap:10px}
.dm-thread-user{font-weight:900}
.dm-thread-time{color:var(--muted); font-size:12px}
.dm-unread{
  min-width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(29,155,240,.9);
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.dm-right{display:flex; flex-direction:column}
.dm-right-head{
  padding:12px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.dm-title{font-weight:950}
.dm-messages{flex:1; overflow:auto; padding-bottom:10px}
.dm-compose{
  border-top:1px solid var(--line);
  padding:12px;
  background:rgba(255,255,255,.01);
}
.dm-compose textarea{min-height:60px}
.dm-tools{display:flex; gap:10px; align-items:center; margin-top:10px}
.okhint{color:#3ddc84}
.errhint{color:#ff6b6b}

/* New posts bar */
.newposts{position:sticky; top:8px; z-index:10; margin:10px 0; display:flex; justify-content:center}
.newposts .btn{box-shadow:0 10px 30px rgba(0,0,0,.35)}
