/**
 * Xila Forum — Unified Discussion System CSS
 * File: /wp-content/themes/xila/assets/css/forum.css
 *
 * Cleaned: duplicate rules हटाए, sidebar overflow fix, action button text added
 */

/* --------------------
   SECTION 1 — LAYOUT
   -------------------- */

.xf-main,
.xfd-main { min-width: 0; padding: 0 0 40px; }

.xf-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
    padding-right: 2px;
}
.xf-sidebar-right::-webkit-scrollbar { width: 4px; }
.xf-sidebar-right::-webkit-scrollbar-track { background: transparent; }
.xf-sidebar-right::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

/* ----------------------------------------
   SECTION 2 — WIDGETS (Sidebar)
   ---------------------------------------- */

.xf-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: visible; /* content को clip मत करो */
}

.xf-widget-head {
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: .01em;
    border-radius: 14px 14px 0 0;
}

.xf-widget-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}
.xf-widget-stat:last-child { border-bottom: none; padding-bottom: 10px; }
.xf-widget-stat-label { color: #6b7280; }
.xf-widget-stat-value { font-weight: 600; color: #111827; }
.xf-stat-green { color: #16a34a; }
.xf-stat-red   { color: #dc2626; }

/* Widget list — overflow fix */
.xf-widget-list {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.xf-widget-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 16px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
    white-space: normal; /* wrap allow करो */
    word-break: break-word;
    gap: 8px;
}
.xf-widget-list-item:last-child { border-bottom: none; padding-bottom: 12px; }
.xf-widget-list-item:hover { background: #f9fafb; }

.xf-widget-list-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    line-height: 1.4;
}
.xf-widget-list-count { font-weight: 700; color: #6366f1; font-size: 12px; flex-shrink: 0; }
.xf-widget-list-meta  { font-size: 11px; color: #9ca3af; white-space: nowrap; flex-shrink: 0; }

.xf-widget-admin-link {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}
.xf-widget-admin-link:hover { text-decoration: underline; }

.xf-widget-back-link {
    display: block;
    padding: 10px 4px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    text-align: center;
}
.xf-widget-back-link:hover { color: #6366f1; }

/* Guide widget */
.xf-widget-guide .xf-guide-list {
    list-style: none;
    margin: 0;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.xf-widget-guide .xf-guide-list li {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    padding: 0;
}

/* ----------------------------------------
   SECTION 3 — FORUM INDEX PAGE
   ---------------------------------------- */

.xf-idx-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 18px;
    padding: 24px 24px 20px;
    margin-bottom: 20px;
    color: #fff;
}
.xf-idx-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
}
.xf-idx-header-top > div:first-child { flex: 1; min-width: 0; }
.xf-idx-header-actions { flex-shrink: 0; display: flex; align-items: center; }

.xf-idx-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    opacity: .85;
    flex-wrap: wrap;
}
.xf-idx-stat { display: flex; align-items: center; gap: 5px; }
.xf-idx-stat-num { font-size: 16px; font-weight: 800; }
.xf-idx-stat-lbl { font-size: 12px; opacity: .8; }
.xf-idx-stat-sep { opacity: .4; font-size: 16px; }

.xf-idx-search-wrap { position: relative; display: flex; align-items: center; }
.xf-idx-search-icon { position: absolute; left: 11px; color: rgba(255,255,255,.7); pointer-events: none; }
.xf-idx-search {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.xf-idx-search::placeholder { color: rgba(255,255,255,.6); }
.xf-idx-search:focus { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.xf-idx-title    { font-size: 26px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.xf-idx-subtitle { font-size: 14px; opacity: .78; }
.xf-idx-admin-link {
    font-size: 13px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 8px;
    transition: background .15s;
}
.xf-idx-admin-link:hover { background: rgba(255,255,255,.15); }

.xf-idx-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.xf-idx-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}
.xf-idx-tab:hover      { border-color: #6366f1; color: #6366f1; background: #eef2ff; }
.xf-idx-tab.is-active  { background: #6366f1; color: #fff; border-color: #6366f1; font-weight: 600; }
.xf-idx-tab-count { background: rgba(255,255,255,.25); font-size: 11px; padding: 1px 6px; border-radius: 10px; font-weight: 700; }
.xf-idx-tab:not(.is-active) .xf-idx-tab-count { background: #f3f4f6; color: #6b7280; }

.xf-idx-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

.xf-idx-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}
.xf-idx-card:hover { border-color: #6366f1; box-shadow: 0 4px 20px rgba(99,102,241,.1); transform: translateY(-1px); }
.xf-idx-card-icon {
    font-size: 26px; flex-shrink: 0;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: #f9fafb; border-radius: 12px; border: 1px solid #f3f4f6;
}
.xf-idx-card-body { flex: 1; min-width: 0; }
.xf-idx-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.xf-idx-card-title  { font-size: 15px; font-weight: 700; color: #111827; margin: 0; line-height: 1.3; }
.xf-idx-card-type-badge {
    font-size: 11px; padding: 2px 8px;
    background: #f3f4f6; color: #6b7280;
    border-radius: 6px; white-space: nowrap; font-weight: 500; flex-shrink: 0;
}
.xf-idx-card-desc { font-size: 13px; color: #6b7280; margin: 4px 0 8px; line-height: 1.5; }
.xf-idx-card-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.xf-idx-card-stat  { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #9ca3af; }
.xf-idx-card-stat--time { margin-left: auto; }
.xf-idx-card-arrow { font-size: 20px; color: #d1d5db; transition: color .15s, transform .15s; align-self: center; flex-shrink: 0; }
.xf-idx-card:hover .xf-idx-card-arrow { color: #6366f1; transform: translateX(3px); }

/* ----------------------------------------
   SECTION 4 — FORUM SINGLE: HEADER
   ---------------------------------------- */

.xfd-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.xfd-header-inner { display: flex; align-items: flex-start; gap: 14px; }
.xfd-header-icon {
    font-size: 22px; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; flex-shrink: 0;
}
.xfd-header-info { flex: 1; min-width: 0; }
.xfd-header-top-meta {
    display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap;
}
.xfd-forum-type-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; opacity: .8; flex-shrink: 0;
}
.xfd-linked-title-link {
    font-size: 16px; font-weight: 800; color: #111827;
    text-decoration: none; line-height: 1.3; transition: color .15s;
}
.xfd-linked-title-link:hover { color: #6366f1; text-decoration: underline; }
.xfd-forum-name-plain { font-size: 16px; font-weight: 800; color: #111827; line-height: 1.3; }
.xfd-header-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xfd-stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #9ca3af; }
.xfd-stat strong { color: #374151; font-weight: 700; }
.xfd-stat-time { color: #b0b8c5; }
.xfd-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.xfd-share-btn,
.xfd-admin-link {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb; border-radius: 8px;
    background: #fff; cursor: pointer; color: #6b7280;
    text-decoration: none; font-size: 13px; transition: all .15s;
}
.xfd-share-btn:hover,
.xfd-admin-link:hover { border-color: #6366f1; color: #6366f1; background: #eef2ff; }

/* ----------------------------------------
   SECTION 5 — COMPOSER
   ---------------------------------------- */

.xfd-composer {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color .2s;
}
.xfd-composer:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }

.xfd-composer-guest {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; font-size: 14px; color: #6b7280; flex-wrap: wrap; gap: 10px;
}
.xfd-login-btn {
    padding: 8px 18px; background: #6366f1; color: #fff;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: opacity .2s;
}
.xfd-login-btn:hover { opacity: .88; }

.xfd-composer-trigger {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; cursor: pointer; transition: background .15s;
}
.xfd-composer-trigger:hover { background: #f9fafb; }
.xfd-composer-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.xfd-composer-cta { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.xfd-composer-placeholder { font-size: 13.5px; color: #9ca3af; pointer-events: none; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfd-composer-cta-btn {
    flex-shrink: 0; padding: 7px 16px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff; border-radius: 8px; font-size: 13px; font-weight: 700;
    pointer-events: none; white-space: nowrap;
}

.xfd-editor { padding: 14px 18px 16px; }

.xfd-type-row {
    display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.xfd-type-row::-webkit-scrollbar { display: none; }
.xfd-type-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 11px; border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; font-size: 12px; font-weight: 600; color: #64748b;
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: all .13s; font-family: inherit;
}
.xfd-type-btn:hover    { border-color: #6366f1; color: #4f46e5; background: #eef2ff; }
.xfd-type-btn.is-active { background: #6366f1; border-color: #6366f1; color: #fff; }
.xfd-type-label { display: none; }
@media (min-width: 480px) { .xfd-type-label { display: inline; } }

.xfd-poll-builder {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
    padding: 12px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb;
}
.xfd-poll-inp { padding: 8px 11px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; transition: border-color .15s; }
.xfd-poll-inp:focus { border-color: #6366f1; }
.xfd-add-poll-opt {
    align-self: flex-start; padding: 4px 12px;
    border: 1.5px dashed #c4b5fd; border-radius: 20px;
    background: #faf5ff; color: #6d28d9; font-size: 11px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all .13s;
}
.xfd-add-poll-opt:hover { background: #ede9fe; }

.xfd-stage-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.xfd-stage-btn {
    padding: 5px 11px; border: 1.5px solid #c7d2fe; border-radius: 20px;
    background: #e0e7ff; color: #3730a3; font-size: 11.5px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all .13s;
}
.xfd-stage-btn:hover,
.xfd-stage-btn.is-active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.xfd-marks-row { display: flex; gap: 8px; margin-bottom: 8px; }
.xfd-marks-inp,
.xfd-cat-sel {
    flex: 1; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 12.5px; outline: none; font-family: inherit; transition: border-color .15s;
}
.xfd-marks-inp:focus,
.xfd-cat-sel:focus { border-color: #4f46e5; }

.xfd-sb-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.xfd-sb-inp { flex: 1; min-width: 100px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 12.5px; outline: none; font-family: inherit; transition: border-color .15s; }
.xfd-sb-inp:focus { border-color: #0f766e; }

.xfd-textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 14px; line-height: 1.6; color: #1e293b;
    resize: vertical; font-family: inherit; outline: none;
    box-sizing: border-box; transition: border-color .15s; min-height: 90px;
}
.xfd-textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.xfd-char-counter { text-align: right; font-size: 11px; color: #9ca3af; margin-top: 4px; margin-bottom: 10px; }

.xfd-editor-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.xfd-cancel-btn {
    padding: 9px 16px; border: 1px solid #e5e7eb; border-radius: 9px;
    background: #fff; font-size: 13px; color: #6b7280; cursor: pointer;
    font-family: inherit; transition: background .15s;
}
.xfd-cancel-btn:hover { background: #f3f4f6; }
.xfd-submit-btn {
    padding: 9px 22px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff; border: none; border-radius: 9px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: opacity .2s, transform .15s;
    box-shadow: 0 3px 12px rgba(99,102,241,.3);
}
.xfd-submit-btn:hover    { opacity: .9; transform: translateY(-1px); }
.xfd-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ----------------------------------------
   SECTION 6 — CONTROLS BAR
   ---------------------------------------- */

.xfd-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.xfd-controls-left,
.xfd-controls-right { display: flex; align-items: center; gap: 6px; }
.xfd-sort-btn {
    padding: 7px 13px; border: 1px solid #e5e7eb; border-radius: 8px;
    background: #fff; font-size: 12.5px; font-weight: 500; color: #6b7280;
    cursor: pointer; transition: all .15s; white-space: nowrap; font-family: inherit;
}
.xfd-sort-btn:hover    { border-color: #6366f1; color: #6366f1; }
.xfd-sort-btn.is-active { background: #6366f1; color: #fff; border-color: #6366f1; font-weight: 600; }
.xfd-type-filter-sel {
    padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 12.5px; color: #374151; background: #fff;
    cursor: pointer; outline: none; font-family: inherit;
}
.xfd-type-filter-sel:focus { border-color: #6366f1; }

/* ----------------------------------------
   SECTION 7 — DISCUSSION CARDS (Community Post / xcp-*)
   ---------------------------------------- */

.xfd-list { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }

.xcp-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
    animation: xcpSlideIn .2s ease;
}
@keyframes xcpSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.xcp-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.xcp-resolved   { opacity: .85; }
.xfd-pinned     { border-color: #f59e0b; background: #fffbeb; }

/* Q status strip */
.xcp-q-status { font-size: 10px; font-weight: 700; padding: 3px 12px; letter-spacing: .5px; text-transform: uppercase; }
.xcp-q-status.is-open { background: #eff6ff; color: #1d4ed8; }
.xcp-q-status.is-ok   { background: #f0fdf4; color: #15803d; }

.xcp-body { padding: 12px 14px 0; }

/* action bar को card के left/right edges तक extend करो */
.xcp-body .xcp-actions {
    margin-left: -14px;
    margin-right: -14px;
}

/* Row 1: User + Timestamp + Type Badge */
.xcp-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.xcp-av   { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.xcp-meta-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.xcp-name { font-size: 12px; font-weight: 700; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcp-time { font-size: 10.5px; color: #94a3b8; }
.xcp-type-badge { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }

/* Row 2: Content */
.xcp-stage-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; background: #e0e7ff; color: #3730a3;
    border-radius: 20px; font-size: 11px; font-weight: 700; margin-bottom: 7px;
}
.xcp-stage-marks { background: rgba(255,255,255,.5); padding: 1px 7px; border-radius: 10px; font-size: 10px; color: #4338ca; }
.xcp-sb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.xcp-sb-tag  { font-size: 11px; font-weight: 600; padding: 2px 9px; background: #f0fdfa; color: #0f766e; border-radius: 12px; border: 1px solid #99f6e4; }
.xcp-text { font-size: 13.5px; line-height: 1.65; color: #374151; word-break: break-word; }
.xcp-text p { margin: 0 0 6px; }
.xcp-text p:last-child { margin-bottom: 0; }
.xcp-ref { margin-top: 6px; font-size: 11px; color: #7c3aed; background: #faf5ff; padding: 3px 9px; border-radius: 6px; display: inline-block; }

/* Poll */
.xcp-poll { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.xcp-poll-opt {
    position: relative; width: 100%; padding: 7px 11px;
    border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff;
    cursor: pointer; text-align: left; font-size: 12.5px; font-weight: 600; color: #374151;
    overflow: hidden; display: flex; align-items: center; justify-content: space-between;
    transition: all .15s; font-family: inherit;
}
.xcp-poll-opt:not(.is-done):hover { border-color: #6366f1; color: #4338ca; }
.xcp-poll-opt.is-sel  { border-color: #6366f1; color: #4338ca; background: #eef2ff; }
.xcp-poll-opt.is-done { cursor: default; }
.xcp-poll-fill  { position: absolute; left: 0; top: 0; height: 100%; background: #e0e7ff; border-radius: 8px; transition: width .45s ease; z-index: 0; }
.xcp-poll-lbl   { position: relative; z-index: 1; }
.xcp-poll-pct   { position: relative; z-index: 1; font-size: 11px; color: #4f46e5; font-weight: 700; flex-shrink: 0; }
.xcp-poll-total { font-size: 10.5px; color: #94a3b8; text-align: right; padding-right: 4px; }

/* ------------------------------------------------------------
   SECTION 8 — ACTION BUTTONS (Icon + Text दोनों)
   ---------------------------------------- */

/* Card footer — equal width action bar, full bleed */
.xcp-actions {
    display: flex;
    align-items: stretch;
    margin-top: 10px;
    padding: 0;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 13px 13px;
    overflow: hidden;
}

.xcp-actions > * {
    flex: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px !important;
    border: none !important;
    border-right: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    color: #6b7280;
    transition: background .13s, color .13s;
    font-family: inherit;
    white-space: nowrap;
    font-weight: 500;
    text-decoration: none;
}

.xcp-actions > *:last-child {
    border-right: none !important;
}

.xcp-actions > *:hover {
    background: #f9fafb !important;
    color: #374151;
}
/* Like button */
.xcp-actions > .xcp-help-btn { color: #6b7280 !important; background: transparent !important; font-weight: 500 !important; }
.xcp-actions > .xcp-help-btn:hover { color: #7c3aed !important; background: #faf5ff !important; }
.xcp-help-n { font-size: 11px; font-weight: 700; color: inherit; }

/* Reply button */
.xcp-reply-toggle-btn:hover { color: #0891b2 !important; background: #f0f9ff !important; }

/* Resolve button */
.xcp-resolve-btn:hover { color: #15803d !important; background: #f0fdf4 !important; }

/* Pin button */
.xfd-pin-btn:hover { color: #f59e0b !important; background: #fef3c7 !important; }
.xfd-pinned .xfd-pin-btn { color: #f59e0b !important; }

/* Delete button */
.xcp-del-btn:hover { color: #dc2626 !important; background: #fef2f2 !important; }

/* Flag button */
.xcp-flag-btn:hover { color: #dc2626 !important; }

/* Spacer for missing buttons */
.xcp-action-spacer { flex: 1; }

/* --------------------
   SECTION 9 — REPLIES
   -------------------- */

.xcp-replies-section {
    border-top: 1px solid #f3f4f6;
    padding: 8px 14px 10px;
    background: transparent;
}
.xcp-replies-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* Inline reply area (new template) */
.xcp-inline-replies {
    border-top: 1px solid #f3f4f6;
    padding: 12px 14px 10px;
}
.xcp-inline-compose { margin-bottom: 10px; }

/* Reply card */
.xcp-reply-card {
    display: flex; gap: 10px; padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
}
.xcp-reply-card:last-child { border-bottom: none; }
.xcp-reply-av {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.xcp-reply-body  { flex: 1; min-width: 0; }
.xcp-reply-meta  { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.xcp-reply-name  { font-size: 12px; font-weight: 700; color: #1e293b; }
.xcp-reply-time  { font-size: 10.5px; color: #94a3b8; }
.xcp-reply-text  { font-size: 13px; line-height: 1.6; color: #374151; }
.xcp-reply-text p { margin: 0 0 4px; }

.xcp-reply-actions { display: flex; align-items: center; gap: 2px; margin-top: 5px; }
.xcp-reply-actions button {
    display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px;
    border: none; border-radius: 6px; background: transparent;
    font-size: 12px; cursor: pointer; color: #9ca3af;
    transition: background .13s, color .13s; font-family: inherit;
}
.xcp-reply-actions button:hover { background: #f1f5f9; color: #374151; }
.xcp-reply-actions button.is-on  { color: #6d28d9; }
.xcp-reply-actions button span   { font-size: 11px; font-weight: 700; }
.xcp-reply-del-btn { opacity: .5; }
.xcp-reply-del-btn:hover { color: #dc2626 !important; opacity: 1; }
.xcp-reply-like-btn.is-on { color: #6d28d9 !important; }

/* Nested area */
.xcp-nested-area {
    margin-top: 8px; padding-left: 16px; border-left: 2px solid #f1f5f9;
}
.xcp-nested-list { display: flex; flex-direction: column; }

/* Reply compose form */
.xcp-reply-form-wrap {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 12px; margin-top: 8px;
}
.xcp-reply-textarea {
    width: 100%; padding: 9px 11px; border: 1.5px solid #e2e8f0;
    border-radius: 10px; font-size: 13px; font-family: inherit;
    resize: vertical; min-height: 70px; outline: none;
    box-sizing: border-box; line-height: 1.5;
}
.xcp-reply-textarea:focus { border-color: #6366f1; }
.xcp-reply-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Inline reply area buttons */
.xcp-inline-compose .xcp-reply-form-actions { margin-top: 8px; display: flex; justify-content: flex-end; gap: 8px; }
.xcp-inline-cancel-btn {
    padding: 7px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 12.5px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}
.xcp-inline-cancel-btn:hover { background: #f3f4f6; border-color: #d1d5db; }
.xcp-inline-submit-btn {
    padding: 7px 16px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s;
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.xcp-inline-submit-btn:hover { opacity: .88; }
.xcp-inline-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Reply etc Main */
.xcp-reply-cancel {
    padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: 8px;
    background: #fff; font-size: 12px; cursor: pointer; color: #6b7280;
    font-family: inherit;
}
.xcp-reply-submit,
.xcp-nested-submit {
    padding: 6px 14px; background: #6366f1; color: #fff;
    border: none; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: opacity .2s; font-family: inherit;
}
.xcp-reply-submit:hover,
.xcp-nested-submit:hover    { opacity: .9; }
.xcp-reply-submit:disabled,
.xcp-nested-submit:disabled { opacity: .5; cursor: not-allowed; }

/* View replies btn */
.xcp-view-replies-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px;
    border: 1.5px solid transparent; border-radius: 8px; background: transparent;
    font-size: 12px; cursor: pointer; color: #6366f1; transition: all .13s;
    font-family: inherit; font-weight: 600;
}
.xcp-view-replies-btn:hover { background: #eef2ff; border-color: #c7d2fe; }
.xcp-reply-count-num { font-weight: 700; }
.xcp-replies-chevron { font-size: 11px; }

/* ----------------------------------------
   SECTION 10 — STAGE TRACKER + CUTOFF
   ---------------------------------------- */

.xfd-stage-tracker {
    background: #fff;
    border: 1.5px solid #e0e7ff;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}
.xfd-st-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
}
.xfd-st-title { font-size: 12px; font-weight: 700; }
.xfd-st-total { font-size: 10px; opacity: .75; }
.xfd-st-steps { display: flex; padding: 10px 8px 8px; }
.xfd-st-step  { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.xfd-st-step:not(:last-child)::after { content: ''; position: absolute; top: 12px; right: -50%; width: 100%; height: 2px; background: #e0e7ff; z-index: 0; }
.xfd-st-step.has-data::after { background: #6366f1; }
.xfd-st-dot { width: 25px; height: 25px; border-radius: 50%; background: #f1f5f9; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 10px; z-index: 1; position: relative; }
.xfd-st-step.has-data .xfd-st-dot { background: #e0e7ff; border-color: #6366f1; }
.xfd-st-lbl { font-size: 9px; color: #94a3b8; margin-top: 4px; line-height: 1.2; }
.xfd-st-cnt { font-size: 11px; font-weight: 800; color: #4338ca; }

.xfd-cutoff {
    background: #fff; border: 1.5px solid #bae6fd; border-radius: 14px;
    overflow: hidden; margin-bottom: 12px;
}
.xfd-co-head { padding: 9px 14px; background: linear-gradient(135deg, #0369a1, #0284c7); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.xfd-co-head small { font-size: 10px; opacity: .7; font-weight: 400; }
.xfd-co-body { padding: 6px 12px 8px; }
.xfd-co-row  { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 1px solid #f0f9ff; font-size: 12px; }
.xfd-co-row:last-child { border-bottom: none; }
.xfd-co-cat  { font-weight: 700; color: #0c4a6e; width: 58px; flex-shrink: 0; }
.xfd-co-bar-wrap { flex: 1; background: #e0f2fe; border-radius: 4px; height: 6px; overflow: hidden; }
.xfd-co-bar  { height: 100%; background: linear-gradient(90deg, #0284c7, #38bdf8); border-radius: 4px; transition: width .5s ease; }
.xfd-co-val  { font-size: 11px; font-weight: 700; color: #0369a1; white-space: nowrap; }
.xfd-co-n    { font-size: 10px; color: #94a3b8; white-space: nowrap; }

/* ------------------------------------------------------------
   SECTION 11 — EMPTY STATE + LOADER + LOAD MORE
   ---------------------------------------- */

.xfd-empty-state,
.xf-empty-state {
    text-align: center; padding: 48px 20px; background: #fff;
    border: 1px dashed #e5e7eb; border-radius: 14px;
}
.xfd-empty-icon,
.xf-empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .4; }
.xfd-empty-state p,
.xf-empty-state p { font-size: 14px; color: #9ca3af; margin: 0; }

.xf-loading-state { display: flex; justify-content: center; padding: 48px; }
.xf-loader { width: 30px; height: 30px; border: 3px solid #e5e7eb; border-top-color: #6366f1; border-radius: 50%; animation: xfSpin .7s linear infinite; }
@keyframes xfSpin { to { transform: rotate(360deg); } }

.xf-load-more-btn {
    padding: 10px 24px; border: 1.5px solid #e5e7eb; border-radius: 10px;
    background: #fff; font-size: 13px; font-weight: 600; color: #6366f1;
    cursor: pointer; transition: all .15s; font-family: inherit;
}
.xf-load-more-btn:hover    { background: #eef2ff; border-color: #6366f1; }
.xf-load-more-btn:disabled { opacity: .5; cursor: not-allowed; }
.xfd-load-more-wrap { text-align: center; padding: 12px 0; }

/* ------------------------------------------------------------
   SECTION 12 — THREAD CARDS (manual forum fallback)
   ---------------------------------------- */

.xf-thread-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px 18px; margin-bottom: 8px; transition: all .2s; }
.xf-thread-card:hover { border-color: #6366f1; box-shadow: 0 2px 12px rgba(99,102,241,.08); }
.xf-thread-card.xf-thread-pinned { border-color: #f59e0b; background: #fffbeb; }
.xf-thread-card-inner { display: flex; gap: 14px; align-items: flex-start; }
.xf-thread-votes { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 36px; padding-top: 2px; }
.xf-thread-card-body { flex: 1; min-width: 0; }
.xf-thread-card-header { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.xf-thread-title { font-size: 14px; font-weight: 700; color: #111827; text-decoration: none; line-height: 1.35; flex: 1; min-width: 0; }
.xf-thread-title:hover { color: #6366f1; }
.xf-thread-type-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.xf-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600; flex-shrink: 0; }
.xf-badge-pinned { background: #fef3c7; color: #92400e; }
.xf-badge-locked { background: #fee2e2; color: #991b1b; }
.xf-thread-card-excerpt { font-size: 13px; color: #6b7280; line-height: 1.55; margin-bottom: 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.xf-thread-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.xf-thread-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9ca3af; }
.xf-thread-meta-avatar { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.xf-thread-card-stats { display: flex; gap: 10px; }
.xf-thread-stat { font-size: 12px; color: #9ca3af; }
.xf-vote-btn { width: 26px; height: 26px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; cursor: pointer; font-size: 11px; color: #9ca3af; display: flex; align-items: center; justify-content: center; transition: all .15s; font-family: inherit; }
.xf-vote-btn:hover { border-color: #6366f1; color: #6366f1; }
.xf-vote-btn.is-voted { background: #eef2ff; border-color: #6366f1; color: #6366f1; }
.xf-vote-count { font-size: 12px; font-weight: 700; color: #374151; }
.xf-vote-count.is-positive { color: #16a34a; }
.xf-vote-count.is-negative { color: #dc2626; }

/* --------------------
   SECTION 13 — BREADCRUMB
   -------------------- */

.xf-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9ca3af; margin-bottom: 14px; flex-wrap: wrap; }
.xf-breadcrumb a { color: #6b7280; text-decoration: none; transition: color .15s; }
.xf-breadcrumb a:hover { color: #6366f1; }
.xf-breadcrumb-sep { color: #d1d5db; }

/* ----------------------------------------
   SECTION 14 — CLOUD TAG FILTER
   ---------------------------------------- */

.xfd-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 14px; }
.xfd-cloud-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 11px;
    background: var(--tag-bg, #f1f5f9);
    color: var(--tag-color, #475569);
    border: 1.5px solid transparent; border-radius: 20px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all .15s; font-family: inherit; line-height: 1;
}
.xfd-cloud-tag:hover { border-color: var(--tag-color, #475569); opacity: .9; }
.xfd-cloud-tag.is-active { border-color: var(--tag-color, #475569); box-shadow: 0 1px 6px rgba(0,0,0,.12); font-weight: 700; }
.xfd-cloud-count {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.1); border-radius: 10px;
    font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 16px;
}

/* --------------------
   SECTION 15 — TOAST
   -------------------- */
.xf-toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
    z-index: 99999; max-width: 320px; background: #111827; color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    transform: translateY(20px); opacity: 0; pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
}
.xf-toast.is-show { transform: translateY(0); opacity: 1; }
.xf-toast.ok   { background: #16a34a; }
.xf-toast.err  { background: #dc2626; }
.xf-toast.warn { background: #d97706; }


/* --------------------
   SECTION 15B — SELECTION PROBABILITY
   -------------------- */

.xfd-sel-prob {
    background: #fff;
    border: 1.5px solid #d1fae5;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}
.xfd-sp-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
}
.xfd-sp-title { font-size: 12px; font-weight: 700; }
.xfd-sp-note  { font-size: 10px; opacity: .75; }
.xfd-sp-bars  { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.xfd-sp-bar-row { display: flex; align-items: center; gap: 8px; }
.xfd-sp-bar-label { font-size: 11px; color: #374151; width: 145px; flex-shrink: 0; }
.xfd-sp-bar-wrap  { flex: 1; background: #f1f5f9; border-radius: 4px; height: 8px; overflow: hidden; }
.xfd-sp-bar-fill  { height: 100%; border-radius: 4px; transition: width .6s ease; }
.xfd-sp-bar-val   { font-size: 12px; font-weight: 800; width: 36px; text-align: right; flex-shrink: 0; }

/* ----------------------------------------
   SECTION 15C — SENTIMENT TIMELINE
   ---------------------------------------- */

.xfd-sentiment {
    background: #fff;
    border: 1.5px solid #e0e7ff;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}
.xfd-sent-head {
    padding: 9px 14px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.xfd-sent-sub { font-size: 10px; opacity: .7; font-weight: 400; }
.xfd-sent-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 14px 14px 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
    min-height: 110px;
}
.xfd-sent-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    position: relative;
    cursor: default;
}
.xfd-sent-spike-label {
    font-size: 12px;
    position: absolute;
    top: -18px;
    animation: xfPulse 1.5s ease-in-out infinite;
}
@keyframes xfPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}
.xfd-sent-bar {
    width: 22px;
    background: #c7d2fe;
    border-radius: 4px 4px 0 0;
    transition: background .2s;
    min-height: 4px;
}
.xfd-sent-bar:hover,
.xfd-sent-bar-wrap:hover .xfd-sent-bar { background: #6366f1; }
.xfd-sent-bar.is-spike { background: #f59e0b; }
.xfd-sent-bar.is-spike:hover,
.xfd-sent-bar-wrap:hover .xfd-sent-bar.is-spike { background: #d97706; }
.xfd-sent-bar-icon { font-size: 10px; }
.xfd-sent-bar-lbl  { font-size: 8px; color: #9ca3af; white-space: nowrap; }
.xfd-sent-breakdown {
    display: flex;
    justify-content: space-around;
    padding: 8px 14px 10px;
    border-top: 1px solid #f3f4f6;
    margin-top: 6px;
}
.xfd-sent-bd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.xfd-sent-bd-item span   { font-size: 10px; color: #9ca3af; }
.xfd-sent-bd-item strong { font-size: 14px; font-weight: 800; color: #4338ca; }

/* ----------------------------------------
   SECTION 15D — SMART ANSWER SUGGESTIONS
   ---------------------------------------- */

#xfd-smart-suggestions {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    animation: xcpSlideIn .2s ease;
}
.xfd-smart-head {
    padding: 7px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
}
.xfd-smart-list { display: flex; flex-direction: column; }
.xfd-smart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #fef3c7;
    transition: background .13s;
    cursor: pointer;
}
.xfd-smart-item:last-child { border-bottom: none; }
.xfd-smart-item:hover,
.xfd-smart-item--community:hover { background: #fef9c3; }
.xfd-smart-badge   { font-size: 13px; flex-shrink: 0; }
.xfd-smart-title   { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xfd-smart-replies { font-size: 10.5px; color: #6366f1; font-weight: 700; flex-shrink: 0; }
.xfd-smart-resolved{ font-size: 10.5px; color: #16a34a; font-weight: 700; flex-shrink: 0; background: #dcfce7; padding: 1px 6px; border-radius: 10px; }


/* ----------------------------------------
   SECTION 15E — ANCHOR HIGHLIGHT (Notification से आने पर)
   ---------------------------------------- */

.xcp-card.xcp-highlighted {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.2), 0 4px 20px rgba(99,102,241,.15);
    animation: xcpHighlightPulse 1s ease 2;
}

@keyframes xcpHighlightPulse {
    0%   { box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
    50%  { box-shadow: 0 0 0 6px rgba(99,102,241,.35); }
    100% { box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
}

/* ----------------------------------------
   SECTION 15F — FORUM NOTIFICATION TOGGLE
   ---------------------------------------- */

.xfd-notif-toggle-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8faff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    border-bottom: 2px solid red;
}

.xfd-notif-toggle-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.xfd-notif-toggle-btns {
    display: flex;
    gap: 5px;
}

.xfd-notif-pref-btn {
    padding: 5px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}

.xfd-notif-pref-btn:hover {
    border-color: #6366f1;
    color: #4f46e5;
}

.xfd-notif-pref-btn.is-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}

.xfd-notif-pref-btn.is-active[data-pref="off"] {
    background: #6b7280;
    border-color: #6b7280;
}

.xfd-notif-pref-msg {
    font-size: 11.5px;
    color: #16a34a;
    font-weight: 500;
    opacity: 0;
    transition: opacity .3s;
}

.xfd-notif-pref-msg.is-show {
    opacity: 1;
}

@media (max-width: 480px) {
    .xfd-notif-toggle-bar { flex-direction: column; align-items: flex-start; gap: 7px; }
}

/* ----------------------------------------
   SECTION 16 — RESPONSIVE
   ---------------------------------------- */

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .xila-sidebar-left { display: none; }
    .xf-sidebar-right  { display: flex; }
    .xila-layout { grid-template-columns: 1fr 280px !important; }
}

/* Mobile */
@media (max-width: 768px) {
    .xf-sidebar-right  { display: none; }
    .xila-sidebar-left { display: none; }
    .xf-idx-header  { padding: 18px; }
    .xf-idx-title   { font-size: 20px; }
    .xf-idx-tabs    { overflow-x: auto; flex-wrap: nowrap; }
    .xfd-controls   { flex-direction: column; align-items: flex-start; }
    .xfd-sort-btn   { font-size: 12px; padding: 6px 10px; }
    .xfd-header-inner { flex-wrap: wrap; }
    .xf-toast { bottom: 72px; right: 16px; left: 16px; max-width: none; }
}

@media (max-width: 480px) {
    .xfd-header-icon { display: none; }
    .xfd-type-row    { flex-wrap: nowrap; overflow-x: auto; }
    .xfd-editor-footer { flex-wrap: wrap; }
    .xfd-submit-btn  { flex: 1; }
    .xcp-actions > * { font-size: 11px; padding: 7px 2px !important; }
}