:root{
  --fb-bg:#f0f2f5;
  --card:#ffffff;
  --text:#050505;
  --muted:#65676b;
  --border:#dddfe2;
  --shadow:0 1px 2px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.06);
  --blue:#1877f2;
  --blue-2:#166fe5;
  --chip:#e7f3ff;
  --radius:12px;
}

/* page */
.fb-page{
  background: var(--fb-bg);
  min-height: calc(100vh - 60px);
  padding: 18px 0 40px;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}


@media (max-width: 1000px){
  .fb-wrap{ grid-template-columns: 1fr; }
  .fb-left,.fb-right{ display:none; }
}

.fb-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.fb-card-pad{ padding: 12px; }

.fb-title{
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0 10px;
}

/* left/right */
.fb-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration:none;
}
.fb-nav a:hover{ background:#f7f8fa; }
.fb-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 13px;
  color: var(--muted);
}

/* composer */
.fb-composer{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.fb-avatar{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #cfd2d7;
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#fff;
}
.fb-cta{
  width:100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f0f2f5;
  padding: 10px 12px;
  color: var(--muted);
  cursor: pointer;
  text-align:left;
}
.fb-cta:hover{ background:#e9ebee; }

.fb-actions{
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.fb-action-btn{
  flex:1;
  border:0;
  background:transparent;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  cursor:pointer;
}
.fb-action-btn:hover{ background:#f7f8fa; }

/* posts */
.fb-post{
  padding: 12px;
}
.fb-post + .fb-post{
  border-top: 1px solid transparent;
  margin-top: 12px;
}

.fb-post-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.fb-post-user{
  display:flex;
  gap: 10px;
  align-items:center;
}
.fb-name{
  font-weight: 700;
  font-size: 14px;
}
.fb-time{
  font-size: 12px;
  color: var(--muted);
}
.fb-post-menu{
  color: var(--muted);
  border:0;
  background:transparent;
  font-size: 18px;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.fb-post-menu:hover{ background:#f7f8fa; }

.fb-post-body{
  font-size: 15px;
  line-height: 1.4;
  margin: 8px 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* footer actions */
.fb-post-actions{
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display:flex;
  gap: 8px;
}
.fb-post-actions button{
  flex: 1;
  border:0;
  background:transparent;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  cursor:pointer;
}
.fb-post-actions button:hover{ background:#f7f8fa; }

.fb-link{
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  text-decoration:none;
}
.fb-link:hover{ text-decoration: underline; }

/* comments */
.fb-comments{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.fb-comment{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.fb-bubble{
  background:#f0f2f5;
  border-radius: 14px;
  padding: 8px 10px;
  max-width: 100%;
}
.fb-bubble strong{
  font-size: 13px;
}
.fb-bubble div{
  font-size: 13px;
  color: var(--text);
  margin-top: 2px;
}
.fb-comment-form{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.fb-input{
  width:100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  outline:none;
  background:#fff;
}
.fb-input:focus{
  border-color: rgba(24,119,242,.5);
  box-shadow: 0 0 0 3px rgba(24,119,242,.15);
}
.fb-send{
  background: var(--blue);
  color:#fff;
  border:0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor:pointer;
}
.fb-send:hover{ background: var(--blue-2); }

/* buttons / load more */
.fb-primary{
  background: var(--blue);
  color:#fff;
  border:0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor:pointer;
}
.fb-primary:hover{ background: var(--blue-2); }

.fb-secondary{
  background:#e4e6eb;
  color: var(--text);
  border:0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor:pointer;
}
.fb-secondary:hover{ background:#d8dadf; }

.fb-center{ display:flex; justify-content:center; margin-top: 10px; }

/* modal */
.fb-modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  padding: 16px;
}
.fb-modal.show{ display:flex; }
.fb-modal-card{
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.fb-modal-head{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.fb-modal-title{ font-weight: 800; font-size: 16px; }
.fb-close{
  border:0;
  background:transparent;
  font-size: 18px;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
}
.fb-close:hover{ background:#f7f8fa; }

.fb-modal-body{ padding: 12px 14px; }
.fb-textarea{
  width:100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  resize: vertical;
  outline:none;
  font-size: 15px;
}
.fb-textarea:focus{
  border-color: rgba(24,119,242,.5);
  box-shadow: 0 0 0 3px rgba(24,119,242,.15);
}
.fb-modal-actions{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display:flex;
  justify-content:flex-end;
  gap: 10px;
}
/* Make shared left-nav look like FB card */
.fb-left > *{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
}
/* ===== Dashboard-style left-aligned layout ===== */

.fb-layout{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 16px;

  /* IMPORTANT: left aligned, not centered */
  max-width: none;
  margin: 0;
  padding: 0 16px;
}

.fb-left{
  position: relative;
}

/* Make left nav sticky like dashboard */
.fb-left{
  position: sticky;
  top: 72px; /* adjust if your header height differs */
  align-self: flex-start;
}

/* Center column should not re-center itself */
.fb-centercol{
  min-width: 0;
}

/* Right sidebar sticky */
.fb-right{
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

/* Mobile: collapse to single column */
@media (max-width: 1024px){
  .fb-layout{
    grid-template-columns: 1fr;
  }
  .fb-left,
  .fb-right{
    position: static;
  }
}
