/* জবানবন্দি — Stylesheet */

:root {
  --side-bg: #e9ecef;
  --accent: #1877f2;
  --accent-dark: #145dbf;
  --danger-bg: #fdeaea;
  --danger-text: #c0392b;
  --warning-bg: #fff4e0;
  --warning-text: #b7791f;
  --border: #dfe3e8;
  --text-primary: #1c1e21;
  --text-secondary: #606770;
  --text-muted: #90949c;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --radius: 10px;
}

html[data-theme="dark"] {
  --border: #33383d;
  --text-primary: #e4e6eb;
  --text-secondary: #b0b3b8;
  --text-muted: #8a8d91;
  --surface: #18191a;
  --surface-2: #242526;
  --danger-bg: #3a2323;
  --warning-bg: #3a301c;
}

* { box-sizing: border-box; }

/* --- স্প্ল্যাশ স্ক্রিন (অ্যাপ খোলার সময় সংক্ষিপ্ত সময়ের জন্য) --- */
.jb-splash {
  position: fixed; inset: 0; background: #18191a;
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: jbSplashOut 0.5s ease 0.7s forwards;
}
.jb-splash-circle {
  width: 88px; height: 88px; border-radius: 50%;
  background: #1877f2;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(24,119,242,0.15);
}
.jb-splash-circle svg { width: 42px; height: 52px; }
.jb-splash-circle img { width: 50px; height: 50px; object-fit: contain; }
@keyframes jbSplashOut {
  0%   { opacity: 1; visibility: visible; }
  99%  { opacity: 0; visibility: visible; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

body {
  margin: 0;
  font-family: "SolaimanLipi", "Noto Sans Bengali", "Segoe UI", sans-serif;
  background: var(--surface);
  color: var(--text-primary);
}

.app-wrapper { display: flex; min-height: 100vh; }
.side-panel {
  flex: 1; background: var(--side-bg); transition: background 0.2s ease;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 16px;
}
.side-ad-card {
  width: 100%; max-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky; top: 70px;
}
.side-ad-card img { width: 100%; border-radius: 8px; display: block; }
.side-ad-card a { text-decoration: none; }
.side-list-card {
  width: 100%; max-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky; top: 70px;
}
.side-list-title {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: 8px; font-weight: 700;
}
.side-list-row {
  display: block; font-size: 13px; line-height: 1.5; color: var(--text-primary);
  text-decoration: none; padding: 8px 0; border-top: 1px solid var(--border);
}
.side-list-row:first-of-type { border-top: none; }
.side-list-row:hover { color: var(--accent); }
.side-list-cat {
  display: block; font-size: 10px; color: var(--accent); font-weight: 700;
  text-transform: uppercase; margin-bottom: 2px;
}

.main-column {
  width: 100%;
  max-width: 600px;
  min-width: 320px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* --- টপ বার (দুই সারি, ফেসবুকের মতো) --- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.top-bar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}
.top-bar .logo {
  font-family: 'Baloo 2', 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--accent);
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img { height: 28px; }
.custom-tab-icon { width: 20px; height: 20px; }
.top-bar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  background: var(--surface-2);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { filter: brightness(0.95); }
.btn-link { color: var(--accent) !important; font-weight: 600; text-decoration: none; font-size: 14px; }

/* --- ট্যাব বার (Home/Notifications/Account/Admin — পুরো width জুড়ে) --- */
.tab-bar {
  display: flex;
  border-top: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 20px;
  border-bottom: 3px solid transparent;
  position: relative;
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-icon { position: relative; display: inline-flex; }

.badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--danger-text); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* --- সেটিংস/মেনু প্যানেল (হ্যামবার্গার থেকে খোলে) --- */
.settings-panel {
  position: absolute; top: 52px; right: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 30;
}
.settings-panel.hidden { display: none; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.settings-row:last-child { border-bottom: none; }
.settings-label { color: var(--text-secondary); }
.color-swatches { display: flex; gap: 5px; }
.color-swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--border); cursor: pointer; padding: 0;
}
.lang-toggle { display: flex; background: var(--surface-2); border-radius: 16px; padding: 2px; }
.lang-toggle button {
  border: none; background: transparent; font-size: 11px; padding: 3px 8px;
  border-radius: 14px; cursor: pointer; color: var(--text-secondary);
}
.lang-toggle button.active { background: var(--accent); color: #fff; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border); transition: 0.2s; border-radius: 20px;
}
.slider:before {
  position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px;
  background-color: #fff; transition: 0.2s; border-radius: 50%;
}
.switch input:checked + .slider { background-color: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(16px); }

/* --- সাসপেনশন ব্যানার --- */
.suspend-banner {
  background: var(--danger-bg); color: var(--danger-text);
  font-size: 13px; padding: 10px 14px; text-align: center;
}
.suspend-banner a { color: var(--danger-text); font-weight: 700; }

/* --- পেজ কনটেন্ট --- */
.page-content { padding: 12px; }

/* --- ফর্ম --- */
/* --- পোস্ট কম্পোজার বক্স ("What's on your mind?") --- */
.composer-box {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 10px 14px; margin-bottom: 14px;
  text-decoration: none; background: var(--surface);
}
.composer-placeholder {
  flex: 1; color: var(--text-muted); font-size: 14px;
  background: var(--surface-2); border-radius: 18px; padding: 8px 14px;
}
.composer-icon { font-size: 18px; }

.form-card {
  max-width: 480px; margin: 20px auto; padding: 20px;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.form-card h2 { margin-top: 0; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; padding: 10px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text-primary);
}
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }
.form-card button[type="submit"] {
  width: 100%; padding: 12px; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.form-card button[type="submit"]:hover { background: var(--accent-dark); }
.error-msg { color: var(--danger-text); background: var(--danger-bg); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.success-msg { color: #2f9e44; background: #eafbee; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.radio-row { display: flex; gap: 16px; margin-bottom: 12px; font-size: 14px; }
.note-text { font-size: 12px; color: var(--text-muted); }

/* --- পোস্টকার্ড (ন্যারেটিভ) --- */
.post-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 14px;
}
.narrator-line {
  font-style: italic; font-size: 14px; line-height: 1.6;
  color: var(--text-secondary); margin: 0 0 12px;
}
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; background: #e7f0fe; color: var(--accent);
  flex-shrink: 0; object-fit: cover;
}
.avatar.anon { background: var(--warning-bg); color: var(--warning-text); }
.post-author { font-size: 14px; margin: 0; }
.post-author .says { color: var(--text-muted); font-weight: 400; }
.category-badge {
  margin-left: auto; font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--warning-bg); color: var(--warning-text); white-space: nowrap;
}
blockquote.testimony {
  margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--border);
}
blockquote.testimony p { font-size: 15px; line-height: 1.7; margin: 0; }
.post-media img, .post-media video {
  width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; display: block;
}
.reaction-bar { display: flex; border-top: 1px solid var(--border); padding-top: 10px; gap: 4px; }
.reaction-bar button, .reaction-bar a {
  flex: 1; background: none; border: none; font-size: 13px; padding: 8px;
  border-radius: 6px; cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.reaction-bar button:hover, .reaction-bar a:hover { background: var(--surface-2); }
.reaction-bar button.active { color: var(--accent); font-weight: 600; }

.reply-card { border-left: 2px solid var(--border); }
.reply-to-reply-link {
  display: inline-block; margin-top: 6px; font-size: 12px;
  color: var(--text-secondary); text-decoration: none;
}
.reply-to-reply-link:hover { color: var(--accent); }
/* --- অ্যাডমিন ব্রেডক্রাম্ব (স্পষ্ট Back লিংক) --- */
.admin-breadcrumb {
  padding: 10px 12px 0; font-size: 12px;
}
.admin-back-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.admin-back-link:hover { text-decoration: underline; }
.admin-breadcrumb-sep { color: var(--text-muted); margin: 0 6px; }

/* --- অ্যাডমিন নেভিগেশন (আধুনিক পিল-স্টাইল) --- */
.admin-shell-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); padding: 12px 12px 4px;
}
.admin-nav {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 12px;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.admin-nav::-webkit-scrollbar { height: 4px; }
.admin-nav-pill {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-secondary);
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.admin-nav-pill:hover { background: #dfe7f5; }
.admin-nav-pill.active { background: var(--accent); color: #fff; }
.admin-nav-icon { font-size: 15px; }

/* --- অ্যাডমিন অ্যাকশন কার্ড (dashboard গ্রিড) --- */
.admin-action-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin: 16px 0;
}
.admin-action-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); text-decoration: none; color: var(--text-primary);
  transition: transform 0.1s, box-shadow 0.1s;
}
.admin-action-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); transform: translateY(-1px); }
.admin-action-icon { font-size: 26px; }
.admin-action-label { font-size: 12px; text-align: center; font-weight: 500; }

/* --- ছবি লাইটবক্স --- */
.jb-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; cursor: zoom-out; padding: 20px;
}
.jb-lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.jb-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,0.15); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.jb-lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* --- পোস্ট মোডাল (কার্ডে ক্লিক করলে খোলে) --- */
.jb-post-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 90; padding: 40px 16px; overflow-y: auto;
}
.jb-post-modal-box {
  background: var(--surface); border-radius: 12px; width: 100%; max-width: 500px;
  padding: 16px; position: relative; margin: 0 auto;
}
.jb-post-modal-box .post-card { border: none; padding: 0; margin-bottom: 12px; }
.jb-post-modal-close {
  position: fixed; top: 50px; right: 20px;
  background: rgba(0,0,0,0.5); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer;
  z-index: 91;
}
.jb-post-modal-close:hover { background: rgba(0,0,0,0.7); }
@media (max-width: 700px) {
  .jb-post-modal-overlay { padding: 0; align-items: stretch; }
  .jb-post-modal-box { max-width: 100%; border-radius: 0; min-height: 100vh; }
  .jb-post-modal-close { top: 10px; right: 10px; }
}

.ad-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 14px; background: var(--surface-2);
}
.ad-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: 8px; display: block;
}
.ad-card img { width: 100%; border-radius: 8px; display: block; }
.ad-card a { text-decoration: none; }

/* --- নোটিফিকেশন লিস্ট --- */
.notif-item {
  display: block; padding: 12px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text-primary); font-size: 14px;
}
.notif-item.unread { background: var(--surface-2); font-weight: 600; }
.notif-time { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

/* --- অ্যাকাউন্ট পেজ --- */
.account-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.account-row .label { color: var(--text-muted); }

/* --- অ্যাডমিন --- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 20px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
.admin-stat-row { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-stat-card { flex: 1; min-width: 120px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.admin-stat-card .num { font-size: 22px; font-weight: 700; color: var(--accent); }
.admin-stat-card .label { font-size: 12px; color: var(--text-muted); }
.btn-approve, .btn-reject, .btn-edit {
  border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.btn-approve { background: #2f9e44; color: #fff; }
.btn-reject { background: var(--danger-text); color: #fff; }
.btn-edit { background: var(--surface-2); color: var(--accent); font-weight: 600; border: 1px solid var(--border); }
.btn-edit:hover { background: #dfe7f5; }

@media (max-width: 700px) {
  .side-panel { display: none; }
}
