
:root {
    --deep: #06004B;
    --deep2: #0d0a6b;
    --mid: #3368FC;
    --mid2: #2255e8;
    --light: #93CCE6;
    --accent: #FF6B35;
    --soft: #EFF4FF;
    --soft2: #e4ecff;
    --bg: #F4F6FB;
    --card: #ffffff;
    --border: rgba(51, 104, 252, 0.11);
    --border2: rgba(51, 104, 252, 0.22);
    --txt: #0D1137;
    --txt2: #374060;
    --muted: #6B7280;
    --fade: #9CA3AF;
    --green: #10B981;
    --green-s: #ECFDF5;
    --amber: #F59E0B;
    --amber-s: #FFFBEB;
    --red: #EF4444;
    --red-s: #FEF2F2;
    --purple: #8B5CF6;
    --purple-s: #F5F3FF;
    --teal: #14B8A6;
    --teal-s: #F0FDFA;
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 22px;
    --pill: 999px;
    --sh: 0 2px 20px rgba(51, 104, 252, 0.07);
    --shh: 0 8px 36px rgba(51, 104, 252, 0.15);
    --sh-deep: 0 20px 60px rgba(6, 0, 75, 0.25);
    --fd: 'Sora', 'Roboto', sans-serif;
    --fb: 'DM Sans', sans-serif;
    --nav-h: 70px;
    --sidebar-w: 280px;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.ri-arrow-down-s-line::before{
color: #fff;
}
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fb);
    background: var(--bg);
    color: var(--txt);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}
.wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-section {
    display: none;
}

.page-section.visible {
    display: block;
}
#navbar {
  position: sticky;
    top: 0;
    z-index: 500;
    margin-bottom: -75px;
    height: var(--nav-h);
    background: rgba(6, 0, 75, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 24px rgba(6, 0, 75, 0.3);
}

#navbar .wrap {
    height: 100%;
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

/* Nav links — desktop */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    margin: 0 8px;
}

.nav-item {
    position: relative;
}

.nav-lnk {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--fb);
    background: none;
    border: none;
}

.nav-lnk:hover,
.nav-lnk.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-lnk i {
    font-size: 16px;
}

.nav-lnk .arr {
    font-size: 13px;
    opacity: 0.6;
    transition: transform 0.2s;
}

.nav-item:hover .arr {
    transform: rotate(180deg);
}

/* Mega menu */
.mega {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border2);
    box-shadow: 0 24px 60px rgba(6, 0, 75, 0.16);
    padding: 18px;
    min-width: 440px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 600;
}

/* Bridge the 14px gap so the mouse never leaves .nav-item */
.nav-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 16px; /* must be >= the gap (14px) */
    display: none;
}

.nav-item:hover::after {
    display: block;
}

.nav-item:hover .mega {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}
.nav-item {
    position: relative;
}
.mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.mega-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.mega-row:hover {
    background: var(--soft);
}

.mega-ico {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.mega-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--txt);
    line-height: 1.2;
}

.mega-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

/* Nav search */
.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--pill);
    padding: 7px 14px;
    width: 200px;
    flex-shrink: 0;
}

.nav-search i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
}

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    font-family: var(--fb);
    width: 100%;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

/* Nav right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-bell {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.nav-bell:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bell-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid rgba(6, 0, 75, 1);
}

.btn-nav-login {
    padding: 7px 16px;
    border-radius: var(--pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nav-login:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-nav-signup {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: var(--pill);
    background: var(--mid);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nav-signup:hover {
    background: var(--mid2);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(51, 104, 252, 0.4);
}
/* ── Hamburger (mobile) ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile drawer ── */
.nav-mobile-drawer {
    display: none;
    position: fixed;
    background: var(--deep);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 24px;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 1000; /* ✅ FIX */
}
.nav-mobile-drawer.open {
    display: block;
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--pill);
    padding: 9px 16px;
    margin: 0 16px 12px;
}

.nav-mobile-search i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
}

.nav-mobile-search input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--fb);
    font-size: 13.5px;
    width: 100%;
}

.nav-mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.mob-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--fb);
}

.mob-nav-link:hover,
.mob-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.mob-nav-link i.main-icon {
    font-size: 16px;
    margin-right: 8px;
}

.mob-nav-link i.toggle-icon {
    font-size: 13px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.mob-nav-item.open .toggle-icon {
    transform: rotate(180deg);
}

.mob-submenu {
    display: none;
    background: #fff;
    border-left: 2px solid rgba(51, 104, 252, 0.4);
    margin: 0 16px 4px 32px;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}

.mob-nav-item.open .mob-submenu {
    display: block;
}

.mob-submenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: #000;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--fb);
}

.mob-submenu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.mob-submenu-link span {
    font-size: 16px;
}

.mob-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 8px 20px;
}

.mob-nav-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px 0;
}

.mob-nav-actions button {
    flex: 1;
    padding: 10px;
    border-radius: var(--pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--fb);
}

.mob-btn-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
}

.mob-btn-signup {
    color: #fff;
}

/* ═══════════════════════════════════════════════
   FORUM PAGE LAYOUT
═══════════════════════════════════════════════ */
.forum-page {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr 260px;
    gap: 24px;
    padding: 28px 0 60px;
    align-items: start;
}

/* ── Left Sidebar ── */
.forum-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fade);
    padding: 12px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--fb);
    width: 100%;
}

.sidebar-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    background: var(--soft);
    color: var(--mid);
}

.sidebar-link.active {
    background: var(--soft);
    color: var(--mid);
    font-weight: 600;
}

.sidebar-link .sl-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    background: var(--mid);
    color: #fff;
    padding: 2px 7px;
    border-radius: var(--pill);
}

.sidebar-link .sl-badge.new {
    background: var(--green);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ── Board Stats Card (sidebar) ── */
.board-stats-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: 18px;
    margin-top: 8px;
}

.board-stats-card h4 {
    font-family: var(--fd);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.bs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.bs-row:last-child {
    border-bottom: none;
}

.bs-label {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bs-label i {
    font-size: 14px;
    color: var(--mid);
}

.bs-val {
    font-family: var(--fd);
    font-weight: 700;
    color: var(--txt);
}

/* ── Right Sidebar ── */
.forum-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}

/* ── Main Feed ── */
.forum-main {}

/* ── Forum Topbar ── */
.forum-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.forum-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.forum-title {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-title i {
    color: var(--mid);
    font-size: 22px;
}

/* ── Filter Pills ── */
.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fpill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--pill);
    font-size: 12.5px;
    font-weight: 500;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.fpill:hover,
.fpill.on {
    background: var(--soft);
    border-color: var(--mid);
    color: var(--mid);
}

.fpill i {
    font-size: 13px;
}

/* New topic button */
.btn-new-topic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--pill);
    background: var(--mid);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-new-topic:hover {
    background: var(--mid2);
    box-shadow: 0 4px 16px rgba(51, 104, 252, 0.3);
}

/* ═══════════════════════════════════════════════
   TOPIC ROW CARD
═══════════════════════════════════════════════ */
.topic-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: 16px 18px;
    margin-bottom: 8px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateX(3px);
    box-shadow: var(--shh);
    border-color: var(--border2);
}

.topic-card.pinned {
    border-left: 3px solid var(--amber);
}

.topic-card.solved {
    border-left: 3px solid var(--green);
}

.topic-card.hot {
    border-left: 3px solid var(--red);
}

.topic-card.waiting {
    border-left: 3px solid var(--purple);
}

/* Avatar */
.tc-av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Body */
.tc-body {
    flex: 1;
    min-width: 0;
}

.tc-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.tc-title {
    font-family: var(--fd);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--txt);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.topic-card:hover .tc-title {
    color: var(--mid);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: var(--pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.b-pin {
    background: var(--amber-s);
    color: #92400E;
}

.b-solved {
    background: var(--green-s);
    color: #065F46;
}

.b-hot {
    background: var(--red-s);
    color: #991B1B;
}

.b-new {
    background: var(--soft);
    color: var(--mid);
}

.b-waiting {
    background: var(--purple-s);
    color: #5B21B6;
}

.b-lock {
    background: #F1F5F9;
    color: var(--muted);
}

.b-feat {
    background: var(--amber-s);
    color: #92400E;
}

/* Excerpt */
.tc-excerpt {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.tc-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tc-tag {
    padding: 2px 8px;
    border-radius: var(--pill);
    background: var(--soft);
    color: var(--mid);
    font-size: 10.5px;
    font-weight: 600;
}

.tc-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--fade);
}

.tc-info i {
    font-size: 13px;
}

.tc-author {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 500;
}

/* Waiting indicator */
.tc-waiting-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--purple);
    background: var(--purple-s);
    padding: 3px 10px;
    border-radius: var(--pill);
}

.tc-waiting-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

/* Stats column */
.tc-stats {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 56px;
    text-align: center;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.tc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.tc-stat-n {
    font-family: var(--fd);
    font-size: 18px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1;
}

.tc-stat-l {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fade);
}

/* Last replied mini-info */
.tc-last-reply {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
}

.tc-last-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}

.tc-last-time {
    font-size: 10px;
    color: var(--fade);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pg-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.pg-btn:hover,
.pg-btn.on {
    background: var(--mid);
    border-color: var(--mid);
    color: #fff;
}

/* ═══════════════════════════════════════════════
   CARD COMPONENT
═══════════════════════════════════════════════ */
.card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
}

.card-hd {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-hd h3 {
    font-family: var(--fd);
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-hd h3 i {
    color: var(--mid);
    font-size: 16px;
}

.card-hd a {
    font-size: 12px;
    color: var(--mid);
    font-weight: 500;
}

.card-hd a:hover {
    text-decoration: underline;
}

.card-bd {
    padding: 16px 18px;
}

/* ═══════════════════════════════════════════════
   PRODUCTS & SERVICES CARD (sidebar / section)
═══════════════════════════════════════════════ */
.product-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-ico {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--txt);
    line-height: 1.3;
}

.product-name:hover {
    color: var(--mid);
    cursor: pointer;
}

.product-desc {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.4;
}

.product-tag {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: var(--pill);
    font-size: 10px;
    font-weight: 700;
    background: var(--soft);
    color: var(--mid);
    margin-top: 4px;
}

/* Online users row */
.online-av-stack {
    display: flex;
}

.online-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #fff;
    margin-left: -8px;
}

.online-av:first-child {
    margin-left: 0;
}

/* ═══════════════════════════════════════════════
   BOARD STATS (full width strip)
═══════════════════════════════════════════════ */
.board-stats-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--r);
    overflow: hidden;
    border: 1.5px solid var(--border);
    margin-bottom: 22px;
}

.bss-item {
    background: var(--card);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bss-ico {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bss-n {
    font-family: var(--fd);
    font-size: 22px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1;
}

.bss-l {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════
   TOPIC DETAIL PAGE
═══════════════════════════════════════════════ */
.detail-page {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    padding: 28px 0 60px;
    align-items: start;
}

/* Back breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a,
.breadcrumb span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a {
    color: var(--mid);
    cursor: pointer;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 12px;
    color: var(--fade);
}

/* Topic header */
.topic-header-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.topic-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mid), var(--light));
}

.th-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.th-title {
    font-family: var(--fd);
    font-size: 22px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    margin-bottom: 14px;
}

.th-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.th-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.th-meta-item i {
    font-size: 15px;
    color: var(--mid);
}

.th-meta-item strong {
    color: var(--txt);
    font-weight: 600;
}

.th-tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.th-tag {
    padding: 4px 12px;
    border-radius: var(--pill);
    background: var(--soft);
    color: var(--mid);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.th-tag:hover {
    background: var(--soft2);
}

/* ── Post / Reply card ── */
.post-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: var(--sh);
}

.post-card.accepted-answer {
    border-color: var(--green);
}

.post-card.accepted-answer .pc-header {
    background: var(--green-s);
}

.post-card.original-post {
    border-top: 3px solid var(--mid);
}

.pc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

.pc-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pc-user {
    flex: 1;
    min-width: 0;
}

.pc-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pc-role {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--pill);
}

.role-mod {
    background: #DBEAFE;
    color: #1E40AF;
}

.role-exp {
    background: var(--amber-s);
    color: #92400E;
}

.role-mem {
    background: #F1F5F9;
    color: var(--muted);
}

.pc-joined {
    font-size: 11.5px;
    color: var(--fade);
}

.pc-time {
    font-size: 12px;
    color: var(--fade);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Accepted answer badge */
.answer-check {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
}

.answer-check i {
    font-size: 16px;
}

.pc-body {
    padding: 18px;
}

.pc-content {
    font-size: 14px;
    color: var(--txt2);
    line-height: 1.75;
}

.pc-content p {
    margin-bottom: 12px;
}

.pc-content p:last-child {
    margin-bottom: 0;
}

.pc-content code {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.pc-content blockquote {
    border-left: 3px solid var(--mid);
    padding-left: 14px;
    color: var(--muted);
    font-style: italic;
    margin: 12px 0;
}

.pc-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pc-action {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--muted);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 7px;
    transition: all 0.15s;
}

.pc-action:hover {
    background: var(--soft);
    color: var(--mid);
}

.pc-action.liked {
    color: var(--mid);
}

.pc-action i {
    font-size: 15px;
}

.pc-action-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
}

/* ── Nested reply ── */
.nested-reply {
    margin-left: 40px;
    background: var(--bg);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

.nr-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.nr-content {
    flex: 1;
}

.nr-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.nr-meta strong {
    color: var(--txt);
}

.nr-text {
    font-size: 13px;
    color: var(--txt2);
    line-height: 1.6;
}

/* ── Reply Box ── */
.reply-box {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-top: 16px;
}

.reply-box-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reply-box-header i {
    color: var(--mid);
}

.reply-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.rt-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.rt-btn:hover {
    background: var(--soft);
    color: var(--mid);
}

.rt-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
}

.reply-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 18px;
    border: none;
    outline: none;
    resize: vertical;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--txt);
    background: transparent;
    line-height: 1.65;
}

.reply-textarea::placeholder {
    color: var(--fade);
}

.reply-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reply-footer-left {
    font-size: 12px;
    color: var(--muted);
}

.btn-post-reply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: var(--pill);
    background: var(--mid);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-post-reply:hover {
    background: var(--mid2);
    box-shadow: 0 4px 16px rgba(51, 104, 252, 0.3);
}

/* ── Related Questions (sidebar) ── */
.rel-q {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.rel-q:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rel-q-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.rel-q-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--txt);
    line-height: 1.4;
}

.rel-q-title:hover {
    color: var(--mid);
}

.rel-q-meta {
    font-size: 11px;
    color: var(--fade);
    margin-top: 3px;
    display: flex;
    gap: 8px;
}

/* ── Contributors widget ── */
.contributor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.contributor-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cr-av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.cr-info {
    flex: 1;
}

.cr-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--txt);
}

.cr-posts {
    font-size: 11px;
    color: var(--fade);
}

.cr-pts {
    font-family: var(--fd);
    font-size: 13px;
    font-weight: 700;
    color: var(--mid);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .forum-page {
        grid-template-columns: 240px 1fr 240px;
        gap: 18px;
    }

    .detail-page {
        grid-template-columns: 1fr 240px;
    }
}

@media (max-width: 1024px) {
    .forum-page {
        grid-template-columns: 220px 1fr;
    }

    .forum-sidebar-right {
        display: none;
    }

    .board-stats-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {

    /* Navbar: hide desktop nav elements */
    .nav-links,
    .nav-search,
    .nav-right {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .forum-page {
        grid-template-columns: 1fr;
    }

    .forum-sidebar-left {
        display: none;
    }

    .board-stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-page {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        display: none;
    }
}

@media (max-width: 600px) {
    .wrap {
        padding: 0 14px;
    }

    .board-stats-strip {
        grid-template-columns: 1fr 1fr;
    }

    .tc-stats {
        display: none;
    }

    .forum-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .th-title {
        font-size: 18px;
    }

    .nested-reply {
        margin-left: 16px;
    }

    .bss-item {
        padding: 12px;
    }

    .bss-n {
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .board-stats-strip {
        grid-template-columns: 1fr;
    }

    .filter-pills {
        gap: 5px;
    }

    .fpill {
        font-size: 11.5px;
        padding: 5px 11px;
    }
}

/*
//// webinar */
/* Next Live Webinar Card Styles */
.live-webinar-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef9e8 100%);
    border-left: 4px solid #ef4444;
    position: relative;
    overflow: hidden;
}

.live-webinar-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.live-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: pulse-red 1.5s infinite;
}

.live-badge i {
    font-size: 10px;
    animation: blink 1s infinite;
}

@keyframes pulse-red {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.webinar-countdown {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.countdown-timer {
    display: flex;
    justify-content: space-around;
    gap: 8px;
}

.countdown-unit {
    text-align: center;
    flex: 1;
}

.countdown-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 0;
    border-radius: 12px;
    letter-spacing: 1px;
}

.countdown-label {
    display: block;
    font-size: 9px;
    color: #94a3b8;
    margin-top: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.webinar-title-sidebar {
    margin-bottom: 16px;
}

.webinar-title-sidebar h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
    line-height: 1.4;
}

.webinar-description {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.webinar-details {
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 16px;
}

.webinar-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.75rem;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.webinar-detail-item:last-child {
    border-bottom: none;
}

.webinar-detail-item i {
    width: 20px;
    color: var(--mid);
    font-size: 0.9rem;
}

.webinar-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.webinar-register-btn {
    flex: 2;
    background: linear-gradient(135deg, var(--mid), #1f6390);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
        max-width: 149px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.webinar-register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 125, 160, 0.3);
}

.webinar-reminder-btn {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 8px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.55rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.webinar-reminder-btn:hover {
    background: #e2e8f0;
}

.webinar-footer-note {
    font-size: 0.65rem;
    color: #94a3b8;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .countdown-number {
        font-size: 20px;
        padding: 6px 0;
    }

    .webinar-actions {
        flex-direction: column;
    }

    .webinar-register-btn,
    .webinar-reminder-btn {
        width: 100%;
    }
}

/* Compact Webinars Grid - Redesigned */
.webinars-grid-tab {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.webinar-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #E8ECF0;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.webinar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #D1D9E6;
}

/* Featured badge */
.webinar-card.featured {
    border-left: 3px solid #F59E0B;
}

.webinar-card.featured::before {
    content: "Featured";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #F59E0B;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    z-index: 10;
}

.webinar-header {
    padding: 16px;
    color: white;
    position: relative;
}

.webinar-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    opacity: 0.85;
    margin-bottom: 8px;
    font-weight: 500;
}

.webinar-date i {
    font-size: 11px;
}

.webinar-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.2px;
}

.webinar-price-tag {
    display: inline-block;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
}

.webinar-body {
    padding: 12px;
}

.webinar-speaker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.webinar-speaker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8EEFF, #D4E0FF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #3368FC;
    flex-shrink: 0;
}

.webinar-speaker-info strong {
    display: block;
    font-size: 11px;
    color: #1F2937;
    margin-bottom: 1px;
}

.webinar-speaker-info small {
    font-size: 9px;
    color: #6B7280;
}

.webinar-desc {
    font-size: 11px;
    color: #6B7280;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.webinar-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.webinar-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #9CA3AF;
}

.webinar-stat i {
    font-size: 10px;
    color: #3368FC;
}

.webinar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #F0F2F5;
}

.webinar-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.webinar-price .price-current {
    font-size: 15px;
    font-weight: 800;
    color: #1F2937;
}

.webinar-price .price-current.free {
    color: #10B981;
    font-size: 13px;
}

.webinar-price .price-original {
    font-size: 10px;
    color: #9CA3AF;
    text-decoration: line-through;
}

.btn-register {
    padding: 5px 14px;
    background: linear-gradient(135deg, #3368FC, #2255E8);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-register i {
    font-size: 10px;
    transition: transform 0.15s;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(51, 104, 252, 0.3);
    background: linear-gradient(135deg, #2255E8, #1A4AD4);
}

.btn-register:hover i {
    transform: translateX(2px);
}

.btn-register-outline {
    background: transparent;
    border: 1px solid #3368FC;
    color: #3368FC;
    padding: 4px 12px;
}

.btn-register-outline:hover {
    background: #3368FC;
    color: white;
}

/* Card type variations - shorter headers */
.webinar-card[data-type="premium"] .webinar-header {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.webinar-card[data-type="free"] .webinar-header {
    background: linear-gradient(135deg, #10B981, #059669);
}

.webinar-card.on-demand .webinar-header {
    background: linear-gradient(135deg, #6B7280, #4B5563);
}

/* Remove the gradient overlay effect */
.webinar-header::after {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .webinars-grid-tab {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ── Topic detail header ── */
.topic-detail-header {
    background: #fffdf6;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px 18px;
    margin-bottom: 16px;
}

.tdh-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.tdh-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin: 0 0 14px;
}

.tdh-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Post cards ── */
/* ══════════════════════════════════════════════
   REPLIES — Redesigned
══════════════════════════════════════════════ */

/* Reply cards use a left-accent strip instead of a sidebar */
.post-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #E4E9F5;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(51, 104, 252, 0.08);
    transform: translateY(-1px);
}

/* Original post — distinct solid top border + warm bg */
.post-card.original-post {
    background: #FFFDF6;
    border-top: 3px solid #F59E0B;
    border-color: #F0E4C0;
}

/* Best answer — green theme */
.post-card.accepted-answer {
    background: #F0FDF8;
    border: 1.5px solid #34D399;
}

/* Reply cards get a left blue accent */
#repliesList .post-card:not(.accepted-answer) {
    border-left: 3px solid #C7D7FD;
}

#repliesList .post-card:not(.accepted-answer):hover {
    border-left-color: #3368FC;
}

/* ── Post header row (new, replaces sidebar) ── */
.post-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 10px;
    border-bottom: 1px solid #EEF1FA;
    background: transparent;
    flex-wrap: wrap;
}

.original-post .post-header-row {
    background: #FFF8E6;
    border-bottom-color: #F0E4C0;
}

.accepted-answer .post-header-row {
    background: #ECFDF5;
    border-bottom-color: #A7F3D0;
}

.post-av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.post-author-info {
    flex: 1;
    min-width: 0;
}

.post-author-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-author-meta {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 1px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-author-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.post-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.post-time-badge {
    font-size: 11px;
    color: #94A3B8;
    background: #F1F5F9;
    padding: 3px 9px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Post body ── */
.post-body {
    padding: 16px 18px 12px;
    font-size: 14.5px;
    line-height: 1.78;
    color: #374151;
}

.post-body p {
    margin: 0 0 12px;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-body ol,
.post-body ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-body blockquote {
    border-left: 3px solid #CBD5E1;
    padding: 8px 14px;
    margin: 12px 0;
    color: #64748B;
    font-style: italic;
    background: #F8FAFC;
    border-radius: 0 6px 6px 0;
}

.post-body code {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #7C3AED;
}

/* ── Accepted banner ── */
.accepted-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #065F46;
    background: #D1FAE5;
    padding: 5px 18px;
    border-bottom: 1px solid #A7F3D0;
}

.accepted-banner i {
    font-size: 15px;
    color: #10B981;
}

/* ── Quote block inside reply ── */
.post-quote {
    background: #F1F5F9;
    border-left: 3px solid #94A3B8;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-size: 13.5px;
    color: #64748B;
}

.pq-author {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Post footer / actions ── */
.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px 11px;
    border-top: 1px solid #EEF1FA;
    background: #F8FAFF;
    flex-wrap: wrap;
    gap: 8px;
}

.original-post .post-footer {
    background: #FFF9ED;
    border-top-color: #F0E4C0;
}

.accepted-answer .post-footer {
    background: #F0FDF8;
    border-top-color: #A7F3D0;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    background: #fff;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.post-action-btn:hover {
    border-color: #3368FC;
    color: #3368FC;
    background: #EEF3FF;
}

.post-action-btn.voted {
    color: #3368FC;
    border-color: #3368FC;
    background: #EEF3FF;
}

.post-action-btn.best-answer-btn {
    color: #059669;
    border-color: #A7F3D0;
    background: #ECFDF5;
}

.post-action-btn.best-answer-btn:hover {
    background: #D1FAE5;
    border-color: #10B981;
}

.post-timestamp {
    font-size: 11px;
    color: #94A3B8;
}

/* ── Author badges ── */
.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.author-badge.expert {
    background: #FEF3C7;
    color: #92400E;
}

.author-badge.mod {
    background: #DBEAFE;
    color: #1E40AF;
}

.op-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #EFF4FF;
    color: #3368FC;
}

/* ══════════════════════════════════════════════
   COMMENTS SECTION — Redesigned
══════════════════════════════════════════════ */

.comments-section {
    background: #fff;
    border: 1px solid #E4E9F5;
    border-radius: 14px;
    margin: 20px 0 16px;
    overflow: hidden;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #EEF1FA;
    background: #F5F7FF;
    flex-wrap: wrap;
    gap: 8px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
}

.comments-title i {
    color: #3368FC;
    font-size: 16px;
}

.cs-pill {
    padding: 4px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #fff;
    color: #64748B;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cs-pill.on,
.cs-pill:hover {
    background: #3368FC;
    color: #fff;
    border-color: #3368FC;
}

/* ── Quick comment input ── */
.comment-quick-input {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #EEF1FA;
    background: #FAFBFF;
}

.cqi-av {
    width: 34px;
    height: 34px;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cqi-wrap {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s;
}

.cqi-wrap:focus-within {
    border-color: #3368FC;
    box-shadow: 0 0 0 3px rgba(51, 104, 252, 0.08);
}

.cqi-editor {
    min-height: 38px;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.55;
    outline: none;
    color: #374151;
}

.cqi-editor:empty:before {
    content: attr(data-placeholder);
    color: #94A3B8;
    pointer-events: none;
}

.cqi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px 9px;
    border-top: 1px solid #EEF1FA;
    background: #F8FAFF;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Individual comment ── */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px 11px;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.15s;
    position: relative;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    background: #FAFBFF;
}

/* Left accent line on comments */
.comment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: background 0.15s;
}

.comment-item:hover::before {
    background: #C7D7FD;
}

.comment-av {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    /* square-ish to differ from post avatars */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta-top {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: #1E293B;
}

.comment-time {
    font-size: 11px;
    color: #94A3B8;
}

.comment-expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 9.5px;
    font-weight: 700;
}

.comment-op-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: #EFF4FF;
    color: #3368FC;
    font-size: 9.5px;
    font-weight: 700;
}

.comment-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 7px;
    background: #F8FAFC;
    border: 1px solid #EEF1FA;
    border-radius: 0 10px 10px 10px;
    padding: 9px 13px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.ca-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94A3B8;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ca-btn:hover {
    background: #EEF3FF;
    color: #3368FC;
}

.ca-btn.liked {
    color: #3368FC;
    background: #EEF3FF;
}

.ca-btn.danger {
    color: #EF4444;
}

.ca-btn.danger:hover {
    background: #FEE2E2;
}

/* ── Nested replies ── */
.nested-replies {
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px dashed #CBD5E1;
}

.comment-item.nested {
    padding: 9px 0 7px;
    border-bottom: none;
    border-radius: 0;
}

.comment-item.nested::before {
    display: none;
}

.comment-item.nested:hover {
    background: transparent;
}

.comment-item.nested .comment-av {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 10px;
}

.comment-item.nested .comment-text {
    font-size: 13px;
    background: #fff;
    border-color: #E2E8F0;
}

/* ── Reply input inside comment ── */
.comment-reply-input {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #E2E8F0;
}

/* ── Load more ── */
.load-more-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 13px;
    border: none;
    border-top: 1px solid #EEF1FA;
    background: #F5F7FF;
    color: #3368FC;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.load-more-comments:hover {
    background: #EEF3FF;
}

/* ══════════════════════════════════════════════
   REPLY BOX — Redesigned
══════════════════════════════════════════════ */

.reply-box {
    background: #fff;
    border: 1.5px solid #C7D7FD;
    border-radius: 14px;
    margin-top: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(51, 104, 252, 0.06);
}

.reply-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid #EEF1FA;
    background: linear-gradient(135deg, #F5F7FF, #EEF3FF);
    flex-wrap: wrap;
    gap: 10px;
}

.reply-box-header h3 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #1E293B;
}

.reply-box-header h3 i {
    color: #3368FC;
}

.btn-mark-solved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid #34D399;
    border-radius: 20px;
    background: #ECFDF5;
    color: #065F46;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-mark-solved:hover {
    background: #D1FAE5;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-bottom: 1px solid #EEF1FA;
    background: #F8FAFF;
    flex-wrap: wrap;
}

.etb {
    width: 30px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748B;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.etb:hover {
    background: #EEF3FF;
    color: #3368FC;
}

.etb-divider {
    width: 1px;
    height: 18px;
    background: #E2E8F0;
    margin: 0 4px;
}

.reply-editor {
    min-height: 130px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.72;
    outline: none;
    color: #374151;
    background: #fff;
}

.reply-editor:empty:before {
    content: attr(data-placeholder);
    color: #94A3B8;
    pointer-events: none;
}

.quote-preview {
    margin: 10px 18px 0;
    background: #F1F5F9;
    border-left: 3px solid #94A3B8;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    font-size: 13px;
    color: #64748B;
}

.qp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
}

.qp-text {
    font-style: italic;
}

.reply-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px 14px;
    background: #F8FAFF;
    border-top: 1px solid #EEF1FA;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-cancel-reply {
    padding: 7px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    background: #fff;
    color: #64748B;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cancel-reply:hover {
    border-color: #94A3B8;
    color: #374151;
}

/* ── Replies topbar ── */
.replies-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 10px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: #F5F7FF;
    border: 1px solid #E4E9F5;
    border-radius: 10px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .post-header-row {
        padding: 10px 14px 8px;
    }

    .post-body {
        padding: 12px 14px 8px;
        font-size: 14px;
    }

    .post-footer {
        padding: 8px 14px 10px;
    }

    .tdh-title {
        font-size: 17px;
    }

    .comment-text {
        padding: 7px 11px;
    }

    .nested-replies {
        padding-left: 10px;
    }
}

.post-author-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
    line-height: 1.3;
}

.post-author-stats {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}

.author-badge.expert {
    background: #FEF3C7;
    color: #92400E;
}

/* ── Post content ── */
.post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.accepted-banner {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #ECFDF5;
    color: #065F46;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 18px;
    border-bottom: 1px solid var(--border);
}

.post-body {
    flex: 1;
    padding: 18px 20px 10px;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text);
}

.post-body p {
    margin: 0 0 12px;
}

.post-body ol,
.post-body ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-body blockquote {
    border-left: 3px solid var(--border);
    padding: 8px 14px;
    margin: 12px 0;
    color: var(--muted);
    font-style: italic;
}

/* ── Quote inside post ── */
.post-quote {
    background: var(--soft);
    border-left: 3px solid var(--mid);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--muted);
}

.pq-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--mid);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Post footer / actions ── */

.btn-mark-solved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--green);
    border-radius: 8px;
    background: #ECFDF5;
    color: #065F46;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-mark-solved:hover {
    background: #D1FAE5;
}

/* ── Editor toolbar ── */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.etb {
    width: 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
    transition: all .15s;
}

.etb:hover {
    background: var(--soft);
    color: var(--text);
}

.etb-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* ── Reply editor ── */
.reply-editor {
    min-height: 140px;
    padding: 14px 18px;
    font-size: 14.5px;
    line-height: 1.7;
    outline: none;
    color: var(--text);
}

.reply-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

/* ── Quote preview in reply box ── */
.quote-preview {
    margin: 10px 18px 0;
    background: var(--soft);
    border-left: 3px solid var(--mid);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--muted);
}

.qp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mid);
    margin-bottom: 4px;
}

.qp-text {
    font-style: italic;
}

/* ── Reply box footer ── */
.reply-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-cancel-reply {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel-reply:hover {
    border-color: var(--mid);
    color: var(--text);
}

/* ── Sidebar action buttons ── */
.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}

.sidebar-action-btn:hover {
    background: var(--soft);
    border-color: var(--mid);
}

.sidebar-action-btn.danger {
    color: var(--red);
}

.sidebar-action-btn.danger:hover {
    background: #FEE2E2;
    border-color: var(--red);
}

/* ── Related topic links ── */
.related-topic-link {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12.5px;
    color: var(--mid);
    text-decoration: none;
    padding: 5px 0;
    line-height: 1.45;
    border-bottom: 1px solid var(--border);
}

.related-topic-link:last-of-type {
    border-bottom: none;
}

.related-topic-link:hover {
    color: var(--primary);
}

.related-topic-link i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Comments section ── */
.comments-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 20px 0 16px;
    overflow: hidden;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--soft);
    flex-wrap: wrap;
    gap: 8px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
}

.comments-sort {
    display: flex;
    gap: 4px;
}

.cs-pill {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.cs-pill.on,
.cs-pill:hover {
    background: var(--mid);
    color: #fff;
    border-color: var(--mid);
}

/* ── Quick comment input ── */
.comment-quick-input {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.cqi-av {
    width: 36px;
    height: 36px;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cqi-wrap {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    overflow: hidden;
    transition: border-color .15s;
}

.cqi-wrap:focus-within {
    border-color: var(--mid);
    background: var(--bg);
}

.cqi-editor {
    min-height: 38px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    outline: none;
    color: var(--text);
}

.cqi-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.cqi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Individual comment ── */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item.nested {
    padding: 10px 0 6px;
    border-bottom: none;
}

.comment-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.comment-time {
    font-size: 11.5px;
    color: var(--muted);
}

.comment-expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 10px;
    font-weight: 700;
}

.comment-op-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: #EFF4FF;
    color: var(--mid);
    font-size: 10px;
    font-weight: 700;
}

.comment-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.ca-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.ca-btn:hover {
    background: var(--soft);
    color: var(--text);
}

.ca-btn.liked {
    color: var(--primary);
}

/* ── Nested replies ── */
.nested-replies {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

.comment-reply-input {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

/* ── Load more ── */
.load-more-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 13px;
    border: none;
    border-top: 1px solid var(--border);
    background: var(--soft);
    color: var(--mid);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.load-more-comments:hover {
    background: var(--border);
}

.post-sidebar {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 16px;
    border-right: 1px solid var(--border);
    background: #fffdf6;
    gap: 6px;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .post-sidebar {
        width: 72px;
        padding: 14px 6px 12px;
    }

    .post-sidebar .post-author-stats {
        display: none;
    }

    .tdh-title {
        font-size: 17px;
    }

    .post-body {
        padding: 14px 14px 8px;
        font-size: 14px;
    }

    .post-footer {
        padding: 8px 12px 10px;
    }
}

.input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.input.is-invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2;
}

.error-text {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-text.show {
    display: block !important;
}

.char-counter {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    text-align: right;
}

.upload-box {
    display: block;
    padding: 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    color: #64748b;
    transition: .2s;
    background: #fafcff;
}

.upload-box:hover {
    border-color: #3368FC;
    color: #3368FC;
    background: #f0f4fe;
}

#imagePreview {
    margin-top: 10px;
    position: relative;
    display: inline-block;
}

#imagePreview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── FIX: Right sidebar must not overflow or scroll into stats ── */
.forum-page {
    display: grid;
    /* left-sidebar | main | right-sidebar */
    grid-template-columns: 220px 1fr 260px;
    gap: 24px;
    align-items: start;
    /* ← key: each column is independent height */
}

.forum-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
    /* adjust to your navbar height */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.forum-sidebar-right::-webkit-scrollbar {
    width: 4px;
}

.forum-sidebar-right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Each card inside right sidebar must not push outside */
.forum-sidebar-right .card {
    flex-shrink: 0;
    min-width: 0;
}

/* Board stats card sits AFTER the right sidebar cards — keep it attached */
.forum-sidebar-right .board-stats-card {
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .forum-page {
        grid-template-columns: 200px 1fr;
    }

    .forum-sidebar-right {
        display: none;
        /* hide on tablet, or move below */
    }
}

@media (max-width: 768px) {
    .forum-page {
        grid-template-columns: 1fr;
    }

    .forum-sidebar-left {
        display: none;
    }
}

.tc-av.tc-av-image {
    background: none !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px;
}

.tc-av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Last reply image avatar styles */
.tc-last-av.tc-last-av-image {
    background: none !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.tc-last-av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Ensure the avatar container has proper dimensions */
.tc-av {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

/* Optional: Add a fallback for broken images */
.tc-av-img {
    display: block;
}

.tc-av-img[src=""],
.tc-av-img:not([src]) {
    opacity: 0;
}

.t-av {
    width: 50px;
    height: 50px;
    border-radius: 10%;
    overflow: hidden;
}

.t-av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Section ────────────────────────────────────────────────── */
.px-section {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Poll card ──────────────────────────────────────────────── */
.px-poll {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, rgba(0, 0, 0, .08));
    border-radius: 18px;
    padding: 22px 22px 16px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .25s, transform .2s;
}

.px-poll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    border-radius: 18px 18px 0 0;
}

.px-poll:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, .09);
    transform: translateY(-1px);
}

/* ── Top strip ──────────────────────────────────────────────── */
.px-poll__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.px-poll__meta {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

/* Pills */
.px-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    padding: 3px 9px;
    border-radius: 99px;
    line-height: 1.4;
}

.px-pill--violet {
    background: #ede9fe;
    color: #5b21b6;
}

.px-pill--blue {
    background: #dbeafe;
    color: #1e40af;
}

.px-pill--red {
    background: #fee2e2;
    color: #991b1b;
}

.px-pill--amber {
    background: #fef3c7;
    color: #92400e;
}

/* Vote count */
.px-poll__vote-count {
    font-size: 22px;
    font-weight: 800;
    color: var(--heading, #111827);
    line-height: 1;
    white-space: nowrap;
}

.px-poll__vote-count span {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted, #9ca3af);
    margin-left: 2px;
}

/* ── Question ───────────────────────────────────────────────── */
.px-poll__question {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading, #111827);
    margin: 0 0 18px;
    line-height: 1.4;
}

/* ── Options ────────────────────────────────────────────────── */
.px-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 16px;
}

.px-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    background: #d8d8ff;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 11px 14px;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition: border-color .18s, background .18s, transform .12s;
    outline: none;
}

.px-opt:hover:not(:disabled):not(.px-opt--result) {
    border-color: var(--opt-color, #6366f1);
    background: color-mix(in srgb, var(--opt-color, #6366f1) 6%, var(--opt-bg, #f8f9fa));
    transform: translateX(3px);
}

.px-opt--chosen {
    border: 2px solid var(--opt-color, #6366f1);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.px-opt:disabled {
    cursor: default;
    opacity: .7;
}

/* Animated fill */
.px-opt__fill {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--opt-color, #6366f1) 10%, transparent);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
}

/* Dot */
.px-opt__dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--opt-color, #6366f1);
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s;
    position: relative;
    z-index: 1;
}

.px-opt__dot--active {
    background: var(--opt-color, #6366f1);
}

/* Label */
.px-opt__label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    position: relative;
    z-index: 1;
    min-width: 0;
}

/* Stats panel */
.px-opt__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.px-opt__stats--visible {
    opacity: 1;
    transform: none;
}

.px-opt__pct {
    font-size: 13px;
    font-weight: 800;
    color: var(--opt-color, #6366f1);
    min-width: 34px;
    text-align: right;
}

.px-opt__bar-wrap {
    width: 52px;
    height: 4px;
    background: rgba(0, 0, 0, .08);
    border-radius: 99px;
    overflow: hidden;
    display: none;
}

.px-opt__bar-inner {
    height: 100%;
    border-radius: 99px;
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.px-opt__votes {
    font-size: 11px;
    color: var(--muted, #9ca3af);
    white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────────── */
.px-poll__footer {
    display: flex;
    align-items: center;
    min-height: 26px;
    gap: 10px;
}

.px-foot-note {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 99px;
    padding: 4px 10px;
}

.px-foot-note--lock {
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
}

.px-foot-note--lock:hover {
    background: #e5e7eb;
}

.px-foot-note--closed {
    background: #fee2e2;
    color: #991b1b;
}

.px-foot-note--voted {
    background: #d1fae5;
    color: #065f46;
    font-weight: 600;
}

.px-foot-note--hint {
    color: var(--muted, #9ca3af);
    padding-left: 0;
}

/* Loading */
.px-loading {
    font-size: 12px;
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.px-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(99, 102, 241, .2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: px-spin .65s linear infinite;
}

@keyframes px-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Voted pulse on card */
@keyframes px-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, .3);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.px-poll--just-voted {
    animation: px-pulse .7s ease-out;
}

/* Dark-mode tweaks */
@media (prefers-color-scheme: dark) {
    .px-opt {
        --opt-bg: #86869a;
    }

    .px-pill--violet {
        background: #3b0764;
        color: #c4b5fd;
    }

    .px-pill--blue {
        background: #1e3a5f;
        color: #93c5fd;
    }

    .px-pill--red {
        background: #450a0a;
        color: #fca5a5;
    }

    .px-pill--amber {
        background: #431407;
        color: #fcd34d;
    }

    .px-foot-note--lock {
        background: #27272a;
        color: #a1a1aa;
    }

    .px-foot-note--voted {
        background: #064e3b;
        color: #6ee7b7;
    }

    .px-foot-note--closed {
        background: #450a0a;
        color: #fca5a5;
    }
}

/* reaction style */
/* ── Reaction bar ───────────────────────────────── */
.reaction-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 4px;
    border-top: 1px solid var(--border, #e5e7eb);
    margin-top: 14px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s ease;
    color: var(--text-muted, #6b7280);
}

.reaction-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f5f3ff;
}

.reaction-btn--active {
    border-color: #6366f1;
    background: #ede9fe;
    color: #6366f1;
    font-weight: 600;
}

.reaction-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.reaction-emoji {
    font-size: 15px;
    line-height: 1;
}

.reaction-count {
    font-size: 12px;
    min-width: 10px;
}

/* ── Reply-level comments ───────────────────────── */
.reply-comments {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #e5e7eb);
}

.rc-item {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.rc-av {
    width: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
    flex-shrink: 0;
}

.rc-input-wrap {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 8px 0 4px;
}

.rc-toggle-btn {
    font-size: 12px;
    color: var(--muted, #9ca3af);
    margin-top: 4px;
}

.rc-toggle-btn:hover {
    color: #6366f1;
}

/* reaction styles end */
/* comment styles */
/* Container spacing */
.reply-comments {
    margin-top: 14px;
    padding-left: 40px;
    /* indent under reply */
    border-left: 2px solid #eef2f7;
}

/* Comment row */
.rc-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* Avatar */
.rc-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Bubble (key difference from replies) */
.rc-bubble {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    max-width: 520px;
    border: 1px solid #e2e8f0;
}

/* Header */
.rc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 2px;
}

/* Author */
.rc-author {
    font-weight: 600;
    color: #111827;
}

/* OP badge */
.rc-op {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
}

/* Time */
.rc-time {
    color: #9ca3af;
    font-size: 11px;
}

/* Text */
.rc-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.article-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.08);
}

.form-label {
    margin-bottom: 4px;
    color: #6b7280;
}

.section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.custom-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.custom-switch input:checked+.slider {
    background-color: #1877f2;
}

.custom-switch input:checked+.slider:before {
    transform: translateX(18px);
}

.permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.permission-row:last-child {
    border-bottom: none;
}

.permission-label {
    font-size: 13px;
    color: #374151;
}

.permission-label small {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}

#thumbnailZone:hover {
    border-color: #0d6efd !important;
    background: #f8fbff;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.section-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-thumbnail-wrap {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.alert-disabled {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-icon i {
    font-size: 20px;
    color: #f39c12;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-content strong {
    color: #e67e22;
    font-size: 14px;
}

.alert-content span {
    color: #7f8c8d;
    font-size: 13px;
}

/* /////blogs styles */

:root {
    --blog-radius: 16px;
    --blog-radius-sm: 10px;
    --blog-shadow: 0 2px 12px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
    --blog-shadow-hover: 0 12px 40px rgba(51, 104, 252, .13), 0 4px 16px rgba(0, 0, 0, .07);
    --accent: #3368FC;
    --accent-soft: #eef2ff;
    --green: #10B981;
    --amber: #F59E0B;
    --purple: #8B5CF6;
    --red: #EF4444;
    --text: #0f172a;
    --sub: #475569;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --surface: #ffffff;
    --bg-page: #f8fafc;
}

/* ── Page wrap ───────────────────────────────────────────── */
.blog-page-wrap {
    max-width: 1380px;
    margin: 32px auto 60px;
    padding: 0 20px;
}

/* ── Hero header ─────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3368FC 50%, #60a5fa 100%);
    border-radius: var(--blog-radius);
    padding: 40px 40px 36px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.blog-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    margin-bottom: 10px;
}

.blog-hero h1 {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.blog-hero p {
    font-size: 14px;
    color: rgba(255, 255, 255, .75);
    margin: 0;
    max-width: 480px;
}

.blog-hero-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.btn-hero-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, .25);
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.blog-hero-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.bhs-item {
    text-align: center;
}

.bhs-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    display: block;
}

.bhs-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

/* ── Layout: main + sidebar ──────────────────────────────── */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
    }
}

/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius-sm);
    padding: 14px 18px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 22px;
    box-shadow: var(--blog-shadow);
    position: static !important;
    top: auto !important;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
}

.filter-group .form-control,
.filter-group select {
    font-size: 12px;
    border-radius: 7px;
    border: 1px solid var(--border);
    padding: 6px 10px;
    color: var(--text);
    height: 34px;
    background: #f8fafc;
    transition: border-color .15s;
}

.filter-group .form-control:focus,
.filter-group select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 104, 252, .1);
    background: #fff;
}

.filter-search {
    flex: 1;
    min-width: 180px;
}

.btn-filter {
    height: 34px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: none;
    transition: transform .12s, box-shadow .12s;
}

.btn-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(51, 104, 252, .2);
}

.btn-filter-primary {
    background: var(--accent);
    color: #fff;
}

.btn-filter-reset {
    background: #f1f5f9;
    color: var(--sub);
    border: 1px solid var(--border);
}

/* ── View toggle ─────────────────────────────────────────── */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.view-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .12s;
    font-size: 14px;
}

.view-toggle-btn.active,
.view-toggle-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.view-toggle-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

/* ── Grid cards ──────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-hover);
    border-color: #c7d7fd;
}

/* ── Thumbnail (grid) ── */
.blog-card-thumb {
    position: relative;
    width: 100%;
    height: 200px;          /* ← was missing — this is the root cause */
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #f0fdf4);
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.04);
}

.blog-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #c7d7fd;
}

/* Badges overlay */
.blog-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    z-index: 2;
}

.blog-card-actions-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity .15s;
    z-index: 2;
}

.blog-card:hover .blog-card-actions-overlay {
    opacity: 1;
}

.card-act-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    color: var(--sub);
    transition: color .12s, background .12s;
    text-decoration: none;
}

.card-act-btn:hover {
    background: #fff;
    color: var(--accent);
}

.card-act-btn.danger:hover {
    color: var(--red);
}

/* ── Body ── */
.blog-card-body {
    padding: 16px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .12s;
}

.blog-card-title:hover {
    color: var(--accent);
}

.blog-card-excerpt {
    font-size: 12px;
    color: var(--sub);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ── Tags ── */
.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.blog-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    background: #f1f5f9;
    color: var(--sub);
    border: 1px solid var(--border);
}

/* ── Footer ── */
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 14px;
    border-top: 1px solid #f1f5f9;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 7px;
}

.blog-card-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3368FC, #93CCE6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-card-author-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--sub);
}

.blog-card-date {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

.blog-card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-stat {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.blog-stat i {
    font-size: 12px;
}

/* ══════════════════════════════════════════════════════════════
   TILE VIEW — horizontal cards, thumb left, content right
══════════════════════════════════════════════════════════════ */

.blog-card-grid { display: flex; }
.blog-card-tile { display: none; }

.blog-grid--list .blog-card-grid { display: none; }
.blog-grid--list .blog-card-tile { display: flex; }

.blog-card-tile {
    flex-direction: row;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}

.blog-card-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--blog-shadow-hover);
    border-color: #c7d7fd;
}

/* Tile thumbnail — left side */
.blog-tile-thumb {
    position: relative;
    width: 220px;
    min-width: 220px;
    height: auto;           /* stretches to card height naturally */
    background: linear-gradient(135deg, #e0e7ff, #f0fdf4);
    overflow: hidden;
    flex-shrink: 0;
}

.blog-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.blog-card-tile:hover .blog-tile-thumb img {
    transform: scale(1.04);
}

.blog-tile-thumb .blog-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #c7d7fd;
}

.blog-tile-thumb .blog-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.blog-tile-thumb .blog-card-actions-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity .15s;
    z-index: 2;
}

.blog-card-tile:hover .blog-tile-thumb .blog-card-actions-overlay {
    opacity: 1;
}

/* Right-side content */
.blog-tile-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-tile-body {
    padding: 16px 20px 12px;
    flex: 1;
}

.blog-tile-body .blog-card-title {
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
}

.blog-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-top: 1px solid #f1f5f9;
    gap: 8px;
    flex-wrap: wrap;
}

/* List mode layout override */
.blog-grid--list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .blog-card-tile {
        flex-direction: column;
    }

    .blog-tile-thumb {
        width: 100%;
        min-width: unset;
        height: 180px;      /* explicit height when stacked vertically */
    }

    .blog-tile-thumb .blog-card-badges {
        flex-direction: row;
    }

    .blog-card-thumb {
        height: 180px;
    }
}

/* Status / type pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
}

.pill-published {
    background: #dcfce7;
    color: #16a34a;
}

.pill-draft {
    background: #fef9c3;
    color: #854d0e;
}

.pill-archived {
    background: #f1f5f9;
    color: #64748b;
}

.pill-article {
    background: #ede9fe;
    color: #7c3aed;
}

.pill-blog {
    background: #e0f2fe;
    color: #0369a1;
}

/* ── Empty state ─────────────────────────────────────────── */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 20px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--blog-radius);
}

.blog-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    margin: 0 auto 16px;
}

.blog-empty h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.blog-empty p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

/* ── Pagination ──────────────────────────────────────────── */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.blog-pagination .page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all .12s;
}

.blog-pagination .page-link:hover,
.blog-pagination .page-link.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius-sm);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
}

.sb-card-hd {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sb-card-hd h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sb-card-hd h4 i {
    color: var(--accent);
}

.sb-card-bd {
    padding: 14px 16px;
}

/* Stats grid */
.sb-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sb-stat-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.sb-stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.sb-stat-lbl {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

/* Contributor rows */
.sb-contributor {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px solid #f8fafc;
}

.sb-contributor:last-child {
    border-bottom: none;
}

.sb-rank {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sb-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sb-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.sb-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

.sb-pts {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

/* Online avatars */
.sb-online-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.sb-online-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #fff;
}

/* Popular tags */
.sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sb-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent);
    cursor: default;
    transition: background .12s;
}

.sb-tag:hover {
    background: #dbe8ff;
}

/* Create form panel */
#createFormPanel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--blog-shadow);
}

#createFormPanel .article-card {
    border-radius: 10px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .blog-hero {
        padding: 28px 20px 24px;
    }

    .blog-hero h1 {
        font-size: 22px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-control,
    .filter-group select {
        width: 100%;
    }

    .filter-search {
        min-width: unset;
        width: 100%;
    }
}

.bd-root {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-page);
    padding-bottom: 72px;
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.bd-crumb {
    max-width: 1320px;
    margin: 0 auto;
    padding: 22px 28px 0;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted);
}

.bd-crumb a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity .12s;
}

.bd-crumb a:hover {
    opacity: .75;
}

.bd-crumb-sep {
    color: var(--border);
    font-size: 16px;
    line-height: 1;
}

.bd-crumb-current {
    max-width: 340px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════════════════════
   HERO  — full-bleed cinematic strip
════════════════════════════════════════════════════════════════════ */
.bd-hero {
    position: relative;
    margin: 20px 28px 0;
    max-width: calc(1320px - 56px);
    margin-left: auto;
    margin-right: auto;
    border-radius: 22px;
    overflow: hidden;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
}

/* Thumb / gradient fallback */
.bd-hero-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transform: scale(1.04);
    transition: transform 8s ease;
}


.bd-hero:hover .bd-hero-thumb {
    transform: scale(1);
}

.bd-hero-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to top, rgba(10, 15, 35, .96) 0%, rgba(10, 15, 35, .55) 45%, transparent 100%),
        linear-gradient(to right, rgba(51, 104, 252, .18) 0%, transparent 60%);
}

/* No-thumb pattern background */
.bd-hero--no-thumb {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(51, 104, 252, .35) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, .25) 0%, transparent 50%),
        linear-gradient(135deg, #050d1f 0%, #0f1e47 50%, #1a1060 100%);
}

.bd-hero--no-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Decorative accent line */
.bd-hero::before {
    content: '';
    position: absolute;
    left: 44px;
    right: 44px;
    top: 0;
    height: 3px;
    z-index: 3;
    background: linear-gradient(90deg, var(--accent), #6366f1, #a78bfa, transparent);
    border-radius: 0 0 4px 4px;
    opacity: .9;
}

.bd-hero-body {
    position: relative;
    z-index: 2;
    padding: 48px 52px 44px;
}

/* Pill row */
.bd-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
}

.bd-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .12);
    transition: transform .12s;
}

.bd-pill:hover {
    transform: translateY(-1px);
}

.bd-pill--pub {
    background: rgba(16, 185, 129, .22);
    color: #86efac;
    border-color: rgba(16, 185, 129, .3);
}

.bd-pill--draft {
    background: rgba(245, 158, 11, .2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, .25);
}

.bd-pill--arc {
    background: rgba(148, 163, 184, .18);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, .2);
}

.bd-pill--type {
    background: rgba(99, 102, 241, .25);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, .3);
}

.bd-pill--tag {
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .8);
}

/* Headline */
.bd-hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(26px, 4vw, 46px);
    font-weight: 400;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 24px;
    max-width: 820px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .4);
}

/* Meta strip */
.bd-hero-meta {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.bd-hero-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.bd-hero-av {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: 2px solid rgba(255, 255, 255, .3);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(51, 104, 252, .4);
}

.bd-hero-av-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.bd-hero-av-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, .55);
    margin-top: 1px;
}

.bd-hero-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, .65);
    padding: 0 14px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.bd-hero-stat:last-child {
    border-right: none;
    padding-right: 0;
}

.bd-hero-stat i {
    font-size: 14px;
    color: rgba(255, 255, 255, .4);
}

/* ════════════════════════════════════════════════════════════════════
   CONTENT GRID
════════════════════════════════════════════════════════════════════ */
.bd-grid {
    max-width: 1320px;
    margin: 32px auto 0;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 1fr 308px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1080px) {
    .bd-grid {
        grid-template-columns: 1fr;
    }

    .bd-sidebar {
        order: -1;
    }
}

@media (max-width: 640px) {
    .bd-hero {
        margin: 16px 12px 0;
        border-radius: 14px;
    }

    .bd-hero-body {
        padding: 28px 22px 26px;
    }

    .bd-grid {
        padding: 0 12px;
        gap: 16px;
    }

    .bd-hero-meta {
        gap: 8px;
    }

    .bd-hero-author {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .bd-hero-stat {
        border-right: none;
        padding: 0 6px;
    }
}

/* ════════════════════════════════════════════════════════════════════
   ARTICLE CARD
════════════════════════════════════════════════════════════════════ */
.bd-article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
}

/* Author stripe */
.bd-author-stripe {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 28px;
    background: linear-gradient(90deg, #f8faff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.bd-author-stripe::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), #6366f1, transparent);
    opacity: .35;
}

.bda-av {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 10px rgba(51, 104, 252, .28);
    flex-shrink: 0;
    font-family: 'DM Serif Display', serif;
}

.bda-info {
    flex: 1;
    min-width: 0;
}

.bda-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.bda-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    padding: 2px 8px;
    border-radius: 99px;
}

.bda-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
    display: flex;
    gap: 10px;
}

.bda-meta i {
    margin-right: 3px;
}

/* Body */
.bd-body {
    padding: 36px 36px 28px;
}

.bd-prose {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.85;
    color: #1e293b;
    font-weight: 300;
}

.bd-prose>p:first-child::first-letter {
    font-family: 'DM Serif Display', serif;
    font-size: 64px;
    font-weight: 400;
    float: left;
    line-height: .78;
    margin: 6px 10px 0 0;
    color: var(--accent);
}

.bd-prose h1,
.bd-prose h2,
.bd-prose h3 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--text);
    margin-top: 2em;
    margin-bottom: .6em;
    line-height: 1.25;
}

.bd-prose h2 {
    font-size: 24px;
}

.bd-prose h3 {
    font-size: 20px;
}

.bd-prose p {
    margin-bottom: 1.2em;
}

.bd-prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bd-prose strong {
    font-weight: 700;
    color: var(--text);
}

.bd-prose blockquote {
    border-left: 3px solid var(--accent);
    margin: 28px 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-soft), #f0f4ff);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--sub);
    position: relative;
}

.bd-prose blockquote::before {
    content: '\201C';
    font-family: 'DM Serif Display', serif;
    font-size: 56px;
    color: var(--accent);
    opacity: .3;
    position: absolute;
    top: -8px;
    left: 12px;
    line-height: 1;
}

.bd-prose pre {
    background: #050d1f;
    color: #93c5fd;
    border-radius: 12px;
    padding: 20px 24px;
    font-size: 13px;
    overflow-x: auto;
    border: 1px solid rgba(99, 102, 241, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.bd-prose code {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .88em;
}

.bd-prose img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--blog-shadow-hover);
}

/* Footer */
.bd-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px 20px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
    background: #fafbff;
}

.bdf-ts {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bdf-actions {
    display: flex;
    gap: 8px;
}

.bdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--sub);
    cursor: pointer;
    text-decoration: none;
    transition: all .14s;
}

.bdf-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: #c7d7fd;
}

/* ════════════════════════════════════════════════════════════════════
   COMMENTS SECTION
════════════════════════════════════════════════════════════════════ */
.bd-comments {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    margin-top: 22px;
}

/* Header */
.bdc-hd {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbff;
    position: relative;
}

.bdc-hd::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), #6366f1, transparent);
    opacity: .3;
}

.bdc-hd h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bdc-hd h3 i {
    color: var(--accent);
    font-size: 18px;
}

.bdc-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 3px 9px;
    border-radius: 99px;
    border: 1px solid #c7d7fd;
}

/* Compose */
.bdc-compose {
    padding: 22px 28px;
    background: #f8fbff;
    border-bottom: 1px solid var(--border);
}

.bdc-compose-row {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.bdc-compose-av {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(51, 104, 252, .25);
}

.bdc-compose-wrap {
    flex: 1;
}

.bdc-editor {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 11px;
    padding: 12px 15px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    min-height: 88px;
    background: #fff;
    outline: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    resize: none;
    line-height: 1.65;
}

.bdc-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(51, 104, 252, .1);
}

.bdc-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.bdc-compose-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.btn-cancel-comment {
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--sub);
    cursor: pointer;
    transition: border-color .12s, color .12s;
}

.btn-cancel-comment:hover {
    border-color: var(--muted);
    color: var(--text);
}

.btn-post-comment {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #4f7afc);
    border: none;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(51, 104, 252, .3);
    transition: transform .12s, box-shadow .12s;
}

.btn-post-comment:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(51, 104, 252, .4);
}

/* Comment items */
.bdc-list {
    padding: 6px 28px 24px;
}

.bdc-item {
    display: flex;
    gap: 13px;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
    animation: fadeUp .3s ease both;
}

.bdc-item:last-child {
    border-bottom: none;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bdc-item-av {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #475569, #64748b);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bdc-item-av--author {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    box-shadow: 0 2px 8px rgba(51, 104, 252, .25);
}

.bdc-item-content {
    flex: 1;
    min-width: 0;
}

.bdc-item-hd {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.bdc-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.bdc-item-op {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    padding: 2px 7px;
    border-radius: 99px;
}

.bdc-item-time {
    font-size: 11px;
    color: var(--muted);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
}

.bdc-item-body {
    font-size: 13px;
    color: var(--sub);
    line-height: 1.7;
}

/* Disabled */
.bdc-disabled {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
}

.bdc-disabled-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #fef3c7;
    color: var(--amber);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bdc-disabled-text strong {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    display: block;
}

.bdc-disabled-text span {
    font-size: 12px;
    color: #a16207;
}

/* No comments */
.bdc-empty {
    text-align: center;
    padding: 42px 20px;
    color: var(--muted);
    font-size: 13px;
}

.bdc-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--accent);
    margin: 0 auto 12px;
}

/* ════════════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════════════ */
.bd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Author card — profile style */
.bds-author {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
}

.bds-author-banner {
    height: 72px;
    background: linear-gradient(135deg, #1e3a8a 0%, var(--accent) 50%, #6366f1 100%);
    position: relative;
}

.bds-author-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bds-author-body {
    padding: 0 18px 18px;
}

.bds-author-av {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 6px 20px rgba(51, 104, 252, .3);
    margin-top: -30px;
    margin-bottom: 12px;
}

.bds-author-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    font-family: 'DM Serif Display', serif;
    line-height: 1.2;
}

.bds-author-role {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.bds-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 14px 0;
}

.bds-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 12px;
    border-bottom: 1px solid #f8fafc;
}

.bds-stat-row:last-child {
    border-bottom: none;
}

.bds-stat-lbl {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bds-stat-lbl i {
    font-size: 13px;
}

.bds-stat-val {
    font-weight: 700;
    color: var(--text);
}

/* Generic sidebar card */
.bds-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--blog-radius-sm);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
}

.bds-card-hd {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fafbff;
    position: relative;
}

.bds-card-hd::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.bds-card-hd i {
    color: var(--accent);
    font-size: 14px;
}

.bds-card-bd {
    padding: 14px 18px;
}

/* Article info rows */
.bds-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #f8fafc;
}

.bds-info-row:last-child {
    border-bottom: none;
}

.bds-info-lbl {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bds-info-lbl i {
    font-size: 13px;
}

.bds-info-val {
    font-weight: 700;
    color: var(--text);
}

/* Related items */
.bds-related-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
}

.bds-related-item:last-child {
    border-bottom: none;
}

.bds-related-item:hover .bds-related-title {
    color: var(--accent);
}

.bds-related-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    border: 1px solid #c7d7fd;
}

.bds-related-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
    transition: color .12s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags cloud */
.bds-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.bds-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid #c7d7fd;
    transition: background .12s, transform .12s;
    cursor: default;
}

.bds-tag:hover {
    background: #dbe8ff;
    transform: translateY(-1px);
}

/* ── Scroll progress bar ──────────────────────────────────────── */
.bd-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    z-index: 9999;
    width: 0%;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(51, 104, 252, .5);
}
.pill-category {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: #6366F1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
/* blogs styles end */
  #newTopicWrapper .card {
            border: 1px solid #e5e7eb;
            border-radius: 14px;
        }

        .form-control,
        .form-select {
            border-radius: 10px;
            border: 1px solid #d1d5db;
            font-size: 13px;
            padding: 8px 10px;
            transition: all 0.2s ease;
        }

        .form-control:focus,
        .form-select:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.08);
        }

        .form-label {
            margin-bottom: 4px;
            color: #6b7280;
        }

        #pollFields,
        #uploadZone {
            border-radius: 10px;
        }

        #uploadZone:hover {
            border-color: #0d6efd !important;
            background: #f8fbff;
        }

        .close-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(0, 0, 0, .5);
            color: #fff;
            border: none;
            border-radius: 50%;
            width: 22px;
            height: 22px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .poll {
            width: 22px;
            height: 22px;
            font-size: 11px;
            flex-shrink: 0
        }

        .custom-switch {
            position: relative;
            display: inline-block;
            width: 42px;
            height: 24px;
        }

        .custom-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #d1d5db;
            transition: .3s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        /* ON state */
        .custom-switch input:checked+.slider {
            background-color: #1877f2;
        }

        .custom-switch input:checked+.slider:before {
            transform: translateX(18px);
        }


.btn-nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.btn-nav-logout:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #d1dbf5 100%);
    color: #4338ca;
    border-color: #a5b4fc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-nav-logout:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-nav-logout i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.btn-nav-logout:hover i {
    transform: translateX(-2px);
}
/* //// my profile styles */



.mp-root {
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ── HERO BANNER ──────────────────────────────────────── */
.mp-hero {
    background: linear-gradient(135deg, var(--deep) 0%, var(--deep2) 45%, var(--mid) 100%);
    position: relative;
    overflow: hidden;
    padding: 48px 0 0;
}

.mp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 80% 50%, rgba(51,104,252,0.25) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 10% 80%, rgba(147,204,230,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.mp-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

.mp-hero-top {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    padding-bottom: 28px;
}

.mp-avatar-wrap {
    flex-shrink: 0;
}

.mp-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mid) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(6,0,75,0.4);
    letter-spacing: -1px;
}

.mp-hero-info { flex: 1; min-width: 0; }

.mp-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--pill);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mp-member-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
}

.mp-name {
    font-family: var(--fd);
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 6px;
}

.mp-email {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}

.mp-meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.mp-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.mp-meta-item svg { opacity: 0.7; }

.mp-hero-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-end;
    padding-bottom: 28px;
}

.mp-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--fb);
}

.mp-btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,107,53,0.35);
}

.mp-btn-primary:hover {
    background: #e85e28;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.45);
    color: #fff;
    text-decoration: none;
}

.mp-btn-ghost {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
}

.mp-btn-ghost:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    text-decoration: none;
}

/* ── PROFILE NAV TABS ─────────────────────────────────── */
.mp-nav {
    display: flex;
    gap: 2px;
    padding: 0 28px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Fix: ensure the nav can scroll its full content width */
    width: 100%;
    box-sizing: border-box;
}

.mp-nav::-webkit-scrollbar {
    display: none;
}

.mp-nav-tab {
    flex-shrink: 0;       /* never compress */
    flex-grow: 0;         /* never expand */
    white-space: nowrap;
    display: inline-flex; /* inline-flex is safer than flex inside a scroll container */
    align-items: center;
    gap: 7px;
    padding: 13px 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    font-family: var(--fb);
    text-decoration: none;
    position: relative;
    /* Fix: explicit min-width so the tab never collapses */
    min-width: max-content;
}

.mp-nav-tab .badge {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    border-radius: var(--pill);
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
}

.mp-nav-tab:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.07);
    text-decoration: none;
}

.mp-nav-tab.active {
    background: var(--bg);
    color: var(--mid);
}

.mp-nav-tab.active .badge {
    background: var(--soft2);
    color: var(--mid);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    /* Make sure the hero section doesn't clip the nav */
    .mp-hero {
        overflow: visible;
    }

    .mp-nav {
        padding: 0 8px;
        gap: 0;
        /* Add right padding so last tab isn't flush against screen edge */
        padding-right: 16px;
    }

    .mp-nav-tab {
        padding: 11px 12px;
        font-size: 11.5px;
        gap: 5px;
    }

    .mp-nav-tab .badge {
        display: none;
    }

    .mp-nav-tab svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    /* Very small screens — tighten further */
    .mp-nav-tab {
        padding: 10px 10px;
        font-size: 11px;
    }
}
/* ── MAIN BODY ────────────────────────────────────────── */
.mp-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 28px 0;
}

/* ── STATS STRIP ──────────────────────────────────────── */
.mp-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.mp-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--sh);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mp-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--r) var(--r) 0 0;
}

.mp-stat-card.c-blue::before   { background: var(--mid); }
.mp-stat-card.c-green::before  { background: var(--green); }
.mp-stat-card.c-amber::before  { background: var(--amber); }
.mp-stat-card.c-purple::before { background: var(--purple); }
.mp-stat-card.c-teal::before   { background: var(--teal); }
.mp-stat-card.c-accent::before { background: var(--accent); }
.mp-stat-card.c-red::before    { background: var(--red); }
.mp-stat-card.c-deep::before   { background: var(--deep); }

.mp-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shh);
    border-color: var(--border2);
}

.mp-stat-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}

.mp-stat-card.c-blue   .mp-stat-icon { background: var(--soft2);   color: var(--mid); }
.mp-stat-card.c-green  .mp-stat-icon { background: var(--green-s);  color: var(--green); }
.mp-stat-card.c-amber  .mp-stat-icon { background: var(--amber-s);  color: var(--amber); }
.mp-stat-card.c-purple .mp-stat-icon { background: var(--purple-s); color: var(--purple); }
.mp-stat-card.c-teal   .mp-stat-icon { background: var(--teal-s);   color: var(--teal); }
.mp-stat-card.c-accent .mp-stat-icon { background: #fff3ee;         color: var(--accent); }
.mp-stat-card.c-red    .mp-stat-icon { background: var(--red-s);    color: var(--red); }
.mp-stat-card.c-deep   .mp-stat-icon { background: var(--soft);     color: var(--deep); }

.mp-stat-num {
    font-family: var(--fd);
    font-size: 26px;
    font-weight: 800;
    color: var(--txt);
    letter-spacing: -1px;
    line-height: 1;
}

.mp-stat-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── TAB PANELS ───────────────────────────────────────── */
.mp-panel { display: none; }
.mp-panel.active { display: block; }

/* ── SECTION HEADER ───────────────────────────────────── */
.mp-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.mp-sec-title {
    font-family: var(--fd);
    font-size: 17px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-sec-title .count {
    background: var(--soft2);
    color: var(--mid);
    border-radius: var(--pill);
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--fb);
}

/* ── POST CARDS ───────────────────────────────────────── */
.mp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.mp-post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    box-shadow: var(--sh);
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.mp-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shh);
    border-color: var(--border2);
}

.mp-post-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mp-post-title {
    font-family: var(--fd);
    font-size: 15px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    flex: 1;
}

.mp-post-title a {
    color: inherit;
    text-decoration: none;
}

.mp-post-title a:hover { color: var(--mid); }

.mp-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.mp-status-pill.published { background: var(--green-s);  color: var(--green); }
.mp-status-pill.draft     { background: var(--amber-s);  color: var(--amber); }
.mp-status-pill.archived  { background: var(--red-s);    color: var(--red); }

.mp-post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.mp-post-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mp-tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mp-tag {
    background: var(--soft);
    color: var(--mid);
    border: 1px solid var(--border);
    border-radius: var(--pill);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
}

.mp-approval-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: var(--pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.mp-approval-pill.approved  { background: var(--green-s);  color: var(--green); }
.mp-approval-pill.pending   { background: var(--amber-s);  color: var(--amber); }
.mp-approval-pill.rejected  { background: var(--red-s);    color: var(--red); }

/* ── EMPTY STATE ──────────────────────────────────────── */
.mp-empty {
    background: var(--card);
    border: 2px dashed var(--border2);
    border-radius: var(--r-lg);
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mp-empty-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--soft2);
    display: flex; align-items: center; justify-content: center;
    color: var(--mid);
    margin-bottom: 4px;
}

.mp-empty h4 {
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 700;
    color: var(--txt);
}

.mp-empty p { font-size: 13px; color: var(--muted); max-width: 280px; }

/* ── TOPICS GRID ──────────────────────────────────────── */
.mp-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.mp-topic-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: var(--sh);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.mp-topic-card:hover {
    border-color: var(--mid);
    transform: translateY(-2px);
    box-shadow: var(--shh);
    text-decoration: none;
}

.mp-topic-icon {
    width: 38px; height: 38px;
    border-radius: var(--r-sm);
    background: var(--soft2);
    display: flex; align-items: center; justify-content: center;
    color: var(--mid);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--fd);
}

.mp-topic-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--txt);
}

.mp-topic-count {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

/* ── OVERVIEW / ACTIVITY ──────────────────────────────── */
.mp-overview-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

@media (max-width: 900px) {
    .mp-overview-grid { grid-template-columns: 1fr; }
}

.mp-section-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh);
    overflow: hidden;
}

.mp-section-box-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mp-section-box-title {
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 7px;
}

.mp-activity-list { padding: 8px 0; }

.mp-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.mp-activity-item:last-child { border-bottom: none; }
.mp-activity-item:hover { background: var(--soft); }

.mp-activity-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mid) 0%, var(--accent) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.mp-activity-body { flex: 1; min-width: 0; }

.mp-activity-text {
    font-size: 13px;
    color: var(--txt2);
    line-height: 1.4;
}

.mp-activity-text strong { color: var(--txt); font-weight: 600; }

.mp-activity-time {
    font-size: 11px;
    color: var(--fade);
    margin-top: 2px;
}

.mp-activity-comment-preview {
    margin-top: 6px;
    background: var(--soft);
    border-left: 3px solid var(--border2);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 7px 10px;
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

/* ── INFO PANEL ───────────────────────────────────────── */
.mp-info-list { padding: 6px 0; }

.mp-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
}

.mp-info-row:last-child { border-bottom: none; }

.mp-info-icon {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--soft2);
    display: flex; align-items: center; justify-content: center;
    color: var(--mid);
    flex-shrink: 0;
}

.mp-info-body { flex: 1; }

.mp-info-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--fade);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 2px;
}

.mp-info-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--txt);
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
    .mp-hero-top { flex-direction: column; align-items: flex-start; }
    .mp-hero-actions { margin-left: 0; padding-bottom: 0; margin-top: 4px; }
    .mp-nav { overflow-x: auto; gap: 0; padding: 0 14px; }
    .mp-nav::-webkit-scrollbar { display: none; }
    .mp-body { padding: 18px 14px 0; }
    .mp-stats-strip { grid-template-columns: repeat(2, 1fr); }
    .mp-posts-grid { grid-template-columns: 1fr; }
    .mp-topics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── ANIMATIONS ───────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mp-stat-card { animation: fadeUp 0.4s ease both; }
.mp-stat-card:nth-child(1) { animation-delay: 0.05s; }
.mp-stat-card:nth-child(2) { animation-delay: 0.10s; }
.mp-stat-card:nth-child(3) { animation-delay: 0.15s; }
.mp-stat-card:nth-child(4) { animation-delay: 0.20s; }
.mp-stat-card:nth-child(5) { animation-delay: 0.25s; }
.mp-stat-card:nth-child(6) { animation-delay: 0.30s; }
.mp-stat-card:nth-child(7) { animation-delay: 0.35s; }
.mp-stat-card:nth-child(8) { animation-delay: 0.40s; }
/* ── Rich list (articles & blogs) ─────────────────────────────── */
.mp-rich-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mp-rich-card {
    display: flex;
    gap: 16px;
    background: var(--card, #fff);
    border: 1px solid var(--border, #e8eaf0);
    border-radius: 12px;
    padding: 14px 16px;
    transition: box-shadow .2s, border-color .2s;
}
.mp-rich-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
    border-color: var(--primary, #3368FC);
}
/* Thumbnail */
.mp-rich-thumb {
    flex-shrink: 0;
    width: 110px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.mp-rich-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mp-rich-thumb-placeholder {
    background: var(--surface, #f4f6fb);
    border: 1px dashed var(--border, #e0e3ed);
}
/* Body */
.mp-rich-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mp-rich-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.mp-rich-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #1a1d2e);
    text-decoration: none;
    line-height: 1.4;
    transition: color .15s;
}
.mp-rich-title:hover { color: var(--primary, #3368FC); }
.mp-rich-excerpt {
    font-size: 12.5px;
    color: var(--muted, #7a7f9a);
    line-height: 1.6;
}
.mp-rich-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11.5px;
    color: var(--fade, #a0a4b8);
}
.mp-rich-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

/* ── Inline status changer ─────────────────────────────────────── */
.mp-status-changer {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.mp-status-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1;
    transition: background .2s, color .2s;
}
.mp-status-select.status-draft {
    background: #fff8e1; color: #f59e0b;
}
.mp-status-select.status-published {
    background: #e6f9f0; color: #10b981;
}
.mp-status-select.status-archived {
    background: #f3f4f6; color: #6b7280;
}
.mp-status-select option { font-weight: 500; }

/* Spinner animation */
.spin-anim {
    animation: mp-spin .7s linear infinite;
    display: block;
}
@keyframes mp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .mp-rich-card { flex-direction: column; }
    .mp-rich-thumb { width: 100%; height: 160px; }
}
/* my profile styles end */
/* User dropdown */
.nav-user-dropdown {
    position: relative;
}
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background .15s;
}
.nav-user-btn:hover { background: rgba(0,0,0,.06); }

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3368FC, #93CCE6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    min-width: 160px;
    padding: 6px;
    z-index: 999;
}
.nav-user-menu.open { display: block; }

.nav-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1d2e;
    border-radius: 7px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.nav-user-item:hover { background: #f4f6fb; }
.nav-user-logout { color: #ef4444; }
.nav-user-logout:hover { background: #fef2f2; }

.nav-user-divider {
    height: 1px;
    background: #f0f2f7;
    margin: 4px 0;
}
.rt-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rt-label::after {
    content: '';
    flex: 1;
    height: 0.5px;
    background: rgba(0,0,0,0.1);
}
.rt-list { display: flex; flex-direction: column; gap: 4px; }

.rt-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 0.5px solid transparent;
    text-decoration: none;
    color: inherit;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s;
}
.rt-link:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.rt-link:hover .rt-icon-wrap { background: #CECBF6; }

.rt-icon-wrap {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.rt-icon-wrap svg { width: 14px; height: 14px; }

.rt-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rt-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 99px;
    background: rgba(0,0,0,0.05);
    color: var(--muted);
    flex-shrink: 0;
}
.rt-empty {
    font-size: 12px;
    color: var(--muted);
    padding: 12px 10px;
    text-align: center;
    border: 0.5px dashed rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* breadcrumb styles */

.td-breadcrumb {
    display: flex;
    align-items: center;
        margin-top: 40px !important;
    gap: 6px;
    font-size: 14px;
    flex-wrap: wrap;
}

.td-breadcrumb a {
    text-decoration: none;
    color: #888;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.td-breadcrumb a:hover {
    color: #111;
    border-bottom-color: #111;
}

/* Category link as badge */
.td-breadcrumb a:nth-child(3) {
    background: #e8f0fe;
    color: #1a56db;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
    border: 0.5px solid #b4caff;
}

.td-breadcrumb span:last-child {
    background: #e8f0fe;
    color: #1a56db;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
    border: 0.5px solid #b4caff;
}

.td-breadcrumb i {
    color: #bbb;
    font-size: 12px;
}
/* ///job applly */
 /* ── Detail layout ────────────────────────────────────────── */
    .jd-hero {
        background: var(--white, #fff);
        border: 0.5px solid #e2e8f0;
        border-radius: 14px;
        overflow: hidden;
        margin-bottom: 20px;
    }
    .jd-hero-band {
        background: linear-gradient(135deg, #0d6efd 0%, #3b82f6 100%);
        height: 6px;
    }
    .jd-hero-body { padding: 24px 28px 20px; }
    .jd-logo-wrap {
        width: 64px; height: 64px;
        background: #f0f4ff;
        border: 1px solid #e0e7ff;
        border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        font-size: 26px; flex-shrink: 0;
    }
    .jd-badge {
        display: inline-flex; align-items: center;
        font-size: 11px; font-weight: 600;
        padding: 3px 10px; border-radius: 20px;
        line-height: 1.8;
    }
    .jd-badge-blue   { background: #e0f2fe; color: #0369a1; }
    .jd-badge-teal   { background: #ccfbf1; color: #0f766e; }
    .jd-badge-purple { background: #ede9fe; color: #7c3aed; }
    .jd-badge-amber  { background: #fef3c7; color: #92400e; }
    .jd-badge-green  { background: #dcfce7; color: #15803d; }
    .jd-badge-gray   { background: #f1f5f9; color: #475569; }
    .jd-badge-red    { background: #fee2e2; color: #b91c1c; }

    /* ── Salary block ─────────────────────────────────────────── */
    .salary-block {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        border-radius: 10px;
        padding: 14px 18px;
    }

    /* ── Section card ─────────────────────────────────────────── */
    .jd-section {
        background: #fff;
        border: 0.5px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: 18px;
        overflow: hidden;
    }
    .jd-section-hd {
        padding: 13px 20px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px; font-weight: 600; color: #1e293b;
    }
    .jd-section-bd { padding: 18px 20px; }

    /* ── Benefits grid ────────────────────────────────────────── */
    .benefit-chip {
        display: inline-flex; align-items: center; gap: 6px;
        background: #f0fdf4; color: #15803d;
        border: 1px solid #bbf7d0; border-radius: 20px;
        padding: 4px 12px; font-size: 12px; font-weight: 500; margin: 3px;
    }
    .benefit-chip::before { content: '✓'; font-weight: 700; }

    /* ── Apply form ───────────────────────────────────────────── */
    /* ── Apply Card (restyled) ────────────────────────────────────────── */

    .apply-card {
    border: none;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
    overflow: hidden;
}
.apply-card .card-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 18px 20px;
    text-align: center;
}
.apply-card .secure-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border-radius: 30px;
    padding: 4px 12px;
    margin-bottom: 10px;
}
.apply-card .secure-badge i {
    font-size: 11px;
    color: #94a3b8;
    margin-right: 5px;
}
.apply-card .secure-badge span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #cbd5e6;
    text-transform: uppercase;
}
.apply-card h6 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: white;
    letter-spacing: -0.2px;
}
.apply-card .header-sub {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    opacity: 0.9;
}
.apply-card .card-body {
    padding: 20px 18px 18px;
    text-align: center;
}
.apply-card .icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 50%;
    margin-bottom: 10px;
}
.apply-card .icon-circle i {
    font-size: 26px;
    color: #0d6efd;
}
.apply-card .msg-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.apply-card .msg-sub {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}
.apply-card .btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.apply-card .btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0d6efd;
    color: white;
    font-weight: 500;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(13,110,253,0.2);
    letter-spacing: 0.3px;
}
.apply-card .btn-login:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}
.apply-card .btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #475569;
    font-weight: 500;
    font-size: 11px;
    padding: 7px 12px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.2s ease;
    border: 1px solid #e2e8f0;
}
.apply-card .btn-signup:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.apply-card .footer-note {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 16px;
    margin-bottom: 0;
}
    /* ── CV drop zone ─────────────────────────────────────────── */
    .cv-zone {
        border: 1.5px dashed #cbd5e1;
        border-radius: 10px;
        padding: 18px 12px;
        text-align: center;
        cursor: pointer;
        transition: border-color .15s, background .15s;
        background: #f8fafc;
    }
    .cv-zone:hover { border-color: #0d6efd; background: #eff6ff; }
    .cv-zone-icon { font-size: 24px; line-height: 1; display: block; margin-bottom: 6px; }
    .cv-zone-text { font-size: 12px; color: #64748b; }
    .cv-zone-text strong { color: #0d6efd; }
    .cv-file-info {
        display: none; align-items: center; gap: 8px;
        background: #f0fdf4; border: 1px solid #bbf7d0;
        border-radius: 8px; padding: 8px 12px; margin-top: 8px;
        font-size: 12px; color: #15803d;
    }
    .cv-file-info .cv-remove {
        margin-left: auto; cursor: pointer;
        color: #64748b; font-size: 14px;
    }
    .cv-file-info .cv-remove:hover { color: #dc2626; }

    /* ── Already applied banner ───────────────────────────────── */
    .applied-banner {
        background: #f0fdf4; border: 1px solid #bbf7d0;
        border-radius: 10px; padding: 14px 16px;
        font-size: 13px; color: #15803d;
        display: flex; align-items: center; gap: 10px;
    }

    /* ── Closing countdown ────────────────────────────────────── */
    .countdown-bar {
        background: #fef9c3; border: 1px solid #fde68a;
        border-radius: 8px; padding: 8px 14px;
        font-size: 12px; color: #92400e;
        margin-bottom: 16px;
    }
    .countdown-bar.critical { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

    /* ── Contact details ──────────────────────────────────────── */
    .contact-row {
        display: flex; align-items: flex-start; gap: 10px;
        padding: 8px 0; border-bottom: 0.5px solid #f1f5f9; font-size: 13px;
    }
    .contact-row:last-child { border-bottom: none; }
    .contact-icon { width: 28px; height: 28px; background: #f0f4ff; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .contact-icon i { font-size: 13px; color: #0d6efd; }
    .contact-label { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
    .contact-value { font-size: 13px; color: #1e293b; font-weight: 500; word-break: break-all; }

    /* ── Related jobs ─────────────────────────────────────────── */
    .related-job-row {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 0; border-bottom: 0.5px solid #f1f5f9;
        text-decoration: none; color: inherit;
        transition: background .1s;
    }
    .related-job-row:last-child { border-bottom: none; }
    .related-job-row:hover { color: #0d6efd; }
    .related-emoji { width: 34px; height: 34px; background: #f0f4ff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
    /* ── Apply Card (Application Form) ────────────────────────────────── */
.apply-card {
    background: #fff;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 80px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
}

.apply-card .apply-card-hd {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 18px 20px;
    text-align: left;
}

.apply-card .apply-card-hd h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.apply-card .apply-card-hd h6 i {
    font-size: 16px;
    color: #60a5fa;
    margin-right: 8px;
}

.apply-card .apply-card-hd p {
    margin: 6px 0 0;
    font-size: 11px;
    color: #94a3b8;
    opacity: 0.9;
}

.apply-card .apply-card-bd {
    padding: 20px;
}

/* Form labels */
.apply-card .apply-form-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 6px;
    display: block;
}

/* Form controls */
.apply-card .form-control-sm {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.apply-card .form-control-sm:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
    outline: none;
}

.apply-card .form-control-sm.is-invalid {
    border-color: #dc2626;
    background-image: none;
}

.apply-card .invalid-feedback {
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
}

/* CV Upload Zone */
.apply-card .cv-zone {
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #f8fafc;
}

.apply-card .cv-zone:hover {
    border-color: #0d6efd;
    background: #eff6ff;
}

.apply-card .cv-zone-icon {
    font-size: 28px;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.apply-card .cv-zone-text {
    font-size: 12px;
    color: #64748b;
}

.apply-card .cv-zone-text strong {
    color: #0d6efd;
    font-weight: 600;
}

/* CV File info strip */
.apply-card .cv-file-info {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 12px;
    color: #15803d;
}

.apply-card .cv-file-info .cv-remove {
    margin-left: auto;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s;
}

.apply-card .cv-file-info .cv-remove:hover {
    color: #dc2626;
}

/* Checkbox styling */
.apply-card .form-check {
    padding-left: 1.6em;
}

.apply-card .form-check-input {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    border: 1.5px solid #cbd5e1;
    border-radius: 3px;
    cursor: pointer;
}

.apply-card .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.apply-card .form-check-label {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.apply-card .form-check-label a {
    color: #0d6efd;
    text-decoration: none;
}

.apply-card .form-check-label a:hover {
    text-decoration: underline;
}

/* Submit button */
.apply-card .btn-primary {
    background: #0d6efd;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.apply-card .btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.25);
}

.apply-card .btn-primary:active {
    transform: translateY(0);
}

/* Loading state */
.apply-card .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success state */
.apply-card .success-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.apply-card .success-icon i {
    font-size: 24px;
    color: #15803d;
}

.apply-card .success-title {
    font-size: 15px;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 6px;
}

.apply-card .success-text {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 16px;
}

.apply-card .btn-outline-primary {
    background: transparent;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 30px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.apply-card .btn-outline-primary:hover {
    background: #0d6efd;
    color: #fff;
}
/* ── CV File Info Display ── */
.apply-card .cv-file-info {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 12px;
    color: #15803d;
}

.apply-card .cv-file-info .cv-remove {
    margin-left: auto;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.15s;
    background: none;
    border: none;
    padding: 0 4px;
}

.apply-card .cv-file-info .cv-remove:hover {
    color: #dc2626;
}
.job-desc-preview {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 8px;
}

.job-meta-item i {
    margin-right: 4px;
    font-size: 13px;
}

.job-salary i {
    margin-right: 4px;
    font-size: 14px;
}

.job-new-badge i {
    margin-right: 4px;
    font-size: 10px;
}

.btn-apply i {
    margin-right: 6px;
    font-size: 13px;
}


/* library style */

.lib-filter-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.lf-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    transition: border-color .13s, box-shadow .13s, background .1s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lf-card:hover {
    border-color: #bfdbfe;
    background: #fafcff;
    box-shadow: 0 3px 12px rgba(59, 130, 246, .07);
    text-decoration: none;
}

.lf-card:hover .lf-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Avatar / thumbnail */
.lf-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    overflow: hidden;
}

.lf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 9px;
}

/* Text area */
.lf-body {
    flex-grow: 1;
    min-width: 0;
}

.lf-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.lf-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.lf-type-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .05em;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.7;
    text-transform: uppercase;
    flex-shrink: 0;
}

.lf-size {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.lf-access {
    font-size: 9px;
    font-weight: 600;
    border-radius: 20px;
    padding: 1px 7px;
    line-height: 1.7;
    flex-shrink: 0;
}

/* Arrow hint */
.lf-arrow {
    font-size: 14px;
    color: #cbd5e1;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .13s, transform .13s;
}

/* ── Section head ──────────────────────────────────────────── */
.lib-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.lib-section-head .icon-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}

.lib-section-head .head-text {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.lib-section-head .head-sub {
    font-size: 11px;
    color: #94a3b8;
}

.lib-section-head .head-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    padding: 2px 9px;
    line-height: 1.8;
}

/* ── Empty ─────────────────────────────────────────────────── */
.lib-empty {
    text-align: center;
    padding: 52px 20px;
    border: 1px dashed #e2e8f0;
    border-radius: 14px;
    background: #fafbfc;
}

/* ── Sidebar nav ───────────────────────────────────────────── */
.sb-nav-item {
    border-bottom: 1px solid #f1f5f9;
}

.sb-nav-item:last-child {
    border-bottom: none;
}

.sb-nav-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 8px;
    text-decoration: none;
    transition: opacity .12s;
}

.sb-nav-btn:hover {
    opacity: .75;
    text-decoration: none;
}

.sb-nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    flex-grow: 1;
    min-width: 0;
}

.sb-nav-label i {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.sb-nav-btn.is-active .sb-nav-label {
    color: #0d6efd;
    font-weight: 600;
}

.sb-nav-btn.is-active .sb-nav-arrow {
    transform: rotate(90deg);
    color: #0d6efd;
}

.sb-nav-count {
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    padding: 1px 8px;
    line-height: 1.8;
    flex-shrink: 0;
}

.sb-nav-btn.is-active .sb-nav-count {
    background: #e0f2fe;
    color: #0369a1;
}

.sb-nav-arrow {
    font-size: 11px;
    color: #d1d5db;
    flex-shrink: 0;
    transition: transform .18s, color .12s;
}

.sb-edition-list {
    display: none;
    padding: 0 0 6px 24px;
}

.sb-edition-list.open {
    display: block;
}

.sb-edt-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 5px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #6b7280;
    gap: 6px;
    text-align: left;
    text-decoration: none;
    transition: color .12s;
}

.sb-edt-btn:hover {
    color: #0d6efd;
    text-decoration: none;
}

.sb-edt-btn.is-active {
    color: #0d6efd;
    font-weight: 600;
}

.sb-edt-count {
    font-size: 10px;
    font-weight: 600;
    background: #f1f5f9;
    color: #94a3b8;
    border-radius: 20px;
    padding: 1px 7px;
    line-height: 1.8;
    flex-shrink: 0;
}

.sb-edt-btn.is-active .sb-edt-count {
    background: #e0f2fe;
    color: #0369a1;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.stat-row:last-child {
    border-bottom: none;
}

.active-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    padding: 3px 10px;
}

.active-filter-pill a {
    color: #0369a1;
    text-decoration: none;
}

.active-filter-pill a:hover {
    color: #b91c1c;
}

/* library file */
/* ── Hero card ─────────────────────────────────────────────── */
.fp-hero {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.fp-hero-thumb {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}

.fp-hero-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f2fd 0%, #d6d5df 100%);
}

.fp-hero-body {
    padding: 22px 24px 20px;
}

/* ── File type icon large ──────────────────────────────────── */
.fp-type-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

/* ── Title ─────────────────────────────────────────────────── */
.fp-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
}

/* ── Meta pills row ────────────────────────────────────────── */
.fp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 10px;
    line-height: 1.8;
}

.fp-pill i {
    font-size: 12px;
}

/* ── Download button ───────────────────────────────────────── */
.fp-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: background .14s, transform .1s;
}

.fp-dl-btn:hover {
    background: #0b5ed7;
    color: #fff;
    transform: translateY(-1px);
}

.fp-dl-btn:active {
    transform: translateY(0);
}

.fp-dl-btn.loading {
    opacity: .7;
    pointer-events: none;
}

.fp-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    background: #f8fafc;
    color: #374151;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s;
}

.fp-preview-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ── Info table ────────────────────────────────────────────── */
.fp-info-table {
    width: 100%;
    border-collapse: collapse;
}

.fp-info-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.fp-info-table tr:last-child {
    border-bottom: none;
}

.fp-info-table td {
    padding: 9px 0;
    font-size: 12px;
    vertical-align: top;
}

.fp-info-table td:first-child {
    color: #94a3b8;
    font-weight: 500;
    width: 110px;
    padding-right: 12px;
    white-space: nowrap;
}

.fp-info-table td:last-child {
    color: #0f172a;
    font-weight: 500;
}

/* ── Description card ──────────────────────────────────────── */
.fp-desc-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 20px;
}

.fp-desc-card .card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin-bottom: 10px;
}

.fp-desc-card p {
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

/* ── Related files ─────────────────────────────────────────── */
.rel-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .13s, box-shadow .13s;
}

.rel-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 2px 10px rgba(59, 130, 246, .06);
    text-decoration: none;
}

.rel-card:hover .rel-arrow {
    opacity: 1;
    transform: translateX(0);
}

.rel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    overflow: hidden;
}

.rel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.rel-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rel-meta {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.rel-arrow {
    font-size: 14px;
    color: #cbd5e1;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .13s, transform .13s;
    margin-left: auto;
}

/* ── Sidebar stat rows ─────────────────────────────────────── */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.stat-row:last-child {
    border-bottom: none;
}

/* ── Download counter badge ────────────────────────────────── */
.dl-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 3px 10px;
}
/* Rating widget */
.fp-rating-wrap { border-top: 1px solid #f1f5f9; padding-top: 12px; }
.fp-rating-avg  { font-size: 22px; font-weight: 600; color: #1e293b; line-height: 1; }
.fp-rating-count{ font-size: 12px; color: #6b7280; }
.fp-stars-display { display: flex; gap: 2px; }
.fp-rate-prompt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; min-height: 36px; }

/* Static star display */
.star-static { display: flex; gap: 3px; }

/* Edit button */
.rw-edit-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; padding: 4px 10px;
    border-radius: 6px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #6b7280;
    cursor: pointer; transition: background .15s, color .15s;
}
.rw-edit-btn:hover { background: #f1f5f9; color: #374151; }

/* Interactive star input */
.fp-stars-input { display: flex; gap: 2px; }
.star-btn {
    background: none; border: none; padding: 2px;
    cursor: pointer; font-size: 22px; color: #d1d5db;
    transition: color .12s, transform .1s; line-height: 1;
}
.star-btn.hover, .star-btn.active { color: #f59e0b; }
.star-btn.hover { transform: scale(1.12); }

/* Action buttons */
.rw-save-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; padding: 4px 12px; font-weight: 600;
    border-radius: 6px; border: 1px solid #bfdbfe;
    background: #eff6ff; color: #1d4ed8;
    cursor: pointer; transition: opacity .15s;
}
.rw-save-btn:disabled { opacity: .45; cursor: default; }
.rw-cancel-btn {
    display: inline-flex; align-items: center;
    font-size: 12px; padding: 4px 10px;
    border-radius: 6px; border: 1px solid #e2e8f0;
    background: none; color: #6b7280; cursor: pointer;
}
.rw-cancel-btn:hover { background: #f8fafc; }
.wb-hero {
    background: linear-gradient(135deg, var(--deep) 0%, var(--deep2) 55%, var(--mid2) 100%);
    padding: 40px 0 56px;
    position: relative;
    overflow: visible; /* Changed from 'hidden' to 'visible' */
    margin-bottom: -28px;
    z-index: 1;
}
.wb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='500' cy='100' r='260' fill='rgba(147,204,230,0.06)'/%3E%3Ccircle cx='100' cy='500' r='200' fill='rgba(51,104,252,0.07)'/%3E%3C/svg%3E") no-repeat center/cover;
    pointer-events: none; /* Ensure pseudo-element doesn't block interactions */
    z-index: -1;
}
.dropdown-menu {
    z-index: 1050;
}
.dropdown {
    position: relative;
    z-index: 10;
}
.wb-hero {
    margin-bottom: 0;
    padding-bottom: 40px;
}
    .wb-hero::before {
        content: '';
        position: absolute; inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='500' cy='100' r='260' fill='rgba(147,204,230,0.06)'/%3E%3Ccircle cx='100' cy='500' r='200' fill='rgba(51,104,252,0.07)'/%3E%3C/svg%3E") no-repeat center/cover;
    }
    .wb-hero-inner { position: relative; }
    .wb-hero h1 {
        font-family: var(--fd); font-size: 2rem; font-weight: 800;
        color: #fff; letter-spacing: -0.5px; margin-bottom: 6px;
    }
    .wb-hero p { color: rgba(255,255,255,.65); font-size: 14px; margin: 0; }

    /* ── Tag pills (filter row) ──────────────────────── */
    .tag-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
    .tag-pill-btn {
        border: 1.5px solid var(--border2);
        background: var(--card); color: var(--txt2);
        border-radius: var(--pill); padding: 5px 14px;
        font-size: 12px; font-weight: 500; cursor: pointer;
        transition: all .2s; font-family: var(--fb);
    }
    .tag-pill-btn:hover, .tag-pill-btn.active {
        background: var(--mid); color: #fff; border-color: var(--mid);
        box-shadow: 0 4px 12px rgba(51,104,252,.25);
    }

    /* ── Sort tabs ───────────────────────────────────── */
    .sort-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--border2); }
    .sort-tab {
        padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--muted);
        text-decoration: none; border-bottom: 2px solid transparent;
        margin-bottom: -2px; transition: color .2s, border-color .2s;
    }
    .sort-tab.active, .sort-tab:hover { color: var(--mid); border-bottom-color: var(--mid); }

    /* ── Webinar Card ────────────────────────────────── */
    .wb-card {
        background: var(--card); border-radius: var(--r-lg);
        border: 1.5px solid var(--border);
        box-shadow: var(--sh);
        margin-bottom: 18px;
        transition: transform .25s, box-shadow .25s, border-color .25s;
        overflow: hidden;
    }
    .wb-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shh);
        border-color: var(--border2);
    }
    .wb-card-body { padding: 22px 24px; }

    /* Host thumb */
    .wb-host-thumb {
        width: 56px; height: 56px; border-radius: var(--r-sm); flex-shrink: 0;
        object-fit: cover;
        border: 2px solid var(--border2);
    }
    .wb-host-thumb-placeholder {
        width: 56px; height: 56px; border-radius: var(--r-sm); flex-shrink: 0;
        background: linear-gradient(135deg, var(--soft), var(--soft2));
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; color: var(--mid); border: 2px solid var(--border2);
    }

    /* Badges */
    .wb-badge {
        display: inline-flex; align-items: center; gap: 4px;
        padding: 3px 10px; border-radius: var(--pill);
        font-size: 11px; font-weight: 600; letter-spacing: .2px;
    }
    .wb-badge-premium { background: var(--amber-s); color: #92400e; }
    .wb-badge-free    { background: var(--green-s); color: #065f46; }
    .wb-badge-online  { background: #dbeafe; color: #1e40af; }
    .wb-badge-offline { background: #fed7aa; color: #7c2d12; }
    .wb-badge-upcoming{ background: var(--green-s); color: #065f46; }
    .wb-badge-ongoing { background: var(--red-s); color: #991b1b; }
    .wb-badge-ended   { background: #f1f5f9; color: var(--muted); }

    /* Title */
    .wb-card-title {
        font-family: var(--fd); font-size: 16px; font-weight: 700;
        color: var(--txt); text-decoration: none; line-height: 1.35;
        display: block; margin-bottom: 8px;
        transition: color .2s;
    }
    .wb-card-title:hover { color: var(--mid); }

    /* Tag chips inline */
    .tag-chip {
        background: var(--soft); color: var(--mid); border-radius: var(--pill);
        padding: 2px 9px; font-size: 11px; font-weight: 500;
    }

    /* Meta row */
    .wb-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
    .wb-meta span { display: flex; align-items: center; gap: 5px; }

    /* Price block */
    .wb-price-block { text-align: right; }
    .wb-price-free {
        font-family: var(--fd); font-size: 18px; font-weight: 800;
        color: var(--green);
    }
    .wb-price-paid {
        font-family: var(--fd); font-size: 18px; font-weight: 800;
        color: var(--mid);
    }
    .wb-price-currency { font-size: 12px; font-weight: 500; color: var(--muted); }

    /* Register button */
    .btn-wb-register {
        background: linear-gradient(135deg, var(--mid), var(--mid2));
        color: #fff; border: none; border-radius: var(--pill);
        padding: 8px 18px; font-size: 13px; font-weight: 600;
        cursor: pointer; transition: opacity .2s, transform .15s, box-shadow .2s;
        display: inline-flex; align-items: center; gap: 6px;
        text-decoration: none; white-space: nowrap;
        box-shadow: 0 4px 14px rgba(51,104,252,.3);
        font-family: var(--fb);
    }
    .btn-wb-register:hover {
        opacity: .92; transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(51,104,252,.4);
        color: #fff;
    }

    /* Separator in action col */
    .wb-stats { font-size: 11.5px; color: var(--fade); text-align: right; margin-bottom: 8px; }

    /* ── Sidebar ─────────────────────────────────────── */
    .sidebar-widget {
        background: var(--card); border-radius: var(--r-lg);
        border: 1.5px solid var(--border);
        box-shadow: var(--sh); overflow: hidden; margin-bottom: 20px;
    }
    .sidebar-widget-hd {
        padding: 16px 20px; border-bottom: 1px solid var(--border);
        font-family: var(--fd); font-size: 14px; font-weight: 700; color: var(--txt);
        display: flex; align-items: center; gap: 8px;
    }
    .sidebar-widget-hd i { color: var(--mid); font-size: 16px; }
    .sidebar-widget-body { padding: 16px 20px; }

    /* Search in sidebar */
    .wb-search-wrap { position: relative; }
    .wb-search-wrap i {
        position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
        color: var(--fade); font-size: 13px; pointer-events: none;
    }
    .wb-search-wrap input {
        width: 100%; border: 1.5px solid var(--border2);
        border-radius: var(--pill); padding: 9px 14px 9px 36px;
        font-family: var(--fb); font-size: 13px; color: var(--txt);
        background: var(--soft); outline: none;
        transition: border-color .2s, box-shadow .2s;
    }
    .wb-search-wrap input:focus {
        border-color: var(--mid); box-shadow: 0 0 0 3px rgba(51,104,252,.1);
        background: #fff;
    }
    .wb-search-wrap input::placeholder { color: var(--fade); }

    /* Countdown */
    .countdown-strip {
        display: flex; gap: 8px; justify-content: center;
        background: var(--soft); border-radius: var(--r-sm);
        padding: 14px; margin-bottom: 14px;
    }
    .cd-unit { text-align: center; }
    .cd-num {
        font-family: var(--fd); font-size: 22px; font-weight: 800;
        color: var(--mid); line-height: 1; display: block;
    }
    .cd-sep {
        font-family: var(--fd); font-size: 22px; font-weight: 800;
        color: var(--mid); padding-top: 2px; opacity: .5;
    }
    .cd-lbl { font-size: 10px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }

    /* Sidebar upcoming item */
    .upcoming-row {
        display: flex; justify-content: space-between; align-items: flex-start;
        padding: 12px 0; gap: 10px;
    }
    .upcoming-row:not(:last-child) { border-bottom: 1px solid var(--border); }
    .upcoming-row-title {
        font-size: 13px; font-weight: 600; color: var(--txt);
        line-height: 1.35; margin-bottom: 4px;
    }
    .upcoming-row-date { font-size: 11.5px; color: var(--muted); }

    /* Filter dropdown btn */
    .btn-filter-dd {
        background: var(--card); border: 1.5px solid var(--border2);
        color: var(--txt2); border-radius: var(--pill);
        padding: 7px 16px; font-size: 13px; font-weight: 600;
        display: inline-flex; align-items: center; gap: 6px;
        cursor: pointer; transition: border-color .2s;
    }
    .btn-filter-dd:hover { border-color: var(--mid); color: var(--mid); }

    /* ── Empty state ─────────────────────────────────── */
    .wb-empty {
        text-align: center; padding: 48px 24px;
        background: var(--card); border-radius: var(--r-lg);
        border: 1.5px dashed var(--border2);
    }
    .wb-empty i { font-size: 36px; color: var(--fade); display: block; margin-bottom: 12px; }
    .wb-empty p { color: var(--muted); margin: 0; }

    /* ── Responsive ──────────────────────────────────── */
    @media (max-width: 768px) {
        .wb-hero { padding: 28px 0 44px; }
        .wb-hero h1 { font-size: 1.5rem; }
        .wb-card-body { padding: 16px; }
        .wb-price-block { text-align: left; margin-top: 12px; }
        .wb-action-col { display: flex; gap: 12px; align-items: center; }
    }
    .btn-recorded-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background:linear-gradient(135deg, #667eea 0%, #1f35a7 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-recorded-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-recorded-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-recorded-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}
/* ////// Webinar library - new design */
 .wb-detail-hero {
        background: linear-gradient(140deg, var(--deep) 0%, var(--deep2) 55%, var(--mid2) 100%);
        padding: 36px 0 60px;
        position: relative; overflow: hidden;
        margin-bottom: -32px;
    }
    .wb-detail-hero::before {
        content: '';
        position: absolute; inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='700' height='500' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='620' cy='80' r='280' fill='rgba(147,204,230,0.06)'/%3E%3Ccircle cx='80' cy='450' r='220' fill='rgba(51,104,252,0.07)'/%3E%3C/svg%3E") no-repeat center/cover;
    }
    .wb-detail-hero-inner { position: relative; }

    .back-link {
        display: inline-flex; align-items: center; gap: 6px;
        color: rgba(255,255,255,.65); font-size: 13px;
        text-decoration: none; margin-bottom: 20px;
        transition: color .2s;
    }
    .back-link:hover { color: #fff; }

    /* ── Badges ──────────────────────────────────────── */
    .wb-badge {
        display: inline-flex; align-items: center; gap: 4px;
        padding: 4px 12px; border-radius: var(--pill);
        font-size: 11.5px; font-weight: 600;
    }
    .wb-badge-premium { background: var(--amber-s); color: #92400e; }
    .wb-badge-free    { background: var(--green-s); color: #065f46; }
    .wb-badge-online  { background: #dbeafe; color: #1e40af; }
    .wb-badge-offline { background: #fed7aa; color: #7c2d12; }
    .wb-badge-upcoming{ background: var(--green-s); color: #065f46; }
    .wb-badge-on-hero { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(4px); }

    /* ── Cards / containers ──────────────────────────── */
    .wb-card {
        background: var(--card); border-radius: var(--r-lg);
        border: 1.5px solid var(--border);
        box-shadow: var(--sh); overflow: hidden;
        margin-bottom: 20px;
    }
    .wb-card-hd {
        padding: 18px 24px; border-bottom: 1px solid var(--border);
        font-family: var(--fd); font-size: 14px; font-weight: 700; color: var(--txt);
        display: flex; align-items: center; gap: 8px;
    }
    .wb-card-hd i { color: var(--mid); }
    .wb-card-body { padding: 22px 24px; }

    /* ── Host sidebar card ───────────────────────────── */
    .host-card {
        background: var(--card); border-radius: var(--r-lg);
        border: 1.5px solid var(--border); box-shadow: var(--sh);
        overflow: hidden; margin-bottom: 20px;
        position: sticky; top: 20px;
    }
    .host-card-banner {
        height: 72px;
        background: linear-gradient(135deg, var(--deep) 0%, var(--mid) 100%);
    }
    .host-card-body { padding: 0 24px 24px; text-align: center; }
    .host-avatar-wrap {
        margin-top: -44px; margin-bottom: 12px;
        display: flex; justify-content: center;
    }
    .host-avatar-img {
        width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
        border: 4px solid var(--card);
        box-shadow: 0 4px 20px rgba(51,104,252,.2);
    }
    .host-avatar-placeholder {
        width: 88px; height: 88px; border-radius: 50%;
        background: linear-gradient(135deg, var(--deep), var(--mid));
        display: flex; align-items: center; justify-content: center;
        border: 4px solid var(--card);
        box-shadow: 0 4px 20px rgba(51,104,252,.2);
        font-size: 32px; color: #fff;
    }
    .host-name {
        font-family: var(--fd); font-size: 17px; font-weight: 700;
        color: var(--txt); margin-bottom: 2px;
    }
    .host-designation { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
    .host-company { font-size: 12px; color: var(--muted); }
    .host-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
    .host-bio { font-size: 13px; color: var(--txt2); line-height: 1.65; text-align: left; }

    /* Host contact */
    .contact-row {
        display: flex; align-items: center; gap: 8px;
        font-size: 12.5px; color: var(--muted); margin-bottom: 6px;
    }
    .contact-row i { color: var(--mid); width: 14px; }
    .contact-row a { color: var(--muted); text-decoration: none; }
    .contact-row a:hover { color: var(--mid); }

    /* ── Detail grid cards ───────────────────────────── */
    .detail-tile {
        background: var(--soft); border-radius: var(--r-sm);
        padding: 16px; display: flex; gap: 14px; align-items: flex-start;
        transition: box-shadow .2s, transform .2s;
        height: 100%;
    }
    .detail-tile:hover { box-shadow: var(--sh); transform: translateY(-2px); }
    .detail-tile-icon {
        width: 46px; height: 46px; border-radius: var(--r-sm);
        background: var(--card); flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 8px rgba(51,104,252,.1);
    }
    .detail-tile-icon i { font-size: 18px; color: var(--mid); }
    .detail-tile-title {
        font-size: 11px; font-weight: 700; color: var(--muted);
        text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px;
    }
    .detail-tile-val {
        font-size: 14px; font-weight: 600; color: var(--txt); line-height: 1.4;
    }
    .detail-tile-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

    /* Progress bar */
    .wb-progress { height: 4px; background: var(--border2); border-radius: 99px; margin-top: 8px; }
    .wb-progress-bar {
        height: 100%; background: linear-gradient(90deg, var(--mid), var(--teal));
        border-radius: 99px; transition: width .5s ease;
    }

    /* ── Description content ─────────────────────────── */
    .wb-description {
        font-size: 14.5px; line-height: 1.8; color: var(--txt2);
    }
    .wb-description p { margin-bottom: 1rem; }
    .wb-description ul, .wb-description ol { padding-left: 1.5rem; margin-bottom: 1rem; }
    .wb-description img { max-width: 100%; border-radius: var(--r-sm); }

    /* ── Sticky register bar ─────────────────────────── */
    .register-bar {
        position: sticky; bottom: 16px; z-index: 200;
        background: var(--card); border: 1.5px solid var(--border2);
        border-radius: var(--r-lg); box-shadow: var(--sh-deep);
        padding: 18px 24px; backdrop-filter: blur(12px);
    }
    .price-big {
        font-family: var(--fd); font-size: 26px; font-weight: 800;
        color: var(--mid); line-height: 1;
    }
    .price-big-free { color: var(--green); }
    .price-unit { font-size: 12px; color: var(--muted); }

    .btn-register-lg {
        background: linear-gradient(135deg, var(--mid), var(--deep2));
        color: #fff; border: none; border-radius: var(--pill);
        padding: 12px 28px; font-size: 15px; font-weight: 700;
        font-family: var(--fd); cursor: pointer; white-space: nowrap;
        display: inline-flex; align-items: center; gap: 8px;
        transition: opacity .2s, transform .15s, box-shadow .2s;
        box-shadow: 0 6px 20px rgba(51,104,252,.35);
        text-decoration: none;
    }
    .btn-register-lg:hover {
        opacity: .92; color: #fff; transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(51,104,252,.45);
    }
    .btn-register-lg.cart {
        background: linear-gradient(135deg, var(--green), #059669);
        box-shadow: 0 6px 20px rgba(16,185,129,.3);
    }
    .btn-register-lg.cart:hover { box-shadow: 0 10px 30px rgba(16,185,129,.4); }

    /* Seats badge */
    .seats-avail {
        font-size: 12px; font-weight: 600;
        padding: 4px 10px; border-radius: var(--pill);
    }
    .seats-avail.ok   { background: var(--green-s); color: #065f46; }
    .seats-avail.warn { background: var(--red-s);   color: #991b1b; }

    /* ── Toast ───────────────────────────────────────── */
    .cart-toast {
        position: fixed; bottom: 90px; right: 20px; z-index: 1100;
        background: var(--card); border: 1.5px solid var(--border2);
        border-radius: var(--r); box-shadow: var(--shh);
        padding: 14px 18px; min-width: 280px;
        display: none; align-items: center; gap: 12px;
    }
    .cart-toast.show { display: flex; animation: slideUp .3s ease; }
    @keyframes slideUp {
        from { opacity: 0; transform: translateY(12px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .cart-toast i { font-size: 20px; color: var(--green); }
    .cart-toast strong { display: block; font-size: 13px; color: var(--txt); }
    .cart-toast span   { font-size: 12px; color: var(--muted); }

    /* ── Responsive ──────────────────────────────────── */
    @media (max-width: 768px) {
        .wb-detail-hero { padding: 24px 0 48px; }
        .host-card { position: relative; top: 0; }
        .register-bar { border-radius: var(--r); }
        .price-big { font-size: 20px; }
    }
/* /// member notifications styles */
/* ── Notification Bell ─────────────────────────────── */
.notif-bell-wrap {
    position: relative;
}

.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--soft2);
    border: 1.5px solid var(--border2);
    color: var(--txt);
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    flex-shrink: 0;
}

.notif-bell-btn:hover {
    background: var(--soft);
    border-color: var(--mid);
    transform: translateY(-1px);
}

.notif-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--card, #fff);
    animation: bellPop .4s cubic-bezier(.34,1.56,.64,1);
    line-height: 1;
}

@keyframes bellPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.notif-bell-icon {
    animation: none;
    transition: animation .2s;
}

.notif-bell-btn.has-unread .notif-bell-icon {
    animation: bellShake 2.5s ease-in-out infinite;
}

@keyframes bellShake {
    0%, 85%, 100% { transform: rotate(0); }
    88% { transform: rotate(-15deg); }
    92% { transform: rotate(12deg); }
    95% { transform: rotate(-8deg); }
    98% { transform: rotate(5deg); }
}

/* ── Notification Dropdown ───────────────────────────── */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: var(--card, #fff);
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.13), 0 4px 16px rgba(0,0,0,.07);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.notif-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.notif-dd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    gap: 10px;
}

.notif-dd-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 7px;
}

.notif-dd-unread-chip {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 50px;
}

.notif-mark-all-btn {
    font-size: 11px;
    font-weight: 600;
    color: var(--mid);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
    white-space: nowrap;
}

.notif-mark-all-btn:hover {
    background: var(--soft2);
}

.notif-dd-list {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notif-dd-list::-webkit-scrollbar { width: 4px; }
.notif-dd-list::-webkit-scrollbar-track { background: transparent; }
.notif-dd-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.notif-item {
    display: flex;
    gap: 11px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #f3f4f6);
    cursor: pointer;
    transition: background .15s;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover { background: var(--soft, #f8fafc); }

.notif-item.unread {
    background: color-mix(in srgb, var(--mid, #3368fc) 5%, transparent);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--mid, #3368fc);
    border-radius: 0 3px 3px 0;
}

.notif-icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.notif-icon-info    { background: #dbeafe; color: #1e40af; }
.notif-icon-success { background: #dcfce7; color: #166534; }
.notif-icon-warning { background: #fef3c7; color: #92400e; }
.notif-icon-danger  { background: #fee2e2; color: #991b1b; }
.notif-icon-message { background: #ede9fe; color: #5b21b6; }
.notif-icon-job     { background: #e0f2fe; color: #075985; }
.notif-icon-article { background: #f0fdf4; color: #166534; }
.notif-icon-forum   { background: #fdf4ff; color: #7e22ce; }
.notif-icon-system  { background: #f1f5f9; color: #475569; }

.notif-body { flex: 1; min-width: 0; }

.notif-subject {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-desc {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 10.5px;
    color: var(--muted);
    opacity: .7;
}

.notif-dd-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border, #e5e7eb);
    text-align: center;
}

.notif-view-all-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--mid);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: background .15s;
    width: 100%;
}

.notif-view-all-btn:hover { background: var(--soft2); }

.notif-dd-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.notif-dd-loading {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Messages Panel (full tab) ───────────────────────── */
.notif-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 12px);
    overflow: hidden;
}

.notif-panel-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #f3f4f6);
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.notif-panel-item:last-child { border-bottom: none; }
.notif-panel-item:hover { background: var(--soft, #f8fafc); }

.notif-panel-item.unread {
    background: color-mix(in srgb, var(--mid, #3368fc) 4%, transparent);
}

.notif-panel-item.unread::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--mid, #3368fc);
}

.notif-panel-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.notif-panel-body { flex: 1; min-width: 0; }

.notif-panel-subject {
    font-size: 14px;
    font-weight: 700;
    color: var(--txt);
    margin-bottom: 4px;
    line-height: 1.3;
}

.notif-panel-desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.notif-panel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notif-panel-time {
    font-size: 11px;
    color: var(--muted);
    opacity: .75;
}

.notif-type-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: capitalize;
}

.chip-info    { background: #dbeafe; color: #1e40af; }
.chip-success { background: #dcfce7; color: #166534; }
.chip-warning { background: #fef3c7; color: #92400e; }
.chip-danger  { background: #fee2e2; color: #991b1b; }
.chip-message { background: #ede9fe; color: #5b21b6; }
.chip-job     { background: #e0f2fe; color: #075985; }
.chip-article { background: #f0fdf4; color: #166534; }
.chip-forum   { background: #fdf4ff; color: #7e22ce; }
.chip-system  { background: #f1f5f9; color: #475569; }

.notif-panel-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mid, #3368fc);
    flex-shrink: 0;
    margin-left: auto;
}

.notif-panel-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.notif-filter-btn {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--border2);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
}

.notif-filter-btn.active,
.notif-filter-btn:hover {
    background: var(--mid);
    color: #fff;
    border-color: var(--mid);
}
.upgrade-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.upgrade-lock i {
    font-size: 0.75rem;
    color: #94a3b8;
}

.upgrade-lock:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.upgrade-lock:hover i {
    color: #3b82f6;
}
