/* HN Account/Dashboard PRO — frontend CSS v2.1.0 */

/* ---------- Base ---------- */
.hn-grid { display:grid; gap:20px; }
@media(min-width:700px){ .hn-grid{ grid-template-columns:1fr 1fr; } }

.hn-card { background:#fff; border:1px solid #eee; border-radius:12px; padding:20px; box-shadow:0 1px 2px rgba(0,0,0,.03); }

.hn-form input,.hn-form textarea,.hn-form select {
  width:100%; padding:11px 12px; border:1px solid #ddd; border-radius:10px;
  margin:6px 0; font-size:14px; box-sizing:border-box; background:#fff; font-family:inherit;
}
.hn-form textarea { resize:vertical; min-height:260px; line-height:1.7; }
.hn-form input:focus,.hn-form textarea:focus {
  outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

.hn-lbl { display:block; font-size:13px; font-weight:600; color:#333; margin-top:10px; }
.hn-lbl.mt { margin-top:18px; }
.hn-lbl .req { color:#e11d48; }
.hn-checkbox { display:inline-flex; align-items:center; gap:8px; margin:10px 0; cursor:pointer; font-size:14px; }
.hn-checkbox input { width:auto !important; margin:0 !important; }

/* ---------- Buttons ---------- */
.hn-btn {
  background:#111; color:#fff; border:0; border-radius:10px; padding:11px 18px;
  cursor:pointer; font-size:14px; font-weight:500;
  transition:opacity .15s, transform .05s; display:inline-flex; align-items:center; gap:6px; text-decoration:none;
}
.hn-btn:hover { opacity:.9; }
.hn-btn:active { transform:translateY(1px); }
.hn-btn:disabled { opacity:.5; cursor:not-allowed; }
.hn-btn.primary { background:#3b82f6; }
.hn-btn.light   { background:#f2f2f2; color:#111; }
.hn-btn.ghost   { background:transparent; color:#111; border:1px solid #e5e5e5; }
.hn-btn.danger  { background:#fee2e2; color:#b91c1c; }
.hn-btn.tiny    { padding:5px 10px; border-radius:7px; font-size:12px; }
.hn-link { background:none; border:0; color:#3b82f6; cursor:pointer; padding:0; font-size:13px; text-decoration:underline; }

.muted { color:#888; }
.small { font-size:12px; }
.center { text-align:center; }

/* ---------- Dashboard layout ---------- */
.hn-dash { max-width:1100px; margin:0 auto; padding:8px 0 60px; }

/* ═══════════════════════════════════════════
   DASHBOARD HEADER — 2 row layout
   ID selector (#hnDashRoot) for high specificity
   ═══════════════════════════════════════════ */
#hnDashRoot .hn-dash-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
    width: 100%;
}

/* ── ROW 1: Avatar + Name/Role ── */
#hnDashRoot .hn-user-block {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    width: 100%;
}
#hnDashRoot .hn-user-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
#hnDashRoot .hn-header-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
#hnDashRoot .hn-avatar img {
    border-radius: 50%;
    width: 46px !important;
    height: 46px !important;
    flex-shrink: 0;
    display: block;
}
#hnDashRoot .hn-welcome {
    margin: 0;
    font-size: clamp(14px, 4.2vw, 19px);
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal !important;
}
#hnDashRoot .hn-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── ROW 2: 5 icons, full width ── */
#hnDashRoot .hn-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    box-sizing: border-box;
}
#hnDashRoot .hn-action-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    color: #475569;
    position: relative;
    transition: background .15s, color .15s;
}
#hnDashRoot .hn-action-icon svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    flex-shrink: 0;
}
#hnDashRoot .hn-action-icon:hover     { background: #e2e8f0; color: #1e293b; }
#hnDashRoot .hn-logout-btn:hover      { color: #ef4444 !important; background: #fff1f2; border-color: #fecaca; }
.hn-notif-count {
    position: absolute;
    top: 4px; right: 5px;
    min-width: 14px; height: 14px;
    padding: 0 3px;
    background: #e5e7eb; color: #333;
    border-radius: 7px;
    font-size: 9px; font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hn-notif-count.has-new { background: #ef4444; color: #fff; }
.hn-notif-count { display:inline-block; min-width:18px; padding:0 5px; background:#e5e7eb; color:#333; border-radius:10px; font-size:11px; font-weight:700; margin-left:4px; }
.hn-notif-count.has-new { background:#ef4444; color:#fff; }

/* ---------- Notifications ---------- */
.hn-notif-panel { background:#fff; border:1px solid #eee; border-radius:14px; padding:14px 18px; margin-bottom:16px; max-height:360px; overflow:auto; }
.hn-notif-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.hn-notif-head h3 { margin:0; font-size:16px; }
.hn-notif-item { display:flex; gap:12px; padding:10px 8px; border-radius:10px; margin:4px 0; border:1px solid #f1f1f1; }
.hn-notif-item.unread { background:#eff6ff; border-color:#bfdbfe; }
.hn-notif-icon { font-size:20px; flex-shrink:0; }
.hn-notif-msg { font-size:14px; color:#222; }
.hn-notif-time { margin-top:2px; }

/* ---------- Stats ---------- */
.hn-stats { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:16px; }
@media(min-width:700px){ .hn-stats{ grid-template-columns:repeat(3,1fr); } }
@media(min-width:1000px){ .hn-stats{ grid-template-columns:repeat(5,1fr); } }
.hn-stat-card { background:#fff; border:1px solid #eee; border-left:4px solid #3b82f6; border-radius:12px; padding:16px; }
.hn-stat-card.warn { border-left-color:#f59e0b; }
.hn-stat-card.mute { border-left-color:#9ca3af; }
.hn-stat-card.info { border-left-color:#06b6d4; }
.hn-stat-num   { font-size:28px; font-weight:700; line-height:1; color:#111; }
.hn-stat-label { margin-top:6px; font-size:12px; color:#666; text-transform:uppercase; letter-spacing:.5px; }

.hn-quick { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }

/* ---------- Sections ---------- */
.hn-section { background:#fff; border:1px solid #eee; border-radius:14px; padding:18px; margin-bottom:16px; }
.hn-section-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.hn-section-head h3 { margin:0; font-size:17px; }
.hn-search { width:240px; max-width:100%; padding:8px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; }

/* ---------- Tabs ---------- */
.hn-tabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:12px; border-bottom:1px solid #eee; }
.hn-tab { background:none; border:0; padding:8px 14px; cursor:pointer; font-size:13px; color:#666; border-bottom:2px solid transparent; margin-bottom:-1px; }
.hn-tab:hover { color:#222; }
.hn-tab.active { color:#3b82f6; border-bottom-color:#3b82f6; font-weight:600; }

/* ---------- Table ---------- */
.hn-table-wrap { overflow-x:auto; }
.hn-table { width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
.hn-table th,.hn-table td { padding:10px 8px; text-align:left; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.hn-table th { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:#777; font-weight:600; }
.hn-table th.sortable { cursor:pointer; user-select:none; }
.hn-table th.sortable:hover { color:#3b82f6; }
.hn-table th.num,.hn-table td.num { text-align:right; width:70px; }
.hn-table th.thumb-col,.hn-table td.thumb-col { width:50px; }
.hn-table th.actions-col,.hn-table td.actions-col { width:230px; }
.hn-table .title-col a { color:#111; text-decoration:none; font-weight:500; }
.hn-table .title-col a:hover { color:#3b82f6; }
.hn-row-thumb { width:40px; height:40px; border-radius:6px; object-fit:cover; background:#f3f4f6; display:block; }
.hn-row-thumb.empty { background:repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 4px,#ececec 4px,#ececec 8px); }

/* ---------- Status pills / badges ---------- */
.hn-status-pill { display:inline-block; padding:3px 10px; border-radius:12px; font-size:11px; font-weight:600; background:#f3f4f6; color:#555; text-transform:uppercase; }
.hn-status-pill.ok     { background:#d1fae5; color:#065f46; }
.hn-status-pill.warn   { background:#fef3c7; color:#92400e; }
.hn-status-pill.mute   { background:#e5e7eb; color:#374151; }
.hn-status-pill.danger { background:#fee2e2; color:#991b1b; }
.hn-status-pill.info   { background:#cffafe; color:#155e75; }
.hn-mini-badge { display:inline-block; padding:1px 7px; border-radius:8px; font-size:10px; font-weight:600; background:#fee2e2; color:#b91c1c; text-transform:uppercase; margin-left:6px; }

/* ---------- Pagination ---------- */
.hn-pagination { margin-top:14px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.hn-pages { display:flex; gap:4px; flex-wrap:wrap; }
.hn-page-btn { background:#f3f4f6; color:#333; border:0; border-radius:6px; padding:6px 11px; cursor:pointer; font-size:13px; }
.hn-page-btn.active { background:#3b82f6; color:#fff; font-weight:600; }

/* ---------- Post Form ---------- */
.hn-post-form-section { padding-bottom:80px; }

.hn-row { display:grid; grid-template-columns:1fr; gap:20px; margin-top:16px; }
@media(min-width:900px){ .hn-row{ grid-template-columns:1fr 1fr; } }

.hn-field-meta { display:flex; justify-content:space-between; align-items:center; margin:-2px 0 6px; min-height:18px; }
.hn-err { color:#dc2626; font-weight:500; }
.hn-ok  { color:#059669; font-weight:500; }
.hn-form-msg { margin-top:10px; min-height:20px; font-size:13px; }
.hn-auto-status { color:#6b7280; }
.hn-auto-status.ok  { color:#059669; }
.hn-auto-status.err { color:#dc2626; }

/* ---------- Categories list ---------- */
.hn-cat-filter {
  width:100%; padding:8px 12px; border:1px solid #ddd; border-radius:8px;
  font-size:14px; box-sizing:border-box; margin-bottom:6px;
}
.hn-cat-list {
  border:1px solid #eee; border-radius:10px;
  max-height:240px; overflow-y:auto;
  background:#fff;
}
.hn-cat-item {
  display:flex; align-items:center; gap:8px;
  padding:9px 12px; cursor:pointer; border-bottom:1px solid #f5f5f5;
  font-size:14px; user-select:none;
}
.hn-cat-item:last-child { border-bottom:0; }
.hn-cat-item:hover { background:#f8f9ff; }
.hn-cat-item input[type=checkbox] { width:16px; height:16px; accent-color:#3b82f6; flex-shrink:0; }
.hn-cat-item input:checked + .hn-cat-name { color:#3b82f6; font-weight:600; }
.hn-cat-name { flex:1; }
.hn-cat-count { margin-left:auto; color:#aaa; }

/* ---------- Featured Image zone ---------- */
.hn-feat-zone { background:#fafafa; border:1px dashed #ddd; border-radius:10px; padding:14px; margin-top:8px; }
.hn-feat-preview { margin-bottom:10px; text-align:center; }
.hn-feat-preview img { max-width:200px; max-height:140px; border-radius:8px; display:inline-block; position:relative; }
.hn-feat-overlay { position:absolute; inset:0; background:rgba(255,255,255,.75); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:13px; color:#666; }
.hn-feat-btns { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.hn-url-field-row { margin-top:6px; }
.hn-url-field-row input { width:100%; padding:8px 10px; font-size:13px; border:1px solid #e5e5e5; border-radius:8px; box-sizing:border-box; }
.hn-feat-action-row { margin-top:8px; display:flex; gap:6px; }

/* ---------- Gallery Zone ---------- */
.hn-gallery-section { margin-top:16px; }
.hn-gallery-zone { background:#fafafa; border:1px dashed #ddd; border-radius:10px; padding:14px; margin-top:8px; }
.hn-gallery-grid { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.hn-gal-item {
  position:relative; width:80px; height:80px;
  border-radius:8px; overflow:hidden; background:#eef1f4;
  border:2px solid transparent; flex-shrink:0;
}
.hn-gal-item.loading { display:flex; align-items:center; justify-content:center; border-style:dashed; border-color:#ccc; }
.hn-gal-loader { font-size:24px; }
.hn-gal-item img { width:100%; height:100%; object-fit:cover; display:block; }
.hn-gal-video { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; padding:4px; font-size:11px; text-align:center; color:#555; gap:2px; }
.hn-gal-video span { font-size:9px; word-break:break-all; overflow:hidden; max-height:30px; }
.hn-gal-remove {
  position:absolute; top:2px; right:2px; width:18px; height:18px;
  border-radius:9px; background:rgba(0,0,0,.6); color:#fff;
  border:0; cursor:pointer; font-size:12px; line-height:18px; text-align:center; padding:0;
}
.hn-gal-remove:hover { background:rgba(220,38,38,.9); }
.hn-gallery-btns { display:flex; gap:8px; flex-wrap:wrap; }

/* ---------- Submit bar ---------- */
.hn-submit-bar {
  position:sticky; bottom:0; background:#fff; border-top:1px solid #eee;
  padding:14px 0; margin-top:20px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
}
.hn-submit-buttons { display:flex; gap:8px; flex-wrap:wrap; }

/* ---------- Rejection banner ---------- */
.hn-rejection-banner { background:#fef2f2; border:1px solid #fecaca; border-left:4px solid #dc2626; border-radius:10px; padding:12px 16px; margin-bottom:14px; color:#991b1b; }
.hn-rejection-note { margin:6px 0 0; color:#7f1d1d; }

/* ---------- Toasts ---------- */
.hn-toast-wrap { position:fixed; top:20px; right:20px; z-index:99999; display:flex; flex-direction:column; gap:8px; max-width:360px; pointer-events:none; }
.hn-toast { background:#111; color:#fff; padding:12px 16px; border-radius:10px; font-size:14px; box-shadow:0 8px 24px rgba(0,0,0,.18); opacity:0; transform:translateX(20px); transition:opacity .25s, transform .25s; pointer-events:auto; }
.hn-toast.show { opacity:1; transform:translateX(0); }
.hn-toast-success { background:#059669; }
.hn-toast-error   { background:#dc2626; }
.hn-toast-info    { background:#1e40af; }

/* ---------- Source link button (frontend posts) ---------- */
.hn-source-btn-wrap { margin:24px 0 16px; text-align:center; }
.hn-source-btn { display:inline-block; padding:10px 20px; background:#1f2937; color:#fff !important; border-radius:10px; text-decoration:none !important; font-size:14px; font-weight:500; }

/* ---------- Media Library Modal ---------- */
/* hidden attribute pe display:none force — CSS display:flex override na kare */
.hn-media-modal[hidden] { display:none !important; }
.hn-media-modal { position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; }
.hn-media-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.5); }
.hn-media-inner {
  position:relative; z-index:1; background:#fff; border-radius:16px;
  width:min(720px, 96vw); max-height:88vh; display:flex; flex-direction:column;
  box-shadow:0 24px 64px rgba(0,0,0,.2);
}
.hn-media-head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid #eee; flex-shrink:0; }
.hn-media-head h3 { margin:0; font-size:17px; }
.hn-media-head-actions { display:flex; gap:8px; align-items:center; }
.hn-media-type-tabs { display:flex; gap:6px; padding:10px 18px 4px; border-bottom:1px solid #f0f0f0; flex-shrink:0; }
.hn-mtab { background:none; border:0; padding:6px 12px; border-radius:8px; cursor:pointer; font-size:13px; color:#555; }
.hn-mtab.active { background:#eff6ff; color:#2563eb; font-weight:600; }
.hn-media-hint { padding:6px 18px 2px; font-size:12px; min-height:18px; }
.hn-modal-grid { flex:1; overflow-y:auto; padding:14px 18px; display:grid; grid-template-columns:repeat(auto-fill, minmax(100px,1fr)); gap:10px; }
.hn-modal-item {
  aspect-ratio:1; border-radius:8px; overflow:hidden; cursor:pointer;
  border:2px solid transparent; background:#f3f4f6; position:relative;
  transition:border-color .15s;
}
.hn-modal-item:hover { border-color:#3b82f6; }
.hn-modal-item.selected { border-color:#059669; }
.hn-modal-item img { width:100%; height:100%; object-fit:cover; display:block; }
.hn-modal-video { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; padding:8px; font-size:11px; text-align:center; color:#555; gap:4px; word-break:break-all; }
.hn-media-loading { padding:40px; }
.hn-media-empty { padding:40px; font-size:14px; }
.hn-media-footer { padding:12px 18px; border-top:1px solid #eee; display:flex; gap:10px; justify-content:center; flex-shrink:0; }

/* ---------- Already-logged-in ---------- */
.hn-already { text-align:center; }

/* ==========================================
   SUBSCRIBER DASHBOARD
   ========================================== */

.hn-sub-dash { padding-bottom: 40px; }

/* Tab nav */
.hn-stab-nav {
    display: flex; gap: 4px; flex-wrap: wrap;
    background: #fff; border: 1px solid #eee; border-radius: 14px;
    padding: 10px 12px; margin-bottom: 16px;
}
.hn-stab {
    background: none; border: 0; padding: 8px 14px; cursor: pointer;
    font-size: 13px; color: #555; border-radius: 10px;
    transition: background .15s, color .15s;
}
.hn-stab:hover  { background: #f3f4f6; color: #111; }
.hn-stab.active { background: #eff6ff; color: #2563eb; font-weight: 600; }

/* Profile layout */
.hn-sub-profile-wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
@media (max-width: 600px) { .hn-sub-profile-wrap { grid-template-columns: 1fr; } }
.hn-sub-avatar-block { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; }
.hn-sub-avatar-block img { border-radius: 50%; width: 80px; height: 80px; display: block; }

/* Toggle switch */
.hn-pref-item { border-bottom: 1px solid #f0f0f0; padding: 14px 0; }
.hn-pref-item:last-of-type { border-bottom: 0; }
.hn-pref-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.hn-pref-info  { display: flex; flex-direction: column; gap: 2px; }
.hn-toggle-wrap { flex-shrink: 0; position: relative; }
.hn-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.hn-toggle-track {
    display: block; width: 44px; height: 24px; background: #d1d5db;
    border-radius: 12px; transition: background .2s; position: relative;
}
.hn-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; background: #fff; border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.hn-toggle-input:checked + .hn-toggle-track { background: #3b82f6; }
.hn-toggle-input:checked + .hn-toggle-track .hn-toggle-thumb { transform: translateX(20px); }

/* Post cards (bookmarks, liked, history) */
.hn-post-list { display: flex; flex-direction: column; gap: 10px; }
.hn-pcard {
    display: flex; gap: 14px; align-items: flex-start;
    background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 12px;
    transition: border-color .15s;
}
.hn-pcard:hover { border-color: #c7d2fe; }
.hn-pcard-thumb { flex-shrink: 0; width: 80px; height: 60px; border-radius: 8px; overflow: hidden; background: #e5e7eb; }
.hn-pcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hn-pcard-nothumb { width: 100%; height: 100%; background: repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 4px,#e5e7eb 4px,#e5e7eb 8px); }
.hn-pcard-body { flex: 1; min-width: 0; }
.hn-pcard-title { display: block; font-size: 14px; font-weight: 500; color: #111; text-decoration: none; margin-bottom: 4px; }
.hn-pcard-title:hover { color: #3b82f6; }
.hn-pcard-meta { font-size: 12px; color: #888; margin-bottom: 8px; }
.hn-pcard-actions { display: flex; gap: 8px; }

/* Bookmark button */
.hn-bm-btn { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: #555; }
.hn-bm-btn.saved { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; font-weight: 600; }
.hn-bm-btn:hover { border-color: #3b82f6; color: #3b82f6; }
.hn-bm-remove { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.hn-bm-remove:hover { background: #fee2e2; }

/* Bookmark search */
.hn-bookmark-search-row { margin-bottom: 12px; }
.hn-bookmark-search-row input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; box-sizing: border-box; }
#hnBookmarkSearchResults { margin-bottom: 8px; padding-bottom: 12px; border-bottom: 2px solid #eef2ff; }

/* Comment items */
.hn-comment-item { padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.hn-comment-item:last-child { border-bottom: 0; }
.hn-comment-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.hn-comment-post { font-size: 13px; font-weight: 500; color: #3b82f6; text-decoration: none; }
.hn-comment-post:hover { text-decoration: underline; }
.hn-comment-text { font-size: 14px; color: #444; margin: 0; line-height: 1.5; }

/* Empty state */
.hn-empty-state { text-align: center; padding: 40px 20px; color: #9ca3af; font-size: 14px; }

/* ===================================================
 *  SUBSCRIBER DASHBOARD STYLES
 * =================================================== */

/* Sub-dashboard hidden panel fix */
.hn-stab-panel[hidden] { display:none !important; }

/* Tab nav */
.hn-stab-nav { display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid #eee; margin-bottom:16px; }
.hn-stab { background:none; border:0; padding:9px 14px; cursor:pointer; font-size:14px; color:#666; border-bottom:2px solid transparent; margin-bottom:-1px; }
.hn-stab:hover { color:#222; }
.hn-stab.active { color:#3b82f6; border-bottom-color:#3b82f6; font-weight:600; }

/* Profile */
.hn-sub-profile-wrap { display:grid; gap:24px; }
@media(min-width:700px) { .hn-sub-profile-wrap { grid-template-columns:140px 1fr; } }
.hn-sub-avatar-block { display:flex; flex-direction:column; align-items:center; gap:10px; padding-top:6px; }
.hn-sub-avatar-block img { border-radius:50%; width:80px; height:80px; }

/* Post cards (bookmarks, liked, history) */
.hn-post-list { display:flex; flex-direction:column; gap:10px; padding:4px 0; }
.hn-pcard { display:flex; gap:12px; padding:12px; border:1px solid #f0f0f0; border-radius:10px; transition:box-shadow .15s; }
.hn-pcard:hover { box-shadow:0 2px 8px rgba(0,0,0,.06); }
.hn-pcard-thumb { width:72px; height:72px; border-radius:8px; overflow:hidden; flex-shrink:0; background:#f3f4f6; }
.hn-pcard-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.hn-pcard-nothumb { width:100%; height:100%; background:repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 4px,#ececec 4px,#ececec 8px); }
.hn-pcard-body { flex:1; min-width:0; }
.hn-pcard-title { font-weight:600; font-size:14px; color:#111; text-decoration:none; display:block; line-height:1.4; }
.hn-pcard-title:hover { color:#3b82f6; }
.hn-pcard-meta { margin-top:4px; }
.hn-pcard-actions { margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.hn-bm-btn { background:#f3f4f6; border:1px solid #e5e7eb; border-radius:8px; padding:4px 10px; font-size:12px; cursor:pointer; }
.hn-bm-btn.saved { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }
.hn-bm-remove { background:#fee2e2; border:1px solid #fecaca; border-radius:8px; padding:4px 10px; font-size:12px; color:#b91c1c; cursor:pointer; }

/* Comments */
.hn-comment-item { padding:12px; border:1px solid #f0f0f0; border-radius:10px; }
.hn-comment-meta { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.hn-comment-post { font-weight:600; color:#111; text-decoration:none; font-size:14px; }
.hn-comment-post:hover { color:#3b82f6; }
.hn-comment-text { color:#555; font-style:italic; font-size:14px; margin:0; }

/* Bookmark search */
.hn-bookmark-search-row { margin-bottom:12px; }
.hn-bookmark-search-row input { width:100%; padding:9px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; box-sizing:border-box; }

/* Notification prefs toggle */
.hn-pref-item { border-bottom:1px solid #f3f4f6; padding:14px 0; }
.hn-pref-item:last-of-type { border-bottom:0; }
.hn-pref-label { display:flex; justify-content:space-between; align-items:center; cursor:pointer; gap:16px; }
.hn-pref-info { flex:1; display:flex; flex-direction:column; gap:2px; }
.hn-toggle-wrap { position:relative; width:44px; height:24px; flex-shrink:0; }
.hn-toggle-input { opacity:0; width:0; height:0; position:absolute; }
.hn-toggle-track { position:absolute; inset:0; background:#e5e7eb; border-radius:12px; transition:.25s; cursor:pointer; }
.hn-toggle-track:before { content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:9px; transition:.25s; box-shadow:0 1px 3px rgba(0,0,0,.15); }
.hn-toggle-input:checked + .hn-toggle-track { background:#3b82f6; }
.hn-toggle-input:checked + .hn-toggle-track:before { transform:translateX(20px); }
.hn-toggle-thumb { display:none; } /* Legacy compat */

/* Empty state */
.hn-empty-state { text-align:center; padding:40px 20px; color:#9ca3af; font-size:14px; }

/* Bookmark button on article pages */
.hn-bm-page-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:9px 18px; margin:16px 0;
    background:#f3f4f6; border:1px solid #e5e7eb; border-radius:10px;
    cursor:pointer; font-size:14px; font-family:inherit;
    transition:background .15s, border-color .15s;
}
.hn-bm-page-btn:hover { background:#e5e7eb; }
.hn-bm-page-btn.active { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }
.hn-bm-page-btn:disabled { opacity:.6; cursor:not-allowed; }

/* ===================================================
 *  Profile Avatar Upload
 * =================================================== */
.hn-avatar-upload-wrap {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 8px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.hn-profile-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #e5e7eb;
}
.hn-avatar-cam-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}
/* Desktop: hover pe dikhao */
.hn-avatar-upload-wrap:hover .hn-avatar-cam-overlay { opacity: 1; }
/* Mobile: hamesha thoda visible raho */
@media (hover: none) {
    .hn-avatar-cam-overlay { opacity: 0.65; }
}

/* Thumbnail loading shimmer */
.hn-thumb-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: hn-shimmer 1.2s infinite;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
@keyframes hn-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.hn-pcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ══════════════════════════════════════════════════
   ANNOUNCEMENTS
   ══════════════════════════════════════════════════ */
.hn-announcement {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    border-left: 4px solid transparent;
}
.hn-ann-body { display: flex; gap: 10px; align-items: flex-start; flex: 1; }
.hn-ann-icon { font-size: 18px; flex-shrink: 0; }
.hn-ann-dismiss {
    background: none; border: none; cursor: pointer;
    opacity: .5; font-size: 14px; padding: 2px 4px;
    border-radius: 4px; line-height: 1;
}
.hn-ann-dismiss:hover { opacity: 1; background: rgba(0,0,0,.08); }
.hn-announcement.hn-ann-info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.hn-announcement.hn-ann-success { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.hn-announcement.hn-ann-warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.hn-announcement.hn-ann-danger  { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

/* ══════════════════════════════════════════════════
   QUICK LINKS BAR
   ══════════════════════════════════════════════════ */
.hn-quick-links-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.hn-quick-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s, transform .1s;
}
.hn-quick-link-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}
.hn-ql-icon { font-size: 16px; }

/* ══════════════════════════════════════════════════
   POINTS & BADGES
   ══════════════════════════════════════════════════ */
.hn-points-overview {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    margin-bottom: 20px;
}
@media (max-width: 600px) { .hn-points-overview { grid-template-columns: 1fr; } }

.hn-points-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: #fff;
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
}
.hn-pts-number {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}
.hn-pts-label {
    font-size: 12px;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 4px;
}
.hn-current-badge {
    margin-top: 10px;
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
}
.hn-badge-icon { margin-right: 4px; }

.hn-badges-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hn-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.hn-badge-item.earned {
    background: #fffbeb;
    border-color: #fcd34d;
}
.hn-badge-ico { font-size: 20px; }
.hn-badge-name { font-weight: 600; font-size: 13px; flex: 1; color: #1e293b; }
.hn-badge-req  { font-size: 12px; color: #94a3b8; }
.hn-badge-item.locked { opacity: .5; }

/* Points log */
.hn-pts-log-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.hn-pts-log-item:last-child { border-bottom: none; }
.hn-pts-log-pts {
    font-weight: 700;
    color: #16a34a;
    min-width: 40px;
    text-align: right;
}
.hn-pts-log-time { color: #94a3b8; font-size: 12px; margin-left: auto; }

/* Leaderboard */
.hn-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.hn-lb-rank  { font-weight: 700; min-width: 28px; color: #94a3b8; }
.hn-lb-name  { flex: 1; }
.hn-lb-pts   { font-weight: 700; color: #7c3aed; }
.hn-lb-row:nth-child(1) .hn-lb-rank { color: #f59e0b; font-size: 16px; }
.hn-lb-row:nth-child(2) .hn-lb-rank { color: #9ca3af; }
.hn-lb-row:nth-child(3) .hn-lb-rank { color: #d97706; }

/* ══════════════════════════════════════════════════
   ACTIVITY LOG
   ══════════════════════════════════════════════════ */
.hn-act-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.hn-act-item:last-child { border-bottom: none; }
.hn-act-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.hn-act-label { flex: 1; color: #334155; }
.hn-act-url   { font-size: 11px; color: #94a3b8; display: block; margin-top: 2px; }
.hn-act-time  { font-size: 11px; color: #94a3b8; white-space: nowrap; }

/* ══════════════════════════════════════════════════
   AD REQUEST FORM
   ══════════════════════════════════════════════════ */
.hn-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    border-left: 4px solid;
}
.hn-alert.info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.hn-alert.danger  { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.hn-alert.success { background: #f0fdf4; border-color: #22c55e; color: #166534; }

/* ══════════════════════════════════════════════════
   DARK MODE
   ══════════════════════════════════════════════════ */
.hn-dark {
    --hn-bg:        #0f172a;
    --hn-surface:   #1e293b;
    --hn-border:    #334155;
    --hn-text:      #e2e8f0;
    --hn-muted:     #94a3b8;
    --hn-primary:   #3b82f6;

    background: var(--hn-bg);
    color: var(--hn-text);
}
.hn-dark .hn-dash-header,
.hn-dark .hn-section,
.hn-dark .hn-sub-dash,
.hn-dark .hn-stat-card,
.hn-dark .hn-card,
.hn-dark .hn-post-form-section,
.hn-dark .hn-media-inner {
    background: var(--hn-surface) !important;
    border-color: var(--hn-border) !important;
    color: var(--hn-text) !important;
}
.hn-dark .hn-stab-nav { border-color: var(--hn-border); background: var(--hn-bg); }
.hn-dark .hn-stab { color: var(--hn-muted); }
.hn-dark .hn-stab.active { color: var(--hn-primary); border-color: var(--hn-primary); }
.hn-dark .hn-table thead th { background: var(--hn-bg) !important; color: var(--hn-muted); }
.hn-dark .hn-table tbody tr:hover { background: rgba(255,255,255,.04) !important; }
.hn-dark .hn-btn.light { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.hn-dark .hn-btn.light:hover { background: #2d3f55; }
.hn-dark .hn-btn.ghost { color: #e2e8f0; border-color: #334155; }
.hn-dark input, .hn-dark textarea, .hn-dark select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
.hn-dark .hn-quick-link-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.hn-dark .hn-quick-link-btn:hover { background: #1d3461; border-color: #3b82f6; }
.hn-dark .hn-role-pill { background: #334155; color: #93c5fd; }
.hn-dark .hn-welcome { color: #f1f5f9; }
.hn-dark .muted, .hn-dark .hn-act-time, .hn-dark .hn-pts-log-time { color: var(--hn-muted) !important; }
.hn-dark .hn-badge-item { background: #1e293b; border-color: #334155; }
.hn-dark .hn-badge-item.earned { background: #2d2200; border-color: #92400e; }
.hn-dark .hn-pts-log-item,
.hn-dark .hn-lb-row,
.hn-dark .hn-act-item { border-color: var(--hn-border); }
.hn-dark .hn-points-score { background: linear-gradient(135deg, #1e3a8a, #5b21b6); }
.hn-dark .hn-section-head h3 { color: #f1f5f9; }
.hn-dark .hn-notif-panel { background: #1e293b; border-color: #334155; }
.hn-dark .hn-announcement.hn-ann-info    { background: #1e3a8a22; border-color: #3b82f6; color: #93c5fd; }
.hn-dark .hn-announcement.hn-ann-success { background: #14532d22; border-color: #22c55e; color: #86efac; }
.hn-dark .hn-announcement.hn-ann-warning { background: #78350f22; border-color: #f59e0b; color: #fcd34d; }
.hn-dark .hn-announcement.hn-ann-danger  { background: #7f1d1d22; border-color: #ef4444; color: #fca5a5; }

/* ══════════════════════════════════════════════════
   UNIFIED TAB NAV
   ══════════════════════════════════════════════════ */
.hn-unified-nav-wrap {
    position: relative;
    margin-bottom: 2px;
    margin-top: 0;
}

.hn-unified-nav {
    display: flex;
    flex-direction: row;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.hn-unified-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Each tab button */
.hn-utab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s, background .12s;
    flex-shrink: 0;
    border-radius: 0;
}
.hn-utab:hover {
    color: #1e293b;
    background: #f8fafc;
}
.hn-utab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: none;
}
/* Editor tabs get a distinct tint */
.hn-utab[data-type="editor"] { color: #7c3aed; }
.hn-utab[data-type="editor"]:hover { background: #faf5ff; color: #6d28d9; }
.hn-utab[data-type="editor"].active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

.hn-utab-icon  { font-size: 16px; }
.hn-utab-label { font-size: 13px; }

/* Tab content area */
.hn-tab-content { padding-top: 6px; }
.hn-utab-panel  { animation: hn-fade-in .15s ease; }
.hn-utab-panel { display: block; }
.hn-utab-panel[hidden] { display: none !important; }

@keyframes hn-fade-in {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: none; }
}

/* Scroll fade indicators */
.hn-nav-fade-left,
.hn-nav-fade-right {
    position: absolute;
    top: 0; bottom: 2px;
    width: 32px;
    pointer-events: none;
    z-index: 2;
}
.hn-nav-fade-left  {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,.95), transparent);
}
.hn-nav-fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,.95), transparent);
}

/* Dark mode overrides for unified nav */
.hn-dark .hn-unified-nav { border-color: #334155; }
.hn-dark .hn-utab { color: #64748b; }
.hn-dark .hn-utab:hover { background: #1e293b; color: #cbd5e1; }
.hn-dark .hn-utab.active { color: #60a5fa; border-bottom-color: #60a5fa; }
.hn-dark .hn-utab[data-type="editor"]        { color: #a78bfa; }
.hn-dark .hn-utab[data-type="editor"].active { color: #a78bfa; border-bottom-color: #a78bfa; }
.hn-dark .hn-nav-fade-left  { background: linear-gradient(to right, rgba(15,23,42,.98), transparent); }
.hn-dark .hn-nav-fade-right { background: linear-gradient(to left,  rgba(15,23,42,.98), transparent); }

/* Remove old hn-sub-dash double border when inside unified */
.hn-tab-content .hn-sub-dash { border: none; padding: 0; }

/* ══════════════════════════════════════════════════
   ENGAGEMENT FEATURES CSS
   ══════════════════════════════════════════════════ */

/* Streak pill in header */
.hn-streak-pill {
    display: inline-flex; align-items: center;
    gap: 3px; padding: 3px 10px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff; border-radius: 20px;
    font-size: 13px; font-weight: 700;
    margin-top: 4px;
}

/* Loading spinner */
.hn-eng-loading {
    text-align: center; padding: 40px; color: #94a3b8; font-size: 14px;
}

/* Subheadings */
.hn-eng-subhead {
    font-size: 13px; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: .5px;
    margin: 16px 0 10px;
}

/* ── STREAK ───────────────────────────────────── */
.hn-streak-hero {
    text-align: center; padding: 24px 16px 16px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 14px; margin-bottom: 16px; color: #fff;
}
.hn-streak-flame { font-size: 48px; line-height: 1; }
.hn-streak-num   { font-size: 64px; font-weight: 900; line-height: 1; }
.hn-streak-label { font-size: 14px; opacity: .85; margin-top: 4px; }

.hn-streak-stats {
    display: flex; gap: 12px; margin-bottom: 16px;
}
.hn-sstat {
    flex: 1; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 14px; text-align: center;
}
.hn-sstat-val { display: block; font-size: 28px; font-weight: 800; color: #1e293b; }
.hn-sstat-lbl { display: block; font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* 30-day calendar grid */
.hn-cal-grid {
    display: grid; grid-template-columns: repeat(10, 1fr);
    gap: 4px; margin: 8px 0;
}
.hn-cal-day {
    aspect-ratio: 1; border-radius: 4px;
    background: #f1f5f9; border: 1px solid #e2e8f0;
}
.hn-cal-day.read  { background: #ff6b35; border-color: #f7931e; }
.hn-cal-day.today { box-shadow: 0 0 0 2px #2563eb; }
.hn-cal-legend { font-size: 12px; color: #94a3b8; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.hn-cal-legend .hn-cal-day { width: 14px; height: 14px; flex-shrink: 0; }

/* ── GOALS ────────────────────────────────────── */
.hn-goal-card {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.hn-goal-card.achieved { background: #f0fdf4; border-color: #86efac; }
.hn-goal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hn-goal-nums { font-size: 22px; font-weight: 800; color: #1e293b; }
.hn-goal-pct  { font-size: 13px; color: #64748b; margin-top: 2px; }
.hn-goal-tick { font-size: 36px; }
.hn-goal-bar-track {
    height: 10px; background: #e2e8f0; border-radius: 10px; overflow: hidden;
}
.hn-goal-bar-fill {
    height: 100%; background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 10px; transition: width .5s ease;
}
.hn-goal-card.achieved .hn-goal-bar-fill { background: linear-gradient(90deg, #16a34a, #22c55e); }

.hn-goal-set { margin-bottom: 16px; }
.hn-goal-set-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

.hn-goal-history { display: flex; flex-direction: column; gap: 6px; }
.hn-goal-week { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hn-gw-label { width: 70px; color: #64748b; font-size: 12px; flex-shrink: 0; }
.hn-gw-bar-wrap { flex: 1; height: 8px; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.hn-gw-bar { height: 100%; background: #93c5fd; border-radius: 8px; transition: width .4s; }
.hn-goal-week.achieved .hn-gw-bar { background: #86efac; }
.hn-gw-count { width: 30px; text-align: right; font-weight: 600; color: #1e293b; font-size: 12px; }

/* ── MASTERY ──────────────────────────────────── */
.hn-mastery-grid { display: flex; flex-direction: column; gap: 10px; }
.hn-mastery-card {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 14px;
}
.hn-mastery-card.earned { background: #fffbeb; border-color: #fcd34d; }
.hn-mc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.hn-mc-badge { font-size: 13px; font-weight: 700; color: #92400e; }
.hn-mc-cat   { flex: 1; font-weight: 600; color: #1e293b; }
.hn-mc-count { font-size: 12px; color: #94a3b8; }
.hn-mc-bar-wrap { height: 6px; background: #f1f5f9; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.hn-mc-bar { height: 100%; background: linear-gradient(90deg, #f59e0b, #d97706); border-radius: 6px; }
.hn-mc-next { font-size: 12px; }

/* ── MY STATS ─────────────────────────────────── */
.hn-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (max-width: 480px) { .hn-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.hn-stat-item {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 16px 12px; text-align: center;
}
.hn-si-icon  { font-size: 22px; margin-bottom: 6px; }
.hn-si-val   { font-size: 18px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.hn-si-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; }

/* ── COMMUNITY ────────────────────────────────── */
.hn-comm-list { display: flex; flex-direction: column; gap: 6px; }
.hn-comm-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 13px;
}
.hn-comm-rank   { font-weight: 700; min-width: 26px; font-size: 16px; }
.hn-comm-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.hn-comm-avatar-ph {
    width: 28px; height: 28px; border-radius: 50%;
    background: #e2e8f0; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.hn-comm-name  { flex: 1; font-weight: 600; color: #1e293b; }
.hn-comm-count { font-size: 12px; font-weight: 700; color: #7c3aed; }
.hn-comm-likes { font-size: 11px; }

/* Dark mode for engagement */
.hn-dark .hn-streak-stats .hn-sstat,
.hn-dark .hn-goal-card,
.hn-dark .hn-mastery-card,
.hn-dark .hn-stat-item,
.hn-dark .hn-comm-row { background: #1e293b !important; border-color: #334155 !important; }
.hn-dark .hn-streak-num, .hn-dark .hn-sstat-val,
.hn-dark .hn-goal-nums, .hn-dark .hn-mc-cat,
.hn-dark .hn-si-val, .hn-dark .hn-comm-name { color: #f1f5f9 !important; }
.hn-dark .hn-goal-bar-track,
.hn-dark .hn-mc-bar-wrap { background: #334155 !important; }
.hn-dark .hn-cal-day { background: #1e293b; border-color: #334155; }

/* ── Milestone bar in Streak ── */
.hn-milestone-bar-wrap { margin:14px 0 10px; }
.hn-ms-label { font-size:13px; font-weight:600; color:#7c3aed; margin-bottom:6px; }
.hn-ms-bar-track { height:8px; background:#e9d5ff; border-radius:8px; overflow:hidden; }
.hn-ms-bar { height:100%; background:linear-gradient(90deg,#7c3aed,#a855f7); border-radius:8px; transition:width .5s; }
.hn-ms-count { font-size:12px; color:#94a3b8; margin-top:4px; text-align:right; }
.hn-ms-achieved { text-align:center; padding:10px; font-weight:700; color:#7c3aed; }
.hn-streak-freeze-row { text-align:center; margin:10px 0; }

/* ── Level card in Stats ── */
.hn-level-card {
    background:linear-gradient(135deg,#ede9fe,#f3e8ff);
    border:1px solid #d8b4fe;
    border-radius:10px; padding:16px; margin-bottom:16px;
}
.hn-lvl-top { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.hn-lvl-badge { font-size:16px; font-weight:800; color:#7c3aed; }

/* ── Milestone row in Stats ── */
.hn-milestone-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.hn-ms-chip {
    padding:5px 12px; border-radius:20px; font-size:12px; font-weight:600;
    border:1px solid #e2e8f0;
}
.hn-ms-chip.done   { background:#d1fae5; border-color:#6ee7b7; color:#065f46; }
.hn-ms-chip.locked { background:#f8fafc; color:#94a3b8; }

/* ── Mastery summary ── */
.hn-mastery-summary {
    display:flex; gap:20px; padding:12px 16px;
    background:#f8fafc; border-radius:8px; margin-bottom:14px;
    font-size:13px; font-weight:600; color:#475569;
}
.hn-mastery-empty { text-align:center; padding:40px 20px; color:#94a3b8; }

/* ── Goal presets ── */
.hn-goal-preset { margin-right:4px !important; }

/* Dark mode additions */
.hn-dark .hn-level-card { background:linear-gradient(135deg,#2e1065,#3b0764); border-color:#6d28d9; }
.hn-dark .hn-lvl-badge  { color:#c4b5fd; }
.hn-dark .hn-mastery-summary { background:#1e293b; color:#94a3b8; }
.hn-dark .hn-ms-chip.locked  { background:#1e293b; border-color:#334155; }

/* ══════════════════════════════════════════════════
   FULL PAGE DARK MODE — body.hn-dark-mode
   Ye rules poori page ko dark karte hain
   ══════════════════════════════════════════════════ */
html.hn-dark-mode,
body.hn-dark-mode {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Theme background — WordPress theme elements */
body.hn-dark-mode .site-header,
body.hn-dark-mode header,
body.hn-dark-mode nav,
body.hn-dark-mode footer,
body.hn-dark-mode .site-footer,
body.hn-dark-mode #masthead {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* All links */
body.hn-dark-mode a:not(.hn-btn):not(.hn-utab):not(.hn-quick-link-btn) {
    color: #60a5fa;
}

/* Scrollbar dark */
body.hn-dark-mode ::-webkit-scrollbar { background: #1e293b; }
body.hn-dark-mode ::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

/* WordPress content area */
body.hn-dark-mode .site-content,
body.hn-dark-mode .content-area,
body.hn-dark-mode main,
body.hn-dark-mode #page,
body.hn-dark-mode #content,
body.hn-dark-mode .entry-content {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Prevent flash on load — transition */
body {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ══════════════════════════════════════════════════
   DARK MODE — COMPREHENSIVE FIX
   ══════════════════════════════════════════════════ */

/* ── 1. Dashboard tab panels & all content areas ── */
.hn-dark .hn-tab-content,
.hn-dark .hn-utab-panel,
.hn-dark .hn-utab-panel.active {
    background: var(--hn-bg) !important;
    color: var(--hn-text) !important;
}

/* All sections inside dark dashboard */
.hn-dark .hn-section,
.hn-dark .hn-sub-profile-wrap,
.hn-dark .hn-form,
.hn-dark .hn-cat-list,
.hn-dark .hn-cat-item,
.hn-dark .hn-feat-zone,
.hn-dark .hn-gallery-zone,
.hn-dark .hn-gallery-section,
.hn-dark .hn-post-form-section,
.hn-dark .hn-table-wrap {
    background: var(--hn-surface) !important;
    color: var(--hn-text) !important;
    border-color: var(--hn-border) !important;
}

/* Table rows */
.hn-dark .hn-table tbody tr { background: var(--hn-surface) !important; color: var(--hn-text) !important; }
.hn-dark .hn-table td { border-color: var(--hn-border) !important; color: var(--hn-text) !important; }
.hn-dark .hn-table th { color: var(--hn-muted) !important; }

/* Labels, headings, text inside dark dashboard */
.hn-dark label,
.hn-dark .hn-lbl,
.hn-dark p,
.hn-dark h2, .hn-dark h3, .hn-dark h4,
.hn-dark .hn-section-head h3 { color: var(--hn-text) !important; }

/* Tabs status bar */
.hn-dark .hn-tabs,
.hn-dark .hn-tab { background: var(--hn-surface) !important; color: var(--hn-muted) !important; border-color: var(--hn-border) !important; }
.hn-dark .hn-tab.active { color: #60a5fa !important; border-color: #60a5fa !important; }

/* Status pills */
.hn-dark .hn-status-pill { background: #334155 !important; color: #e2e8f0 !important; }

/* Submit bar */
.hn-dark .hn-submit-bar { background: var(--hn-surface) !important; border-color: var(--hn-border) !important; }

/* Profile section */
.hn-dark .hn-sub-avatar-block { background: transparent !important; }
.hn-dark .hn-pref-item { border-color: var(--hn-border) !important; }
.hn-dark .hn-pref-label { color: var(--hn-text) !important; }

/* Notification & bookmark items */
.hn-dark .hn-notif-item,
.hn-dark .hn-post-item,
.hn-dark .hn-bm-item { background: var(--hn-surface) !important; border-color: var(--hn-border) !important; color: var(--hn-text) !important; }
.hn-dark .hn-post-title,
.hn-dark .hn-bm-title { color: var(--hn-text) !important; }

/* Engagement tabs content */
.hn-dark .hn-goal-card,
.hn-dark .hn-mastery-card,
.hn-dark .hn-stat-item,
.hn-dark .hn-comm-row,
.hn-dark .hn-sstat { background: #1e293b !important; border-color: #334155 !important; }
.hn-dark .hn-goal-bar-track,
.hn-dark .hn-mc-bar-wrap { background: #334155 !important; }
.hn-dark .hn-streak-hero { /* gradient stays */ }
.hn-dark .hn-ms-chip.locked { background: #1e293b !important; border-color: #334155 !important; color: #64748b !important; }
.hn-dark .hn-mastery-summary { background: #1e293b !important; color: #94a3b8 !important; }
.hn-dark .hn-level-card { background: linear-gradient(135deg,#2e1065,#3b0764) !important; border-color: #6d28d9 !important; }
.hn-dark .hn-lvl-badge { color: #c4b5fd !important; }

/* ── 2. Post/Swipe pages dark mode ─────────────── */
/* Post card content area */
body.hn-dark-mode .hnao-card,
body.hn-dark-mode .hnao-body,
body.hn-dark-mode .hnao-text,
body.hn-dark-mode .hnao-title,
body.hn-dark-mode .hnao-stage,
body.hn-dark-mode .hnao-wrap,
body.hn-dark-mode #hnao-stage {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.hn-dark-mode .hnao-title { color: #f1f5f9 !important; }
body.hn-dark-mode .hnao-text  { color: #cbd5e1 !important; }
body.hn-dark-mode .hnao-meta,
body.hn-dark-mode .hnao-source,
body.hn-dark-mode .hnao-tag   { color: #64748b !important; }

/* Category bar / filter bar */
body.hn-dark-mode .hnao-cats,
body.hn-dark-mode .hnao-cat-bar,
body.hn-dark-mode [class*="cat-bar"],
body.hn-dark-mode [class*="cats-bar"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* General WordPress content area in dark mode */
body.hn-dark-mode .entry-content,
body.hn-dark-mode .post-content,
body.hn-dark-mode article,
body.hn-dark-mode .site-main,
body.hn-dark-mode #main,
body.hn-dark-mode .page-content {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
body.hn-dark-mode .entry-content p,
body.hn-dark-mode .entry-content h1,
body.hn-dark-mode .entry-content h2,
body.hn-dark-mode .entry-content h3 {
    color: #e2e8f0 !important;
}

/* Links in dark mode */
body.hn-dark-mode a { color: #60a5fa; }
body.hn-dark-mode a:hover { color: #93c5fd; }

/* Input fields in dark mode (global) */
body.hn-dark-mode input:not([type=checkbox]):not([type=radio]),
body.hn-dark-mode textarea,
body.hn-dark-mode select {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* ── Dark mode: 2-row header ── */
#hnDashRoot.hn-dark .hn-dash-header  { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-actions      { border-top-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-action-icon  { background: #0f172a !important; border-color: #334155 !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-action-icon:hover { background: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-logout-btn:hover  { color: #f87171 !important; background: #1c0a0a !important; }
#hnDashRoot.hn-dark .hn-welcome      { color: #f1f5f9 !important; }

/* ══════════════════════════════════════════════════
   DASHBOARD DARK MODE — Missing elements fix
   ══════════════════════════════════════════════════ */

/* All text in dark dashboard */
#hnDashRoot.hn-dark,
#hnDashRoot.hn-dark p,
#hnDashRoot.hn-dark span,
#hnDashRoot.hn-dark label,
#hnDashRoot.hn-dark td,
#hnDashRoot.hn-dark th,
#hnDashRoot.hn-dark li { color: #e2e8f0; }

#hnDashRoot.hn-dark h1,
#hnDashRoot.hn-dark h2,
#hnDashRoot.hn-dark h3,
#hnDashRoot.hn-dark h4 { color: #f1f5f9 !important; }

/* Form inputs */
#hnDashRoot.hn-dark input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
#hnDashRoot.hn-dark textarea,
#hnDashRoot.hn-dark select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
#hnDashRoot.hn-dark input::placeholder,
#hnDashRoot.hn-dark textarea::placeholder { color: #475569 !important; }

/* Tables */
#hnDashRoot.hn-dark table,
#hnDashRoot.hn-dark .hn-table { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark thead th { background: #0f172a !important; color: #94a3b8 !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark tbody td { border-color: #334155 !important; color: #cbd5e1 !important; }
#hnDashRoot.hn-dark tbody tr:nth-child(even) { background: #172135 !important; }
#hnDashRoot.hn-dark tbody tr:hover td { background: #253148 !important; }

/* Cards and sections */
#hnDashRoot.hn-dark .hn-post-item,
#hnDashRoot.hn-dark .hn-bm-item,
#hnDashRoot.hn-dark .hn-notif-item,
#hnDashRoot.hn-dark .hn-act-item {
    background: #1e293b !important;
    border-color: #334155 !important;
}
#hnDashRoot.hn-dark .hn-post-title,
#hnDashRoot.hn-dark .hn-bm-title,
#hnDashRoot.hn-dark .hn-post-meta { color: #e2e8f0 !important; }

/* Status pills */
#hnDashRoot.hn-dark .hn-status-published { background: #052e16 !important; color: #86efac !important; }
#hnDashRoot.hn-dark .hn-status-pending   { background: #2a1200 !important; color: #fdba74 !important; }
#hnDashRoot.hn-dark .hn-status-draft     { background: #1e293b !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-status-trash     { background: #1c0a0a !important; color: #fca5a5 !important; }

/* Buttons */
#hnDashRoot.hn-dark .hn-btn.light,
#hnDashRoot.hn-dark .hn-btn.ghost {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
#hnDashRoot.hn-dark .hn-tab { background: #1e293b !important; color: #94a3b8 !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-tab.active { color: #60a5fa !important; border-color: #60a5fa !important; }

/* Search input */
#hnDashRoot.hn-dark .hn-search-input { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }

/* Nav tabs bar */
#hnDashRoot.hn-dark .hn-unified-nav { background: #0f172a !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-utab { color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-utab.active { color: #60a5fa !important; border-color: #60a5fa !important; }
#hnDashRoot.hn-dark .hn-unified-nav-wrap { border-color: #334155 !important; }

/* Write post form */
#hnDashRoot.hn-dark .hn-post-form-section { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-submit-bar { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-feat-zone,
#hnDashRoot.hn-dark .hn-gallery-zone { background: #0f172a !important; border-color: #334155 !important; }

/* Muted text */
#hnDashRoot.hn-dark .muted { color: #64748b !important; }
#hnDashRoot.hn-dark small  { color: #64748b !important; }

/* ── Pending Queue ── */
.hn-pending-list      { display: flex; flex-direction: column; gap: 10px; }
.hn-pending-item      { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; }
.hn-pending-thumb     { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.hn-thumb-placeholder { width: 56px; height: 56px; border-radius: 10px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.hn-pending-info      { flex: 1; min-width: 0; }
.hn-pending-title     { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-pending-meta      { font-size: 12px; color: #64748b; margin-top: 3px; }
.hn-pending-actions   { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* Rejection note in My Posts */
.hn-rejection-note    { background: #fff1f2; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #be123c; margin-top: 6px; }

/* ── Reject Modal ── */
.hn-modal-overlay     { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hn-modal-box         { background: #fff; border-radius: 18px; padding: 24px; max-width: 420px; width: 100%; box-shadow: 0 24px 48px rgba(0,0,0,.25); }
.hn-modal-box h4      { margin: 0 0 8px; font-size: 18px; }
.hn-reject-post-title { font-size: 13px; color: #64748b; margin-bottom: 12px; }

/* Small button variant */
.hn-btn.small, .hn-btn.ghost.small, .hn-btn.primary.small, .hn-btn.danger.small {
    padding: 6px 11px !important; font-size: 12px !important; border-radius: 10px !important;
}
.hn-btn.danger        { background: #ef4444; color: #fff; border-color: #ef4444; }
.hn-btn.danger:hover  { background: #dc2626; }

/* Dark mode */
#hnDashRoot.hn-dark .hn-pending-item        { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-thumb-placeholder   { background: #0f172a !important; }
#hnDashRoot.hn-dark .hn-pending-title       { color: #f1f5f9 !important; }
#hnDashRoot.hn-dark .hn-rejection-note      { background: #1c0a0a !important; border-color: #7f1d1d !important; color: #fca5a5 !important; }
#hnDashRoot.hn-dark .hn-modal-box           { background: #1e293b !important; }
#hnDashRoot.hn-dark .hn-modal-box h4        { color: #f1f5f9 !important; }
#hnDashRoot.hn-dark .hn-modal-box textarea  { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }

/* ── Post Timeline ─────────────────────────── */
.hn-timeline-row td      { padding: 0 12px 10px !important; background: #fafbff; }
.hn-post-timeline        { display: flex; align-items: center; gap: 0; padding: 8px 4px 2px; }
.hn-tl-step              { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; }
.hn-tl-icon              { width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 13px; border: 2px solid #e2e8f0; transition: all .2s; }
.hn-tl-label             { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.hn-tl-line              { flex: 1; height: 2px; background: #e2e8f0; margin-bottom: 14px; transition: background .2s; }

/* Active step */
.hn-tl-step.active .hn-tl-icon   { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.hn-tl-step.active .hn-tl-label  { color: #2563eb; }

/* Done step */
.hn-tl-step.done .hn-tl-icon     { background: #16a34a; border-color: #16a34a; color: #fff; }
.hn-tl-step.done .hn-tl-label    { color: #16a34a; }
.hn-tl-line.done                  { background: #16a34a; }

/* Rejected state */
.hn-post-timeline.rejected .hn-tl-step.rejected .hn-tl-icon { background: #ef4444; border-color: #ef4444; color: #fff; box-shadow: 0 0 0 4px rgba(239,68,68,.15); }
.hn-post-timeline.rejected .hn-tl-step.rejected .hn-tl-label{ color: #ef4444; }

/* Dark mode */
#hnDashRoot.hn-dark .hn-timeline-row td { background: #0f172a !important; }
#hnDashRoot.hn-dark .hn-tl-icon        { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-tl-line        { background: #334155 !important; }
#hnDashRoot.hn-dark .hn-tl-label       { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-tl-step.active .hn-tl-icon  { background: #2563eb !important; border-color: #2563eb !important; }
#hnDashRoot.hn-dark .hn-tl-step.done   .hn-tl-icon  { background: #16a34a !important; border-color: #16a34a !important; }
#hnDashRoot.hn-dark .hn-tl-line.done   { background: #16a34a !important; }

/* Sub-Editor/Publisher — author column visible */
body.hn-role-sub_editor .hn-author-col,
body.hn-role-publisher  .hn-author-col { display: table-cell !important; }

/* ================================================================
   COMPACT + DARK MODE — Overview / My Posts / Write Post
   ================================================================ */

/* ── Section base compact ── */
.hn-section                     { padding: 12px 14px !important; border-radius: 14px !important; margin-bottom: 10px !important; }
.hn-section-head                { margin-bottom: 10px !important; gap: 8px !important; }
.hn-section-head h3             { font-size: 15px !important; }

/* ── Overview — Stat cards compact ── */
.hn-stats                       { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px,1fr)); gap: 8px !important; }
.hn-stat-card                   { padding: 10px 10px !important; border-radius: 10px !important; border-left-width: 3px !important; }
.hn-stat-num                    { font-size: 22px !important; font-weight: 900 !important; line-height: 1.1 !important; }
.hn-stat-label                  { font-size: 10px !important; margin-top: 3px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }

/* ── My Posts — Table compact ── */
.hn-tabs                        { gap: 4px !important; margin-bottom: 8px !important; flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none !important; }
.hn-tab                         { padding: 5px 10px !important; font-size: 11px !important; border-radius: 8px !important; white-space: nowrap !important; }
.hn-search                      { padding: 6px 10px !important; font-size: 12px !important; border-radius: 8px !important; }
.hn-table th, .hn-table td      { padding: 8px 6px !important; font-size: 12px !important; }
.hn-table th                    { font-size: 10px !important; padding: 6px 6px !important; }
.hn-table th.thumb-col,
.hn-table td.thumb-col          { width: 36px !important; }
.hn-table .hn-thumb-sm          { width: 32px !important; height: 32px !important; border-radius: 6px !important; }
.hn-table th.actions-col,
.hn-table td.actions-col        { width: 180px !important; }
.hn-mini-badge                  { padding: 2px 6px !important; font-size: 9px !important; border-radius: 5px !important; }
.hn-status-pill                 { padding: 3px 8px !important; font-size: 10px !important; }
.hn-timeline-row td             { padding: 0 6px 8px !important; }
.hn-post-timeline               { padding: 4px 0 0 !important; }
.hn-tl-step                     { min-width: 44px !important; }
.hn-tl-icon                     { width: 24px !important; height: 24px !important; font-size: 11px !important; }
.hn-tl-label                    { font-size: 8px !important; }
.hn-tl-line                     { margin-bottom: 11px !important; }
.hn-btn.tiny                    { padding: 4px 8px !important; font-size: 11px !important; border-radius: 7px !important; }
.hn-pagination                  { margin-top: 8px !important; gap: 4px !important; }

/* ── Write Post — Form compact ── */
.hn-lbl                         { font-size: 12px !important; margin-top: 8px !important; margin-bottom: 3px !important; }
.hn-lbl.mt                      { margin-top: 12px !important; }
.hn-form input,
.hn-form textarea,
.hn-form select                 { padding: 8px 10px !important; font-size: 13px !important; border-radius: 8px !important; }
.hn-form textarea               { min-height: 180px !important; }
.hn-field-meta                  { margin-top: 3px !important; margin-bottom: 4px !important; }
.hn-cat-filter                  { margin-bottom: 4px !important; }
.hn-cat-list                    { max-height: 120px !important; border-radius: 8px !important; padding: 6px !important; }
.hn-cat-item                    { padding: 4px 6px !important; font-size: 12px !important; border-radius: 6px !important; }
.hn-cat-count                   { font-size: 10px !important; }
.hn-feat-zone                   { padding: 10px !important; border-radius: 8px !important; }
.hn-gallery-zone                { padding: 8px !important; border-radius: 8px !important; }
.hn-gallery-section             { margin-top: 8px !important; }
.hn-submit-bar                  { padding: 10px 12px !important; margin-top: 10px !important; border-radius: 10px !important; }
.hn-submit-buttons              { gap: 6px !important; }
.hn-rejection-banner            { padding: 10px 12px !important; margin-bottom: 10px !important; border-radius: 8px !important; }

/* ================================================================
   DARK MODE FIXES — Overview / My Posts / Write Post
   ================================================================ */

/* ── Overview ── */
#hnDashRoot.hn-dark .hn-stat-card           { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-stat-card.warn      { border-left-color: #f59e0b !important; }
#hnDashRoot.hn-dark .hn-stat-card.mute      { border-left-color: #475569 !important; }
#hnDashRoot.hn-dark .hn-stat-card.info      { border-left-color: #06b6d4 !important; }
#hnDashRoot.hn-dark .hn-stat-num            { color: #f1f5f9 !important; }
#hnDashRoot.hn-dark .hn-stat-label          { color: #94a3b8 !important; }

/* ── My Posts ── */
#hnDashRoot.hn-dark .hn-tabs               { border-color: #334155 !important; background: #0f172a !important; }
#hnDashRoot.hn-dark .hn-tab               { color: #94a3b8 !important; background: transparent !important; border-color: transparent !important; }
#hnDashRoot.hn-dark .hn-tab.active        { color: #60a5fa !important; background: #1e293b !important; border-color: #3b82f6 !important; }
#hnDashRoot.hn-dark .hn-search            { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-search::placeholder { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-table-wrap        { background: #1e293b !important; border-color: #334155 !important; border-radius: 10px !important; overflow: hidden !important; }
#hnDashRoot.hn-dark .hn-table             { background: #1e293b !important; }
#hnDashRoot.hn-dark .hn-table th          { background: #0f172a !important; color: #64748b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-table td          { border-color: #1e293b !important; color: #cbd5e1 !important; }
#hnDashRoot.hn-dark .hn-table tbody tr    { background: #1e293b !important; }
#hnDashRoot.hn-dark .hn-table tbody tr:nth-child(even) { background: #182436 !important; }
#hnDashRoot.hn-dark .hn-table tbody tr:hover { background: #253148 !important; }
#hnDashRoot.hn-dark .hn-table .title-col a { color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-table .title-col a:hover { color: #60a5fa !important; }
#hnDashRoot.hn-dark .hn-mini-badge        { background: #334155 !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-mini-badge.danger { background: #1c0a0a !important; color: #fca5a5 !important; }
#hnDashRoot.hn-dark .hn-status-pill       { background: #334155 !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-status-pill.ok,
#hnDashRoot.hn-dark .hn-status-pill.publish { background: #052e16 !important; color: #86efac !important; }
#hnDashRoot.hn-dark .hn-status-pill.warn  { background: #1c1000 !important; color: #fdba74 !important; }
#hnDashRoot.hn-dark .hn-status-pill.mute  { background: #1e293b !important; color: #64748b !important; }
#hnDashRoot.hn-dark .hn-timeline-row td   { background: #0f172a !important; }
#hnDashRoot.hn-dark .hn-rejection-note    { background: #1c0a0a !important; border-color: #7f1d1d !important; color: #fca5a5 !important; }
#hnDashRoot.hn-dark .hn-pagination a,
#hnDashRoot.hn-dark .hn-pagination span   { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark .hn-pagination a.active { background: #1d4ed8 !important; border-color: #1d4ed8 !important; color: #fff !important; }

/* ── Write Post ── */
#hnDashRoot.hn-dark .hn-post-form-section  { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-form              { background: transparent !important; }
#hnDashRoot.hn-dark .hn-lbl              { color: #cbd5e1 !important; }
#hnDashRoot.hn-dark .hn-form input,
#hnDashRoot.hn-dark .hn-form textarea,
#hnDashRoot.hn-dark .hn-form select      { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-form input:focus,
#hnDashRoot.hn-dark .hn-form textarea:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important; }
#hnDashRoot.hn-dark .hn-form input::placeholder,
#hnDashRoot.hn-dark .hn-form textarea::placeholder { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-cat-list         { background: #0f172a !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-cat-item         { color: #cbd5e1 !important; border-color: transparent !important; }
#hnDashRoot.hn-dark .hn-cat-item:hover   { background: #1e293b !important; }
#hnDashRoot.hn-dark .hn-cat-name         { color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-cat-count        { color: #64748b !important; }
#hnDashRoot.hn-dark .hn-feat-zone        { background: #0f172a !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-gallery-zone     { background: #0f172a !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-submit-bar       { background: #0f172a !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-rejection-banner { background: #1c0a0a !important; border-color: #7f1d1d !important; color: #fca5a5 !important; }
#hnDashRoot.hn-dark .hn-form-msg         { color: #94a3b8 !important; }
#hnDashRoot.hn-dark .muted,
#hnDashRoot.hn-dark .small.muted         { color: #64748b !important; }
#hnDashRoot.hn-dark .hn-field-meta .muted { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-auto-status      { color: #22c55e !important; }
#hnDashRoot.hn-dark .hn-row .hn-col      { background: transparent !important; }

/* ================================================================
   POST CARDS — My Posts (replaces table)
   ================================================================ */
.hn-posts-list          { display: flex; flex-direction: column; gap: 8px; }
.hn-posts-empty         { padding: 20px; text-align: center; font-size: 13px; color: #94a3b8; }

.hn-post-card           { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
                          padding: 12px 14px; transition: box-shadow .15s; }
.hn-post-card:hover     { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

/* Top row: thumb + body */
.hn-pc-top              { display: flex; gap: 10px; align-items: flex-start; }
.hn-pc-thumb            { width: 52px; height: 52px; border-radius: 10px; object-fit: cover;
                          flex-shrink: 0; }
.hn-pc-thumb.placeholder{ background: #f1f5f9; display: flex; align-items: center;
                          justify-content: center; font-size: 20px; color: #94a3b8; }
.hn-pc-body             { flex: 1; min-width: 0; }

/* Title row */
.hn-pc-title-row        { display: flex; align-items: flex-start; gap: 6px;
                          flex-wrap: wrap; margin-bottom: 5px; }
.hn-pc-title            { font-weight: 700; font-size: 13px; color: #0f172a;
                          text-decoration: none; flex: 1; min-width: 0;
                          display: -webkit-box; -webkit-line-clamp: 2;
                          -webkit-box-orient: vertical; overflow: hidden; }
.hn-pc-title:hover      { color: #2563eb; }

/* Meta row */
.hn-pc-meta             { display: flex; gap: 10px; flex-wrap: wrap;
                          font-size: 11px; color: #64748b; margin-bottom: 8px; }
.hn-pc-date             { margin-left: auto; }
.hn-pc-author           { color: #3b82f6; }

/* Actions */
.hn-pc-actions          { display: flex; gap: 5px; flex-wrap: wrap; }

/* Timeline inside card */
.hn-post-card .hn-post-timeline { padding: 8px 0 0; }

/* Stat cards — pointer cursor */
.hn-stat-card           { cursor: pointer; transition: box-shadow .15s, transform .1s; }
.hn-stat-card:hover     { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.hn-stat-card:active    { transform: translateY(0); }

/* ── Dark mode — Post Cards ── */
#hnDashRoot.hn-dark .hn-post-card         { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-post-card:hover   { box-shadow: 0 4px 16px rgba(0,0,0,.3) !important; }
#hnDashRoot.hn-dark .hn-pc-thumb.placeholder { background: #0f172a !important; color: #475569 !important; }
#hnDashRoot.hn-dark .hn-pc-title         { color: #f1f5f9 !important; }
#hnDashRoot.hn-dark .hn-pc-title:hover   { color: #60a5fa !important; }
#hnDashRoot.hn-dark .hn-pc-meta          { color: #64748b !important; }
#hnDashRoot.hn-dark .hn-pc-author        { color: #60a5fa !important; }
#hnDashRoot.hn-dark .hn-pc-date          { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-posts-empty      { color: #475569 !important; }
#hnDashRoot.hn-dark .hn-stat-card        { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-stat-card:hover  { box-shadow: 0 6px 20px rgba(0,0,0,.4) !important; }

/* ── Notifications Dark Mode — Complete ── */
#hnDashRoot.hn-dark .hn-notif-panel           { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-notif-panel h4,
#hnDashRoot.hn-dark .hn-notif-panel .hn-notif-head { color: #f1f5f9 !important; }
#hnDashRoot.hn-dark .hn-notif-item            { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-notif-item.unread     { background: #0c1a3a !important; border-color: #1d4ed8 !important; }
#hnDashRoot.hn-dark .hn-notif-msg             { color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-notif-time            { color: #64748b !important; }
#hnDashRoot.hn-dark .hn-notif-icon            { filter: none !important; }
#hnDashRoot.hn-dark #hnMarkAllRead            { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
#hnDashRoot.hn-dark #hnMarkAllRead:hover      { color: #60a5fa !important; border-color: #3b82f6 !important; }
#hnDashRoot.hn-dark .hn-notif-empty           { color: #64748b !important; }

/* ── Pending Queue — Button overflow fix ── */
.hn-pending-item        { flex-wrap: wrap !important; align-items: flex-start !important; }
.hn-pending-info        { flex: 1 1 100% !important; min-width: 0 !important; margin-bottom: 8px !important; }
.hn-pending-actions     { flex: 1 1 100% !important; display: flex !important; flex-wrap: wrap !important; gap: 6px !important; }
.hn-pending-actions .hn-btn { flex: 1 1 auto !important; text-align: center !important; min-width: 70px !important; }
.hn-pending-meta        { font-size: 12px !important; color: #64748b !important; margin-top: 3px !important; }

/* Dark mode */
#hnDashRoot.hn-dark .hn-pending-item   { background: #1e293b !important; border-color: #334155 !important; }
#hnDashRoot.hn-dark .hn-pending-meta   { color: #64748b !important; }

/* ── Sub-approve (Send to Publisher) button ── */
.hn-btn.success           { background: #16a34a !important; color: #fff !important; border-color: #16a34a !important; }
.hn-btn.success:hover     { background: #15803d !important; }

/* ── 5-step timeline ── */
.hn-tl-step.active .hn-tl-icon[style],
.hn-post-timeline .hn-tl-step:nth-child(7).active .hn-tl-icon { background: #7c3aed !important; border-color: #7c3aed !important; }

/* ── New Category Section ── */
.hn-new-cat-wrap        { margin-top: 6px; }
.hn-new-cat-row         { display: flex; gap: 6px; align-items: center; }
.hn-new-cat-row input   { flex: 1; padding: 6px 10px !important; font-size: 12px !important;
                          border: 1px solid #e5e7eb; border-radius: 8px; }
.hn-new-cat-msg.ok      { color: #16a34a !important; }
.hn-new-cat-msg.fail    { color: #ef4444 !important; }

/* Dark mode */
#hnDashRoot.hn-dark .hn-new-cat-row input  { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark #hnNewCatParent { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }

/* ── Searchable Parent Dropdown ── */
.hn-parent-picker               { position: relative; }
.hn-parent-picker input[type=text] { width: 100%; box-sizing: border-box;
                                  padding: 6px 10px !important; font-size: 12px !important;
                                  border: 1px solid #e5e7eb; border-radius: 8px; }
.hn-parent-dropdown             { display: none; position: absolute; top: calc(100% + 3px); left: 0; right: 0;
                                  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
                                  max-height: 160px; overflow-y: auto; z-index: 999;
                                  box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.hn-parent-opt                  { padding: 8px 12px; font-size: 12px; cursor: pointer;
                                  color: #1e293b; transition: background .1s; }
.hn-parent-opt:first-child      { color: #94a3b8; font-style: italic; }
.hn-parent-opt:hover            { background: #eff6ff; color: #2563eb; }
.hn-parent-opt:first-child:hover{ background: #f8fafc; color: #64748b; }

/* Dark mode */
#hnDashRoot.hn-dark .hn-parent-picker input[type=text] { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-parent-dropdown { background: #1e293b !important; border-color: #334155 !important; box-shadow: 0 8px 24px rgba(0,0,0,.4) !important; }
#hnDashRoot.hn-dark .hn-parent-opt     { color: #e2e8f0 !important; }
#hnDashRoot.hn-dark .hn-parent-opt:first-child { color: #64748b !important; }
#hnDashRoot.hn-dark .hn-parent-opt:hover { background: #0c1a3a !important; color: #60a5fa !important; }
