/*
 * Memur Kahvesi public hero contract
 * One shell, one spacing rhythm, one left-copy/right-actions layout.
 * Back-office pages stay on their own visual contract.
 */

body:not(.mk-shell-backoffice) .site-main {
    padding-top: 1.25rem !important;
}

body:not(.mk-shell-backoffice) .site-main > :is(
    .classic-forum-wrapper,
    .documents-page-container,
    .tools-page,
    .signals-page-container,
    .cetele-page-container,
    .favorites-page,
    .notifications-page,
    .active-sessions-page,
    .two-factor-page,
    .legal-static-page,
    .chat-page-modern,
    .becayis-page,
    .blog-page
) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Shared shell: the forum hero is the visual reference. */
body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero,
    .forum-topbar,
    .forum-watch-hero,
    .leaderboard-hero
) {
    position: relative !important;
    z-index: 0;
    box-sizing: border-box !important;
    width: min(calc(100% - 2rem), 1380px) !important;
    max-width: 1380px !important;
    min-height: 220px !important;
    margin: 0 auto 1.25rem !important;
    padding: 1.35rem 1.5rem !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    background: linear-gradient(112deg, #111827 0%, #24242d 52%, #8f2428 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero,
    .forum-topbar,
    .forum-watch-hero,
    .leaderboard-hero
)::after {
    position: absolute;
    right: -102px;
    bottom: -170px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow:
        0 0 0 46px rgba(255, 255, 255, 0.035),
        0 0 0 92px rgba(255, 255, 255, 0.025);
    content: "";
    pointer-events: none;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero,
    .forum-topbar,
    .forum-watch-hero,
    .leaderboard-hero
) > * {
    position: relative;
    z-index: 1;
}

/* Shared two-zone layout. */
body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero > .hero-content,
    .page-hero > .mk-hero-content,
    .page-hero > .blog-hero-inner,
    .page-hero > .becayis-hero-inner,
    .forum-topbar,
    .forum-watch-hero,
    .leaderboard-hero > .hero-content
) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* Heroes with direct left and right regions. */
body:not(.mk-shell-backoffice) .site-main :is(
    .hero-left,
    .topbar-left,
    .mk-hero-left,
    .blog-hero-copy,
    .signals-hero-main,
    .becayis-hero-copy
) {
    min-width: 0;
    align-self: center;
    text-align: left !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-right,
    .forum-topbar-actions,
    .hero-actions,
    .notifications-hero-actions,
    .signals-hero-stats,
    .forum-watch-stats,
    .favorites-hero-stats
) {
    min-width: 0;
    justify-self: end;
}

/* Stats come first, actions sit immediately to their right. */
body:not(.mk-shell-backoffice) .site-main :is(
    .hero-right,
    .becayis-hero-right,
    .signals-hero-right
) {
    display: grid !important;
    grid-template-columns: auto auto !important;
    align-items: center !important;
    justify-content: end !important;
    gap: 0.65rem !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-right > .hero-stats-grid,
    .hero-right > .hero-stats,
    .signals-hero-stats,
    .becayis-hero-stats
) {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-right > .hero-actions,
    .hero-right > .documents-hero-actions,
    .hero-right > .becayis-hero-actions,
    .signals-hero-actions
) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.55rem !important;
    min-width: max-content;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-stats-grid,
    .hero-stats,
    .forum-watch-stats
) {
    align-items: stretch;
    gap: 0.65rem;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-stat-card,
    .hero-stats-grid > *,
    .hero-stats > *,
    .forum-watch-stats > *
) {
    box-sizing: border-box;
    min-width: 96px;
    min-height: 64px;
}

/* Cetele places stats before actions in the same right rail. */
body:not(.mk-shell-backoffice) .site-main .cetele-hero > .hero-content {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
}

body:not(.mk-shell-backoffice) .site-main .cetele-hero .hero-left {
    grid-column: 1;
}

body:not(.mk-shell-backoffice) .site-main .cetele-hero .cetele-hero-stats {
    grid-column: 2;
    justify-self: end;
}

body:not(.mk-shell-backoffice) .site-main .cetele-hero .cetele-hero-actions {
    grid-column: 3;
    justify-self: end;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.55rem !important;
}

/* Signal detail has no inner hero-content wrapper. */
body:not(.mk-shell-backoffice) .site-main .signal-detail-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 1.25rem !important;
}

body:not(.mk-shell-backoffice) .site-main .signal-detail-hero .signals-hero-main {
    grid-column: 1;
}

body:not(.mk-shell-backoffice) .site-main .signal-detail-hero .signals-hero-stats {
    grid-column: 2;
    display: flex !important;
}

/* Legal pages and simple profile/security heroes use the same shell,
   but their copy remains a single left column. */
body:not(.mk-shell-backoffice) .site-main .legal-static-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-title,
    .forum-title,
    .mk-hero-title,
    .blog-hero h1,
    .page-hero h1,
    .forum-watch-hero h1,
    .leaderboard-hero h1
) {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(1.8rem, 2.5vw, 2.3rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-subtitle,
    .forum-subtitle,
    .hero-description,
    .blog-hero p,
    .page-hero p
) {
    max-width: 62ch;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-actions > a,
    .hero-actions > button,
    .forum-topbar-actions > a,
    .forum-topbar-actions > button,
    .notifications-hero-actions > form > button,
    .cetele-hero-actions > a,
    .cetele-hero-actions > button
) {
    min-height: 40px !important;
    white-space: nowrap !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .hero-bg-pattern,
    .hero-decoration,
    .page-hero-background
) {
    pointer-events: none;
}

/* Keep the framework's desktop details, but remove accidental extra top gaps. */
body:not(.mk-shell-backoffice) .site-main :is(
    .documents-page-container,
    .tools-page,
    .signals-page-container,
    .cetele-page-container,
    .favorites-page,
    .chat-page-modern,
    .becayis-page,
    .blog-page
) > :is(.page-hero, .documents-hero, .tools-hero, .signals-hero, .cetele-hero, .favorites-hero, .chat-hero, .becayis-hero, .blog-hero) {
    margin-top: 0 !important;
}

/* Mobile: preserve the same order while allowing controls to wrap cleanly. */
@media (max-width: 900px) {
    body:not(.mk-shell-backoffice) .site-main {
        padding-top: 0.75rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero
    ) {
        width: min(calc(100% - 1rem), 1380px) !important;
        min-height: 0 !important;
        margin-bottom: 1rem !important;
        padding: 1.1rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero > .hero-content,
        .page-hero > .mk-hero-content,
        .page-hero > .blog-hero-inner,
        .page-hero > .becayis-hero-inner,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero > .hero-content,
        .signal-detail-hero
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 0.9rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-right,
        .forum-topbar-actions,
        .hero-actions,
        .notifications-hero-actions,
        .signals-hero-stats,
        .forum-watch-stats,
        .favorites-hero-stats
    ) {
        width: 100%;
        justify-self: stretch;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-right,
        .becayis-hero-right,
        .signals-hero-right
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
        justify-content: stretch !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-right > .hero-stats-grid,
        .hero-right > .hero-stats,
        .signals-hero-stats,
        .becayis-hero-stats,
        .hero-right > .hero-actions,
        .hero-right > .documents-hero-actions,
        .hero-right > .becayis-hero-actions,
        .signals-hero-actions
    ) {
        width: 100%;
        justify-content: flex-start !important;
    }

    body:not(.mk-shell-backoffice) .site-main .cetele-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body:not(.mk-shell-backoffice) .site-main .cetele-hero :is(
        .cetele-hero-stats,
        .cetele-hero-actions
    ) {
        grid-column: 1 !important;
        justify-self: stretch !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-stats-grid,
        .hero-stats,
        .forum-watch-stats
    ) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-stat-card,
        .hero-stats-grid > *,
        .hero-stats > *,
        .forum-watch-stats > *
    ) {
        min-width: 0;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-actions,
        .forum-topbar-actions,
        .notifications-hero-actions,
        .cetele-hero-actions
    ) {
        justify-content: flex-start !important;
    }
}

@media (max-width: 560px) {
    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-title,
        .forum-title,
        .mk-hero-title,
        .blog-hero h1,
        .page-hero h1,
        .forum-watch-hero h1,
        .leaderboard-hero h1
    ) {
        font-size: 1.6rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-stats-grid,
        .hero-stats,
        .forum-watch-stats
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .hero-actions > a,
        .hero-actions > button,
        .forum-topbar-actions > a,
        .forum-topbar-actions > button,
        .notifications-hero-actions > form > button,
        .cetele-hero-actions > a,
        .cetele-hero-actions > button
    ) {
        flex: 1 1 auto;
    }
}


/* Detail and workflow heroes that predate the shared page-hero class. */
body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero,
    .topic-hero,
    .article-hero,
    .prepare-hero,
    .studio-hero,
    .view-hero,
    .docs-hero
) {
    position: relative !important;
    z-index: 0;
    box-sizing: border-box !important;
    width: min(calc(100% - 2rem), 1380px) !important;
    max-width: 1380px !important;
    min-height: 220px !important;
    margin: 0 auto 1.25rem !important;
    padding: 1.35rem 1.5rem !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    background: linear-gradient(112deg, #111827 0%, #24242d 52%, #8f2428 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero,
    .topic-hero,
    .article-hero,
    .prepare-hero,
    .studio-hero,
    .view-hero,
    .docs-hero
)::after {
    position: absolute;
    right: -102px;
    bottom: -170px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow:
        0 0 0 46px rgba(255, 255, 255, 0.035),
        0 0 0 92px rgba(255, 255, 255, 0.025);
    content: "";
    pointer-events: none;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero,
    .topic-hero,
    .article-hero,
    .prepare-hero,
    .studio-hero,
    .view-hero,
    .docs-hero
) > * {
    position: relative;
    z-index: 1;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero,
    .topic-hero,
    .article-hero,
    .prepare-hero,
    .studio-hero,
    .view-hero,
    .docs-hero
) > :first-child {
    align-self: flex-start;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-layout,
    .topic-hero-grid,
    .article-hero-layout,
    .prepare-hero-layout,
    .studio-hero-layout,
    .view-hero-layout,
    .docs-hero-layout
) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-layout > div,
    .topic-hero-grid > div,
    .article-hero-layout > div,
    .prepare-hero-layout > div,
    .studio-hero-layout > div,
    .view-hero-layout > div,
    .docs-hero-layout > div
) {
    min-width: 0;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero h1,
    .topic-hero h1,
    .article-hero h1,
    .prepare-hero h1,
    .studio-hero h1,
    .view-hero h1,
    .docs-hero h1
) {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(1.8rem, 2.5vw, 2.3rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero p,
    .topic-hero p,
    .article-hero p,
    .prepare-hero p,
    .studio-hero p,
    .view-hero p,
    .docs-hero p
) {
    max-width: 62ch;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

body:not(.mk-shell-backoffice) .site-main :is(
    .law-detail-hero > a,
    .topic-hero > a,
    .article-hero > a,
    .prepare-hero > a,
    .studio-hero > a,
    .view-hero > a,
    .docs-hero > a,
    .law-detail-layout > a,
    .article-hero-layout > a
) {
    color: #ffffff !important;
}

body:not(.mk-shell-backoffice) .site-main .mk-form-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 1.25rem !important;
}

body:not(.mk-shell-backoffice) .site-main .mk-form-hero__content {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    min-width: 0;
    margin: 0 !important;
}

body:not(.mk-shell-backoffice) .site-main .mk-form-hero__copy {
    min-width: 0;
    text-align: left !important;
}

body:not(.mk-shell-backoffice) .site-main .mk-form-hero__content h1,
body:not(.mk-shell-backoffice) .site-main .mk-form-hero__content p {
    color: #ffffff !important;
}

@media (max-width: 900px) {
    body:not(.mk-shell-backoffice) .site-main :is(
        .law-detail-hero,
        .topic-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero
    ) {
        width: min(calc(100% - 1rem), 1380px) !important;
        min-height: 0 !important;
        margin-bottom: 1rem !important;
        padding: 1.1rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .law-detail-hero,
        .topic-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero,
        .law-detail-layout,
        .topic-hero-grid,
        .article-hero-layout,
        .prepare-hero-layout,
        .studio-hero-layout,
        .view-hero-layout,
        .docs-hero-layout,
        .mk-form-hero
    ) {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 0.9rem !important;
    }

    body:not(.mk-shell-backoffice) .site-main :is(
        .law-detail-layout > a,
        .article-hero-layout > a,
        .mk-form-hero__back
    ) {
        justify-self: start !important;
    }

    body:not(.mk-shell-backoffice) .site-main .mk-form-hero__content {
        align-items: flex-start !important;
    }
}

@media (max-width: 560px) {
    body:not(.mk-shell-backoffice) .site-main :is(
        .law-detail-hero h1,
        .topic-hero h1,
        .article-hero h1,
        .prepare-hero h1,
        .studio-hero h1,
        .view-hero h1,
        .docs-hero h1,
        .mk-form-hero__content h1
    ) {
        font-size: 1.6rem !important;
    }
}


/* The work center keeps its summary inside the hero: stats, then actions. */
body:not(.mk-shell-backoffice) .site-main .tools-hero > .hero-content {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
}

body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-left {
    grid-column: 1;
}

body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
    grid-column: 2;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-self: end;
    gap: 0.65rem !important;
}

body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-actions {
    grid-column: 3;
    justify-self: end;
}

@media (max-width: 900px) {
    body:not(.mk-shell-backoffice) .site-main .tools-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body:not(.mk-shell-backoffice) .site-main .tools-hero :is(
        .tools-summary-bar,
        .hero-actions
    ) {
        grid-column: 1 !important;
        justify-self: stretch !important;
    }

    body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/*
 * Final lock: the shell itself must never be reset by its inner-grid rule.
 * Desktop cards share the exact forum reference dimensions.
 */
@media (min-width: 901px) {
    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero,
        .law-detail-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero
    ) {
        width: min(calc(100% - 2rem), 1400px) !important;
        max-width: 1400px !important;
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
        margin-top: 0 !important;
        margin-bottom: 1.25rem !important;
        padding: 1.35rem 1.5rem !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        background: linear-gradient(112deg, #111827 0%, #24242d 52%, #8f2428 100%) !important;
        border-radius: 8px !important;
    }

    /* Remove page-specific top offsets; site-main owns the single gap. */
    html body:not(.mk-shell-backoffice) .site-main > .page-shell.page-shell,
    html body:not(.mk-shell-backoffice) .site-main > .classic-forum-wrapper.classic-forum-wrapper,
    html body:not(.mk-shell-backoffice) .site-main > .tools-page.tools-page,
    html body:not(.mk-shell-backoffice) .site-main > .blog-page.blog-page,
    html body:not(.mk-shell-backoffice) .site-main > .documents-page-container.documents-page-container,
    html body:not(.mk-shell-backoffice) .site-main > .signals-page-container.signals-page-container,
    html body:not(.mk-shell-backoffice) .site-main > .cetele-page-container.cetele-page-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Forum and watch heroes are their own grid containers. */
    html body:not(.mk-shell-backoffice) .site-main :is(
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero
    ) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 1.25rem !important;
    }

    /* Re-assert the tools composition after moving its stats into the hero. */
    html body:not(.mk-shell-backoffice) .site-main .tools-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) auto auto !important;
        min-height: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
        grid-column: 2 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-actions {
        grid-column: 3 !important;
    }
}

@media (max-width: 900px) {
    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero,
        .law-detail-hero,
        .topic-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero
    ) {
        width: min(calc(100% - 1rem), 1400px) !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
        padding: 1.1rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .page-shell.page-shell,
    html body:not(.mk-shell-backoffice) .site-main > .classic-forum-wrapper.classic-forum-wrapper,
    html body:not(.mk-shell-backoffice) .site-main > .tools-page.tools-page,
    html body:not(.mk-shell-backoffice) .site-main > .blog-page.blog-page {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}


/* Inner page shells must not introduce a second header-to-hero gap. */
@media (min-width: 901px) {
    html body:not(.mk-shell-backoffice) .site-main > .tools-page.tools-page.classic-forum-wrapper.forum-reference-wrapper,
    html body:not(.mk-shell-backoffice) .site-main > .mk-legal-search.mk-legal-search,
    html body:not(.mk-shell-backoffice) .site-main > .mk-aym-search.mk-aym-search,
    html body:not(.mk-shell-backoffice) .site-main > .mk-announcements.mk-announcements,
    html body:not(.mk-shell-backoffice) .site-main > .mk-cities-main.mk-cities-main,
    html body:not(.mk-shell-backoffice) .site-main > .mk-compare-main.mk-compare-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > :is(
        .mk-legal-search,
        .mk-aym-search,
        .mk-announcements,
        .mk-cities-main,
        .mk-compare-main
    ) > :is(
        .emsal-page-container,
        .aym-page-container,
        .announcements-page-container,
        .city-page,
        .compare-page
    ) {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 900px) {
    html body:not(.mk-shell-backoffice) .site-main > :is(
        .mk-legal-search,
        .mk-aym-search,
        .mk-announcements,
        .mk-cities-main,
        .mk-compare-main
    ) > :is(
        .emsal-page-container,
        .aym-page-container,
        .announcements-page-container,
        .city-page,
        .compare-page
    ) {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}


/* A hero inside a page shell must fill that shell exactly.
   Applying calc(100% - gap) here creates the document-page inset. */
html body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero,
    .forum-topbar,
    .forum-watch-hero,
    .leaderboard-hero,
    .law-detail-hero,
    .topic-hero,
    .article-hero,
    .prepare-hero,
    .studio-hero,
    .view-hero,
    .docs-hero
) {
    width: 100% !important;
    max-width: none !important;
}

/* Final cross-page alignment pass.
   Some older page styles still assign their own grid areas after the shared
   hero contract. Keep the common shell, then correct only those inner rails. */
@media (min-width: 901px) {
    /* A top-level hero uses the same centered rail as the forum page. */
    html body:not(.mk-shell-backoffice) .site-main > :is(
        .page-hero,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero,
        .law-detail-hero,
        .topic-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero
    ) {
        width: min(calc(100% - 2rem), 1400px) !important;
        max-width: 1400px !important;
    }

    /* Three announcement/search counters stay on one horizontal rail. */
    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero > .hero-content > .hero-stats-grid,
        .page-hero > .mk-hero-content > .hero-stats-grid
    ) {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        grid-template-columns: none !important;
        gap: .65rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero > .hero-content > .hero-stats-grid > *,
        .page-hero > .mk-hero-content > .hero-stats-grid > *
    ) {
        flex: 0 0 auto !important;
        min-width: 96px !important;
    }

    /* Documents: counters first, upload action at the far right. */
    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right {
        display: grid !important;
        grid-template-columns: auto auto !important;
        grid-template-areas: none !important;
        align-items: center !important;
        justify-content: end !important;
        gap: .65rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right > .hero-stats-grid {
        grid-area: auto !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right > .documents-hero-actions {
        grid-area: auto !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: center !important;
        justify-self: end !important;
        margin: 0 !important;
    }

    /* Process center: reserve a real column for counters and actions so the
       greeting can wrap instead of running underneath them. */
    html body:not(.mk-shell-backoffice) .site-main .tools-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) auto auto !important;
        grid-template-areas: "copy stats actions" !important;
        align-items: center !important;
        gap: .75rem !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-left {
        grid-area: copy !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-title,
    html body:not(.mk-shell-backoffice) .site-main .tools-hero h1 {
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        font-size: clamp(1.45rem, 2vw, 1.9rem) !important;
        line-height: 1.12 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
        grid-area: stats !important;
        grid-column: auto !important;
        grid-row: auto !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
        gap: .55rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        grid-row: auto !important;
        justify-self: end !important;
        width: auto !important;
        min-width: max-content !important;
    }

    /* Becayis: keep the copy left, counters before the action rail, and both
       action buttons together at the far right. */
    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas: "copy rail" !important;
        align-items: center !important;
        gap: 1.25rem !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-inner > .hero-left {
        grid-area: copy !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-inner > .hero-right {
        grid-area: rail !important;
        display: grid !important;
        grid-template-columns: auto auto !important;
        grid-template-areas: "stats actions" !important;
        align-items: center !important;
        justify-self: end !important;
        gap: .65rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-right > .hero-stats {
        grid-area: stats !important;
        grid-column: auto !important;
        grid-row: auto !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        width: auto !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-right > .becayis-hero-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        grid-row: auto !important;
        justify-self: end !important;
        width: auto !important;
        min-width: max-content !important;
        margin: 0 !important;
    }
}

@media (max-width: 900px) {
    /* Keep top-level heroes centered while nested heroes fill their shell. */
    html body:not(.mk-shell-backoffice) .site-main > :is(
        .page-hero,
        .forum-topbar,
        .forum-watch-hero,
        .leaderboard-hero,
        .law-detail-hero,
        .topic-hero,
        .article-hero,
        .prepare-hero,
        .studio-hero,
        .view-hero,
        .docs-hero
    ) {
        width: min(calc(100% - 1rem), 1400px) !important;
        max-width: 1400px !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "stats" "actions" !important;
        justify-content: stretch !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right > .hero-stats-grid {
        grid-area: stats !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .documents-hero .documents-hero-right > .documents-hero-actions {
        grid-area: actions !important;
        grid-column: 1 !important;
        grid-row: 2 !important;
        justify-self: start !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "copy" "stats" "actions" !important;
        overflow: visible !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar,
    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-actions {
        grid-column: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .tools-summary-bar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .tools-hero .hero-actions {
        justify-self: stretch !important;
        justify-content: flex-start !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-inner {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "copy" "rail" !important;
        align-items: start !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-inner > .hero-right {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "stats" "actions" !important;
        justify-self: stretch !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-right > .hero-stats,
    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-right > .becayis-hero-actions {
        grid-column: 1 !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .becayis-hero-right > .becayis-hero-actions {
        justify-self: start !important;
    }
}


/* Signal hero: keep counters and actions on one centered right rail. */
@media (min-width: 901px) {
    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: minmax(0, 1fr) !important;
        grid-template-areas: "copy rail" !important;
        align-items: center !important;
        gap: 1.25rem !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content > .signals-hero-main {
        grid-area: copy !important;
        grid-column: auto !important;
        grid-row: auto !important;
        align-self: center !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content > .signals-hero-right {
        grid-area: rail !important;
        grid-column: auto !important;
        grid-row: auto !important;
        display: grid !important;
        grid-template-columns: auto auto !important;
        grid-template-areas: "stats actions" !important;
        align-items: center !important;
        align-self: center !important;
        justify-self: end !important;
        gap: .65rem !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero .signals-hero-stats {
        grid-area: stats !important;
        grid-column: auto !important;
        grid-row: auto !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        align-self: center !important;
        justify-self: end !important;
        width: auto !important;
        min-width: 0 !important;
        gap: .55rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero .signals-hero-actions {
        grid-area: actions !important;
        grid-column: auto !important;
        grid-row: auto !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        align-self: center !important;
        justify-self: end !important;
        width: auto !important;
        min-width: max-content !important;
        margin: 0 !important;
        gap: .55rem !important;
    }
}

@media (max-width: 900px) {
    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto !important;
        grid-template-areas: "copy" "rail" !important;
        align-items: start !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content > .signals-hero-main {
        grid-area: copy !important;
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero > .hero-content > .signals-hero-right {
        grid-area: rail !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "stats" "actions" !important;
        justify-self: stretch !important;
        align-self: start !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero .signals-hero-stats {
        grid-area: stats !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        width: 100% !important;
    }

    html body:not(.mk-shell-backoffice) .site-main .signals-hero .signals-hero-actions {
        grid-area: actions !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        justify-self: start !important;
        width: 100% !important;
        margin: 0 !important;
    }
}


/* Blog hero search: use the same right-side action rail as the forum hero. */
@media (min-width: 901px) {
    html body:not(.mk-shell-backoffice) .site-main > .blog-hero > .blog-hero-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 650px) !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        gap: 1.25rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero > .blog-hero-inner > .hero-right {
        display: block !important;
        width: min(100%, 650px) !important;
        max-width: 650px !important;
        justify-self: end !important;
        margin: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero .blog-search {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        gap: .55rem !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero .blog-search input {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero .blog-search button {
        width: auto !important;
        min-width: 82px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 900px) {
    html body:not(.mk-shell-backoffice) .site-main > .blog-hero > .blog-hero-inner {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero > .blog-hero-inner > .hero-right,
    html body:not(.mk-shell-backoffice) .site-main > .blog-hero .blog-search {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body:not(.mk-shell-backoffice) .site-main > .blog-hero .blog-search {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: .5rem !important;
    }
}


/* Shared hero rail control height.
   Stat cards are the reference; buttons match their two-line information rhythm. */
@media (min-width: 901px) {
    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .tools-hero,
        .signals-hero,
        .cetele-hero,
        .chat-hero,
        .favorites-hero,
        .notifications-hero,
        .active-sessions-hero,
        .two-factor-hero,
        .messages-hero
    ) :is(
        .hero-stat-card,
        .hero-stats-grid > *,
        .hero-stats > *,
        .signals-hero-stats > *,
        .hstat
    ) {
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        box-sizing: border-box !important;
        align-self: center !important;
    }

    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .tools-hero,
        .signals-hero,
        .cetele-hero,
        .chat-hero,
        .favorites-hero,
        .notifications-hero,
        .active-sessions-hero,
        .two-factor-hero,
        .messages-hero
    ) :is(
        .hero-actions > a,
        .hero-actions > button,
        .documents-hero-actions > a,
        .becayis-hero-actions > a,
        .signals-hero-actions > a,
        .cetele-hero-actions > a,
        .btn-upload,
        .btn-hero,
        .hero-primary,
        .hero-secondary,
        .blog-search button
    ) {
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        box-sizing: border-box !important;
        align-self: center !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 900px) {
    html body:not(.mk-shell-backoffice) .site-main :is(
        .page-hero,
        .tools-hero,
        .signals-hero,
        .cetele-hero,
        .chat-hero,
        .favorites-hero,
        .notifications-hero,
        .active-sessions-hero,
        .two-factor-hero,
        .messages-hero
    ) :is(
        .hero-stat-card,
        .hero-stats-grid > *,
        .hero-stats > *,
        .signals-hero-stats > *,
        .hstat,
        .hero-actions > a,
        .hero-actions > button,
        .documents-hero-actions > a,
        .becayis-hero-actions > a,
        .signals-hero-actions > a,
        .cetele-hero-actions > a,
        .btn-upload,
        .btn-hero,
        .hero-primary,
        .hero-secondary,
        .blog-search button
    ) {
        min-height: 48px !important;
        box-sizing: border-box !important;
    }
}


/* Controlled module accents: one hero system, distinct product identities. */
body.mk-page-forum {
    --mk-hero-accent: #60a5fa;
    --mk-hero-accent-strong: #2563eb;
}
body.mk-page-blog {
    --mk-hero-accent: #fb7185;
    --mk-hero-accent-strong: #e11d48;
}
body.mk-page-documents {
    --mk-hero-accent: #f5b94c;
    --mk-hero-accent-strong: #ea580c;
}
body.mk-page-tools {
    --mk-hero-accent: #22d3ee;
    --mk-hero-accent-strong: #0891b2;
}
body.mk-page-archive {
    --mk-hero-accent: #34d399;
    --mk-hero-accent-strong: #0f9d8e;
}
body.mk-page-becayis {
    --mk-hero-accent: #2dd4bf;
    --mk-hero-accent-strong: #0f9d8e;
}
body.mk-page-signals {
    --mk-hero-accent: #fb7185;
    --mk-hero-accent-strong: #e11d48;
}
body.mk-page-legal,
body.mk-page-legal-search {
    --mk-hero-accent: #38bdf8;
    --mk-hero-accent-strong: #0284c7;
}
body.mk-page-announcements {
    --mk-hero-accent: #fb923c;
    --mk-hero-accent-strong: #ea580c;
}
body.mk-page-cities {
    --mk-hero-accent: #34d399;
    --mk-hero-accent-strong: #059669;
}
body.mk-page-search {
    --mk-hero-accent: #fda4af;
    --mk-hero-accent-strong: #e11d48;
}
body.mk-page-notifications,
body.mk-page-messages {
    --mk-hero-accent: #60a5fa;
    --mk-hero-accent-strong: #2563eb;
}
body.mk-page-active-sessions,
body.mk-page-two-factor {
    --mk-hero-accent: #34d399;
    --mk-hero-accent-strong: #059669;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero,
    .tools-hero,
    .signals-hero,
    .cetele-hero,
    .chat-hero,
    .favorites-hero,
    .notifications-hero,
    .active-sessions-hero,
    .two-factor-hero,
    .messages-hero
) {
    border-left-color: var(--mk-hero-accent, #60a5fa) !important;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero h1 > svg,
    .tools-hero h1 > svg,
    .hero-title > svg,
    .mk-hero-title > svg,
    .hero-eyebrow > svg,
    .tools-kicker > svg,
    .signals-kicker > svg
) {
    color: var(--mk-hero-accent, #60a5fa) !important;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero .hero-stat-card,
    .page-hero .hero-stats-grid > *,
    .page-hero .hero-stats > *,
    .tools-hero .hero-stat-card,
    .signals-hero .hero-stat-card,
    .cetele-hero .hero-stat-card,
    .hstat
) {
    border-color: color-mix(in srgb, var(--mk-hero-accent, #60a5fa) 42%, rgba(255, 255, 255, .18)) !important;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .page-hero .stat-icon,
    .page-hero .hero-stat-card > svg,
    .tools-hero .stat-icon,
    .cetele-hero .stat-icon,
    .signals-hero .hero-stat-card > svg
) {
    color: var(--mk-hero-accent, #60a5fa) !important;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .hero-primary,
    .hero-actions .btn-new-topic,
    .btn-primary-signal,
    .btn-upload,
    .btn-hero:not(.btn-outline),
    .btn-hero-primary,
    .blog-button-primary,
    .mk-hero-official-btn
) {
    background: var(--mk-hero-accent-strong, #2563eb) !important;
    border-color: var(--mk-hero-accent-strong, #2563eb) !important;
    color: #fff !important;
}

html body:not(.mk-shell-backoffice) .site-main :is(
    .hero-secondary,
    .btn-secondary-signal,
    .btn-hero-secondary,
    .btn-outline
) {
    border-color: color-mix(in srgb, var(--mk-hero-accent, #60a5fa) 48%, rgba(255, 255, 255, .32)) !important;
}


/* Keep legacy premium selectors on the same module accent token. */
body.mk-page-forum { --premium-accent: #2563eb; }
body.mk-page-blog { --premium-accent: #e11d48; }
body.mk-page-documents { --premium-accent: #ea580c; }
body.mk-page-tools { --premium-accent: #0891b2; }
body.mk-page-archive { --premium-accent: #0f9d8e; }
body.mk-page-becayis { --premium-accent: #0f9d8e; }
body.mk-page-signals { --premium-accent: #e11d48; }
body.mk-page-legal,
body.mk-page-legal-search { --premium-accent: #0284c7; }
body.mk-page-announcements { --premium-accent: #ea580c; }
body.mk-page-cities { --premium-accent: #059669; }
body.mk-page-search { --premium-accent: #e11d48; }
body.mk-page-notifications,
body.mk-page-messages { --premium-accent: #2563eb; }
body.mk-page-active-sessions,
body.mk-page-two-factor { --premium-accent: #059669; }
/* Current detail/list fixes: becayis, people directory, document uploader and topic actions. */

/* People directory: forum-like single-column rows with aligned controls. */
body.mk-page-users .filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: .65rem !important;
}
body.mk-page-users .filter-bar .search-box {
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
    min-width: 0 !important;
}
body.mk-page-users .filter-bar .search-box svg {
    flex: 0 0 auto;
    color: #64748b;
}
body.mk-page-users .filter-bar :where(input, select, button, a) {
    min-height: 44px !important;
    box-sizing: border-box !important;
}
body.mk-page-users .filter-bar .search-box input {
    width: 100% !important;
    min-width: 0 !important;
}
body.mk-page-users .users-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .55rem !important;
    padding: .7rem !important;
}
body.mk-page-users .user-card {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) auto auto !important;
    align-items: center !important;
    gap: 1rem !important;
    min-width: 0 !important;
    padding: .8rem 1rem !important;
}
body.mk-page-users .user-card-header {
    min-width: 0 !important;
}
body.mk-page-users .user-stats {
    display: flex !important;
    align-items: center !important;
    gap: .9rem !important;
    margin: 0 !important;
    padding: 0 1rem !important;
    border-left: 1px solid var(--mk-color-line, #e2e8f0) !important;
    border-top: 0 !important;
}
body.mk-page-users .user-stats .stat-item {
    min-width: 48px !important;
}
body.mk-page-users .user-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: .75rem !important;
    min-width: 175px !important;
    margin: 0 !important;
    padding: 0 0 0 1rem !important;
    border-left: 1px solid var(--mk-color-line, #e2e8f0) !important;
}
body.mk-page-users .user-date {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.25rem 0.55rem !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--mk-color-line, #e2e8f0) !important;
    border-radius: 6px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--mk-muted, #64748b) !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}
body.mk-page-users .user-date svg,
body.mk-page-users .user-date .icon-svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    stroke-width: 2.2 !important;
}
body.mk-page-users .user-action {
    white-space: nowrap !important;
    color: var(--pm-strong, #1d4ed8) !important;
    font-weight: 800 !important;
}

/* Leaderboard: keep the table as a compact, one-column forum-style stream. */
body.mk-page-leaderboard .leaderboard-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .55rem !important;
}
body.mk-page-leaderboard .leaderboard-item {
    grid-template-columns: 52px minmax(220px, 1fr) auto !important;
    align-items: center !important;
    gap: 1rem !important;
    min-height: 68px !important;
    padding: .75rem 1rem !important;
}
body.mk-page-leaderboard .stats-col {
    align-items: center !important;
    justify-content: flex-end !important;
    gap: .85rem !important;
    min-width: 0 !important;
}
body.mk-page-leaderboard .stat-item {
    min-width: 50px !important;
}

/* Document details: separate download states and make the uploader an actual profile rail. */
body.mk-page-document-detail .download-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .65rem !important;
    margin-top: 1rem !important;
}
body.mk-page-document-detail .document-download-quota {
    display: block !important;
    margin: 0 !important;
    padding: .35rem .6rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    color: #64748b !important;
    line-height: 1.35 !important;
}
body.mk-page-document-detail .document-save-form {
    margin: .1rem 0 0 !important;
}
body.mk-page-document-detail .uploader-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: .75rem !important;
}
body.mk-page-document-detail .uploader-avatar-link {
    position: relative !important;
    display: inline-block !important;
    width: 88px !important;
    height: 88px !important;
    margin: 0 auto !important;
}
body.mk-page-document-detail .uploader-avatar-ring {
    position: relative !important;
    width: 88px !important;
    height: 88px !important;
    flex: 0 0 88px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 3px solid #f1f5f9 !important;
    background: #f8fafc !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
body.mk-page-document-detail .uploader-avatar,
body.mk-page-document-detail .uploader-avatar-placeholder {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.mk-page-document-detail .uploader-avatar-placeholder {
    display: grid !important;
    place-items: center !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    font-size: 1.85rem !important;
    font-weight: 900 !important;
}
body.mk-page-document-detail .uploader-details {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
}
body.mk-page-document-detail .uploader-name {
    display: block !important;
    font-size: 1.45rem !important;
    font-weight: 900 !important;
    color: var(--rank-color, #dc2626) !important;
    text-decoration: none !important;
    letter-spacing: -.02em !important;
    line-height: 1.2 !important;
    margin-bottom: .25rem !important;
}
body.mk-page-document-detail .uploader-name:hover {
    opacity: .88 !important;
}
body.mk-page-document-detail .uploader-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: .35rem !important;
    margin-top: .35rem !important;
}
body.mk-page-document-detail .uploader-stats {
    margin-top: 1rem !important;
    padding-top: .8rem !important;
    border-top: 1px solid var(--mk-color-line, #e2e8f0) !important;
}

/* Topic Header Card & Layout */
body.mk-page-forum-topic .topic-header-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.75rem !important;
}

/* Topic header top row: Badges and Topic Meta on the same top line */
body.mk-page-forum-topic .topic-header-main {
    display: flex !important;
    flex-direction: column !important;
    gap: .55rem !important;
    width: 100% !important;
}
body.mk-page-forum-topic .topic-title-section {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: .45rem !important;
}
body.mk-page-forum-topic .topic-header-top-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: .5rem 1rem !important;
    width: 100% !important;
}
body.mk-page-forum-topic .topic-badges {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: .4rem !important;
}
body.mk-page-forum-topic .topic-meta {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: .4rem !important;
    margin: 0 !important;
}
body.mk-page-forum-topic .topic-meta .meta-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    padding: .22rem .55rem !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .09) !important;
    border: 1px solid rgba(255, 255, 255, .15) !important;
    color: rgba(255, 255, 255, .9) !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
body.mk-page-forum-topic .topic-meta .meta-icon svg {
    width: 13px !important;
    height: 13px !important;
    opacity: .85 !important;
}

/* Topic action toolbar: Share bar & User Action Buttons */
body.mk-page-forum-topic .topic-action-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: .75rem 1.25rem !important;
    width: 100% !important;
    margin: .15rem 0 .25rem !important;
}
body.mk-page-forum-topic .topic-share-area {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
}
body.mk-page-forum-topic .mk-share-bar--topic {
    display: inline-flex !important;
    align-items: center !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: .2rem .45rem !important;
    border: 1px solid rgba(15, 23, 42, .14) !important;
    border-radius: 9px !important;
    background: rgba(248, 250, 252, .96) !important;
    box-sizing: border-box !important;
    gap: .4rem !important;
}
body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__label {
    font-size: .72rem !important;
    font-weight: 800 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: .03em !important;
    padding-left: .25rem !important;
    margin: 0 !important;
    line-height: 1 !important;
}
body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .3rem !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 .65rem !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    border-radius: 7px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05) !important;
    white-space: nowrap !important;
}
body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__btn svg {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 auto !important;
}
body.mk-page-forum-topic .topic-user-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .45rem !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
}
body.mk-page-forum-topic .topic-user-actions > *,
body.mk-page-forum-topic .topic-user-actions :where(.inline-form) {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}
body.mk-page-forum-topic .topic-user-actions :where(.btn-modern) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .38rem !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 .85rem !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    width: auto !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}
body.mk-page-forum-topic .topic-user-actions :where(.btn-modern) .btn-icon svg {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 auto !important;
}

/* Moderation Tools Panel - Full Width Premium Strip */
body.mk-page-forum-topic .topic-moderation-panel {
    display: block !important;
    width: 100% !important;
    margin-top: .85rem !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 10px !important;
    background: rgba(15, 23, 42, .45) !important;
    backdrop-filter: blur(8px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    clear: both !important;
}
body.mk-page-forum-topic .topic-moderation-panel > summary {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: .6rem 1rem !important;
    font-size: .85rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background .15s ease !important;
}
body.mk-page-forum-topic .topic-moderation-panel > summary:hover {
    background: rgba(255, 255, 255, .06) !important;
}
body.mk-page-forum-topic .topic-moderation-summary-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: .45rem !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}
body.mk-page-forum-topic .topic-moderation-summary-title svg {
    width: 16px !important;
    height: 16px !important;
    color: #38bdf8 !important;
}
body.mk-page-forum-topic .topic-moderation-summary-help {
    display: inline-block !important;
    color: rgba(255, 255, 255, .65) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    margin-left: .5rem !important;
}
body.mk-page-forum-topic .topic-moderation-body {
    padding: 1rem 1.15rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: .85rem !important;
    background: rgba(0, 0, 0, .25) !important;
    border-top: 1px solid rgba(255, 255, 255, .1) !important;
}
body.mk-page-forum-topic .topic-actions,
body.mk-page-forum-topic .topic-actions .inline-form {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: .65rem !important;
    width: 100% !important;
    margin: 0 !important;
}
body.mk-page-forum-topic .topic-actions .action-btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 1rem !important;
    font-size: .83rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .4rem !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
}
body.mk-page-forum-topic .topic-actions .action-btn:hover {
    background: rgba(255, 255, 255, .22) !important;
    border-color: rgba(255, 255, 255, .35) !important;
    transform: translateY(-1px) !important;
}
body.mk-page-forum-topic .topic-actions .action-btn svg {
    width: 15px !important;
    height: 15px !important;
}
body.mk-page-forum-topic .topic-actions .btn-delete {
    margin-left: auto !important;
    background: rgba(220, 38, 38, .85) !important;
    border-color: rgba(248, 113, 113, .4) !important;
    color: #ffffff !important;
}
body.mk-page-forum-topic .topic-actions .btn-delete:hover {
    background: #dc2626 !important;
    border-color: #f87171 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, .35) !important;
}
body.mk-page-forum-topic .forum-topic-move-form {
    margin: 0 !important;
    padding: .85rem 1rem !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
body.mk-page-forum-topic .forum-topic-move-fields {
    display: grid !important;
    grid-template-columns: minmax(200px, 1.2fr) minmax(200px, 1.8fr) auto !important;
    gap: .85rem !important;
    align-items: flex-end !important;
    width: 100% !important;
}
body.mk-page-forum-topic .forum-topic-move-fields label {
    display: flex !important;
    flex-direction: column !important;
    gap: .35rem !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, .88) !important;
    margin: 0 !important;
    min-width: 0 !important;
}
body.mk-page-forum-topic .forum-topic-move-fields select,
body.mk-page-forum-topic .forum-topic-move-fields input {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 7px !important;
    padding: 0 .75rem !important;
    background: rgba(15, 23, 42, .8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, .25) !important;
    font-size: .84rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
body.mk-page-forum-topic .forum-topic-move-fields select:focus,
body.mk-page-forum-topic .forum-topic-move-fields input:focus {
    border-color: #38bdf8 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .2) !important;
}
body.mk-page-forum-topic .forum-topic-move-fields .btn-move-topic {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 1.25rem !important;
    border-radius: 7px !important;
    font-size: .84rem !important;
    font-weight: 800 !important;
    background: #0284c7 !important;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, .35) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .4rem !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
}
body.mk-page-forum-topic .forum-topic-move-fields .btn-move-topic:hover {
    background: #0369a1 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, .35) !important;
    transform: translateY(-1px) !important;
}
@media (max-width: 820px) {
    body.mk-page-forum-topic .forum-topic-move-fields {
        grid-template-columns: 1fr !important;
    }
    body.mk-page-forum-topic .topic-actions .btn-delete {
        margin-left: 0 !important;
        width: 100% !important;
    }
    body.mk-page-forum-topic .topic-actions .action-btn {
        flex: 1 1 calc(50% - .35rem) !important;
    }
}
@media (max-width: 900px) {
    body.mk-page-users .filter-bar {
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(150px, 1fr)) auto !important;
    }
    body.mk-page-users .user-card {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }
    body.mk-page-users .user-stats {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        padding: .6rem 0 0 !important;
        border-left: 0 !important;
        border-top: 1px solid var(--mk-color-line, #e2e8f0) !important;
    }
    body.mk-page-users .user-footer {
        grid-column: 2;
        grid-row: 1;
        min-width: 0 !important;
        padding-left: .75rem !important;
        border-left: 1px solid var(--mk-color-line, #e2e8f0) !important;
    }
    body.mk-page-leaderboard .leaderboard-item {
        grid-template-columns: 44px minmax(0, 1fr) !important;
    }
    body.mk-page-leaderboard .stats-col {
        grid-column: 2;
        justify-content: flex-start !important;
        overflow-x: auto;
        padding-top: .45rem;
    }
}
@media (max-width: 680px) {
    body.mk-page-users .filter-bar {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.mk-page-users .user-card {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .7rem !important;
    }
    body.mk-page-users .user-footer,
    body.mk-page-users .user-stats {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        border-left: 0 !important;
        padding-left: 0 !important;
    }
    body.mk-page-users .user-footer {
        justify-content: space-between !important;
        padding-top: .65rem !important;
        border-top: 1px solid var(--mk-color-line, #e2e8f0) !important;
    }
    body.mk-page-forum-topic .topic-action-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: .65rem !important;
    }
    body.mk-page-forum-topic .topic-share-area,
    body.mk-page-forum-topic .topic-user-actions {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    body.mk-page-forum-topic .mk-share-bar--topic {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 34px !important;
        flex-wrap: wrap !important;
        padding: .3rem .45rem !important;
        box-sizing: border-box !important;
        gap: .3rem !important;
    }
    body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__actions {
        flex-wrap: wrap !important;
        gap: .25rem !important;
    }
    body.mk-page-forum-topic .mk-share-bar--topic .mk-share-bar__btn {
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 .45rem !important;
        font-size: .72rem !important;
    }
    body.mk-page-forum-topic .topic-user-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: .35rem !important;
    }
    body.mk-page-forum-topic .topic-user-actions :where(.btn-modern) {
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 .55rem !important;
        font-size: .74rem !important;
        border-radius: 7px !important;
    }
    body.mk-page-forum-topic .topic-user-actions :where(.btn-modern) .btn-icon svg {
        width: 13px !important;
        height: 13px !important;
    }
}
/* Document info cards: Forum category style with icon badges, refined borders, and action zone */
body.mk-page-document-detail .info-grid.document-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .75rem !important;
    margin-top: 1rem !important;
}
body.mk-page-document-detail .document-meta-grid .info-item {
    display: flex !important;
    align-items: center !important;
    gap: .85rem !important;
    min-width: 0 !important;
    padding: .85rem 1rem !important;
    border: 1px solid rgba(15, 23, 42, .09) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .03) !important;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}
body.mk-page-document-detail .document-meta-grid .info-item:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(37, 99, 235, .28) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06) !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge svg {
    width: 20px !important;
    height: 20px !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge.icon-size {
    background: rgba(37, 99, 235, .09) !important;
    color: #2563eb !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge.icon-type {
    background: rgba(139, 92, 246, .09) !important;
    color: #8b5cf6 !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge.icon-download {
    background: rgba(16, 185, 129, .09) !important;
    color: #059669 !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge.icon-views {
    background: rgba(245, 158, 11, .09) !important;
    color: #d97706 !important;
}
body.mk-page-document-detail .document-meta-grid .info-icon-badge.icon-date {
    background: rgba(6, 182, 212, .09) !important;
    color: #0891b2 !important;
}
body.mk-page-document-detail .document-meta-grid .info-content {
    display: flex !important;
    flex-direction: column !important;
    gap: .15rem !important;
    min-width: 0 !important;
}
body.mk-page-document-detail .document-meta-grid .info-label {
    font-size: .74rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: .02em !important;
    line-height: 1 !important;
}
body.mk-page-document-detail .document-meta-grid .info-value {
    color: #0f172a !important;
    font-size: .95rem !important;
    font-weight: 800 !important;
    overflow-wrap: anywhere !important;
    line-height: 1.25 !important;
}

/* Action item in the right of upload date */
body.mk-page-document-detail .document-meta-grid .info-action-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: .5rem !important;
    padding: .7rem .85rem !important;
    background: linear-gradient(135deg, #f8fbff, #f1f5f9) !important;
    border: 1px solid #cbd5e1 !important;
}
body.mk-page-document-detail .document-meta-grid .info-action-buttons {
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
    width: 100% !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-download {
    flex: 1 1 auto !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .4rem !important;
    padding: 0 .9rem !important;
    font-size: .84rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, .08) !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, .22) !important;
    white-space: nowrap !important;
    transition: all .15s ease !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-download:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, .3) !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-download.is-disabled {
    background: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}
body.mk-page-document-detail .document-meta-grid .doc-inline-save-form {
    display: inline-flex !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-save {
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .35rem !important;
    padding: 0 .75rem !important;
    font-size: .8rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all .15s ease !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-save:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}
body.mk-page-document-detail .document-meta-grid .btn-doc-save.is-saved {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
}
body.mk-page-document-detail .document-meta-grid .doc-quota-indicator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
body.mk-page-document-detail .document-meta-grid .quota-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    padding: .15rem .5rem !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, .06) !important;
}
body.mk-page-document-detail .document-meta-grid .quota-pill.is-unlimited {
    background: rgba(22, 163, 74, .1) !important;
    color: #15803d !important;
}
@media (max-width: 680px) {
    body.mk-page-document-detail .info-grid.document-meta-grid {
        grid-template-columns: 1fr !important;
    }
}/* Uploader identity: avatar and rank are one clickable profile presentation. */
body.mk-page-document-detail .uploader-avatar-link {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    color: inherit !important;
    text-decoration: none !important;
    border-radius: 50% !important;
}
body.mk-page-document-detail .uploader-avatar-link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--premium-accent, #2563eb) 35%, transparent) !important;
    outline-offset: 3px !important;
}
body.mk-page-document-detail .uploader-details {
    display: grid !important;
    gap: .35rem !important;
}
body.mk-page-document-detail .uploader-badges .badge-rutbe {
    display: inline-flex !important;
    align-items: center !important;
    gap: .3rem !important;
    width: fit-content !important;
    padding: .3rem .55rem !important;
    border: 1px solid color-mix(in srgb, var(--rank-color, #64748b) 35%, #fff) !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--rank-color, #64748b) 10%, #fff) !important;
    color: var(--rank-color, #64748b) !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
}
body.mk-page-document-detail .uploader-badges .badge-rutbe svg {
    width: .9rem !important;
    height: .9rem !important;
}
@media (max-width: 640px) {
    body.mk-page-document-detail .uploader-info {
        align-items: flex-start !important;
    }
}/* Final alignment pass for becayis hero and people stats. */
body.mk-page-becayis .becayis-hero-right {
    display: grid !important;
    grid-template-columns: auto auto !important;
    align-items: center !important;
    gap: .65rem !important;
}
body.mk-page-becayis .becayis-hero-right .hero-stats {
    align-items: stretch !important;
    height: 48px !important;
    margin: 0 !important;
}
body.mk-page-becayis .becayis-hero-right .hstat,
body.mk-page-becayis .becayis-hero-right .becayis-hero-actions > .btn-hero {
    height: 48px !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
}
body.mk-page-becayis .becayis-hero-right .hstat {
    align-items: center !important;
}
body.mk-page-becayis .becayis-hero-right .becayis-hero-actions {
    align-items: stretch !important;
    height: 48px !important;
}
body.mk-page-users .user-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 64px) !important;
    align-items: center !important;
    justify-content: start !important;
    gap: .55rem !important;
}
body.mk-page-users .user-stats .stat-item {
    display: grid !important;
    grid-template-rows: 1.25rem 1rem !important;
    justify-items: center !important;
    width: 64px !important;
    min-width: 64px !important;
    text-align: center !important;
}
body.mk-page-users .user-stats .stat-value,
body.mk-page-users .user-stats .stat-label {
    white-space: nowrap !important;
}
body.mk-page-document-detail .uploader-badges .badge-role {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    padding: .3rem .55rem !important;
    border: 1px solid #fecaca !important;
    border-radius: 999px !important;
    background: #fff1f2 !important;
    color: #dc2626 !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
}
body.mk-page-document-detail .uploader-badges .badge-mod {
    border-color: #a7f3d0 !important;
    background: #ecfdf5 !important;
    color: #059669 !important;
}
@media (max-width: 900px) {
    body.mk-page-becayis .becayis-hero-right {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }
    body.mk-page-becayis .becayis-hero-right .hero-stats,
    body.mk-page-becayis .becayis-hero-right .becayis-hero-actions {
        width: 100% !important;
    }
}
@media (max-width: 680px) {
    body.mk-page-users .user-stats {
        grid-template-columns: repeat(3, minmax(58px, 64px)) !important;
        overflow-x: auto !important;
    }
}/* User rows: stable statistics columns across the entire vertical list. */
html body.mk-page-users .site-main .users-rank-group .users-grid .user-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 1.15rem !important;
    min-width: 0 !important;
    padding: 0.95rem 1.25rem !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07) !important;
    transform: translateY(-1px) !important;
}

/* Avatar ve Çevrimiçi Çerçeve Durumları */
html body.mk-page-users .user-avatar {
    position: relative !important;
    flex-shrink: 0 !important;
}

html body.mk-page-users .user-avatar-circle {
    border-radius: 50% !important;
    border: 2px solid #e2e8f0 !important;
    transition: border-color 0.2s ease !important;
}

html body.mk-page-users .user-avatar:has(.user-status:not(.offline)) .user-avatar-circle,
html body.mk-page-users .user-avatar-circle.is-online {
    border-color: #10b981 !important;
}

html body.mk-page-users .user-avatar:has(.user-status.offline) .user-avatar-circle,
html body.mk-page-users .user-avatar-circle.is-offline {
    border-color: #e2e8f0 !important;
}

html body.mk-page-users .user-status {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35) !important;
    z-index: 2 !important;
}

html body.mk-page-users .user-status.offline {
    background: #94a3b8 !important;
    box-shadow: none !important;
}

/* İstatistik Kutucukları (Gönderi, Seviye, Gün) */
html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-stats {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    margin: 0 !important;
    padding: 0 1rem !important;
    border-left: 1px solid #e2e8f0 !important;
    border-top: 0 !important;
    width: auto !important;
    min-width: auto !important;
    box-sizing: border-box !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-stats .stat-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 2px 0 !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-stats .stat-value {
    font-size: 1.12rem !important;
    font-weight: 800 !important;
    color: #991f24 !important;
    line-height: 1.1 !important;
    display: block !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-stats .stat-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-top: 2px !important;
    display: block !important;
}

/* Footer: Tarih Kutusu ve Profil Butonu */
html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-footer {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.65rem !important;
    margin: 0 !important;
    padding: 0 0 0 1rem !important;
    border-left: 1px solid #e2e8f0 !important;
    min-width: max-content !important;
    box-sizing: border-box !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-footer .user-date {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    height: 40px !important;
    padding: 0 0.85rem !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-footer .user-date svg {
    width: 15px !important;
    height: 15px !important;
    color: #64748b !important;
    flex-shrink: 0 !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-footer .user-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    height: 40px !important;
    padding: 0 1.15rem !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #7c3aed !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
}

html body.mk-page-users .site-main .users-rank-group .users-grid .user-card:hover .user-footer .user-action {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    transform: translateX(2px) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28) !important;
}

@media (max-width: 900px) {
    html body.mk-page-users .site-main .users-rank-group .users-grid .user-card {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }
}
@media (max-width: 680px) {
    html body.mk-page-users .site-main .users-rank-group .users-grid .user-card {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.85rem !important;
    }
    html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-stats,
    html body.mk-page-users .site-main .users-rank-group .users-grid .user-card .user-footer {
        border-left: none !important;
        border-top: 1px solid #e2e8f0 !important;
        padding: 0.75rem 0 0 0 !important;
        justify-content: flex-start !important;
    }
    }
/* Exact hero rail and profile-like uploader presentation. */
html body.mk-page-becayis .site-main .becayis-hero-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: .65rem !important;
    height: 48px !important;
    min-height: 48px !important;
}
html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats,
html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: .55rem !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
}
html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats > .hstat,
html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions > .btn-hero {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: 1 !important;
}
html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats > .hstat {
    gap: .55rem !important;
    padding: 0 1.15rem !important;
}
html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats > .hstat strong,
html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats > .hstat span {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}
html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions > .btn-hero {
    gap: .5rem !important;
    padding: 0 1.25rem !important;
}
@media (max-width: 900px) {
    html body.mk-page-becayis .site-main .becayis-hero-right {
        height: auto !important;
        min-height: 0 !important;
        flex-wrap: wrap !important;
    }
    html body.mk-page-becayis .site-main .becayis-hero-right > .hero-stats,
    html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions {
        height: 48px !important;
        min-height: 48px !important;
    }
}

/* Topic Hero Layout Protection */
html body:not(.mk-shell-backoffice) .site-main .topic-hero {
    height: auto !important;
    min-height: 180px !important;
    max-height: none !important;
    padding: 1.5rem 1.75rem !important;
    overflow: hidden !important;
}

/* ==========================================================================
   MOBİL CHROME HERO KART VE İSTATİSTİK HİZALAMALARI (RESPONSIVE ALIGNMENT)
   ========================================================================== */
@media (max-width: 768px) {
    /* 4. Çetele Arşiv Hero % Tamamlanma Çerçevesini Ortala */
    .cetele-hero .cetele-hero-stats,
    .cetele-page-container .cetele-hero-stats,
    .cetele-hero .cetele-progress-card {
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* 5. Ortak Arama Hero "Tüm Sistem Taranıyor" Çerçevesini Ortala */
    .search-hero .search-hero-stats,
    .search-page-container .search-hero-stats,
    .search-hero-stats .hero-stat-card {
        margin-left: auto !important;
        margin-right: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* 6. Mevzuat Merkezi Hero İstatistik Çerçevelerini Ortala / Yan Yana Göster */
    body.mk-page-legal .law-hero .hero-stats-grid,
    .law-hero .hero-stats-grid,
    .law-page-container .hero-stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: .5rem !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    body.mk-page-legal .law-hero .hero-stat-card,
    .law-hero .hero-stat-card {
        flex: 1 1 calc(33.333% - 0.5rem) !important;
        min-width: 85px !important;
        max-width: 140px !important;
        text-align: center !important;
        padding: .55rem .45rem !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* 7 & 8. Emsal Kararlar ve AYM Karar Arama Hero Butonlarını Ortala */
    body.mk-legal-search .mk-hero-header .mk-hero-right,
    body.mk-aym-search .mk-hero-header .mk-hero-right,
    .emsal-page-container .mk-hero-right,
    .aym-page-container .mk-hero-right,
    .mk-hero-header .mk-hero-right {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: .75rem auto 0 !important;
        text-align: center !important;
    }
    body.mk-legal-search .mk-hero-official-btn,
    body.mk-aym-search .mk-hero-official-btn,
    .mk-hero-official-btn {
        margin-left: auto !important;
        margin-right: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* 9. Resmi Duyurular Hero İstatistik Çerçevelerini Ortala / Yan Yana Göster */
    body.mk-announcements .announcements-hero .hero-stats-grid,
    .announcements-hero .hero-stats-grid,
    .announcements-page-container .hero-stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: .5rem !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    body.mk-announcements .announcements-hero .hero-stat-card,
    .announcements-hero .hero-stat-card {
        flex: 1 1 calc(33.333% - 0.5rem) !important;
        min-width: 85px !important;
        max-width: 140px !important;
        text-align: center !important;
        padding: .55rem .45rem !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* 10 & 11. İl Karşılaştır ve İller Hero İstatistiklerini Ortala / Yan Yana Göster */
    .compare-hero .hero-stats-grid,
    .mk-compare-main .hero-stats-grid,
    .city-hero .hero-stats-grid,
    .mk-cities-main .hero-stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: .5rem !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    .compare-hero .hero-stat-card,
    .city-hero .hero-stat-card {
        flex: 1 1 calc(33.333% - 0.5rem) !important;
        min-width: 85px !important;
        max-width: 140px !important;
        text-align: center !important;
        padding: .55rem .45rem !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* 12. Kullanıcılar Sayfası Hero Kart Toplam Üye Çerçevesini Ortala */
    .users-hero .users-hero-stats,
    .users-page .users-hero-stats,
    body.mk-page-users .users-hero-stats {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
    .users-hero-stats .hero-stat-card {
        margin-left: auto !important;
        margin-right: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* 13. Becayiş Hero Kart İlan Ver ve İlanlarım Butonlarını Ekrana Tam Sığdır */
    html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions,
    .becayis-hero-right .becayis-hero-actions,
    .becayis-hero-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: .5rem !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    html body.mk-page-becayis .site-main .becayis-hero-right > .becayis-hero-actions > .btn-hero,
    .becayis-hero-actions > .btn-hero {
        flex: 1 1 calc(50% - 0.5rem) !important;
        min-width: 120px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 0 .75rem !important;
        font-size: .84rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* 14. Mevzuat Merkezi Arama Girişi & Placeholder Çarpıklığını Gider */
    body.mk-page-legal .mk-search-input-wrap.law-search-input,
    body.mk-page-legal .law-search-input {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }
    body.mk-page-legal .law-search-input :is(.mk-search-icon, svg, .icon-svg) {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 10px 0 0 !important;
    }
    body.mk-page-legal .law-search-input :is(input, input[type="search"]) {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        font-size: 0.92rem !important;
        line-height: normal !important;
    }

    /* ==========================================================================
       FORUM KONU MESAJ YAZAN KULLANICI PROFİLİ MOBİL DÜZENİ (COMPACT HEADER)
       ========================================================================== */
    .forum-topic-detail-page .post-sidebar {
        padding: 0.65rem 0.85rem !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
        background: #f8fafc !important;
        box-sizing: border-box !important;
    }

    .forum-topic-detail-page .user-profile-card {
        display: grid !important;
        grid-template-columns: 46px 1fr !important;
        grid-template-rows: auto auto !important;
        column-gap: 0.75rem !important;
        row-gap: 0.25rem !important;
        align-items: center !important;
        text-align: left !important;
        width: 100% !important;
    }

    .forum-topic-detail-page .user-avatar-link {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 46px !important;
        height: 46px !important;
        align-self: center !important;
        margin: 0 !important;
    }

    .forum-topic-detail-page .user-avatar {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        border-width: 2px !important;
        font-size: 1rem !important;
    }

    .forum-topic-detail-page .username-link {
        grid-column: 2 !important;
        grid-row: 1 !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        text-align: left !important;
        line-height: 1.25 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        margin: 0 !important;
        word-break: break-word !important;
    }

    .forum-topic-detail-page .user-badge {
        grid-column: 2 !important;
        grid-row: 2 !important;
        font-size: 0.72rem !important;
        padding: 0.18rem 0.5rem !important;
        justify-self: start !important;
        margin: 0 !important;
        width: fit-content !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .forum-topic-detail-page .user-stats-grid {
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.35rem !important;
        width: 100% !important;
        margin-top: 0.35rem !important;
        padding-top: 0.35rem !important;
        border-top: 1px dashed rgba(203, 213, 225, 0.6) !important;
    }

    .forum-topic-detail-page .user-stats-grid .stat-item {
        flex: 1 1 auto !important;
        min-height: 26px !important;
        height: 26px !important;
        padding: 0 0.45rem !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.25rem !important;
        background: #ffffff !important;
        border: 1px solid rgba(203, 213, 225, 0.5) !important;
    }

    .forum-topic-detail-page .user-stats-grid .stat-icon {
        display: none !important;
    }

    .forum-topic-detail-page .user-stats-grid .stat-value {
        font-weight: 800 !important;
        font-size: 0.75rem !important;
        line-height: 1 !important;
    }

    .forum-topic-detail-page .user-stats-grid .stat-label {
        font-size: 0.68rem !important;
        color: #64748b !important;
        line-height: 1 !important;
    }

    .forum-topic-detail-page .user-info-section,
    .forum-topic-detail-page .member-since {
        grid-column: 1 / -1 !important;
        display: inline-flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0.45rem !important;
        font-size: 0.72rem !important;
        margin: 0 !important;
        color: #64748b !important;
    }

    /* ==========================================================================
       FORUM & BLOG YAZI YAZMA EKRANI WYSIWYG BUTONLARI TEK SATIR KESİN KURAL
       ========================================================================== */
    html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-toolbar, .editor-toolbar, .forum-editor-toolbar) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-inline: contain !important;
        gap: 3px !important;
        padding: 6px 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        scrollbar-width: thin !important;
    }

    html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-btn-group) {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: max-content !important;
        min-width: max-content !important;
        white-space: nowrap !important;
        gap: 3px !important;
    }

    html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-btn, .forum-editor-btn, .mk-editor-tool-button) {
        display: inline-flex !important;
        flex: 0 0 32px !important;
        flex-shrink: 0 !important;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }

    html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-divider, .forum-editor-divider) {
        display: inline-block !important;
        flex: 0 0 1px !important;
        flex-shrink: 0 !important;
        width: 1px !important;
        min-width: 1px !important;
        max-width: 1px !important;
        height: 18px !important;
        margin: 0 3px !important;
        box-sizing: border-box !important;
    }
}

/* Genel (Tüm Ekranlar) Kesin WYSIWYG Güvencesi */
html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-toolbar, .editor-toolbar, .forum-editor-toolbar) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
}

html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-btn-group) {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
    white-space: nowrap !important;
}

html body:not(.mk-shell-backoffice) :is(.mk-wysiwyg-btn, .forum-editor-btn, .mk-editor-tool-button) {
    display: inline-flex !important;
    flex: 0 0 32px !important;
    flex-shrink: 0 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}