/* =====================================================================
   UZFOR — Threads / X uslubidagi qobiq va mavzu (2026-11)
   Faqat <html class="th"> bo'lganda ishlaydi (incfiles/th_shell.php).
   Tuzilishi:
     1. Ranglar va shriftlar (kunduzgi / tungi)
     2. Maket: chap menyu · markaziy ustun · o'ng panel · telefon qatorlari
     3. "Ko'proq" menyusi, toast
     4. Lenta: kompozer, tablar, post kartalari
     5. Umumiy komponentlar: card, list, tugma, forma, tab, sahifalash...
     6. Forum mavzusi, profil, chat, bildirishnomalar va boshqa sahifalar
   ===================================================================== */

/* ---------- 1. Ranglar ---------- */
html.th {
    --bg: #ffffff;
    --soft: #f4f4f2;
    --soft2: #ebebe8;
    --ink: #0f1419;
    --muted: #6e6e69;
    --line: #ebebe8;
    --link: #1a6fd1;
    --heart: #ff3040;
    --ok: #12a150;
    --warn: #c77700;
    --danger: #e0242f;
    --f-logo: "Bricolage Grotesque", "Golos Text", system-ui, sans-serif;
    --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --navw: 260px;
    --sidew: 350px;
    --col: 600px;
    --topH: 0px;
    --th-bar: var(--ink);
    --th-bar-sh: none;

    --tblr-font-sans-serif: var(--f-body);
    --tblr-body-font-family: var(--f-body);
    --tblr-body-font-size: 15px;
    --tblr-body-bg: var(--bg);
    --tblr-bg-surface: var(--bg);
    --tblr-bg-surface-secondary: var(--soft);
    --tblr-bg-surface-tertiary: var(--soft);
    --tblr-bg-forms: var(--bg);
    --tblr-body-color: var(--ink);
    --tblr-body-color-rgb: 15, 20, 25;
    --tblr-emphasis-color: var(--ink);
    --tblr-heading-color: var(--ink);
    --tblr-secondary: var(--muted);
    --tblr-secondary-color: var(--muted);
    --tblr-muted: var(--muted);
    --tblr-border-color: var(--line);
    --tblr-border-color-translucent: var(--line);
    --tblr-border-color-light: var(--line);
    --tblr-primary: #0f1419;
    --tblr-primary-rgb: 15, 20, 25;
    --tblr-primary-fg: #fff;
    --tblr-link-color: var(--link);
    --tblr-link-color-rgb: 26, 111, 209;
    --tblr-link-hover-color: var(--link);
    --tblr-border-radius: 12px;
    --tblr-card-border-radius: 0;
    --tblr-box-shadow: none;
    --tblr-box-shadow-card: none;
    --tblr-shadow-card: none;
    color-scheme: light;
}
html.th[data-bs-theme="dark"] {
    --bg: #0f0f0f;
    --soft: #1b1b1b;
    --soft2: #262626;
    --ink: #f3f3f1;
    --muted: #9a9a95;
    --line: #262626;
    --link: #5aa9f7;
    --heart: #ff4d5b;
    --ok: #3fcf7f;
    --warn: #f0a83a;
    --danger: #ff5c63;
    --tblr-body-color-rgb: 243, 243, 241;
    --tblr-primary: #f3f3f1;
    --tblr-primary-rgb: 243, 243, 241;
    --tblr-primary-fg: #0f0f0f;
    --tblr-link-color-rgb: 90, 169, 247;
    color-scheme: dark;
}

html.th, html.th body {
    background: var(--bg) !important;
    color: var(--ink);
}
html.th body {
    font: 400 15px/1.5 var(--f-body);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0;
}
html.th .body_hide { opacity: 1 !important; transition: none !important; }
/* Eski win11.css "Segoe UI" ni ko'p joyda majburlagan — hammasini bitta shriftga */
html.th body *:not(pre):not(pre *):not(code):not(code *):not(kbd):not(samp):not(.th-logo):not(.th-logo *):not(.th-tlogo):not(.gw-title):not(svg):not(svg *):not(.ti):not([class^="icon"]) {
    font-family: var(--f-body) !important;
}
html.th a { color: inherit; }
html.th a:hover { text-decoration: none; }
html.th :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
html.th ::selection { background: color-mix(in srgb, var(--link) 25%, transparent); }
html.th .th-i { width: 26px; height: 26px; flex: none; display: block; }

/* Vaqtinchalik "yangi server" belgisi — ingichka */
html.th body > div[style*="16a34a"] {
    font: 500 12px/1.3 var(--f-body) !important;
    padding: 4px 12px !important;
    background: var(--ink) !important;
    color: var(--bg) !important;
    z-index: 1 !important;
}

/* Tasdiq belgisi — X kabi ko'k qoladi (oq-qora mavzuda ham taniladi) */
html.th .uz-badge--owner { color: #1d9bf0 !important; }
html.th .th-sbox input:focus, html.th .th-sbox input:focus-visible { outline: none !important; box-shadow: none !important; }

/* ---------- 2. Maket ---------- */
html.th .th-app {
    display: grid;
    grid-template-columns: var(--navw) minmax(0, var(--col)) var(--sidew);
    justify-content: center;
    align-items: start;
    min-height: 100vh;
}
html.th .th-main {
    min-width: 0;
    min-height: 100vh;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding-bottom: 80px;
}
html.th #pjax-content {
    --tblr-gutter-x: 0;
    --tblr-gutter-y: 0;
    margin: 0 !important;
    width: 100%;
}
html.th #pjax-content > * { max-width: 100%; padding-left: 0; padding-right: 0; margin-top: 0; }

/* Chap menyu */
html.th .th-nav { position: sticky; top: 0; height: 100vh; display: flex; justify-content: flex-end; }
html.th .th-nav-in {
    width: 100%;
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 16px 16px 12px;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}
html.th .th-logo {
    display: inline-flex; align-items: center;
    height: 56px; padding: 0 12px; margin-bottom: 6px;
    font: 800 30px/1 var(--f-logo); letter-spacing: -.045em;
    color: var(--ink) !important;
}
html.th .th-logo-m { display: none; }
html.th .th-nl {
    position: relative;
    display: flex; align-items: center; gap: 18px;
    height: 52px; padding: 0 14px; width: fit-content; max-width: 100%;
    border: 0; background: none; border-radius: 999px;
    color: var(--ink) !important; font: 400 19px/1 var(--f-body);
    cursor: pointer; text-align: left;
    transition: background .15s;
}
html.th .th-nl:hover { background: var(--soft); }
html.th .th-nl[aria-current] { font-weight: 700; }
html.th .th-nl[aria-current] .th-i { stroke-width: 2.6; }
html.th .th-nl .th-badge { position: absolute; left: 30px; top: 7px; }
html.th .th-write {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; margin: 14px 8px 0 0; border-radius: 999px;
    background: var(--ink); color: var(--bg) !important;
    font: 700 17px/1 var(--f-body);
    transition: opacity .15s;
}
html.th .th-write:hover { opacity: .86; }
html.th .th-write .th-i { display: none; }
html.th .th-reg { display: block; text-align: center; margin: 10px 8px 0 0; padding: 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; color: var(--ink) !important; }
html.th .th-reg:hover { background: var(--soft); }
html.th .th-me {
    margin-top: auto; display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 999px; color: var(--ink) !important;
}
html.th .th-me:hover { background: var(--soft); }
html.th .th-me-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
html.th .th-me-t b, html.th .th-me-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.th .th-me-t small { color: var(--muted); font-size: 14px; }

html.th .th-av {
    width: 40px; height: 40px; flex: none; border-radius: 50%;
    background: var(--soft) center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
    display: inline-block;
}
html.th .th-av-s { width: 28px; height: 28px; }
html.th .th-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--heart); color: #fff; font: 700 11px/18px var(--f-body);
    text-align: center; box-shadow: 0 0 0 2px var(--bg);
}

/* O'ng panel */
html.th .th-side {
    position: sticky; top: 0;
    padding: 10px 0 24px 28px;
    max-height: 100vh; overflow-y: auto; scrollbar-width: none;
    display: flex; flex-direction: column; gap: 16px;
}
html.th .th-search { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 2px 0 4px; max-width: none !important; }
html.th .th-sbox {
    display: flex; align-items: center; gap: 10px;
    height: 46px; padding: 0 16px; border-radius: 999px;
    background: var(--soft); color: var(--muted);
    border: 1px solid transparent; cursor: text; margin: 0;
}
html.th .th-sbox:focus-within { background: var(--bg); border-color: var(--ink); color: var(--ink); }
html.th .th-sbox .th-i { width: 20px; height: 20px; }
html.th .th-sbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 15px var(--f-body); }
html.th .th-search .navbar-search__results {
    position: absolute; left: 0; right: 0; top: 52px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    max-height: 70vh; overflow-y: auto;
}
html.th .th-box { border: 1px solid var(--line); border-radius: 18px; padding: 14px 0 4px; }
html.th .th-box h2 { font: 800 19px/1.2 var(--f-body); margin: 0 16px 8px; letter-spacing: -.01em; }
html.th .th-who { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
html.th .th-who:hover { background: var(--soft); }
html.th .th-who-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; color: var(--ink) !important; }
html.th .th-who-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
html.th .th-who-t small { color: var(--muted); font-size: 14px; }
html.th .th-box-more { display: block; padding: 12px 16px 12px; color: var(--link) !important; font-size: 15px; }
html.th .th-box-more:hover { background: var(--soft); border-radius: 0 0 18px 18px; }
html.th .th-online { padding: 14px 16px; }
html.th .th-online a { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; }
html.th .th-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
html.th .th-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 16px; font-size: 13px; color: var(--muted); }
html.th .th-foot a { color: var(--muted) !important; }
html.th .th-foot a:hover { text-decoration: underline; }

/* Kichik tugma (kuzatish) */
html.th .th-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 16px; border-radius: 999px; border: 0;
    background: var(--ink); color: var(--bg); font: 700 14px/1 var(--f-body);
    cursor: pointer; white-space: nowrap;
}
html.th .th-btn:hover { opacity: .86; }
html.th .th-btn.is-on { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* Telefon tepa va pastki qatorlari (kompyuterda yashirin) */
html.th .th-top, html.th .th-tabs { display: none; }

/* 1100–1279: chap menyu faqat belgilar (Threads kabi) */
@media (max-width: 1279.98px) {
    html.th { --navw: 88px; --sidew: 330px; }
    html.th .th-nav-in { align-items: center; padding: 8px 0 16px; }
    html.th .th-logo { padding: 0; justify-content: center; width: 52px; }
    html.th .th-logo-w { display: none; }
    html.th .th-logo-m { display: block; font-size: 34px; }
    html.th .th-nl { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 16px; }
    html.th .th-nl span:not(.th-badge) { display: none; }
    html.th .th-nl .th-badge { left: auto; right: 6px; top: 6px; }
    html.th .th-write { width: 56px; height: 56px; margin: 12px 0 0; padding: 0; border-radius: 16px; }
    html.th .th-write span { display: none; }
    html.th .th-write .th-i { display: block; }
    html.th .th-reg { display: none; }
    html.th .th-me { padding: 8px; }
    html.th .th-me-t { display: none; }
}
/* 700–1099: o'ng panel yo'q */
@media (max-width: 1099.98px) {
    html.th { --sidew: 0px; }
    html.th .th-app { grid-template-columns: var(--navw) minmax(0, var(--col)); }
    html.th .th-side { display: none; }
}
/* Telefon: Threads */
@media (max-width: 699.98px) {
    html.th { --topH: 56px; }
    html.th .th-app { display: block; }
    html.th .th-nav { display: none; }
    html.th .th-main { border: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    html.th .th-top {
        position: sticky; top: 0; z-index: 1030;
        display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
        height: var(--topH); padding: 0 8px;
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
        transition: transform .25s ease;
    }
    html.th.th-scrolled .th-top { transform: translateY(-100%); }
    html.th .th-tlogo { justify-self: center; font: 800 27px/1 var(--f-logo); letter-spacing: -.045em; color: var(--ink) !important; }
    html.th .th-tlogin { justify-self: end; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: var(--bg) !important; font-weight: 700; font-size: 14px; }
    html.th .th-tabs {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        display: flex; justify-content: space-around; align-items: center;
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
    }
    html.th .th-tabs a {
        position: relative; width: 58px; height: 52px;
        display: grid; place-items: center; border-radius: 14px;
        color: var(--muted) !important;
    }
    html.th .th-tabs a[aria-current] { color: var(--ink) !important; }
    html.th .th-tabs a[aria-current] .th-i { stroke-width: 2.6; }
    html.th .th-tabs a[aria-current] .th-av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
    html.th .th-tabs .th-plus { background: var(--soft); color: var(--ink) !important; width: 64px; height: 46px; }
    html.th .th-tabs .th-badge { position: absolute; top: 6px; left: 32px; }
}
html.th .th-tb {
    position: relative; width: 44px; height: 44px;
    display: grid; place-items: center; border-radius: 50%;
    border: 0; background: none; color: var(--ink) !important; cursor: pointer;
}
html.th .th-tb:hover { background: var(--soft); }
html.th .th-tb:last-child { justify-self: end; }
html.th .th-tb .th-badge { position: absolute; top: 4px; right: 2px; }

/* Eski chrome'ning qoldiqlari */
html.th .th-counters { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.th #pjax-bar { height: 2px !important; }

/* ---------- 3. "Ko'proq" menyusi ---------- */
html.th .th-menu {
    --tblr-offcanvas-width: 340px;
    width: min(340px, 88vw) !important;
    background: var(--bg) !important; color: var(--ink);
    border-right: 1px solid var(--line) !important;
    box-shadow: 0 0 60px rgba(0,0,0,.18);
}
html.th .th-menu-h { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 10px 0 20px; font: 800 20px/1 var(--f-body); }
html.th .th-menu-b { overflow-y: auto; padding: 0 8px 24px; }
html.th .th-mme { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; color: var(--ink) !important; }
html.th .th-mme:hover { background: var(--soft); }
html.th .th-mme span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
html.th .th-mme small { color: var(--muted); }
html.th .th-mg { padding: 6px 0; border-top: 1px solid var(--line); }
html.th .th-mg:first-child { border-top: 0; }
html.th .th-ml {
    display: flex; align-items: center; gap: 14px; width: 100%;
    min-height: 50px; padding: 8px 12px; border-radius: 14px;
    border: 0; background: none; color: var(--ink) !important;
    font: 500 16px/1.3 var(--f-body); text-align: left; cursor: pointer;
}
html.th .th-ml:hover { background: var(--soft); }
html.th .th-ml .th-i { width: 24px; height: 24px; }
html.th .th-ml > span:not(.th-badge):not(.th-sw):not(.th-av) { flex: 1; }
html.th .th-ml.th-danger { color: var(--danger) !important; }
html.th .th-ad .th-av { width: 34px; height: 34px; border-radius: 10px; }
html.th .th-ad-t { display: flex; flex-direction: column; min-width: 0; }
html.th .th-ad-t small { color: var(--muted); font-size: 13px; }
html.th .th-sw { width: 44px; height: 26px; border-radius: 999px; background: var(--soft2); position: relative; transition: background .2s; flex: none; }
html.th .th-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
html.th[data-bs-theme="dark"] .th-sw { background: var(--ink); }
html.th[data-bs-theme="dark"] .th-sw::after { transform: translateX(18px); background: var(--bg); }
html.th .offcanvas-backdrop.show { opacity: .4; }

/* Toast */
html.th .th-toast {
    position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); z-index: 2000;
    transform: translateX(-50%);
    background: var(--ink); color: var(--bg);
    padding: 11px 20px; border-radius: 999px; font-weight: 500; font-size: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
@media (min-width: 700px) { html.th .th-toast { bottom: 28px; } }

/* ---------- 4. Lenta ---------- */
html.th .wall-wrap { margin: 0 !important; }
html.th .wall-h {
    position: sticky; top: var(--topH); z-index: 20;
    margin: 0 !important; height: 54px; padding: 0 16px;
    font: 800 20px/1 var(--f-body); letter-spacing: -.01em;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
html.th .wall-h .wall-bar { display: none !important; }
html.th .feed-tabs {
    position: sticky; top: calc(var(--topH) + 54px); z-index: 19;
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 !important;
    margin: 0 !important; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
html.th .feed-tabs a {
    position: relative; display: flex; align-items: center; justify-content: center;
    height: 52px; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: none !important; color: var(--muted) !important;
    font: 500 15px/1 var(--f-body) !important;
}
html.th .feed-tabs a:hover { background: var(--soft) !important; }
html.th .feed-tabs a.active { color: var(--ink) !important; font-weight: 700 !important; }
html.th .feed-tabs a.active::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 4px; background: var(--ink); }
@media (max-width: 699.98px) {
    html.th .wall-h { display: none !important; }
    html.th .feed-tabs { top: var(--topH); transition: top .25s ease; }
    html.th.th-scrolled .feed-tabs { top: 0; }
}

/* Kompozer */
html.th .wall-composer {
    background: none !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important; padding: 14px 16px 12px !important; margin: 0 !important;
}
html.th .wall-composer-top { gap: 12px !important; }
html.th .wall-composer-top .avatar { width: 40px !important; height: 40px !important; }
html.th .wall-composer textarea {
    font: 19px/1.45 var(--f-body) !important; color: var(--ink) !important;
    min-height: 40px !important; padding: 7px 0 0 !important;
}
html.th .wall-composer textarea::placeholder { color: var(--muted); }
html.th .wall-composer-foot { border-top: 0 !important; padding: 4px 0 0 52px !important; margin-top: 6px !important; gap: 2px !important; }
html.th .wall-tool {
    width: 36px; height: 36px; padding: 0 !important; justify-content: center;
    border-radius: 50% !important; color: var(--muted) !important;
}
html.th .wall-tool:hover { background: var(--soft) !important; color: var(--ink) !important; }
html.th #wall-submit, html.th .wall-cform .btn {
    border-radius: 999px !important; padding: 0 18px !important; height: 36px;
    font-weight: 700 !important; font-size: 15px !important;
}

/* Post kartalari */
html.th .tw-feed { background: none !important; border: 0 !important; border-radius: 0 !important; overflow: visible !important; }
html.th .tw-post {
    gap: 12px !important; padding: 14px 16px 10px !important;
    border-bottom: 1px solid var(--line) !important; background: none;
}
html.th .tw-post[data-href] { cursor: pointer; }
html.th .tw-post[data-href]:hover { background: color-mix(in srgb, var(--soft) 55%, transparent) !important; }
html.th .tw-ava .avatar { width: 40px !important; height: 40px !important; }
html.th .tw-head { gap: 4px !important; margin-bottom: 0 !important; line-height: 1.35; }
html.th .tw-name { font-weight: 600 !important; color: var(--ink) !important; }
html.th .tw-name:hover { text-decoration: underline !important; }
html.th .tw-time { color: var(--muted) !important; font-size: 15px !important; }
html.th .tw-content, html.th .tw-title {
    font-size: 15.5px !important; line-height: 1.5 !important; color: var(--ink) !important;
    margin: 2px 0 8px !important;
}
html.th .tw-lastreply {
    background: none !important; border: 0 !important; border-left: 2px solid var(--line) !important;
    border-radius: 0 !important; padding: 2px 0 2px 12px !important; margin: 2px 0 10px !important;
}
html.th .tw-lr-name { color: var(--ink) !important; font-weight: 600; }
html.th .tw-lr-name::before { display: none !important; }
html.th .tw-lr-text { color: var(--muted) !important; }
html.th .tw-actions { gap: 4px !important; margin: 2px 0 0 -10px !important; color: var(--muted) !important; font-size: 14px !important; }
html.th .tw-act {
    height: 36px; padding: 0 10px !important; border-radius: 999px !important;
    color: var(--muted) !important; gap: 6px !important;
}
html.th .tw-act svg { width: 20px; height: 20px; }
html.th .tw-act:hover { background: var(--soft) !important; color: var(--ink) !important; }
html.th .tw-act.liked, html.th .tw-like.liked { color: var(--heart) !important; }
html.th .wall-media-grid { border-radius: 14px !important; border: 1px solid var(--line); margin: 6px 0 8px !important; }
html.th .wall-media-grid.one img { background: var(--soft) !important; }
html.th .wall-video video { border-radius: 14px; max-width: 100%; }
html.th .wall-empty { color: var(--muted) !important; padding: 48px 24px !important; }
html.th .wall-more { padding: 24px 0 !important; }

/* ---------- 5. Umumiy komponentlar ---------- */
html.th h1, html.th h2, html.th h3, html.th h4, html.th .h1, html.th .h2, html.th .h3, html.th .h4,
html.th .page-title, html.th .card-title { font-family: var(--f-body); color: var(--ink); letter-spacing: -.01em; }
html.th .text-muted, html.th .text-secondary { color: var(--muted) !important; }
html.th .text-primary { color: var(--link) !important; }
html.th .text-body { color: var(--ink) !important; }
html.th .fw-bold { font-weight: 700 !important; }

/* Card: X kabi — tekis, faqat pastki chiziq */
html.th #pjax-content .card {
    background: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}
html.th #pjax-content .card .card { border: 1px solid var(--line) !important; border-radius: 16px !important; margin: 8px 0 !important; }
html.th #pjax-content .card-header {
    background: none !important; border-bottom: 1px solid var(--line) !important;
    padding: 14px 16px !important; min-height: 0;
}
html.th #pjax-content .card-header .card-title, html.th #pjax-content .card-title { font-size: 17px; font-weight: 700; margin: 0; }
html.th #pjax-content .card-body { padding: 16px !important; }
html.th #pjax-content .card-footer { background: none !important; border-top: 1px solid var(--line) !important; padding: 12px 16px !important; }
html.th #pjax-content [class*="col-"], html.th #pjax-content > .col { padding-left: 0 !important; padding-right: 0 !important; }
html.th #pjax-content .row { --tblr-gutter-x: 0; margin-left: 0; margin-right: 0; }
html.th #pjax-content .row.g-2, html.th #pjax-content .row.g-3 { --tblr-gutter-x: .75rem; }
html.th #pjax-content .mt-2.col-12, html.th #pjax-content .col-12.mt-3 { margin-top: 0 !important; }

/* Ro'yxatlar */
html.th .list-group { --tblr-list-group-bg: transparent; --tblr-list-group-border-color: var(--line); border-radius: 0 !important; }
html.th .list-group-item { background: none !important; border-color: var(--line) !important; color: var(--ink); padding: 12px 16px; }
html.th .list-group-flush > .list-group-item { border-left: 0 !important; border-right: 0 !important; }
html.th .list-group-item-action:hover, html.th .list-group-item-action:focus { background: var(--soft) !important; color: var(--ink); }
html.th .list-group-item.active, html.th .list-group-item-action.active { background: var(--soft) !important; color: var(--ink) !important; font-weight: 700; border-color: var(--line) !important; }
html.th .list-group-header { background: var(--bg) !important; color: var(--muted); }

/* Tugmalar: qora "pill" (Threads) */
html.th .btn {
    --tblr-btn-border-radius: 999px;
    border-radius: 999px !important;
    font-family: var(--f-body); font-weight: 600;
    box-shadow: none !important;
}
html.th .btn-primary, html.th .btn-dark, html.th .btn-blue, html.th .btn-info, html.th .btn-azure, html.th .btn-indigo {
    background: var(--ink) !important; border-color: var(--ink) !important; color: var(--bg) !important;
}
html.th .btn-primary:hover, html.th .btn-dark:hover, html.th .btn-blue:hover { opacity: .86; }
html.th .btn-primary:disabled, html.th .btn-primary.disabled { opacity: .3; }
html.th .btn-outline-primary, html.th .btn-outline-secondary, html.th .btn-secondary, html.th .btn-light, html.th .btn-white, html.th .btn-outline-dark, html.th .btn-ghost-secondary, html.th .btn-default {
    background: transparent !important; border: 1px solid var(--line) !important; color: var(--ink) !important;
}
html.th .btn-outline-primary:hover, html.th .btn-outline-secondary:hover, html.th .btn-secondary:hover, html.th .btn-light:hover, html.th .btn-white:hover, html.th .btn-ghost-secondary:hover { background: var(--soft) !important; }
html.th .btn-success, html.th .btn-green { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
html.th .btn-danger, html.th .btn-red { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
html.th .btn-link { color: var(--link) !important; border: 0 !important; background: none !important; }
html.th .btn-action { border-radius: 999px !important; color: var(--muted); }
html.th .btn-action:hover { background: var(--soft) !important; color: var(--ink); }

/* Formalar */
html.th .form-control, html.th .form-select, html.th textarea.form-control {
    background-color: var(--bg) !important; color: var(--ink) !important;
    border: 1px solid var(--line) !important; border-radius: 12px !important;
    font: 16px/1.4 var(--f-body); min-height: 46px; box-shadow: none !important;
}
html.th .form-control:focus, html.th .form-select:focus { border-color: var(--ink) !important; }
html.th .form-control::placeholder { color: var(--muted); }
html.th .form-label, html.th label { color: var(--ink); font-weight: 500; }
html.th .form-check-input:checked { background-color: var(--ink) !important; border-color: var(--ink) !important; }
html.th .form-check-input { border-color: var(--muted); }
html.th .input-group-text { background: var(--soft) !important; border-color: var(--line) !important; color: var(--muted); }
html.th .form-control-rounded { border-radius: 999px !important; }

/* Tablar */
html.th .nav-tabs, html.th .card-header-tabs { border-bottom: 1px solid var(--line) !important; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html.th .nav-tabs .nav-link {
    border: 0 !important; border-radius: 0 !important; background: none !important;
    color: var(--muted) !important; font-weight: 500; padding: 14px 16px !important; position: relative; white-space: nowrap;
}
html.th .nav-tabs .nav-link:hover { background: var(--soft) !important; color: var(--ink) !important; }
html.th .nav-tabs .nav-link.active { color: var(--ink) !important; font-weight: 700; }
html.th .nav-tabs .nav-link.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 4px; border-radius: 4px; background: var(--ink); }
html.th .nav-pills .nav-link { border-radius: 999px; color: var(--muted); }
html.th .nav-pills .nav-link.active { background: var(--ink) !important; color: var(--bg) !important; }
html.th .nav-segmented, html.th .nav-segmented-vertical { background: var(--soft) !important; border-radius: 999px !important; }

/* Belgilar */
html.th .badge { border-radius: 999px; font-weight: 600; }
html.th .badge.bg-blue, html.th .badge.bg-primary, html.th .badge.bg-azure { background: var(--ink) !important; color: var(--bg) !important; }
html.th .badge.bg-red { background: var(--heart) !important; color: #fff !important; }
html.th [class*="bg-"][class*="-lt"] { background: var(--soft) !important; color: var(--ink) !important; }

/* Avatar — yumaloq */
html.th .avatar { border-radius: 50% !important; background-color: var(--soft); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }

/* Sahifalash */
html.th .pagination { justify-content: center; gap: 4px; padding: 16px; margin: 0; flex-wrap: wrap; }
html.th .page-link, html.th .pagination a, html.th .pagination span {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px !important; border: 0 !important; background: none !important; color: var(--ink) !important; font-weight: 500;
}
html.th .page-link:hover, html.th .pagination a:hover { background: var(--soft) !important; }
html.th .page-item.active .page-link, html.th .pagination .currentpage, html.th .pagination b { background: var(--ink) !important; color: var(--bg) !important; }

/* Dropdown, modal, alert */
html.th .dropdown-menu {
    background: var(--bg) !important; border: 1px solid var(--line) !important; border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.14) !important; padding: 6px !important;
}
html.th .dropdown-item { border-radius: 10px; color: var(--ink) !important; padding: 10px 12px; }
html.th .dropdown-item:hover, html.th .dropdown-item:focus { background: var(--soft) !important; }
html.th .dropdown-divider { border-color: var(--line); }
html.th .modal-content { background: var(--bg) !important; color: var(--ink); border: 0 !important; border-radius: 20px !important; box-shadow: 0 24px 80px rgba(0,0,0,.28) !important; }
html.th .modal-header, html.th .modal-footer { border-color: var(--line) !important; }
html.th .modal-backdrop.show { opacity: .45; }
html.th .alert { border-radius: 14px; border: 1px solid var(--line); background: var(--soft) !important; color: var(--ink) !important; box-shadow: none; margin: 12px 16px; }
html.th .alert-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
html.th .alert-success { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
html.th .hr-text { color: var(--muted); }
html.th .hr-text::before, html.th .hr-text::after { background: var(--line); }
html.th hr { border-color: var(--line); opacity: 1; }
html.th .breadcrumb { font-size: 13px; text-transform: none !important; letter-spacing: 0 !important; margin: 0; }
html.th .breadcrumb a { color: var(--muted) !important; }
html.th .progress { background: var(--soft); border-radius: 999px; }
html.th .progress-bar { background: var(--ink) !important; }
html.th table, html.th .table { --tblr-table-bg: transparent; color: var(--ink); border-color: var(--line); }
html.th .table > :not(caption) > * > * { border-color: var(--line); background: none; }
html.th pre, html.th code { border-radius: 12px; }
html.th blockquote, html.th .quote, html.th .bbquote { border-left: 3px solid var(--line) !important; background: var(--soft) !important; border-radius: 0 12px 12px 0; color: var(--ink); }
html.th img { max-width: 100%; }

/* Eski JohnCMS bloklari (.menu, .phdr, .gmenu, .rmenu, .list1/2) */
html.th .phdr, html.th .gmenu, html.th .rmenu, html.th .menu, html.th .list1, html.th .list2, html.th .topmenu, html.th .bmenu, html.th .fmenu {
    background: none !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important; padding: 12px 16px !important; margin: 0 !important; color: var(--ink) !important;
}
html.th .phdr { font-weight: 700; font-size: 17px; }

/* Mehmonlar uchun "Xush kelibsiz" oynasi — sodda, oq-qora */
html.th #guestWelcome .gw-top { background: var(--bg) !important; border-bottom: 0 !important; padding: 32px 24px 8px !important; }
html.th #guestWelcome .gw-top::after { display: none; }
html.th #guestWelcome .gw-logo { display: none; }
html.th #guestWelcome .gw-title { color: var(--ink) !important; font: 800 30px/1 var(--f-logo) !important; letter-spacing: -.04em; }
html.th #guestWelcome .gw-sub { color: var(--muted) !important; font-size: 15px !important; }
html.th #guestWelcome .gw-body { padding: 8px 24px 20px !important; }
html.th #guestWelcome .btn-lg { border-radius: 999px !important; height: 50px; }

/* ---------- 6. Sahifalar ---------- */
/* Forum mavzusi: postlar (view.php #post-list) — Threads kabi: avatar chapda, matn ism ostida */
html.th #post-list .fpost { padding: 14px 16px 12px !important; }
html.th #post-list .fpost:hover { background: none; }
html.th #post-list .delava img, html.th .fpost .delava img {
    width: 40px !important; height: 40px !important; border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06) !important; object-fit: cover;
}
html.th img.delava { width: 40px !important; height: 40px !important; border-radius: 50% !important; }
html.th #post-list .fpost-main { margin-left: 52px; min-height: 40px; color: var(--muted); font-size: 14px; line-height: 1.4; }
html.th #post-list .fpost-main a { color: var(--ink); }
html.th #post-list .fpost-main strong, html.th #post-list .fpost-main b { font-size: 15px; font-weight: 600; }
html.th #post-list time { font-size: 14px; color: var(--muted); }
html.th #post-list .mt-2 { color: var(--ink); font-size: 15.5px; line-height: 1.55; }
html.th #post-list .fpost-body {
    background: none !important; border-radius: 0 !important;
    padding: 0 0 0 52px !important; margin-top: 4px !important;
}
html.th #post-list .fpost-body a { color: var(--link); }
html.th #post-list .fpost-body img { border-radius: 14px; border: 1px solid var(--line); }
html.th #post-list .fpost-vote {
    position: static; margin: 10px 0 0 -6px; display: inline-flex; vertical-align: middle;
    background: none !important; border: 0 !important; box-shadow: none !important; padding: 0;
}
html.th #post-list .fpost-vote .btn-action { width: 34px; height: 34px; color: var(--muted); }
html.th #post-list .fpost-vote .btn-action svg { width: 18px; height: 18px; }
html.th #post-list .fpost-vote .btn-action:hover { background: var(--soft); color: var(--ink); }
html.th #post-list .fpost-vote .js-pvote-count { font-size: 14px; font-weight: 600; color: var(--muted); }
html.th #post-list .fpost-vote .js-pvote-up.is-active { color: var(--ok); }
html.th #post-list .fpost-vote .js-pvote-down.is-active { color: var(--danger); }
html.th #post-list .fpost + .fpost { border-top: 1px solid var(--line); }
html.th #post-list .fpost-files { padding-left: 52px; }
html.th #post-list .fpost-file { background: var(--bg); border-color: var(--line); border-radius: 14px; }
html.th #post-list .fpost-file-icon { background: var(--soft); color: var(--ink); }
html.th #post-list .fpost-single-foot { margin-left: 52px; border-color: var(--line); }
html.th .fpost-cite { border-left: 2px solid var(--line) !important; background: none !important; border-radius: 0 !important; padding: 2px 0 2px 12px !important; }
html.th .fpost-cite-text { color: var(--muted) !important; }
html.th .post-toolbar { padding-left: 52px; }
html.th .post-toolbar a, html.th .post-toolbar .btn-action { color: var(--muted) !important; border-radius: 999px !important; }
html.th .post-toolbar a:hover { background: var(--soft) !important; color: var(--ink) !important; }
@media (max-width: 699.98px) {
    html.th #post-list .fpost-body, html.th .post-toolbar, html.th #post-list .fpost-files, html.th #post-list .fpost-single-foot { padding-left: 0 !important; margin-left: 0; }
}
/* Mavzu sarlavhasi */
html.th .card-header h1, html.th .card-header h2, html.th .card-header h3 { font-size: 20px !important; line-height: 1.3; font-weight: 700 !important; }

/* Forum haqida: rangli "hero" foni o'rniga toza fon */
html.th .fh-hero { background: var(--bg) !important; }
html.th .fh-hero::after { display: none !important; }

/* Profil */
html.th .profile-cover, html.th .card-cover { border-radius: 0 !important; }

/* Chat va shaxsiy yozishma: "ilova" kabi qulflangan oyna markaziy ustun ichida.
   O'lchamlarni th.js hisoblaydi: --th-ml (chap), --th-mw (en), --th-mt (tepa), --th-mb (past) */
html.th body.is-chat-page .th-side { display: none; }
html.th body.is-chat-page .th-app { grid-template-columns: var(--navw) minmax(0, 720px); }
html.th .chat-card-container, html.th .mailchat-container {
    left: var(--th-ml, 0) !important; right: auto !important; width: var(--th-mw, 100%);
    top: var(--th-mt, 0) !important; bottom: var(--th-mb, 0) !important;
    background: var(--bg) !important; border: 0 !important; box-shadow: none !important;
}
html.th .chat-card-container .card-header, html.th .mailchat-header {
    background: color-mix(in srgb, var(--bg) 90%, transparent) !important;
    border-bottom: 1px solid var(--line) !important;
}
html.th .chat-card-container .chat-input-bar, html.th .mailchat-container .mail-input-bar, html.th .chat-input-bar {
    background: var(--bg) !important; border-top: 1px solid var(--line) !important; box-shadow: none !important;
}
html.th #pjax-content .chat-card-container, html.th body > .chat-card-container { background: var(--bg) !important; border-bottom: 0 !important; }
html.th .th-chat-guestcard { display: none !important; }
html.th .th-chat-guest { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px !important; color: var(--muted); }
html.th .chat-card-container .ribbon { display: none; }
/* Chat pufakchalari: soyasiz, yumshoq fon; o'zimniki — qora (tungida oq) */
html.th .chat-bubble { background: var(--soft) !important; border: 0 !important; box-shadow: none !important; color: var(--ink); }
html.th .chat-msg.mine .chat-bubble { background: var(--ink) !important; color: var(--bg) !important; }
html.th .chat-msg.mine .chat-msg__text a, html.th .chat-msg.mine .chat-msg__meta, html.th .chat-msg.mine .chat-msg__time { color: var(--bg) !important; opacity: .85; }
html.th .chat-msg__text { font-size: 15px; }
html.th .chat-msg__text a { color: var(--link); }
html.th .chat-date-divider { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--muted) !important; font-weight: 500; }
html.th .chat-msg__ava .avatar { width: 32px; height: 32px; }
html.th .mailchat-back:hover { background: var(--soft); color: var(--ink); }
@media (max-width: 699.98px) {
    html.th body.is-chat-page .th-top { transform: none !important; }
}

/* Eski desktop qoidalarini bekor qilish (uzfor.css 3 ustunli margin) */
html.th .wrapper { margin: 0 !important; width: auto !important; max-width: none !important; }

/* Harakatni kamaytirish */
@media (prefers-reduced-motion: reduce) {
    html.th *, html.th *::before, html.th *::after { transition: none !important; animation: none !important; }
}
