:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --sidebar-bg: #06065c;
    --border: #ebebeb;
    --border-subtle: #f3f3f3;
    --text-1: #111111;
    --text-2: #444444;
    --text-3: #717171;
    --accent: #06065c;
    --accent-soft: #f0f0f8;
    --brand-blue: #06065c;
    --brand-blue-light: #0d0d7a;
    --brand-blue-soft: #f0f0f8;
    --brand-red: #ed1c24;
    --brand-red-soft: #fef0f0;
    --blue: #06065c;
    --blue-soft: #f0f0f8;
    --green: #16a34a;
    --green-soft: #f0fdf4;
    --amber: #d97706;
    --amber-soft: #fffbeb;
    --red: #ed1c24;
    --red-soft: #fef0f0;
    --purple: #7c3aed;
    --purple-soft: #f5f3ff;
    --r: 10px;
    --sidebar-w: 220px;
    --header-h: 56px;
    --transition: 0.15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================
   TOGGLE SWITCH
   ============================ */
.toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 20px;
    transition: all var(--transition);
}

.toggle .slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all var(--transition);
}

.toggle input:checked + .slider {
    background: var(--green);
}

.toggle input:checked + .slider::before {
    transform: translateX(16px);
}

.toggle.toggle--field {
    margin-top: 8px;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 18px 20px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo img { height: 28px; }
.sidebar-logo span { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; color: var(--text-1); }

.sidebar-nav { flex: 1; padding: 0 10px; }

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    padding: 20px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    transition: all var(--transition);
    position: relative;
    margin-bottom: 1px;
}

.nav-item:hover { background: var(--brand-blue-soft); color: var(--brand-blue); }

.nav-item.active {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
    font-weight: 600;
}

.nav-item i { width: 16px; text-align: center; font-size: 14px; opacity: 0.5; }
.nav-item.active i { opacity: 1; color: var(--brand-blue); }
.nav-item:hover i { opacity: 0.8; }

.nav-dot {
    width: 6px;
    height: 6px;
    background: var(--brand-red);
    border-radius: 50%;
    margin-left: auto;
}

.nav-external {
    margin-left: auto;
    width: auto;
    font-size: 10px;
    opacity: 0.35;
}

.nav-item:hover .nav-external { opacity: 0.6; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
}

.sidebar-profile:hover { background: var(--accent-soft); }

.sidebar-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-profile .sp-info { flex: 1; min-width: 0; }
.sidebar-profile .sp-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile .sp-role { font-size: 11px; color: var(--text-3); }
.sidebar-profile .sp-dots { color: var(--text-3); font-size: 16px; }

/* ============================
   MAIN AREA
   ============================ */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.main--full {
    margin-left: 0;
}

/* Header */
.topbar {
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.topbar-search .search-users-container {
    position: relative;
    width: 100%;
}

.topbar-search .search-wrapper {
    position: relative;
}

.topbar-search .search-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-3);
    z-index: 1;
    pointer-events: none;
}

.topbar-search .users-search-form input {
    width: 100%;
    padding: 8px 36px 8px 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg);
    outline: none;
    transition: all var(--transition);
    color: var(--text-1);
}

.topbar-search .users-search-form input:focus {
    border-color: var(--text-3);
    background: var(--surface);
}

.topbar-search .users-search-form input::placeholder {
    color: var(--text-3);
}

.topbar-search .x-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-3);
    cursor: pointer;
    display: none;
}

.topbar-search .dropdown-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.topbar-search .dropdown-user-list {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-1);
}

.topbar-search .dropdown-user-list.user-result:hover {
    background: var(--accent-soft);
}

.topbar-search .dropdown-user-list.no-result {
    justify-content: center;
    color: var(--text-3);
}

.topbar-search .dropdown-user-list .avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-search .dropdown-user-list .user-info h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.topbar-search .dropdown-user-list .user-info small {
    font-size: 11px;
    color: var(--text-3);
}

.topbar-search .search-bar {
    width: 100%;
}

.topbar-search .search-bar-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    justify-content: center;
    align-items: center;
    color: var(--text-2);
}

.topbar-search .search-bar-btn:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.topbar-search .search-icon {
    font-size: 14px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    cursor: pointer;
    position: relative;
}
.topbar-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.topbar-profile .tp-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.topbar-profile .tp-role { font-size: 11px; color: var(--text-3); }
.topbar-profile .tp-info { display: block; }
.topbar-profile .tp-chevron { font-size: 10px; color: var(--text-3); transition: transform var(--transition); }
.topbar-profile.open .tp-chevron { transform: rotate(180deg); }

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 6px 0;
}
.profile-dropdown.show { display: block; }

.pd-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}
.pd-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.pd-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.pd-email { font-size: 11px; color: var(--text-3); }

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

.pd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-2);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.pd-item:hover { background: var(--accent-soft); color: var(--text-1); }
.pd-item i:first-child { width: 16px; text-align: center; font-size: 12px; color: var(--text-3); }
.pd-item:hover i:first-child { color: var(--text-2); }

.pd-referral { background: var(--accent-soft); font-weight: 500; color: var(--accent); }
.pd-referral i:first-child { color: var(--accent); }
.pd-referral:hover { background: var(--accent); color: #fff; }
.pd-referral:hover i { color: #fff !important; }

.pd-logout { color: var(--brand-red); }
.pd-logout i:first-child { color: var(--brand-red); }
.pd-logout:hover { background: rgba(237,28,36,0.05); }

/* Notification dropdown */
.notif-wrap { position: relative; }

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow: hidden;
}
.notif-dropdown.show { display: block; }

.nd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
}
.nd-header h4 { font-size: 14px; font-weight: 600; color: var(--text-1); margin: 0; }
.nd-mark { font-size: 11px; color: var(--accent); text-decoration: none; }
.nd-mark:hover { text-decoration: underline; }

.nd-list { max-height: 340px; overflow-y: auto; }

.nd-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background var(--transition);
}
.nd-item:hover { background: var(--accent-soft); }
.nd-item.unread { background: rgba(37,99,235,0.04); }
.nd-item.unread:hover { background: rgba(37,99,235,0.07); }

.nd-item img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }

.nd-body { flex: 1; min-width: 0; }
.nd-msg { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.nd-msg strong { color: var(--text-1); font-weight: 600; }
.nd-time { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.nd-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.nd-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
}
.nd-footer a { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; }
.nd-footer a:hover { text-decoration: underline; }

/* Country dropdown */
.country-wrap { position: relative; }
.country-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }

.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 6px 0;
    overflow: hidden;
}
.country-dropdown.show { display: block; }

.cd-header { padding: 10px 14px 6px; }
.cd-header h4 { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin: 0; }

.cd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-2);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.cd-item:hover { background: var(--accent-soft); color: var(--text-1); }
.cd-item.active { color: var(--text-1); font-weight: 600; background: var(--accent-soft); }
.cd-item img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; }

@media (max-width: 600px) {
    .topbar-profile .tp-info { display: none; }
    .profile-dropdown { right: -8px; width: 240px; }
    .notif-dropdown { width: 300px; right: -40px; }
    .country-dropdown { right: -8px; }
}

.tb-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    font-size: 15px;
    transition: all var(--transition);
    position: relative;
}

.tb-btn:hover { background: var(--accent-soft); color: var(--text-1); }

.tb-btn .dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    border: 1.5px solid var(--surface);
}

/* Page content */
.page {
    padding: 20px 24px;
    max-width: 1060px;
    margin: 0 auto;
}

/* ============================
   GREETING
   ============================ */
.greeting { margin-bottom: 20px; }
.greeting h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 1px; }
.greeting p { font-size: 13px; color: var(--text-3); }

/* ============================
   ANNOUNCEMENT
   ============================ */
.announce {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--amber-soft);
    border: 1px solid #fde68a;
    border-radius: var(--r);
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400e;
}

.announce i.icon { flex-shrink: 0; }
.announce .x { margin-left: auto; cursor: pointer; opacity: 0.5; font-size: 12px; }
.announce .x:hover { opacity: 1; }

/* ============================
   RENEWAL STRIP
   ============================ */
/* Membership renewal sticky bar */
.membership-bar-wrap {
    position: sticky;
    top: var(--header-h);
    z-index: 49;
    background: var(--red-soft);
}

.membership-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.mb-left { display: flex; align-items: center; gap: 10px; }

.mb-icon { color: var(--red); font-size: 13px; }

.mb-text { font-size: 13px; color: var(--text-1); }
.mb-text strong { color: var(--red); font-weight: 700; }

.mb-countdown {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}
.mb-countdown span {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.mb-countdown small { font-size: 10px; font-weight: 500; opacity: 0.7; }

.mb-right { display: flex; align-items: center; gap: 8px; }

.btn-renew {
    padding: 6px 16px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}
.btn-renew:hover { background: #c8161d; }

.mb-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}
.mb-close:hover { color: var(--text-1); }

.membership-bar-wrap.is-upgrade {
    background: var(--brand-blue);
}

.membership-bar-wrap.is-upgrade .membership-bar-inner {
    background: var(--brand-blue);
}

.membership-bar-wrap.is-upgrade .mb-icon {
    color: var(--amber);
}

.membership-bar-wrap.is-upgrade .mb-text {
    color: #fff;
}

.membership-bar-wrap.is-upgrade .mb-text strong {
    color: #fff;
}

.membership-bar-wrap.is-upgrade .btn-renew {
    background: #fff;
    color: var(--brand-blue);
}

.membership-bar-wrap.is-upgrade .btn-renew:hover {
    background: #f0f0f0;
}

.membership-bar-wrap.is-upgrade .mb-close {
    color: rgba(255, 255, 255, 0.6);
}

.membership-bar-wrap.is-upgrade .mb-close:hover {
    color: #fff;
}

.btn-white {
    padding: 8px 18px;
    background: #fff;
    color: var(--text-1);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-white:hover { background: #f0f0f0; }

/* ============================
   STAT CARDS
   ============================ */
/* Programs showcase */
.programs-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }

.program-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.program-card:hover { border-color: var(--text-3); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.program-bhc { background: var(--brand-red-soft); border-color: #f5d0d1; }
.program-espp { background: var(--green-soft); border-color: #c6efd0; }
.program-mentor { background: var(--purple-soft); border-color: #ddd6fe; }
.program-bhc:hover { border-color: var(--brand-red); }
.program-espp:hover { border-color: var(--green); }
.program-mentor:hover { border-color: var(--purple); }

.program-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
    background: var(--brand-red-soft);
    color: var(--brand-red);
}
.program-icon.green { background: var(--green-soft); color: var(--green); }
.program-icon.purple { background: var(--purple-soft); color: var(--purple); }

.program-body { margin-bottom: 12px; }
.program-body h4 { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.program-body p { font-size: 11px; color: var(--text-3); line-height: 1.4; }

.program-cta { font-size: 12px; font-weight: 600; color: var(--brand-red); margin-top: auto; }
.program-cta.green { color: var(--green); }
.program-cta.purple { color: var(--purple); }

.bhc-wheels { display: flex; gap: 8px; margin-bottom: 10px; }
.bhc-wheel { text-align: center; }
.bhc-wheel svg { width: 36px; height: 36px; }
.bhc-wheel span { font-size: 9px; color: var(--text-3); display: block; margin-top: 2px; }

.espp-tier { margin-bottom: 10px; }
.espp-stars { display: flex; gap: 3px; margin-bottom: 4px; }
.espp-stars i { font-size: 12px; color: #e5e7eb; }
.espp-stars i.filled { color: var(--amber); }
.espp-label { font-size: 11px; color: var(--text-2); }

.mentor-preview { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mentor-preview img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mentor-name { font-size: 12px; font-weight: 600; color: var(--text-1); display: block; }
.mentor-avail { font-size: 10px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }

.stat-card {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--text-3); }

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }

.stat-text h4 { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
.stat-text p { font-size: 11px; color: var(--text-3); }

/* ============================
   TWO COLUMN LAYOUT
   ============================ */
.grid-2 { display: grid; grid-template-columns: 1fr 280px; gap: 16px; margin-bottom: 16px; }

/* ============================
   SECTION
   ============================ */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

.sec-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
}

.sec-h h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }

.sec-h .link {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}

.sec-h .link:hover { color: var(--text-1); }

.sec-b { padding: 0 18px 16px; }

/* ============================
   LEAD ROWS
   ============================ */
.lead-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.lead-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    flex-shrink: 0;
}

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

.lead-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }

.lead-name-line { font-size: 13px; font-weight: 600; }

.lead-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.lead-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }

.lead-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }

.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    transition: all var(--transition);
}

.btn-sm:hover { border-color: var(--text-3); color: var(--text-1); }

.btn-sm.wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn-sm.wa:hover { background: #1ebe5b; }

.status-select.btn-sm {
    appearance: none;
    cursor: pointer;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%239ca3af' d='M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301 191.9 288 191.9L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 7 34.9l128 128z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px;
}

.status-select.btn-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Lead actions (right side — legacy) */
.lead-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-self: center;
}

/* Lead actions inline (same row as pill) */
.lead-actions-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Section footer */
.sec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-top: 1px solid var(--border-subtle);
}
.sec-footer-hint {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Locked lead (free member) */
.lead-locked { position: relative; overflow: hidden; }
.blurred-el { filter: blur(4px); opacity: 0.4; user-select: none; pointer-events: none; }
.lead-lock-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95) 30%);
    z-index: 2;
}
.lead-lock-overlay i { font-size: 16px; color: var(--text-3); }
.lead-lock-overlay span { font-size: 11px; color: var(--text-2); font-weight: 500; text-align: center; }
.btn-sm-cta { padding: 6px 14px !important; font-size: 11px !important; border-radius: 6px; cursor: pointer; }

/* Referral section */
.referral-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 16px;
    overflow: hidden;
}

.referral-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--brand-blue-soft);
    border-bottom: 1px solid #d0d0e8;
}
.referral-top-left { display: flex; align-items: center; gap: 14px; }
.referral-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.referral-top h2 { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.referral-subtitle { font-size: 12px; color: var(--text-2); line-height: 1.4; margin: 0; }
.referral-subtitle a { color: var(--blue); font-weight: 500; }
.referral-subtitle a:hover { text-decoration: underline; }


.referral-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
}

.referral-goal-card {
    padding: 18px;
    background: var(--accent-soft);
    border-radius: 10px;
}
.referral-goal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rg-left { display: flex; align-items: center; gap: 8px; }
.rg-right { display: flex; align-items: center; gap: 5px; }
.referral-goal-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--brand-blue);
    background: var(--brand-blue-soft);
    padding: 3px 8px;
    border-radius: 4px;
}
.referral-goal-tag.next { color: var(--text-3); background: var(--border); }
.referral-goal-tag.completed {
    color: var(--green);
    background: var(--green-soft);
}
.referral-goal-card.completed {
    background: var(--green-soft);
    border: 1px solid rgba(22, 163, 74, 0.15);
}
.referral-goal-card.completed .referral-fill { background: var(--green); }
.referral-goal-card.completed .referral-goal-count { color: var(--green); }
.referral-goal-count { font-size: 13px; font-weight: 700; color: var(--brand-blue); }
.ref-expand-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-3); font-size: 11px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all var(--transition);
}
.ref-expand-btn:hover { background: var(--accent-soft); color: var(--text-1); }
.referral-goal-card.expanded .ref-expand-btn i { transform: rotate(180deg); }

.referral-goal-card h3 { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.referral-goal-card p { font-size: 12px; color: var(--text-2); line-height: 1.4; margin: 0 0 12px; }
.referral-goal-card p strong { color: var(--text-1); }

.referral-progress { margin-bottom: 14px; }
.referral-bar { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.referral-fill { height: 100%; background: var(--brand-blue); border-radius: 6px; transition: width 0.4s ease; }
.referral-bar-label { font-size: 11px; color: var(--text-3); }

/* Collapsed stacked avatars */
.ref-collapsed-faces { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ref-stack { display: flex; }
.ref-stack img {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--accent-soft); margin-right: -8px;
}
.ref-stack img:last-child { margin-right: 0; }
.ref-stack-label { font-size: 11px; color: var(--text-2); }
.referral-goal-card.expanded .ref-collapsed-faces { display: none; }
.referral-goal-card.expanded .ref-expanded-faces { display: block !important; }

/* Expanded named avatars */
.ref-expanded-faces { margin-bottom: 14px; }
.referral-faces-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.referral-face-named { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ref-name { font-size: 10px; font-weight: 600; color: var(--text-2); max-width: 48px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-name.placeholder { color: var(--text-3); font-weight: 400; }

.referral-face { position: relative; width: 42px; height: 42px; }
.referral-face img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); }
.referral-face .ref-badge {
    position: absolute; bottom: -2px; right: -2px;
    width: 16px; height: 16px; border-radius: 50%; font-size: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; border: 2px solid var(--surface);
}
.ref-badge.upgraded { background: var(--green); }
.ref-badge.registered { background: var(--brand-blue); }
.referral-face.empty {
    border-radius: 50%; border: 1.5px dashed var(--border);
    display: flex; align-items: center; justify-content: center; background: var(--surface);
}
.referral-face.empty span { font-size: 13px; color: var(--text-3); font-weight: 500; }

.referral-share-btn { padding: 6px 14px !important; font-size: 11px !important; }

.ref-code-inline {
    display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
    padding: 3px 8px; border: 1px dashed var(--border); border-radius: 4px;
    font-size: 10px; font-weight: 600; color: var(--text-3); letter-spacing: 0.5px;
    cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.ref-code-inline:hover { color: var(--brand-blue); border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.ref-code-inline i { font-size: 8px; }
.referral-method {
    width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-2); font-size: 13px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all var(--transition);
}
.referral-method:hover { background: var(--accent-soft); color: var(--text-1); border-color: var(--text-3); }

/* Next goal (locked) */
.referral-next-card {
    padding: 16px 18px; background: var(--accent-soft); border-radius: 10px; opacity: 0.7;
}
.referral-next-card.locked h3 { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.referral-next-card.locked p { font-size: 12px; color: var(--text-3); line-height: 1.4; margin: 0 0 6px; }
.referral-next-card.locked p strong { color: var(--text-2); }
.ref-locked-hint { font-size: 10px; color: var(--text-3); font-style: italic; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 32px 24px;
}
.empty-icon { font-size: 32px; color: var(--border); margin-bottom: 10px; }
.empty-state h4 { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty-state p { font-size: 12px; color: var(--text-3); line-height: 1.5; max-width: 380px; margin: 0 auto; }

/* Event social proof */
.ev-social { font-size: 11px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 5px; }

/* Member profile cards */
.member-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.member-card:hover { border-color: var(--text-3); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

.mc-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.member-card h4 { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.mc-expertise { font-size: 11px; color: var(--brand-blue); font-weight: 500; margin-bottom: 6px; }
.mc-company { font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 4px; justify-content: center; margin-bottom: 2px; }
.mc-location { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; justify-content: center; margin-bottom: 8px; }
.mc-mutual { font-size: 10px; color: var(--text-3); display: flex; align-items: center; gap: 4px; justify-content: center; margin-bottom: 10px; padding: 3px 8px; background: var(--accent-soft); border-radius: 4px; }
.mc-connect { width: 100%; justify-content: center; margin-top: auto; padding: 6px 0 !important; font-size: 11px !important; text-decoration: none; display: inline-flex; }

/* Centered footer variant */
.sec-footer-center {
    justify-content: center;
    background: transparent;
}

/* Free leads list */
.free-leads-list { padding: 0; }

.free-lead-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
}
.free-lead-item:last-child { border-bottom: none; }

.free-lead-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    flex-shrink: 0;
}

.free-lead-desc { flex: 1; font-size: 13px; color: var(--text-1); line-height: 1.5; }

.free-lead-lock { font-size: 11px; color: var(--text-3); flex-shrink: 0; margin-top: 3px; }

.free-lead-blurred { opacity: 0.45; filter: blur(4px); user-select: none; pointer-events: none; }

/* Free member leads upgrade footer */
.leads-upgrade-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid var(--border-subtle);
}
.leads-upgrade-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.leads-upgrade-msg i { color: var(--brand-blue); flex-shrink: 0; }
.leads-upgrade-msg strong { font-size: 13px; color: var(--text-1); display: block; }
.leads-upgrade-msg p { font-size: 11px; color: var(--text-2); margin: 2px 0 0; }

.sec-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-red);
    background: var(--brand-red-soft);
    padding: 2px 8px;
    border-radius: 10px;
}

.lead-source {
    font-size: 10px;
    color: #25d366;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}


/* WhatsApp Community Groups */
.wa-groups { display: flex; flex-direction: column; gap: 1px; }

.wa-group-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.wa-group-card:last-child { border-bottom: none; }

.wa-group-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #dcfce7;
    color: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.wa-group-icon.joined { background: #25d366; color: #fff; }

.wa-group-info { flex: 1; min-width: 0; }
.wa-group-info h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.wa-group-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.wa-active { color: #25d366; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.wa-group-topic { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-join {
    background: #25d366 !important;
    color: #fff !important;
    border-color: #25d366 !important;
    white-space: nowrap;
    flex-shrink: 0;
}
.wa-join:hover { background: #1ebe5b !important; }

.wa-joined-tag {
    font-size: 11px;
    color: #25d366;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Referral card */
.referral-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.referral-header h3 { margin: 0; }

.referral-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--brand-blue-soft);
    border: 1px dashed var(--brand-blue);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-blue);
    cursor: pointer;
    transition: background var(--transition);
}
.referral-code:hover { background: #e0e0f0; }
.referral-code i { font-size: 10px; color: var(--text-3); }

.referral-goal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.referral-goal-info { flex: 1; }
.referral-goal-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); font-weight: 600; }
.referral-goal h4 { font-size: 13px; font-weight: 600; margin: 2px 0; }
.referral-goal p { font-size: 11px; color: var(--text-2); line-height: 1.4; margin: 0; }

.referral-progress-ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.referral-progress-ring svg { transform: rotate(-90deg); }
.referral-progress-ring .bg { stroke: var(--border-subtle); }
.referral-progress-ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--brand-blue); }

.referral-timeline { margin-bottom: 12px; }

.ref-person {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.ref-person:last-child { border-bottom: none; }
.ref-person img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ref-info { flex: 1; display: flex; align-items: center; gap: 6px; }
.ref-name { font-size: 12px; font-weight: 500; }
.ref-status { font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 4px; }
.ref-status.upgraded { background: var(--green-soft); color: var(--green); }
.ref-status.registered { background: var(--blue-soft); color: var(--blue); }
.ref-date { font-size: 11px; color: var(--text-3); }

.referral-next {
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

/* Knowledge Hub */
.knowledge-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.knowledge-card {
    display: block;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.knowledge-card:hover { border-color: var(--text-3); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

.knowledge-img { height: 80px; display: flex; align-items: center; justify-content: center; }
.knowledge-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.knowledge-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-blue);
    padding: 8px 12px 0;
}
.knowledge-tag.green { color: var(--green); }
.knowledge-tag.purple { color: var(--purple); }

.knowledge-card h4 { font-size: 13px; font-weight: 600; color: var(--text-1); padding: 4px 12px 4px; line-height: 1.4; }
.knowledge-meta { font-size: 11px; color: var(--text-3); padding: 0 12px 10px; }

/* ============================
   SIDEBAR CARDS (right col)
   ============================ */
.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 12px;
}

.side-card:last-child { margin-bottom: 0; }

.side-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.2px; }

/* Progress */
.progress-visual { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.mini-ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.mini-ring svg { transform: rotate(-90deg); }
.mini-ring .bg { stroke: var(--border-subtle); }
.mini-ring .fg { stroke: var(--green); stroke-linecap: round; }
.mini-ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

.progress-text { font-size: 12px; color: var(--text-3); line-height: 1.5; }

.task-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 12px;
}

.task-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.task-check.done { background: var(--green-soft); color: var(--green); }
.task-check.pending { border: 1.5px solid var(--border); color: transparent; }

.task-label { flex: 1; color: var(--text-2); }
.task-label.done { color: var(--text-3); text-decoration: line-through; }

.task-link { font-size: 11px; color: var(--blue); font-weight: 500; }
.task-link:hover { text-decoration: underline; }

/* Reward tasks in side card */
.reward-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0 10px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.reward-step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
}

.reward-step-header .task-label {
    flex: 1;
    line-height: 1.45;
}

#reward-task .step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 12px;
}

#reward-task .step:last-child { border-bottom: none; }

#reward-task .step .number {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

#reward-task .step .number.completed {
    background: var(--green-soft);
    color: var(--green);
}

#reward-task .step .number:not(.completed) {
    border: 1.5px solid var(--border);
}

#reward-task .step .number:not(.completed) svg {
    display: none;
}

#reward-task .step .number svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

#reward-task .step .info {
    flex: 1;
    min-width: 0;
}

#reward-task .header-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

#reward-task .header-wrapper .header {
    flex: 1;
    font-weight: 500;
    color: var(--text-2);
    line-height: 1.45;
    margin-right: 0;
}

#reward-task .header-wrapper .function {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-align: right;
}

#reward-task .header-wrapper .function a {
    font-size: 11px;
    color: var(--blue);
    font-weight: 500;
    white-space: nowrap;
}

#reward-task .header-wrapper .function a:hover { text-decoration: underline; }

#reward-task .header-wrapper .function i {
    font-size: 11px;
    color: var(--text-3);
    cursor: pointer;
    padding: 2px;
}

#reward-task .step .info > span,
#reward-task .step .info > div > span {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.5;
    padding-top: 4px;
}

#reward-task .referrers {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

#reward-task .referrers .ui.feed .event .label img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

#reward-task .referrers .ui.feed .event .content {
    font-size: 11px;
    color: var(--text-2);
}

#reward-task .referrers .ui.divider {
    margin: 8px 0;
}

@media (max-width: 768px) {
    #reward-task .header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    #reward-task .header-wrapper .function {
        width: 100%;
        justify-content: space-between;
    }
}

/* Channel items */
.ch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.ch-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ch-info { flex: 1; min-width: 0; }
.ch-info h4 { font-size: 12px; font-weight: 600; }
.ch-info span { font-size: 11px; color: var(--text-3); }

.ch-count { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.ch-empty {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
    padding: 4px 0 8px;
}

/* ============================
   MEMBERS STRIP (carousel style)
   ============================ */
.members-strip {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.members-strip::-webkit-scrollbar { height: 0; }

.m-card {
    flex: 0 0 120px;
    scroll-snap-align: start;
    text-align: center;
    padding: 14px 8px;
    border-radius: 10px;
    transition: background var(--transition);
}

.m-card:hover { background: var(--accent-soft); }

.m-card img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.m-card h4 { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-card p { font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================
   MEMBERS TABLE (professional style)
   ============================ */
.members-table { width: 100%; border-collapse: collapse; }
.members-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--border);
}
.members-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}
.members-table tr:last-child td { border-bottom: none; }
.members-table tr { transition: background var(--transition); }
.members-table tbody tr:hover { background: var(--accent-soft); }

.m-name-cell { display: flex; align-items: center; gap: 10px; }
.m-name-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.m-name-cell .m-info h4 { font-size: 13px; font-weight: 600; line-height: 1.3; }
.m-name-cell .m-info span { font-size: 11px; color: var(--text-3); }
.m-industry { font-size: 12px; color: var(--text-2); }
.m-date { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ============================
   EVENT CARDS
   ============================ */
.ev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ev-card {
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color var(--transition);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    display: block;
}

.ev-card:hover { border-color: var(--text-3); }

.ev-img { height: 90px; position: relative; overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; }

.ev-badge { position: absolute; top: 8px; left: 8px; background: var(--green); color: #fff; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }

.ev-body { padding: 10px 12px; }
.ev-body h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -0.1px; }

.ev-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }

.ev-date { background: var(--bg); border-radius: 6px; padding: 4px 8px; text-align: center; line-height: 1; }
.ev-date .mo { font-size: 9px; font-weight: 700; color: var(--red); text-transform: uppercase; }
.ev-date .dy { font-size: 15px; font-weight: 700; color: var(--text-1); }

.ev-loc { display: flex; flex-direction: column; gap: 2px; }

/* ============================
   REWARDS
   ============================ */
.rw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.rw-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: border-color var(--transition);
}

.rw-card:hover { border-color: var(--text-3); }

.rw-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.rw-card p { font-size: 11px; color: var(--text-3); margin-bottom: 10px; line-height: 1.5; }

.progress-bar { height: 4px; background: var(--border-subtle); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.progress-bar .fill { height: 100%; border-radius: 2px; background: var(--green); }

.rw-meta { font-size: 10px; color: var(--text-3); margin-bottom: 10px; }

.btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    transition: background var(--transition);
}

.btn-dark:hover { background: var(--brand-blue-light); }

/* ============================
   FOOTER CTA
   ============================ */
.footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 16px;
}

.footer-cta h3 { font-size: 14px; font-weight: 600; }
.footer-cta p { font-size: 12px; color: var(--text-3); }

.btn-outline {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-outline:hover { background: var(--accent-soft); border-color: var(--text-3); }

/* ============================
   BREADCRUMB
   ============================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-3); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--text-1); }
.breadcrumb .bc-sep { font-size: 9px; }
.breadcrumb .bc-current { color: var(--text-2); font-weight: 500; }

/* Ad slots */
.ad-slot {
    width: 100%;
    min-height: 140px;
    margin-bottom: 16px;
    border-radius: var(--r);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.ad-slot.ads {
    cursor: pointer;
}

.ad-slot.top {
    min-height: 180px;
}

.ad-slot.middle,
.ad-slot.bottom {
    min-height: 120px;
}

.ad-slot-fallback {
    display: flex;
    align-items: center;
    background-color: var(--brand-blue-soft);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
}

.ad-slot-fallback-inner {
    width: 100%;
    padding: 24px 28px;
}

.ad-slot-slogan {
    max-width: 280px;
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-blue);
}

@media (max-width: 768px) {
    .ad-slot.top { min-height: 140px; }
    .ad-slot-slogan { font-size: 17px; }
}

/* ============================
   MOBILE HAMBURGER
   ============================ */
.hamburger {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    font-size: 18px;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
    backdrop-filter: blur(2px);
}

.overlay.show { display: block; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1100px) {
    .sidebar { display: none; }
    .sidebar.open { display: flex; z-index: 200; box-shadow: 4px 0 20px rgba(0,0,0,0.08); }
    .main { margin-left: 0; }
    .hamburger { display: flex; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .page { padding: 16px 14px; }
    .topbar { padding: 0 14px; }
    .programs-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .ev-row { grid-template-columns: 1fr; }
    .rw-row { grid-template-columns: 1fr; }
    .knowledge-row { grid-template-columns: 1fr; }
    .member-cards { grid-template-columns: repeat(2, 1fr); }
    .referral-top { flex-direction: column; align-items: flex-start; }
    .rg-right { flex-wrap: wrap; }
    .ref-code-inline { margin-left: 0; }
    .lead-lock-overlay { width: 180px; }
    .lead-actions { flex-direction: row; }
    .mb-countdown { display: none; }
    .membership-bar-inner { padding: 8px 14px; }
    .footer-cta { flex-direction: column; gap: 10px; text-align: center; }
    .greeting h1 { font-size: 18px; }
    .members-table th.hide-mobile,
    .members-table td.hide-mobile { display: none; }
    .wa-group-card { flex-wrap: wrap; }
    .wa-join, .wa-joined-tag { margin-left: 50px; }
    .lead-top-row { flex-wrap: wrap; }
}

@media (max-width: 940px) {
    .topbar-search {
        max-width: none;
        flex: 0;
    }

    .topbar-search .search-bar {
        display: none;
        flex: 1;
    }

    .topbar-search .search-bar-btn {
        display: flex;
    }

    .topbar-search .x-icon {
        display: block;
    }
}

/* ============================
   FULL-SCREEN MODAL / TOUR OVERLAYS
   ============================ */
body.dimmable.dimmed {
    overflow: hidden;
}

body.dimmable > .ui.dimmer,
.ui.dimmer.modals,
.ui.dimmer.modals.page,
.ui.page.dimmer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    z-index: 10000 !important;
}

.ui.dimmer.modals .ui.modal,
body > .ui.modal.active,
body > .ui.modal.visible {
    z-index: 10001 !important;
}

.introjs-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

.introjs-helperLayer,
.introjs-tooltipReferenceLayer {
    z-index: 100000000 !important;
}

/* ============================
   BUSINESS PROFILE HEADER
   ============================ */
.profile-wrapper {
    margin-bottom: 16px;
}

.profile-cover {
    min-height: 300px;
    height: 300px;
    border-radius: var(--r) var(--r) 0 0;
    overflow: hidden;
    position: relative;
}

.profile-cover .pc-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-cover .edit-profile-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}

.profile-cover .edit-profile-button:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.profile-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--r) var(--r);
    padding: 0 24px 16px;
    margin-bottom: 16px;
    position: relative;
}

.ph-top {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: -30px;
    margin-bottom: 14px;
}

.ph-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: 3px solid var(--surface);
    flex-shrink: 0;
    overflow: hidden;
    background: var(--accent-soft);
}

.ph-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
}

.ph-info h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 2px;
}

.ph-info .ph-cat {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 4px;
}

.ph-info .ph-loc {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ph-info .under-company {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    padding: 3px 10px;
    border-radius: 15px;
    background: var(--brand-blue, var(--blue));
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-info .under-company:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.ph-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-self: center;
}

.ph-actions .btn-primary,
.ph-actions .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
}

.profile-header .btn-primary {
    padding: 8px 18px;
    background: var(--text-1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--transition);
}

.profile-header .btn-primary:hover {
    background: #333;
    color: #fff;
}

.ph-social {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.ph-social a {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-3);
    transition: all var(--transition);
    text-decoration: none;
}

.ph-social a:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    background: var(--surface);
    border-radius: var(--r) var(--r) 0 0;
    overflow-x: auto;
}

.profile-tabs .ptab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.profile-tabs .ptab:hover {
    color: var(--text-1);
    text-decoration: none;
}

.profile-tabs .ptab.active {
    color: var(--text-1);
    font-weight: 600;
    border-bottom-color: var(--text-1);
}

.profile-tabs .ptab-count {
    font-size: 11px;
    color: var(--text-3);
    margin-left: 4px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .ph-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ph-actions {
        width: 100%;
    }

    .ph-actions .btn-primary,
    .ph-actions .btn-outline {
        flex: 1;
        justify-content: center;
    }
}

/* Profile content layout */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    align-items: start;
}

.profile-panel {
    display: none;
}

.profile-panel.active {
    display: block;
}

.about-block {
    margin-bottom: 20px;
}

.about-block h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.about-block p,
.profile-empty {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 10px;
}

.services-tab-header,
.team-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.ad-item {
    padding: 12px 14px;
    background: var(--accent-soft);
    border-radius: 8px;
}

.ad-item .ad-label {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.ad-item .ad-value {
    font-size: 13px;
    font-weight: 600;
}

.svc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.svc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color var(--transition);
}

.svc-card:hover {
    border-color: var(--text-3);
}

.svc-card .sc-img {
    height: 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.svc-card .sc-img-placeholder {
    background: var(--accent-soft);
}

.svc-card .sc-body {
    padding: 12px;
    position: relative;
}

.svc-card .sc-body h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    padding-right: 20px;
}

.svc-card .sc-body p {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.svc-card .sc-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.svc-empty {
    grid-column: 1 / -1;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.team-card {
    text-align: center;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
}

.team-card img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.team-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1px;
}

.team-card span {
    font-size: 11px;
    color: var(--text-3);
    display: block;
}

.team-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
}

.team-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    border: none;
    cursor: default;
}

.team-badge-owner {
    background: #e8f5e9;
    color: #2e7d32;
}

.team-badge-remove {
    background: #ffebee;
    color: #c62828;
    cursor: pointer;
}

.inquiry-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
}

.inquiry-form h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.inquiry-form .if-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 16px;
}

.inquiry-form .form-group {
    margin-bottom: 14px;
}

.inquiry-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 4px;
}

.inquiry-form .form-group input,
.inquiry-form .form-group textarea,
.inquiry-form .form-group select,
.inquiry-form .form-group .ui.input > input,
.inquiry-form .form-group .ui.selection.dropdown {
    width: 100%;
}

.inquiry-form .inquiry-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    border: none;
    cursor: pointer;
}

.profile-sidebar {
    position: sticky;
    top: 76px;
}

.ps-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 12px;
}

.ps-card h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-3);
    margin-bottom: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.contact-row i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}

.contact-row span {
    font-size: 13px;
    color: var(--text-2);
}

.contact-row a {
    font-size: 13px;
    color: var(--blue);
    text-decoration: none;
}

.contact-row a:hover {
    text-decoration: underline;
}

.ps-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.ps-stat:last-child {
    margin-bottom: 0;
}

.ps-stat .pss-num {
    font-size: 18px;
    font-weight: 700;
}

.ps-stat .pss-label {
    font-size: 12px;
    color: var(--text-3);
}

.ph-actions .btn-primary {
    border: none;
    cursor: pointer;
}

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

    .profile-sidebar {
        position: static;
    }

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

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

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

.contact-gated {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.contact-gated-value {
    display: inline-block;
    font-size: 13px;
    color: var(--text-2);
}

.contact-gated-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

a.contact-gated-cta.btn-dark,
.contact-row a.contact-gated-cta.btn-dark,
.ad-value-gated a.contact-gated-cta.btn-dark {
    color: #fff;
    background: var(--brand-blue);
}

a.contact-gated-cta.btn-dark:hover,
.contact-row a.contact-gated-cta.btn-dark:hover,
.ad-value-gated a.contact-gated-cta.btn-dark:hover {
    color: #fff;
    background: var(--brand-blue-light);
    text-decoration: none;
}

.contact-row .contact-gated {
    flex: 1;
    min-width: 0;
}

.ad-value-gated .contact-gated-cta {
    font-size: 10px;
    padding: 5px 10px;
}

/* ============================
   INQUIRIES & LEADS PAGE
   ============================ */
.inquiries-leads-page {
    margin-bottom: 24px;
}

.il-tabs {
    border: 1px solid var(--border);
    border-radius: var(--r) var(--r) 0 0;
    margin-bottom: 0;
}

.inquiries-panel {
    display: none;
    padding-top: 16px;
}

.inquiries-panel.active {
    display: block;
}

.inquiries-panel .section {
    margin-bottom: 0;
}

.il-leads-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.il-pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.il-pagination-links .btn-sm.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.inquiries-table-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 0;
}

.inquiries-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.inquiries-table {
    width: 100%;
    margin-bottom: 0 !important;
}

.inquiries-table-section .dataTables_wrapper {
    width: 100%;
}

.inquiries-table-section .dataTables_scrollHead,
.inquiries-table-section .dataTables_scrollBody {
    width: 100% !important;
}

@media (max-width: 768px) {
    .il-leads-pagination {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================
   BUSINESS DIRECTORY INDEX
   ============================ */
.directory-index {
    margin-bottom: 24px;
}

.directory-index .pg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.directory-index .pg-header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0;
}

.directory-index .ph-count {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
    margin-left: 8px;
}

.directory-index .btn-primary {
    padding: 8px 18px;
    background: var(--text-1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.directory-index .btn-primary:hover {
    background: #333;
    color: #fff;
}

.directory-index .dir-search {
    position: relative;
    margin-bottom: 20px;
}

.directory-index .dir-search > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-3);
    pointer-events: none;
}

.directory-index .dir-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    outline: none;
    transition: border-color var(--transition);
}

.directory-index .dir-search input:focus {
    border-color: var(--text-3);
}

.directory-index .sec-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.directory-index .sec-label-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    text-transform: none;
    letter-spacing: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color var(--transition);
}

.directory-index .sec-label-link:hover {
    color: var(--text-1);
}

.directory-index .filters {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.directory-index .f-chip {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.directory-index .f-chip:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.directory-index .f-chip.active {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.directory-index .cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.directory-index .cat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.directory-index .cat-card:hover {
    border-color: var(--text-3);
    background: var(--accent-soft);
}

.directory-index .cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.directory-index .cat-icon-blue { background: var(--blue-soft); color: var(--blue); }
.directory-index .cat-icon-green { background: var(--green-soft); color: var(--green); }
.directory-index .cat-icon-amber { background: var(--amber-soft); color: var(--amber); }
.directory-index .cat-icon-purple { background: var(--purple-soft); color: var(--purple); }
.directory-index .cat-icon-red { background: var(--red-soft); color: var(--red); }

.directory-index .cat-text {
    min-width: 0;
}

.directory-index .cat-text h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-index .cat-notify-dot {
    color: #e53935;
    font-size: 6px;
    vertical-align: middle;
    margin-left: 4px;
}

.directory-index .cat-text span {
    font-size: 11px;
    color: var(--text-3);
}

.directory-index .biz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.directory-index .biz-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.directory-index .biz-card:hover {
    border-color: var(--text-3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.directory-index .biz-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.directory-index .biz-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}

.directory-index .biz-logo-blue { background: var(--blue-soft); color: var(--blue); }
.directory-index .biz-logo-green { background: var(--green-soft); color: var(--green); }
.directory-index .biz-logo-amber { background: var(--amber-soft); color: var(--amber); }
.directory-index .biz-logo-purple { background: var(--purple-soft); color: var(--purple); }
.directory-index .biz-logo-red { background: var(--red-soft); color: var(--red); }

.directory-index .biz-info {
    flex: 1;
    min-width: 0;
}

.directory-index .biz-info h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-index .biz-info span {
    font-size: 11px;
    color: var(--text-3);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-index .biz-arrow {
    font-size: 11px;
    color: var(--text-3);
    flex-shrink: 0;
}

.directory-index .dir-empty {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    border: 1px dashed var(--border);
    border-radius: var(--r);
}

.directory-index .dir-load-more,
.directory-index .dir-end {
    text-align: center;
    margin-bottom: 20px;
}

.directory-index .dir-end {
    font-size: 12px;
    color: var(--text-3);
}

@media (max-width: 768px) {
    .directory-index .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .directory-index .biz-grid {
        grid-template-columns: 1fr;
    }

    .directory-index .pg-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================
   BUSINESS DIRECTORY CATEGORY LIST
   ============================ */
.directory-list {
    margin-bottom: 24px;
}

.directory-list .list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.directory-list .lh-left h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 2px;
}

.directory-list .lh-left span {
    font-size: 13px;
    color: var(--text-3);
}

.directory-list .lh-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.directory-list .list-search {
    position: relative;
    width: 240px;
}

.directory-list .list-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    outline: none;
    transition: border-color var(--transition);
    color: var(--text-1);
}

.directory-list .list-search input:focus {
    border-color: var(--text-3);
}

.directory-list .list-search input::placeholder {
    color: var(--text-3);
}

.directory-list .list-search i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-3);
    pointer-events: none;
}

.directory-list .sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    background: var(--surface);
    color: var(--text-2);
    outline: none;
    cursor: pointer;
}

.directory-list .country-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.directory-list .country-chips .cc-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    margin-right: 2px;
}

.directory-list .c-chip {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.directory-list .c-chip:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.directory-list .c-chip.active {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.directory-list .biz-list {
    margin-bottom: 20px;
}

.directory-list .bl-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 8px;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.directory-list .bl-row:hover {
    border-color: var(--text-3);
}

.directory-list .bl-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.directory-list .bl-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}

.directory-list .bl-logo-blue { background: var(--blue-soft); color: var(--blue); }
.directory-list .bl-logo-green { background: var(--green-soft); color: var(--green); }
.directory-list .bl-logo-amber { background: var(--amber-soft); color: var(--amber); }
.directory-list .bl-logo-purple { background: var(--purple-soft); color: var(--purple); }
.directory-list .bl-logo-red { background: var(--red-soft); color: var(--red); }

.directory-list .bl-info {
    flex: 1;
    min-width: 0;
}

.directory-list .bl-info h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 2px;
}

.directory-list .bl-desc {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.directory-list .bl-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-3);
    flex-wrap: wrap;
}

.directory-list .bl-meta i {
    font-size: 10px;
}

.directory-list .bl-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.directory-list .dir-list-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    border: 1px dashed var(--border);
    border-radius: var(--r);
}

.directory-list .dir-list-pagination {
    margin-top: 8px;
}

.directory-list .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.directory-list .pg-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0 8px;
}

.directory-list .pg-btn:hover:not(.disabled):not(.active) {
    border-color: var(--text-3);
    color: var(--text-1);
}

.directory-list .pg-btn.active {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.directory-list .pg-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

@media (max-width: 768px) {
    .directory-list .list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .directory-list .list-search {
        width: 100%;
    }

    .directory-list .lh-actions {
        width: 100%;
    }

    .directory-list .bl-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .directory-list .bl-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================
   PORTAL PAGES — MOBILE ENHANCEMENTS
   Profile, inquiries/leads, directory
   ============================ */
@media (max-width: 768px) {
    .breadcrumb {
        flex-wrap: wrap;
        row-gap: 4px;
        line-height: 1.4;
    }

    .breadcrumb .bc-current {
        min-width: 0;
        word-break: break-word;
    }

    /* Business profile */
    .profile-cover {
        min-height: 180px;
        height: 180px;
        border-radius: var(--r);
    }

    .profile-header {
        padding: 0 14px 14px;
        border-radius: var(--r);
        margin-top: -1px;
    }

    .ph-info h1 {
        font-size: 18px;
    }

    .ph-logo {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .profile-tabs,
    .il-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: var(--r);
    }

    .profile-tabs::-webkit-scrollbar,
    .il-tabs::-webkit-scrollbar {
        display: none;
    }

    .profile-tabs .ptab,
    .il-tabs .ptab {
        padding: 10px 14px;
        font-size: 12px;
    }

    .ph-social {
        flex-wrap: wrap;
    }

    .services-tab-header,
    .team-tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .contact-row {
        align-items: flex-start;
    }

    .contact-row span,
    .contact-row a {
        word-break: break-word;
    }

    .inquiry-form {
        padding: 0;
    }

    /* Inquiries & leads */
    .inquiries-table-section {
        margin-bottom: 0;
        border: none;
        background: transparent;
    }

    .inquiries-table-wrap {
        border: 1px solid var(--border);
        border-radius: var(--r);
        background: var(--surface);
    }

    .inquiries-table {
        min-width: 640px;
    }

    .inquiries-panel .section .sec-h,
    .inquiries-panel .section .sec-b {
        padding-left: 14px;
        padding-right: 14px;
    }

    .inquiries-panel .lead-top-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .inquiries-panel .lead-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .inquiries-panel .lead-actions-inline {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .inquiries-panel .status-select.btn-sm {
        flex: 1;
        min-width: 120px;
    }

    .leads-upgrade-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        text-align: center;
    }

    .leads-upgrade-msg {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .leads-upgrade-footer .btn-dark {
        width: 100%;
        justify-content: center;
    }

    .free-lead-item {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Directory index */
    .directory-index .pg-header h1 {
        font-size: 18px;
        line-height: 1.35;
    }

    .directory-index .ph-count {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

    .directory-index .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .directory-index .dir-search {
        margin-bottom: 14px;
    }

    .directory-index .filters {
        gap: 4px;
    }

    .directory-index .f-chip {
        padding: 6px 12px;
    }

    /* Directory category list */
    .directory-list .lh-left h1 {
        font-size: 18px;
    }

    .directory-list .lh-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .directory-list .list-search,
    .directory-list .sort-select {
        width: 100%;
    }

    .directory-list .bl-row {
        gap: 12px;
        padding: 12px 14px;
    }

    .directory-list .bl-desc {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .directory-list .bl-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .directory-list .bl-meta span {
        max-width: 100%;
    }

    .directory-list .bl-actions {
        display: none;
    }

    .directory-list .pagination {
        gap: 2px;
    }

    .directory-list .pg-btn {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
        padding: 0 6px;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 14px 12px;
    }

    .directory-index .cat-grid {
        grid-template-columns: 1fr;
    }

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

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

    .ph-actions .btn-primary,
    .ph-actions .btn-outline {
        width: 100%;
        flex: none;
    }

    .profile-tabs .ptab,
    .il-tabs .ptab {
        padding: 10px 12px;
    }
}

/* ============================
   PORTAL BLOG (DASHBOARD)
   ============================ */
.portal-blog-page {
    margin-bottom: 24px;
}

.portal-blog-page .pg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-blog-page .pg-header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0;
}

.portal-blog-page .ph-count {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
    margin-left: 8px;
}

.portal-blog-page .blog-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.portal-blog-page .f-chip {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    text-decoration: none;
    transition: all var(--transition);
}

.portal-blog-page .f-chip:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.portal-blog-page .f-chip.active {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.portal-blog-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.portal-blog-page .blog-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}

.portal-blog-page .blog-card:hover {
    border-color: var(--text-3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.portal-blog-page .blog-card-img {
    position: relative;
    height: 140px;
    background: var(--accent-soft);
    overflow: hidden;
}

.portal-blog-page .blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-blog-page .blog-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-3);
    background: var(--brand-blue-soft);
}

.portal-blog-page .blog-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

.portal-blog-page .blog-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.portal-blog-page .blog-card-cat {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--brand-blue);
}

.portal-blog-page .blog-card-body h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-blog-page .blog-card-body p {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.portal-blog-page .blog-card-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: auto;
}

.portal-blog-page .blog-empty {
    grid-column: 1 / -1;
    padding: 32px 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    border: 1px dashed var(--border);
    border-radius: var(--r);
}

.portal-blog-page .blog-pagination .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

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

.portal-blog-page .blog-pagination .pg-btn:hover:not(.disabled):not(.active) {
    border-color: var(--text-3);
    color: var(--text-1);
}

.portal-blog-page .blog-pagination .pg-btn.active {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.portal-blog-page .blog-pagination .pg-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Blog detail */
.portal-blog-detail .blog-article {
    margin-bottom: 0;
}

.portal-blog-detail .blog-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.portal-blog-detail .blog-article-cat {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.portal-blog-detail .blog-article-cat.members {
    background: var(--amber-soft);
    color: var(--amber);
}

.portal-blog-detail .blog-article-date {
    font-size: 12px;
    color: var(--text-3);
}

.portal-blog-detail .blog-article-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin: 0 0 10px;
}

.portal-blog-detail .blog-article-excerpt {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0 0 18px;
}

.portal-blog-detail .blog-article-cover {
    margin-bottom: 20px;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
}

.portal-blog-detail .blog-article-cover img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.portal-blog-detail .blog-article-content {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.75;
}

.portal-blog-detail .blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r);
    margin: 12px 0;
}

.portal-blog-detail .blog-article-content h1,
.portal-blog-detail .blog-article-content h2,
.portal-blog-detail .blog-article-content h3,
.portal-blog-detail .blog-article-content h4 {
    color: var(--text-1);
    margin: 1.4em 0 0.6em;
    line-height: 1.3;
}

.portal-blog-detail .blog-article-content p {
    margin: 0 0 1em;
}

.portal-blog-detail .blog-article-content ul,
.portal-blog-detail .blog-article-content ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.portal-blog-detail .blog-article-content a {
    color: var(--brand-blue);
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .portal-blog-page .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-blog-page .pg-header h1 {
        font-size: 18px;
        line-height: 1.35;
    }

    .portal-blog-page .ph-count {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

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

    .portal-blog-page .blog-card-img {
        height: 180px;
    }

    .portal-blog-detail .blog-article-title {
        font-size: 20px;
    }

    .portal-blog-detail .blog-article-cover img {
        max-height: 260px;
    }
}

/* ============================
   SETTINGS PAGE (dashboard v2)
   ============================ */
.settings-page {
    margin-bottom: 24px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.settings-content {
    min-width: 0;
}

.settings-page .greeting {
    margin-bottom: 16px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
}

.settings-nav-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-2);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.settings-nav-link:hover {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.settings-nav-link.is-active {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
    font-weight: 600;
}

.settings-panel {
    min-width: 0;
}

/* Override legacy style.css `.section` / `.section h2` inside settings */
.settings-page .section {
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

.settings-page .section:last-child {
    margin-bottom: 0;
}

.settings-page .sec-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
}

.settings-page .sec-h h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-1);
}

.settings-page .sec-b {
    padding: 0 18px 16px;
}

.settings-help {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
}

.settings-help strong {
    color: var(--text-1);
    font-weight: 600;
}

.settings-empty {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.settings-text-count,
.settings-page .text-count {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 6px;
}

.settings-field-error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--red);
}

.settings-form-actions {
    margin-top: 4px;
    margin-bottom: 16px;
}

.settings-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-page .btn-primary {
    padding: 8px 18px;
    background: var(--text-1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.settings-page .btn-primary:hover {
    background: #333;
    color: #fff;
}

.settings-page .field {
    margin-bottom: 14px;
}

.settings-page .field:last-child {
    margin-bottom: 0;
}

.settings-page .two.fields > .field,
.settings-page .three.fields > .field {
    margin-bottom: 0;
}

.settings-page .field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.settings-page .field input[type="text"],
.settings-page .field input[type="email"],
.settings-page .field input[type="password"],
.settings-page .field input[type="date"],
.settings-page .field input[type="tel"],
.settings-page .field input[type="number"],
.settings-page .field textarea,
.settings-page .settings-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-1);
    outline: none;
    transition: border-color var(--transition);
    box-sizing: border-box;
}

.settings-page .field input:focus,
.settings-page .field textarea:focus,
.settings-page .settings-select:focus {
    border-color: var(--text-3);
}

.settings-page .field textarea {
    min-height: 120px;
    resize: vertical;
}

.settings-page .two.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.settings-page .two.fields.phone-fields {
    grid-template-columns: minmax(140px, 0.45fr) 1fr;
}

.settings-page .three.fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.settings-page .two.fields:last-child,
.settings-page .three.fields:last-child {
    margin-bottom: 0;
}

.settings-page .ui.pointing.red.basic.label {
    margin-top: 6px;
    font-size: 12px;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-toggle-info strong {
    font-size: 13px;
    color: var(--text-1);
    font-weight: 500;
}

.settings-toggle-info span {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.45;
}

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

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

.settings-info-row span {
    color: var(--text-3);
}

.settings-info-row strong {
    color: var(--text-1);
    font-weight: 600;
}

.settings-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.settings-referral-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 10px;
}

.settings-referral-box code {
    font-size: 12px;
    word-break: break-all;
    color: var(--text-2);
    flex: 1;
}

.settings-interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.settings-interest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    transition: all var(--transition);
}

.settings-interest-item:hover {
    border-color: var(--text-3);
}

.settings-interest-item:has(input:checked) {
    border-color: var(--brand-blue);
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.settings-country-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
}

.settings-country-option.active,
.settings-country-option:has(input:checked) {
    border-color: var(--brand-blue);
    background: var(--brand-blue-soft);
}

.settings-country-option img {
    width: 24px;
    height: auto;
    border-radius: 2px;
}

.settings-country-option input {
    display: none;
}

.settings-stub .sec-h {
    align-items: center;
}

.settings-coming-soon {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    background: var(--accent-soft);
    padding: 4px 8px;
    border-radius: 999px;
}

.settings-alert {
    border-color: #fde68a;
    background: var(--amber-soft);
}

.settings-danger-zone .settings-stub {
    border-style: dashed;
    border-color: rgba(220, 38, 38, 0.2);
}

/* Profile hero (settings profile tab) */
.settings-profile-hero {
    margin-bottom: 16px;
    border-radius: var(--r);
    overflow: hidden;
}

.settings-profile-hero .profile-cover {
    min-height: 160px;
    height: 160px;
    border-radius: var(--r) var(--r) 0 0;
}

.settings-profile-hero .profile-header {
    margin-bottom: 0;
    border-radius: 0 0 var(--r) var(--r);
}

.settings-media-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.settings-media-edit:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.settings-avatar-edit {
    cursor: pointer;
    position: relative;
    margin: 0;
}

.settings-avatar-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--text-1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid var(--surface);
    pointer-events: none;
}

.settings-add-row {
    margin-top: 12px;
}

/* Crop modal */
.settings-crop-modal.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}

.settings-crop-modal.confirm-image {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
    pointer-events: none;
}

.settings-crop-modal.confirm-image .settings-crop-dialog {
    pointer-events: auto;
}

.settings-crop-dialog {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.settings-crop-dialog .sec-h {
    padding-right: 12px;
}

.settings-crop-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-crop-close:hover {
    color: var(--text-1);
    border-color: var(--text-3);
}

.settings-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 18px 16px;
}

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

    .settings-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .settings-nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .settings-page .two.fields,
    .settings-page .three.fields {
        grid-template-columns: 1fr;
    }

    .settings-profile-hero .profile-cover {
        min-height: 120px;
        height: 120px;
    }
}

/* ============================
   PORTAL CHANNELS
   ============================ */
.portal-channels-page {
    margin-bottom: 24px;
}

.portal-channels-page .ch-stats {
    margin-bottom: 20px;
}

.portal-channels-page .pg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.portal-channels-page .pg-header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0;
}

.portal-channels-page .btn-primary {
    padding: 8px 18px;
    background: var(--text-1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.portal-channels-page .btn-primary:hover {
    background: #333;
    color: #fff;
}

.portal-channels-page .ch-search {
    position: relative;
    margin-bottom: 20px;
}

.portal-channels-page .ch-search > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-3);
    pointer-events: none;
}

.portal-channels-page .ch-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    outline: none;
    transition: border-color var(--transition);
}

.portal-channels-page .ch-search input:focus {
    border-color: var(--text-3);
}

.portal-channels-page .sec-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-channels-page .sec-label.discover-label {
    margin-top: 8px;
}

.portal-channels-page .sec-label .sl-count {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--text-2);
}

.portal-channels-page .ch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
}

.portal-channels-page .ch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.portal-channels-page a.ch-row:hover {
    border-color: var(--text-3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.portal-channels-page .ch-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
    color: #fff;
}

.portal-channels-page .ch-row-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.portal-channels-page .ch-row-icon-fa {
    font-size: 18px;
    color: #fff;
}

.portal-channels-page .ch-row-icon-letter {
    font-size: 16px;
    font-weight: 700;
}

.portal-channels-page .ch-row-icon .ch-lock-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    color: #fff;
}

.portal-channels-page .ch-row-info {
    flex: 1;
    min-width: 0;
}

.portal-channels-page .ch-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-channels-page .ch-name .ch-private-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-channels-page .ch-desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.portal-channels-page .ch-faces {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.portal-channels-page .ch-faces img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    object-fit: cover;
    margin-left: -6px;
}

.portal-channels-page .ch-faces img:first-child {
    margin-left: 0;
}

.portal-channels-page .ch-faces .cf-more {
    font-size: 10px;
    color: var(--text-3);
    margin-left: 6px;
}

.portal-channels-page .ch-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: 100px;
}

.portal-channels-page .ch-stat {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.portal-channels-page .ch-stat i {
    font-size: 10px;
}

.portal-channels-page .ch-activity {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.portal-channels-page .ch-activity.hot {
    background: var(--green-soft);
    color: var(--green);
}

.portal-channels-page .ch-activity.warm {
    background: var(--blue-soft);
    color: var(--blue);
}

.portal-channels-page .ch-activity.quiet {
    background: var(--accent-soft);
    color: var(--text-3);
}

.portal-channels-page .ch-row-arrow {
    font-size: 10px;
    color: var(--text-3);
    flex-shrink: 0;
}

.portal-channels-page .ch-row.discover {
    cursor: default;
}

.portal-channels-page .ch-row.discover .ch-row-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.portal-channels-page .ch-row.discover .ch-row-link:hover .ch-name {
    color: var(--text-1);
}

.portal-channels-page .ch-row.discover .ch-join {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-1);
    transition: all var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.portal-channels-page .ch-row.discover .ch-join:hover {
    background: var(--text-1);
    color: #fff;
    border-color: var(--text-1);
}

.portal-channels-page .invite-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--blue-soft);
    border: 1px solid #dbeafe;
    border-radius: var(--r);
    margin-bottom: 20px;
}

.portal-channels-page .invite-banner > i {
    font-size: 18px;
    color: var(--blue);
}

.portal-channels-page .ib-text {
    flex: 1;
}

.portal-channels-page .ib-text strong {
    font-size: 13px;
}

.portal-channels-page .ib-text p {
    font-size: 12px;
    color: var(--text-2);
    margin: 4px 0 0;
}

.portal-channels-page .ib-actions {
    display: flex;
    gap: 8px;
}

.portal-channels-page .ib-accept {
    padding: 6px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.portal-channels-page .ib-decline {
    padding: 6px 14px;
    background: transparent;
    color: var(--text-3);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.portal-channels-page .ch-empty-state {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 24px;
}

.portal-channels-page .ad-slot.middle,
.portal-channels-page .ad-slot.bottom {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .portal-channels-page .ch-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .portal-channels-page .ch-faces {
        display: none;
    }

    .portal-channels-page .ch-row-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-left: 58px;
        min-width: 0;
    }

    .portal-channels-page .ch-row-arrow {
        display: none;
    }

    .portal-channels-page .pg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .portal-channels-page .invite-banner {
        flex-direction: column;
        text-align: center;
    }

    .portal-channels-page .ch-row.discover .ch-join {
        margin-left: 58px;
    }
}

/* ============================
   PORTAL CHANNEL DETAIL
   ============================ */
.portal-channel-detail {
    margin-bottom: 24px;
}

.portal-channel-detail .ch-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 16px;
}

.portal-channel-detail .ch-banner-img {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 600;
}

.portal-channel-detail .ch-header-body {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-channel-detail .ch-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--accent-soft);
    flex-shrink: 0;
    margin-top: -36px;
    border: 3px solid var(--surface);
    position: relative;
    color: #fff;
    font-weight: 700;
}

.portal-channel-detail .ch-header-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.portal-channel-detail .ch-header-info {
    flex: 1;
    min-width: 0;
}

.portal-channel-detail .ch-header-info h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 4px;
}

.portal-channel-detail .ch-header-info p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
    margin: 0;
}

.portal-channel-detail .ch-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}

.portal-channel-detail .ch-header-meta span {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-channel-detail .ch-header-meta i {
    font-size: 10px;
}

.portal-channel-detail .ch-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.portal-channel-detail .btn-sm {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.portal-channel-detail .btn-sm:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.portal-channel-detail .btn-sm.danger {
    color: var(--red);
}

.portal-channel-detail .btn-sm.danger:hover {
    background: var(--red-soft);
    border-color: var(--red);
}

.portal-channel-detail .ch-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: flex-start;
}

.portal-channel-detail .ch-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    background: var(--surface);
    border-radius: var(--r) var(--r) 0 0;
}

.portal-channel-detail .ch-tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
}

.portal-channel-detail .ch-tab:hover {
    color: var(--text-1);
}

.portal-channel-detail .ch-tab.active {
    color: var(--text-1);
    font-weight: 600;
    border-bottom-color: var(--text-1);
}

.portal-channel-detail .ch-tab .ct-count {
    font-size: 10px;
    color: var(--text-3);
    margin-left: 4px;
}

.portal-channel-detail .tab-panel {
    display: none;
}

.portal-channel-detail .tab-panel.active {
    display: block;
}

.portal-channel-detail .channel-compose {
    margin-bottom: 12px;
}

.portal-channel-detail .channel-compose .input-box {
    display: flex;
    gap: 10px;
}

.portal-channel-detail .channel-compose .input-box .image img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-channel-detail .channel-compose .input-info {
    flex: 1;
}

.portal-channel-detail .channel-compose textarea,
.portal-channel-detail .channel-compose input[type="text"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.portal-channel-detail .compose {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.portal-channel-detail .compose:focus-within {
    border-color: var(--text-3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.portal-channel-detail .compose > img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.portal-channel-detail .compose-form {
    flex: 1;
    min-width: 0;
}

.portal-channel-detail .compose-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.portal-channel-detail .compose-input .disc-title-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-soft, var(--border));
    border-radius: 0;
    padding: 4px 0 10px;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    font-family: inherit;
    background: transparent;
    color: var(--text-1);
}

.portal-channel-detail .compose-input .disc-title-input::placeholder {
    color: var(--text-3);
    font-weight: 500;
}

.portal-channel-detail .compose-input .disc-title-input:focus {
    border-bottom-color: var(--text-2);
}

.portal-channel-detail .compose-input textarea {
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 10px 0;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    outline: none;
    font-family: inherit;
    background: transparent;
    color: var(--text-1);
    transition: min-height var(--transition);
}

.portal-channel-detail .compose-input textarea::placeholder {
    color: var(--text-3);
}

.portal-channel-detail .compose-input textarea:focus {
    min-height: 80px;
}

.portal-channel-detail .compose-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.portal-channel-detail .compose-toolbar .ct-icons {
    display: flex;
    gap: 2px;
    align-items: center;
}

.portal-channel-detail .compose-toolbar .ct-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 6px;
    color: var(--text-3);
    font-size: 13px;
    transition: all var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-channel-detail .compose-toolbar .ct-icon-btn:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-channel-detail .compose-toolbar .ct-icon-btn.active {
    background: var(--blue-soft);
    color: var(--blue);
}

.portal-channel-detail .compose-toolbar .ct-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.portal-channel-detail .feed-char-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 8px;
    background: var(--surface-2, #f5f5f5);
    padding: 2px 8px;
    border-radius: 10px;
}

.portal-channel-detail .compose-image-preview {
    margin-top: 4px;
}

.portal-channel-detail .compose-image-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
}

.portal-channel-detail .disc-title-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    background: var(--surface-2, #f5f5f5);
    padding: 2px 8px;
    border-radius: 10px;
}

.portal-channel-detail .compose-toolbar .ct-post {
    padding: 8px 20px;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.portal-channel-detail .compose-toolbar .ct-post:hover {
    background: var(--brand-blue-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 6, 92, 0.15);
}

.disc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disc-list .disc-item-wrap {
    margin-bottom: 0;
}

.disc-list .disc-empty,
.portal-channel-detail .disc-empty {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.portal-channels-page .disc-list.portal-channels-discussions {
    margin-bottom: 30px;
}

.disc-list .disc-item-wrap,
.portal-channel-detail .disc-item-wrap {
    position: relative;
}

.disc-list .disc-item,
.portal-channel-detail .disc-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.disc-list .disc-item:hover,
.portal-channel-detail .disc-item:hover {
    border-color: var(--text-3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.disc-list .disc-item > img,
.portal-channel-detail .disc-item > img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.disc-list .disc-body,
.portal-channel-detail .disc-body {
    flex: 1;
    min-width: 0;
    padding-right: 0;
}

.disc-list .disc-item-wrap .disc-body,
.portal-channel-detail .disc-item-wrap .disc-body {
    padding-right: 24px;
}

.disc-list .disc-body h4,
.portal-channel-detail .disc-body h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.4;
    color: var(--text-1);
}

.disc-list .disc-body p,
.portal-channel-detail .disc-body p {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.disc-list .disc-meta,
.portal-channel-detail .disc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.disc-list .disc-meta span,
.portal-channel-detail .disc-meta span {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.disc-list .disc-meta i,
.portal-channel-detail .disc-meta i {
    font-size: 10px;
}

.disc-list .disc-item-menu,
.portal-channel-detail .disc-item-menu {
    position: absolute;
    top: 10px;
    right: 10px;
}

.disc-list .disc-more,
.portal-channel-detail .disc-more {
    color: var(--text-3);
    font-size: 13px;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.disc-list .disc-more:hover,
.portal-channel-detail .disc-more:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-channel-detail .channel-compose .option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.portal-channel-detail .member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.portal-channel-detail .member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.portal-channel-detail .member-card:hover {
    border-color: var(--text-3);
}

.portal-channel-detail .member-card img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-channel-detail .member-card .mc-info {
    flex: 1;
    min-width: 0;
}

.portal-channel-detail .member-card .mc-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-channel-detail .member-card .mc-role {
    font-size: 10px;
    color: var(--text-3);
}

.portal-channel-detail .mc-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.portal-channel-detail .mc-badge-admin {
    background: var(--blue-soft);
    color: var(--blue);
}

.portal-channel-detail .member-pagination {
    margin-top: 20px;
}

.portal-channel-detail .ch-sidebar {
    position: sticky;
    top: 72px;
}

.portal-channel-detail .sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 12px;
}

.portal-channel-detail .sidebar-card h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin: 0 0 10px;
}

.portal-channel-detail .sc-about p {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

.portal-channel-detail .sc-about-stats {
    margin-top: 12px;
}

.portal-channel-detail .sc-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
}

.portal-channel-detail .sc-stat-row .sc-label {
    color: var(--text-3);
}

.portal-channel-detail .sc-stat-row .sc-val {
    font-weight: 600;
}

.portal-channel-detail .sc-members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-channel-detail .sc-member {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-channel-detail .sc-member img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-channel-detail .sc-member span {
    font-size: 12px;
}

.portal-channel-detail .sc-member .sc-admin {
    font-size: 9px;
    font-weight: 600;
    color: var(--blue);
    margin-left: 4px;
}

.portal-channel-detail .sc-see-all {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    margin-top: 10px;
    padding: 6px;
    border-radius: 6px;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.portal-channel-detail .sc-see-all:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-channel-detail .sc-empty,
.portal-channel-detail .ch-empty-state {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
}

.portal-channel-detail #posts-container .box.feed,
.portal-channel-detail #discussion-posts-container .box.feed {
    margin-bottom: 10px;
}

.portal-channel-detail .post {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 10px;
}

.portal-channel-detail .post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.portal-channel-detail .post-header > img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.portal-channel-detail .post-author {
    flex: 1;
    min-width: 0;
}

.portal-channel-detail .post-author-link {
    text-decoration: none;
    color: inherit;
}

.portal-channel-detail .post-author strong {
    font-size: 13px;
    font-weight: 600;
}

.portal-channel-detail .post-author span {
    font-size: 11px;
    color: var(--text-3);
    display: block;
}

.portal-channel-detail .post-more-dropdown {
    margin-left: auto;
}

.portal-channel-detail .post-more {
    color: var(--text-3);
    font-size: 13px;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.portal-channel-detail .post-more:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-channel-detail .post-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-2);
    margin-bottom: 12px;
}

.portal-channel-detail .post-body .description {
    margin: 0;
}

.portal-channel-detail .post-body strong {
    color: var(--text-1);
}

.portal-channel-detail .post-gallery {
    margin-top: 12px;
}

.portal-channel-detail .post-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    display: block;
}

.portal-channel-detail .post-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.portal-channel-detail .post-connection {
    margin-bottom: 10px;
}

.portal-channel-detail .post-connection-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface);
    text-decoration: none;
    cursor: pointer;
}

.portal-channel-detail .post-connection-btn:hover {
    border-color: var(--text-3);
    color: var(--text-1);
}

.portal-channel-detail .post-connection-btn.disabled,
.portal-channel-detail .post-connection-btn.connected {
    opacity: 0.7;
    cursor: default;
}

.portal-channel-detail .post-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.portal-channel-detail .post-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-3);
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.portal-channel-detail .post-action:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-channel-detail .post-action.liked {
    color: var(--blue);
}

.portal-channel-detail .post-action i {
    font-size: 13px;
}

.portal-channel-detail .post .comment-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.portal-channel-detail .end-indicator {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    padding: 16px 0;
}

@media (max-width: 900px) {
    .portal-channel-detail .ch-layout {
        grid-template-columns: 1fr;
    }

    .portal-channel-detail .ch-sidebar {
        position: static;
    }

    .portal-channel-detail .ch-header-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-channel-detail .ch-header-actions {
        width: 100%;
    }
}

/* ============================
   DISCUSSION THREAD DETAIL
   ============================ */
.portal-discussion-thread {
    margin-bottom: 24px;
}

.portal-discussion-thread .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 16px;
    transition: color var(--transition);
    text-decoration: none;
}

.portal-discussion-thread .back-link:hover {
    color: var(--text-1);
}

.portal-discussion-thread .thread {
    max-width: 720px;
}

.portal-discussion-thread .op {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 16px;
}

.portal-discussion-thread .op-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.portal-discussion-thread .op-header > img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.portal-discussion-thread .op-author {
    flex: 1;
    min-width: 0;
}

.portal-discussion-thread .op-author-link {
    text-decoration: none;
    color: inherit;
}

.portal-discussion-thread .op-author strong {
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.portal-discussion-thread .op-author span {
    font-size: 11px;
    color: var(--text-3);
}

.portal-discussion-thread .op-channel {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--text-2);
    text-decoration: none;
    white-space: nowrap;
}

.portal-discussion-thread .op-more-dropdown {
    margin-left: auto;
}

.portal-discussion-thread .op-more {
    color: var(--text-3);
    font-size: 13px;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.portal-discussion-thread .op-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}

.portal-discussion-thread .op-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
    margin-bottom: 16px;
}

.portal-discussion-thread .op-body p {
    margin-bottom: 10px;
}

.portal-discussion-thread .op-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.portal-discussion-thread .op-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-3);
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.portal-discussion-thread .op-action:hover {
    background: var(--accent-soft);
    color: var(--text-1);
}

.portal-discussion-thread .op-action.liked {
    color: var(--blue);
}

.portal-discussion-thread .op-action-static {
    cursor: default;
}

.portal-discussion-thread .op-action-static:hover {
    background: none;
    color: var(--text-3);
}

.portal-discussion-thread .comments-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
}

.portal-discussion-thread .reply-box {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px;
    align-items: flex-end;
}

.portal-discussion-thread .reply-box > img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.portal-discussion-thread .thread-top-reply-form {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    min-width: 0;
}

.portal-discussion-thread .thread-top-reply-form textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    resize: none;
    min-height: 36px;
    outline: none;
    font-family: inherit;
    transition: border-color var(--transition);
}

.portal-discussion-thread .thread-top-reply-form textarea:focus {
    border-color: var(--text-3);
    min-height: 60px;
}

.portal-discussion-thread .thread-top-reply-form button,
.portal-discussion-thread .thread-sub-reply-form button {
    padding: 6px 14px;
    background: var(--text-1);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    cursor: pointer;
}

.portal-discussion-thread .thread-char-count {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 16px;
    text-align: right;
}

.portal-discussion-thread .thread-login-prompt {
    margin-bottom: 16px;
    font-size: 13px;
}

.portal-discussion-thread .thread-login-prompt a {
    color: var(--blue);
    text-decoration: none;
}

.portal-discussion-thread .thread-empty {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.portal-discussion-thread .comment {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.portal-discussion-thread .comment > img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.portal-discussion-thread .comment-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
}

.portal-discussion-thread .comment-bubble .cb-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.portal-discussion-thread .comment-bubble .cb-name a {
    color: inherit;
    text-decoration: none;
}

.portal-discussion-thread .comment-bubble .cb-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.portal-discussion-thread [hidden] {
    display: none !important;
}

.portal-discussion-thread .thread-sub-loader {
    display: none;
}

.portal-discussion-thread .thread-sub-loader.is-loading {
    display: inline-block;
}

.portal-discussion-thread .comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0 0 4px;
    align-items: center;
}

.portal-discussion-thread .comment-meta button,
.portal-discussion-thread .thread-like-btn {
    font-size: 11px;
    color: var(--text-3);
    border: none;
    background: none;
    transition: color var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    padding: 0;
}

.portal-discussion-thread .comment-meta button:hover,
.portal-discussion-thread .thread-like-btn:hover {
    color: var(--text-1);
}

.portal-discussion-thread .comment-meta button.liked,
.portal-discussion-thread .thread-like-btn.liked {
    color: var(--blue);
}

.portal-discussion-thread .thread-delete-btn {
    color: var(--red) !important;
}

.portal-discussion-thread .comment-meta .cm-time {
    font-size: 11px;
    color: var(--text-3);
}

.portal-discussion-thread .sub-comments {
    margin-left: 40px;
    margin-top: 10px;
}

.portal-discussion-thread .sub-comments .comment > img {
    width: 26px;
    height: 26px;
}

.portal-discussion-thread .sub-comments .comment-bubble {
    background: var(--accent-soft);
    border-color: var(--border);
}

.portal-discussion-thread .thread-reply-box {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.portal-discussion-thread .thread-reply-box > img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.portal-discussion-thread .thread-sub-reply-form {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.portal-discussion-thread .thread-sub-reply-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    outline: none;
    font-family: inherit;
}

.portal-discussion-thread .thread-sub-reply-input:focus {
    border-color: var(--text-3);
}

@media (max-width: 768px) {
    .portal-discussion-thread .sub-comments {
        margin-left: 20px;
    }

    .portal-discussion-thread .thread-top-reply-form,
    .portal-discussion-thread .thread-sub-reply-form {
        flex-wrap: wrap;
    }
}
