:root {
    color-scheme: dark;
    --bg: #18191a;
    --bg-body: var(--bg);
    --surface: #242526;
    --topic-box-bg: var(--surface);
    --topic-box-hover: color-mix(in srgb, var(--surface) 92%, white);
    --surface-2: var(--surface);
    --surface-3: var(--surface);
    --header-bg: var(--surface);
    --header-sub: var(--surface);
    --bg-alt: var(--bg);
    --fg: #e1e4ea;
    --text-2: #b0b3b8;
    --primary: #e1e4ea;
    --border: var(--bg);
    --line: var(--bg);
    --line-subtle: var(--bg);
    --line-strong: var(--bg);
    --control-border: #3a3d42;
    --control-border-hover: #555a62;
    --text: #e1e4ea;
    --text-title: #f5f5f5;
    --muted: #7b818d;
    --muted-light: #9ba1ad;
    --muted-dark: #616773;
    
    --accent-orange: #ff9800;
    --accent-orange-hover: #ffa726;
    --accent-red: #e53935;
    --accent-green: #00c853;
    --accent-green-bg: rgba(0, 200, 83, 0.12);
    --accent-blue: #3498db;
    --accent-cyan: #00b0ff;
    
    --red: #e53935;
    --red-2: #ff4757;
    --amber: #ff9800;
    --green: #00c853;
    --blue: #3498db;
    --cyan: #00b0ff;
    
    --role-admin: #e53935;
    --role-mod: #00c853;
    --role-helper: #00b0ff;
    --role-vip: #ff9800;
    
    --shadow: none;
    --shadow-box: none;
    --radius-card: 4px;
    --font-sans: 'Inter', 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg-body);
    background-image: none;
    background-position: center top;
    background-repeat: repeat;
    background-size: 420px 420px;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 760px) {
    body {
        background-size: 360px 360px;
        background-attachment: scroll;
    }
}

body::before {
    position: fixed;
    z-index: 0;
    inset: -8px;
    background: url('/images/backdrop.png') center top / 480px 480px repeat;
    content: '';
    filter: blur(2px);
    opacity: .002;
    pointer-events: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 44px;
}

.topbar {
    position: relative;
    z-index: 20;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    padding: 10px max(20px, calc((100vw - 1320px) / 2 + 20px));
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #000;
    box-shadow: 0 2px 32px rgba(0,0,0,.5);
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(215, 45, 51, .35));
    transition: filter .2s, transform .2s;
}

.brand:hover .brand-logo {
    filter: drop-shadow(0 4px 18px rgba(229, 169, 58, .55));
    transform: scale(1.04);
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    background:
        linear-gradient(135deg, rgba(215, 45, 51, .95), rgba(229, 169, 58, .78)),
        #111;
    color: #fff;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.nav-tabs,
.mode-switch {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
}

.nav-tabs {
    justify-self: center;
}

.nav-tab,
.mode-switch button {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
}

.nav-tab.is-active,
.mode-switch button.is-active {
    background: var(--surface-2);
    color: var(--text);
}

.server-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(63, 207, 142, .25);
    background: rgba(63, 207, 142, .08);
    color: #baf4d8;
    font-size: .86rem;
    white-space: nowrap;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(63, 207, 142, .12);
}

.forum-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.forum-main,
.auth-panel,
.quick-panel {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(20, 24, 29, .92);
    box-shadow: var(--shadow);
}

.forum-main {
    border: none;
    background: transparent;
    box-shadow: none;
    min-width: 0;
    padding: 0;
}

.is-board-view .topic-panel {
    padding: 0;
}

.is-board-view .section-heading {
    display: none;
}

.forum-band {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    min-height: 158px;
    padding: 28px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(215, 45, 51, .25), transparent 42%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 56px),
        #16181d;
}

.forum-band-copy {
    display: grid;
    flex: 1;
    min-width: 0;
}

.forum-search {
    width: min(760px, 100%);
    margin-top: 22px;
}

.forum-search input {
    background: rgba(15, 18, 22, .92);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--amber);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 6vw, 4.6rem);
    line-height: .95;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 0;
    font-size: 1rem;
}

.band-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .26);
}

.band-stats span {
    padding: 14px;
    color: var(--muted);
    font-size: .84rem;
}

.band-stats span + span {
    border-left: 1px solid rgba(255, 255, 255, .10);
}

.band-stats strong {
    display: block;
    color: var(--text);
    font-size: 1.5rem;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.search-box,
.auth-form label,
.topic-form label,
.profile-edit-form label,
.profile-edit-form .profile-signature-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
}

.search-box input,
.auth-form input,
.topic-form input,
.topic-form textarea,
.topic-form select,
.profile-edit-form input,
.profile-edit-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
}

.profile-edit-form input[readonly],
.admin-user-edit-form input[readonly] {
    cursor: not-allowed;
    color: var(--muted-light);
    background: color-mix(in srgb, var(--bg-body) 82%, var(--surface) 18%);
}

.identity-field-help,
.auth-field-help,
.admin-user-edit-form label > small {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.4;
}

.topic-form textarea {
    min-height: 140px;
    resize: vertical;
}

.rich-source {
    display: none !important;
}

.rich-editor {
    width: 100%;
    min-height: 142px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
    overflow: auto;
    white-space: pre-wrap;
}

.rich-editor:focus {
    border-color: rgba(229, 169, 58, .75);
    box-shadow: 0 0 0 3px rgba(229, 169, 58, .12);
}

.comment-composer .rich-editor,
.profile-edit-form .rich-editor {
    min-height: 112px;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .18);
}

.rich-toolbar button,
.rich-toolbar select {
    min-height: 32px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 0 8px;
    font-size: .78rem;
}

.rich-toolbar button:focus,
.rich-toolbar select:focus {
    outline: none;
    border-color: var(--line);
    box-shadow: none;
}

.rich-toolbar button:active {
    transform: translateY(1px);
}

.rich-toolbar button:hover,
.rich-toolbar select:hover {
    border-color: rgba(229, 169, 58, .55);
}

.topic-preview {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(123, 183, 255, .32);
    background: rgba(123, 183, 255, .07);
}

.topic-preview h3,
.preview-body h3 {
    margin: 0;
}

.search-box input:focus,
.auth-form input:focus,
.topic-form input:focus,
.topic-form textarea:focus,
.topic-form select:focus,
.profile-edit-form input:focus,
.profile-edit-form textarea:focus {
    border-color: rgba(229, 169, 58, .75);
    box-shadow: 0 0 0 3px rgba(229, 169, 58, .12);
}

.primary-action,
.ghost-button {
    min-height: 42px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-weight: 700;
}

.primary-action {
    background: var(--red);
    color: white;
}

.primary-action:hover {
    background: var(--red-2);
}

.ghost-button {
    border-color: var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.ghost-button:hover {
    border-color: rgba(255, 255, 255, .22);
}

.full {
    width: 100%;
}

.content-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 560px;
}

.content-split.is-board-view,
.content-split.is-category-view,
.content-split.is-search-view {
    grid-template-columns: 1fr;
}

/* Kategori içindeki konu listelerini ana sayfadaki kutularla aynı ölçüde tut. */
.content-split.is-category-view {
    width: min(1160px, 100%);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 1051px) {
    .is-category-view .category-topic-latest {
        width: 260px;
        justify-self: end;
    }
}

.topic-panel,
.auth-panel,
.quick-panel {
    padding: 16px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .84rem;
}

.topics-list {
    display: grid;
    gap: 10px;
}

.topic-item {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--topic-box-bg);
    color: inherit;
    text-align: left;
}

.topic-item:hover {
    border-color: rgba(229, 169, 58, .45);
    background: var(--topic-box-hover);
}

.topic-item strong {
    color: var(--text);
}

.topic-meta {
    color: var(--muted);
    font-size: .82rem;
}

.like-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: var(--muted);
    font-size: .82rem;
}

.like-button {
    min-height: 34px;
    border: 1px solid rgba(215, 45, 51, .34);
    background: rgba(215, 45, 51, .10);
    color: #ffd8d8;
    padding: 0 11px;
    font-weight: 700;
}

.like-button:hover,
.like-button.is-liked {
    border-color: rgba(229, 169, 58, .62);
    background: rgba(229, 169, 58, .14);
    color: #ffe4a8;
}

.like-button:disabled {
    cursor: wait;
    opacity: .65;
}

.topic-form {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(229, 169, 58, .30);
    background: rgba(229, 169, 58, .07);
}

.topic-form.is-category-locked .topic-category-field {
    display: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.topic-item {
    display: grid;
    gap: 8px;
    padding: 15px;
    text-decoration: none;
    cursor: pointer;
}

.forum-board-section {
    display: grid;
    gap: 0;
}

.forum-board-section + .forum-board-section {
    margin-top: 18px;
}

.forum-board-heading {
    position: relative;
    min-height: 88px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 0;
    background: var(--surface);
}

.forum-board-heading::after {
    position: absolute;
    inset: 0 auto 0 43%;
    width: 190px;
    background: var(--surface);
    clip-path: polygon(0 0, 58% 0, 100% 100%, 42% 100%);
    content: "";
}

.forum-board-heading div {
    position: relative;
    z-index: 1;
    padding: 22px 20px;
}

.forum-board-heading h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1;
}

.forum-board-heading p {
    margin: 8px 0 0;
    color: var(--text);
    font-size: .78rem;
    font-weight: 800;
}

.forum-board-list {
    display: grid;
    border: 1px solid rgba(255, 255, 255, .06);
    border-top: 0;
    background: rgba(255, 255, 255, .025);
}

.forum-board-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 120px minmax(220px, .72fr);
    gap: 18px;
    align-items: center;
    min-height: 76px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    background: var(--surface);
    cursor: pointer;
}

.forum-board-row:nth-child(even) {
    background: var(--surface);
}

.forum-board-row:hover {
    background: rgba(229, 169, 58, .075);
}

.forum-board-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(229, 169, 58, .34);
    background:
        linear-gradient(135deg, rgba(215, 45, 51, .45), rgba(229, 169, 58, .24)),
        #11161b;
    color: #fff3d0;
    font-size: .68rem;
    font-weight: 900;
}

.forum-board-main {
    min-width: 0;
}

.forum-board-title {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    color: #c4ccd5;
    font-weight: 900;
    text-decoration: none;
}

.forum-board-title:hover {
    color: var(--amber);
}

.forum-board-main p {
    margin: 4px 0 0;
    color: var(--text);
    font-size: .78rem;
    font-weight: 700;
}

.forum-board-main small {
    display: block;
    margin-top: 12px;
    color: #87909b;
    font-size: .78rem;
    font-weight: 800;
}

.forum-board-main small span {
    color: #aeb7c1;
}

.forum-board-stats {
    display: grid;
    gap: 3px;
    color: var(--text);
    font-size: .9rem;
}

.forum-board-stats strong,
.forum-board-stats span {
    line-height: 1.2;
}

.forum-board-latest {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: #c9d0d8;
    font-size: .86rem;
}

.forum-board-latest span,
.forum-board-latest a,
.forum-board-latest strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-board-latest a {
    color: #aeb7c1;
    text-decoration: none;
}

.forum-board-latest a:hover,
.forum-board-latest .profile-link:hover {
    color: var(--amber);
}

.forum-board-latest strong {
    color: var(--text);
    font-size: .84rem;
}

.category-topic-view {
    display: grid;
    gap: 12px;
}

.forum-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .055);
    background: var(--surface);
    color: #8793a1;
    font-size: .78rem;
    font-weight: 800;
}

.forum-breadcrumb a,
.forum-breadcrumb span {
    min-width: 0;
}

.forum-breadcrumb a {
    color: #6fa8ff;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    color: var(--amber);
}

.forum-breadcrumb > span:last-child {
    overflow: hidden;
    color: #c7d0da;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-breadcrumb-separator {
    color: #4d5865;
}

.category-topic-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(215, 45, 51, .95);
    background: var(--topic-box-bg);
}

.category-topic-brand {
    display: inline-flex;
    min-width: 0;
    gap: 8px;
    align-items: center;
    color: #ffdddd;
    font-size: .78rem;
}

.category-topic-brand span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    background: var(--red);
    color: #fff;
    font-size: .58rem;
    font-weight: 900;
}

.category-topic-strip h3 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: right;
}

.category-topic-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.category-topic-actions .primary-action {
    min-height: 36px;
    padding: 0 13px;
    white-space: nowrap;
}

.category-topic-hero {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .055);
    background: var(--surface);
}

.category-topic-hero h2 {
    margin: 0;
    font-size: 1.35rem;
}

.category-topic-hero p {
    margin: 6px 0 0;
    color: var(--text);
    font-size: .9rem;
}

.category-topic-hero small {
    display: block;
    margin-top: 12px;
    color: #b4bec9;
    font-weight: 700;
}

.category-topic-table {
    display: grid;
    border: 1px solid rgba(255, 255, 255, .055);
    background: rgba(255, 255, 255, .025);
}

.category-topic-table-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px minmax(260px, .52fr);
    gap: 18px;
    align-items: center;
    padding: 9px 18px 9px 70px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    background: var(--surface);
    color: #aeb8c3;
    font-size: .85rem;
    font-weight: 900;
}

.category-topic-list {
    display: grid;
}

.category-topic-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 132px minmax(260px, .52fr) 40px;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    background: var(--surface);
    cursor: pointer;
}

.category-topic-row:first-child {
    border-top: 0;
}

.category-topic-row:nth-child(even) {
    background: var(--surface);
}

.category-topic-row:hover {
    background: rgba(229, 169, 58, .075);
}

.category-topic-row.is-pinned {
    border-left: 2px solid var(--amber);
}

.category-topic-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    background: var(--surface);
    color: #d5dde7;
    font-size: .58rem;
    font-weight: 900;
}

.category-topic-main {
    min-width: 0;
}

.category-topic-title {
    display: block;
    overflow: hidden;
    color: #cbd4de;
    font-size: .95rem;
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-topic-title:hover {
    color: var(--amber);
}

.category-topic-main small {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #dce3eb;
    font-size: .78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-topic-main .profile-link,
.category-topic-latest .profile-link {
    color: #ff6060;
    font-weight: 900;
}

.category-topic-metrics {
    display: grid;
    justify-items: end;
    gap: 3px;
    color: #f0f4f8;
    font-size: .82rem;
}

.category-topic-metrics span {
    color: #dce3eb;
    font-size: .78rem;
    font-weight: 800;
}

.category-topic-latest {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: center;
}

.category-topic-latest .post-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
}

.category-topic-latest div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.category-topic-latest strong,
.category-topic-latest span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-topic-latest strong {
    color: #f6f8fb;
    font-size: .78rem;
}

.category-topic-latest span {
    color: #dce3eb;
    font-size: .78rem;
    font-weight: 800;
}

.topic-title-link {
    color: inherit;
    text-decoration: none;
}

.topic-title-link:hover {
    color: var(--amber);
}

.post-author {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: .82rem;
}

.post-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    position: relative;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--amber);
    font-weight: 800;
    text-decoration: none;
    border-radius: 50%;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
}

.post-avatar:hover {
    border-color: rgba(229, 169, 58, .62);
}

.post-author-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.post-author-copy > div,
.post-author-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-author-copy small {
    color: var(--muted);
}

.topic-detail-author .post-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.topic-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.topic-title-row strong {
    overflow-wrap: anywhere;
}

.tag {
    flex: 0 0 auto;
    align-self: start;
    padding: 4px 8px;
    background: rgba(123, 183, 255, .10);
    color: #cbe2ff;
    font-size: .76rem;
}

.topic-tag-list,
.post-thread-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.post-thread-tags {
    margin-top: 0;
    margin-left: auto;
}

.topic-tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(229, 169, 58, .26);
    background: rgba(229, 169, 58, .08);
    color: var(--amber);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: border-color .16s, background .16s, color .16s;
}

.topic-tag-pill:hover {
    border-color: rgba(229, 169, 58, .55);
    background: rgba(229, 169, 58, .15);
    color: #fff;
}

/* ============================================================
   TOPIC DETAIL – wrapper
   ============================================================ */
.topic-detail {
    display: grid;
    gap: 0;
}

/* ============================================================
   POST THREAD
   ============================================================ */
.post-thread {
    display: grid;
    gap: 0;
}

/* Başlık şeridi */
.post-thread-title-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: var(--topic-box-bg);
    margin-bottom: 12px;
    border-radius: 4px;
}

.post-thread-category {
    flex-shrink: 0;
    padding: 3px 10px;
    background: rgba(215, 45, 51, .18);
    border: 1px solid rgba(215, 45, 51, .35);
    color: #ff9999;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.post-thread-title {
    flex: 1;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text);
    overflow-wrap: anywhere;
}

.post-thread-meta {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    color: var(--muted);
    font-size: .78rem;
}

/* ============================================================
   POST CARD – klasik forum postu (sol: kullanıcı, sağ: içerik)
   ============================================================ */
.post-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    border: 1px solid rgba(255, 255, 255, .065);
    border-bottom: 0;
    background: var(--surface);
}

.post-card:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, .065);
}

.op-post {
    background: var(--surface);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .065);
    margin-bottom: 15px; /* Add gap between OP and comments */
}

.post-comments-section {
    display: grid;
}

.post-comments-section .post-card:last-of-type {
    border-bottom: 1px solid rgba(255, 255, 255, .065);
}

.post-comments-section .profile-feed-pagination {
    padding: 12px 0 0;
}

/* Sol kullanıcı kartı */
.post-card-left {
    border-right: 1px solid rgba(255, 255, 255, .065);
    background: var(--surface);
}

.post-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    text-align: center;
}

.post-user-avatar {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .12);
    background: var(--surface-2);
    color: var(--amber);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    position: relative;
    border-radius: 50%;
    transition: border-color .2s;
}

.post-user-avatar:hover {
    border-color: rgba(229, 169, 58, .6);
}

.post-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
}

.post-user-name {
    font-size: .86rem;
    font-weight: 800;
}

.post-user-name a {
    color: var(--text);
    text-decoration: none;
}

.post-user-name a:hover {
    color: var(--amber);
}

.post-user-role {
    padding: 2px 8px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.post-user-presence {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.post-user-presence.is-online {
    color: #8fdc95;
}

.post-user-presence.is-offline {
    color: #8b929c;
}

.role-admin {
    background: rgba(215, 45, 51, .18);
    border: 1px solid rgba(215, 45, 51, .4);
    color: #ff9999;
}

.role-mod {
    background: rgba(123, 183, 255, .12);
    border: 1px solid rgba(123, 183, 255, .35);
    color: #a0caff;
}

.role-member {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--muted);
}

.post-user-stats {
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    gap: 0;
    width: 100%;
}

.post-user-stats div {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 6px;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.post-user-stats dt {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 600;
}

.post-user-stats dd {
    margin: 0;
    color: var(--text);
    font-size: .68rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 76px;
    text-align: right;
}

.post-user-stats dd a {
    color: var(--blue);
    text-decoration: none;
}

/* Sağ içerik alanı */
.post-card-right {
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.post-card-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 7px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    background: rgba(0, 0, 0, .15);
}

.post-card-date {
    color: var(--muted);
    font-size: .74rem;
}

.post-card-content {
    flex: 1;
    padding: 16px 18px;
    color: #d8e0ea;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.post-body-text {
    white-space: pre-wrap;
}

/* Post footer */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 14px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    background: rgba(0, 0, 0, .12);
}

.post-card-actions-left,
.post-card-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: transparent;
    color: var(--muted);
    font-size: .74rem;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.post-action-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, .25);
}

.post-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px solid rgba(215, 45, 51, .28);
    background: rgba(215, 45, 51, .07);
    color: #ffd0d0;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.post-like-btn:hover,
.post-like-btn.is-liked {
    background: rgba(229, 169, 58, .14);
    border-color: rgba(229, 169, 58, .55);
    color: #ffe4a8;
}

.post-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    border: 1px solid rgba(123, 183, 255, .28);
    background: rgba(123, 183, 255, .07);
    color: #b0d4ff;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.post-reply-btn:hover {
    background: rgba(123, 183, 255, .14);
    border-color: rgba(123, 183, 255, .5);
}

/* Yorum yok */
.empty-state.post-no-comments {
    border: 1px solid rgba(255, 255, 255, .065);
    border-top: 0;
    background: var(--topic-box-bg);
}

/* ============================================================
   POST COMPOSER – yanıt formu
   ============================================================ */
.post-composer {
    display: grid;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, .065);
    border-top: 2px solid rgba(229, 169, 58, .45);
    background: var(--topic-box-bg);
    margin-top: 4px;
}

.post-composer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.post-composer-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    background: var(--surface-2);
    color: var(--amber);
    font-size: .68rem;
    font-weight: 800;
    overflow: hidden;
    border-radius: 50%;
}

.post-composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-composer-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
}

.post-composer-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 0;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    transition: background .15s;
}

.post-composer-textarea:focus {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(229, 169, 58, .35);
}

.post-composer-editor {
    border: 0;
    border-radius: 0;
    background: var(--surface);
}

.post-composer-toolbar {
    padding: 7px 10px;
    background: var(--surface);
}

.post-composer-editor .rtc-textarea {
    min-height: 150px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
}

.post-composer-editor .rtc-textarea:focus,
.post-composer-editor .rtc-textarea.ProseMirror-focused {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(229, 169, 58, .35);
}

.post-composer-footer {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    background: rgba(0, 0, 0, .12);
}

.post-composer-submit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 22px;
    border: 0;
    background: var(--red);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: .88rem;
    cursor: pointer;
    transition: background .15s;
}

.post-composer-submit:hover {
    background: var(--red-2);
}

/* Kilitli composer */
.post-composer-locked {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-top: 0;
    color: var(--muted);
    font-size: .88rem;
    text-align: center;
    background: var(--topic-box-bg);
    margin-top: 4px;
}

.post-composer-login-btn {
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--amber);
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    vertical-align: baseline;
    cursor: pointer;
    text-decoration: underline;
}

/* Eski topic-detail-header (geriye dönük uyumluluk) */
.topic-detail-header,
.topic-detail-body,
.comment-item,
.comment-composer {
    border: 1px solid var(--line);
    background: var(--topic-box-bg);
}

.topic-detail-header {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.back-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.topic-detail-title {
    display: grid;
    gap: 9px;
}

.topic-detail-title h2 {
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.topic-detail-body {
    padding: 18px;
    color: #dce3ea;
    line-height: 1.7;
    white-space: pre-wrap;
}

.comments-section {
    display: grid;
    gap: 10px;
}

.comments-section h3 {
    margin: 4px 0;
    font-size: 1rem;
}

.comment-item {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.comment-meta {
    color: var(--muted);
    font-size: .82rem;
}

.comment-body {
    color: #dce3ea;
    line-height: 1.6;
    white-space: pre-wrap;
}

.preview-plain {
    color: #dce3ea;
    line-height: 1.6;
    white-space: pre-wrap;
}

.rich-content {
    color: inherit;
    line-height: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
    margin: 0 0 8px;
    line-height: 1.2;
}

.rich-content h1 {
    font-size: 1.65rem;
}

.rich-content h2 {
    font-size: 1.35rem;
}

.rich-content h3 {
    font-size: 1.08rem;
}

.rich-content a {
    color: #cbe2ff;
    font-weight: 700;
}

.rich-content .rich-youtube-embed {
    position: relative;
    display: block;
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
    margin: 14px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: #080808;
}

.rich-content .rich-youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.rich-content .rich-youtube-embed[data-align="center"] { margin-right: auto; margin-left: auto; }
.rich-content .rich-youtube-embed[data-align="right"] { margin-right: 0; margin-left: auto; }
.rich-content .rich-youtube-embed[data-align="left"] { margin-right: auto; margin-left: 0; }

.rich-content u {
    text-decoration: underline;
}

.rich-content blockquote {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 3px solid rgba(229, 169, 58, .65);
    background: rgba(229, 169, 58, .08);
    color: #dce3ea;
}

.rich-content blockquote p {
    margin: 0;
}

.rich-content code {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .24);
    color: #f5d179;
    font-family: "Courier New", monospace;
    font-size: .92em;
}

.rich-content pre {
    margin: 12px 0;
    padding: 12px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .28);
    white-space: pre;
}

.rich-content pre code {
    padding: 0;
    background: transparent;
}

.rich-content img.topic-image,
.rich-content img.bb-image,
.rtc-textarea img.topic-image,
.rtc-textarea img.bb-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.rich-content img[data-align="left"],
.rtc-textarea img[data-align="left"] {
    display: block;
    margin: 12px auto 12px 0;
}

.rich-content img[data-align="center"],
.rtc-textarea img[data-align="center"] {
    display: block;
    margin: 12px auto;
}

.rich-content img[data-align="right"],
.rtc-textarea img[data-align="right"] {
    display: block;
    margin: 12px 0 12px auto;
}

.rich-content a > img.topic-image,
.rich-content a > img.bb-image {
    display: block;
    margin: 0;
    cursor: pointer;
}

.rich-content a:has(> img.topic-image),
.rich-content a:has(> img.bb-image) {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 12px auto;
    line-height: 0;
    font-weight: inherit;
    text-decoration: none;
}

.rich-content a:has(> img[data-align="left"]) {
    margin: 12px auto 12px 0;
}

.rich-content a:has(> img[data-align="center"]) {
    margin: 12px auto;
}

.rich-content a:has(> img[data-align="right"]) {
    margin: 12px 0 12px auto;
}

.rtc-textarea [data-resize-container][data-node="image"] {
    margin: 12px 0;
    max-width: 100%;
}

.rtc-textarea [data-resize-container][data-node="image"]:has(img[data-align="left"]) {
    justify-content: flex-start;
}

.rtc-textarea [data-resize-container][data-node="image"]:has(img[data-align="center"]) {
    justify-content: center;
}

.rtc-textarea [data-resize-container][data-node="image"]:has(img[data-align="right"]) {
    justify-content: flex-end;
}

.rtc-textarea [data-resize-wrapper] {
    max-width: 100%;
}

.rtc-textarea [data-resize-handle] {
    width: 10px;
    height: 10px;
    background: #8e5bd9;
    border: 1px solid #fff;
    border-radius: 2px;
    z-index: 2;
}

.mention-link {
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.mention-link:hover {
    color: #d9ecff;
    text-decoration: underline;
}

.bb-quote,
.bb-code,
.bb-spoiler {
    margin: 10px 0;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .22);
}

.bb-quote {
    padding: 10px 12px;
    border-left: 3px solid var(--amber);
    color: #cfd7df;
}

.bb-code {
    padding: 10px 12px;
    overflow-x: auto;
    white-space: pre;
    color: #dfe8f1;
}

.bb-spoiler {
    padding: 8px 10px;
}

.bb-spoiler summary {
    cursor: pointer;
    color: var(--amber);
    font-weight: 800;
}

.bb-align-left {
    text-align: left;
}

.bb-align-center {
    text-align: center;
}

.bb-align-right {
    text-align: right;
}

.bb-size-small {
    font-size: .86rem;
}

.bb-size-normal {
    font-size: 1rem;
}

.bb-size-large {
    font-size: 1.2rem;
}

.bb-size-huge {
    font-size: 1.45rem;
}

.bb-align-left .bb-image {
    margin-left: 0;
    margin-right: auto;
}

.bb-align-center .bb-image {
    margin-left: auto;
    margin-right: auto;
}

.bb-align-right .bb-image {
    margin-left: auto;
    margin-right: 0;
}

.bb-image {
    display: block;
    max-width: min(100%, 720px);
    max-height: 460px;
    margin: 12px 0;
    border: 1px solid var(--line);
    object-fit: contain;
}

.bb-list {
    margin: 8px 0 8px 20px;
    padding-left: 16px;
}

.profile-link {
    color: #cbe2ff;
    text-decoration: none;
    font-weight: 700;
}

.profile-link:hover {
    color: var(--amber);
}

.post-signature {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .16);
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.post-signature.rich-content p {
    margin: 0 0 6px;
}

.post-signature.rich-content p:last-child {
    margin-bottom: 0;
}

.post-signature.rich-content blockquote {
    margin: 8px 0;
    padding: 8px 10px;
}

.comment-composer {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.comment-composer label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
}

.comment-composer textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
    resize: vertical;
}

.comment-composer textarea:focus {
    border-color: rgba(229, 169, 58, .75);
    box-shadow: 0 0 0 3px rgba(229, 169, 58, .12);
}

.empty-state,
.loading-state {
    padding: 24px;
    border: 1px dashed var(--line);
    color: var(--muted);
    text-align: center;
}

.side-panel {
    display: grid;
    align-content: start;
    gap: 18px;
}

.mode-switch {
    width: 100%;
    margin-bottom: 14px;
}

.mode-switch button {
    flex: 1 1 0;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.user-box {
    display: grid;
    gap: 12px;
}

.user-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--amber);
    font-weight: 800;
    overflow: hidden;
    border-radius: 50%;
}

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

.user-card strong,
.user-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card small {
    color: var(--muted);
}

.user-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profile-edit-form {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    padding: 16px;
}

.profile-password-form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--bg-body);
    background: #242526;
}

.profile-password-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.profile-password-heading h3 {
    margin: 3px 0 0;
    color: var(--text-title);
    font-size: 1rem;
}

.profile-password-heading p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.55;
}

.profile-password-kicker {
    color: #ff9f1a;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.profile-password-form label {
    display: grid;
    gap: 7px;
    color: var(--muted-light);
    font-size: .75rem;
    font-weight: 750;
}

.profile-password-form input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--bg-body);
    background: #18191a;
    color: var(--text-title);
    outline: none;
}

.profile-password-form input:focus {
    border-color: rgba(255, 152, 0, .72);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, .1);
}

.profile-password-form label small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 500;
    line-height: 18px;
}

.profile-password-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-password-grid label {
    grid-template-rows: 18px 42px minmax(18px, auto);
    align-content: start;
    line-height: 18px;
}

.profile-password-grid input {
    box-sizing: border-box;
    height: 42px;
}

/* ============================================================
   NEW PROFILE LAYOUT
   ============================================================ */
.profile-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.profile-main-col {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 20px;
}

.profile-side-col {
    width: 300px;
    flex-shrink: 0;
    display: grid;
    gap: 20px;
}

/* HERO SECTION */
.profile-hero-new {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
    overflow: hidden;
    contain: paint;
}

.profile-hero-banner {
    height: 140px;
    background: linear-gradient(to right, #2b323b, #1d2228); /* placeholder banner */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.profile-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 20px;
    margin-top: -65px;
    text-align: center;
}

.profile-hero-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid #181c21;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--amber);
    margin-bottom: 10px;
}

.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
}

.profile-hero-name {
    font-size: 1.6rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.profile-hero-role {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.role-admin { background: rgba(220, 53, 69, 0.15); color: #ff6b6b; }
.role-mod { background: rgba(13, 110, 253, 0.15); color: #6bb4ff; }
.role-member { background: rgba(255, 255, 255, 0.1); color: #bbb; }

.profile-hero-level {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-hero-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #a0a0a0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
}

.is-offline .status-dot {
    background: #69717c;
}

.is-online .status-dot {
    background: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, .35);
}

.profile-edit-btn {
    position: absolute;
    top: 150px;
    right: 20px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.profile-edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.profile-message-btn {
    position: absolute;
    top: 150px;
    right: 20px;
    padding: 6px 12px;
    background: rgba(26, 188, 156, 0.16);
    border: 1px solid rgba(26, 188, 156, 0.42);
    color: #d7fff6;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.profile-message-btn:hover {
    background: rgba(26, 188, 156, 0.25);
    border-color: rgba(26, 188, 156, 0.62);
}

/* STATS TABLE */
.profile-details-table {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
    padding: 15px 20px;
}

.profile-details-table .detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .03);
    font-size: 0.9rem;
}

.profile-details-table .detail-row:last-child {
    border-bottom: none;
}

.profile-details-table .detail-row span {
    color: var(--muted);
    font-weight: 600;
}

.profile-details-table .detail-row strong {
    color: var(--text);
    font-weight: 400;
    word-break: break-word;
}

.profile-details-table .divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 15px 0;
}

.profile-game-stats {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 184, 77, .10), transparent 34%),
        linear-gradient(160deg, rgba(46, 196, 182, .08), transparent 48%),
        #171b21;
    border: 1px solid rgba(255, 255, 255, .075);
    padding: 18px;
    contain: paint;
}

.profile-game-stats::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: .45;
    pointer-events: none;
}

.profile-game-stats-head,
.profile-game-meta,
.profile-game-stat-grid,
.profile-game-stat-empty {
    position: relative;
    z-index: 1;
}

.profile-game-stats-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.profile-game-kicker {
    display: block;
    color: var(--amber);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-game-stats h3 {
    margin: 2px 0 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.profile-game-citizen {
    border: 1px solid rgba(255, 184, 77, .28);
    background: rgba(255, 184, 77, .08);
    color: #ffd38a;
    padding: 5px 9px;
    font-size: .72rem;
    font-weight: 800;
}

.profile-game-meta {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: .82rem;
}

.profile-game-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.profile-game-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    background: rgba(8, 11, 15, .54);
    border: 1px solid rgba(255, 255, 255, .07);
    padding: 12px;
}

.profile-game-stat-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #121519;
    background: #ffb84d;
    box-shadow: 0 0 24px rgba(255, 184, 77, .18);
}

.profile-game-stat-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.profile-game-stat-icon-bolt {
    background: #39d98a;
}

.profile-game-stat-icon-target {
    background: #78a6ff;
}

.profile-game-stat-icon-clock {
    background: #ff6b6b;
}

.profile-game-stat-card strong {
    display: block;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.1;
}

.profile-game-stat-card span {
    display: block;
    color: #b9c2ce;
    font-size: .78rem;
    font-weight: 700;
    margin-top: 3px;
}

.profile-game-stat-card small {
    display: block;
    color: rgba(185, 194, 206, .58);
    font-size: .68rem;
    margin-top: 2px;
}

.profile-game-stat-empty {
    border: 1px dashed rgba(255, 255, 255, .12);
    color: var(--muted);
    padding: 14px;
    text-align: center;
}

.profile-tabs-shell {
    display: grid;
    gap: 10px;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .075);
}

.profile-tab-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .065);
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    cursor: pointer;
}

.profile-tab-button:last-child {
    border-right: 0;
}

.profile-tab-button strong {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .055);
    color: var(--text-2);
    font-size: .72rem;
}

.profile-tab-button:hover,
.profile-tab-button.is-active {
    background: rgba(229, 169, 58, .12);
    color: #fff;
}

.profile-tab-button.is-active {
    box-shadow: inset 0 -2px 0 rgba(229, 169, 58, .8);
}

.profile-tab-content {
    display: grid;
    gap: 10px;
}

.profile-activity-list,
.profile-topic-list {
    display: grid;
    gap: 10px;
}

.profile-activity-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    background: linear-gradient(180deg, rgba(27, 32, 39, .98), rgba(17, 20, 24, .98));
    border: 1px solid rgba(255, 255, 255, .065);
    border-left: 3px solid rgba(78, 161, 255, .36);
}

.profile-activity-item.is-clickable {
    cursor: pointer;
}

.profile-activity-item.is-clickable:hover {
    border-color: rgba(229, 169, 58, .42);
    border-left-color: rgba(229, 169, 58, .75);
    background: linear-gradient(180deg, rgba(34, 39, 45, .98), rgba(22, 26, 31, .98));
}

.profile-activity-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-2);
    display: grid;
    place-items: center;
    position: relative;
    overflow: visible;
    font-size: .74rem;
    font-weight: 900;
}

.profile-activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-activity-body {
    min-width: 0;
}

.profile-activity-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
}

.profile-activity-head span {
    color: #9fc6ef;
}

.profile-activity-body p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
    word-break: break-word;
}

.profile-topic-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 220px;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(28, 33, 39, .98), rgba(20, 24, 29, .98));
    border: 1px solid rgba(255, 255, 255, .065);
    cursor: pointer;
}

.profile-topic-card:hover {
    border-color: rgba(229, 169, 58, .42);
    background: linear-gradient(180deg, rgba(34, 39, 45, .98), rgba(22, 26, 31, .98));
}

.profile-topic-main,
.profile-topic-latest {
    min-width: 0;
}

.profile-topic-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: 5px;
}

.profile-topic-title-line a {
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-topic-title-line span {
    flex-shrink: 0;
    padding: 2px 6px;
    border: 1px solid rgba(229, 169, 58, .38);
    background: rgba(229, 169, 58, .12);
    color: #f0c56b;
    font-size: .65rem;
    font-weight: 900;
}

.profile-topic-main small,
.profile-topic-metrics span,
.profile-topic-latest span {
    color: var(--muted);
}

.profile-topic-metrics {
    display: grid;
    gap: 3px;
    color: var(--text);
    font-size: .82rem;
}

.profile-topic-latest {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    font-size: .78rem;
}

.profile-topic-latest strong,
.profile-topic-latest span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* STATUS COMPOSER (FEET) */
.profile-status-composer {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 4px;
    overflow: hidden;
}

.composer-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, .03);
    font-weight: 600;
}

#profileStatusBody {
    width: 100%;
    min-height: 80px;
    background: var(--surface);
    border: none;
    padding: 12px 15px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
}

#profileStatusBody:focus {
    background: var(--surface);
}

.composer-footer {
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-top: 1px solid rgba(255, 255, 255, .03);
}

.profile-feed-login-notice {
    padding: 14px 15px;
    color: var(--muted);
    background: rgba(0, 0, 0, .16);
    font-size: .9rem;
}

.submit-status-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.submit-status-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* STATUS LIST */
.profile-status-list {
    display: grid;
    gap: 10px;
}

.status-item {
    background: linear-gradient(180deg, rgba(27, 32, 39, .98), rgba(17, 20, 24, .98));
    border: 1px solid rgba(255, 255, 255, .065);
    padding: 14px 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.profile-feed-comment {
    border-left: 3px solid rgba(229, 169, 58, .42);
}

.status-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    position: relative;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-2);
}

.status-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
}

.status-content {
    flex: 1;
    min-width: 0;
}

.status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.status-author {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.status-author a { color: var(--text); text-decoration: none; }
.status-author a:hover { text-decoration: underline; }

.status-date {
    font-size: 0.75rem;
    color: var(--muted);
}

.status-body {
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .055);
    background: rgba(0, 0, 0, .16);
}

.status-delete-button {
    flex-shrink: 0;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.status-delete-button:hover {
    border-color: rgba(215, 45, 51, .48);
    background: rgba(215, 45, 51, .14);
    color: #fff;
}

.profile-feed-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px 0 0;
}

.profile-feed-page-button {
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.profile-feed-page-button:hover:not(:disabled),
.profile-feed-page-button.is-active {
    border-color: rgba(229, 169, 58, .55);
    background: rgba(229, 169, 58, .13);
    color: #fff;
}

.profile-feed-page-button:disabled {
    cursor: default;
    opacity: .42;
}

.profile-feed-page-ellipsis {
    display: grid;
    min-width: 22px;
    height: 30px;
    place-items: center;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

/* VISITORS WIDGET */
.profile-visitors-widget {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
    padding: 15px;
}

.profile-visitors-widget h3 {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.visitors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visitor-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visitor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--amber);
    position: relative;
    overflow: visible;
}

.visitor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

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

.visitor-name { font-size: 0.85rem; font-weight: 600; }
.visitor-name a { color: var(--text); text-decoration: none; }
.visitor-name a:hover { text-decoration: underline; }

.visitor-date { font-size: 0.75rem; color: var(--muted); }

.empty-state, .empty-text {
    padding: 15px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
}
.empty-text { border: none; padding: 10px 0; }

/* ============================================================
   PRIVATE MESSAGES
   ============================================================ */
.messages-main {
    width: 100%;
    margin: 0 auto;
}

.pm-shell {
    height: min(760px, calc(100vh - 142px));
    min-height: 560px;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    border: 1px solid var(--line);
    background: var(--surface);
}

.pm-sidebar {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.pm-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.pm-sidebar-header h2,
.pm-chat-header h2 {
    margin: 0;
    font-size: 1.02rem;
}

.pm-sidebar-header p,
.pm-chat-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.pm-icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    cursor: pointer;
}

.pm-icon-btn:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.pm-sidebar-list {
    min-height: 0;
    overflow-y: auto;
}

.pm-conversation {
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.pm-conversation:hover,
.pm-conversation.is-active {
    background: rgba(255, 255, 255, .055);
}

.pm-conversation-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.pm-conversation-top,
.pm-conversation-bottom {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pm-conversation-top strong,
.pm-conversation-bottom small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-conversation-top time {
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.pm-conversation-bottom small {
    color: var(--muted);
    font-size: 0.8rem;
}

.pm-conversation-bottom em {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #21c063;
    color: #06140c;
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 800;
}

.pm-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: visible;
}

.pm-avatar-image {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    color: var(--amber);
    font-weight: 800;
}

.pm-avatar--large {
    width: 48px;
    height: 48px;
}

.pm-avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-chat-panel {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background:
        linear-gradient(rgba(14, 17, 20, .88), rgba(14, 17, 20, .92)),
        radial-gradient(circle at 20% 0%, rgba(33, 192, 99, .12), transparent 28%),
        #0e1114;
}

.pm-chat-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.pm-chat-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pm-profile-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(33, 192, 99, .32);
    background: rgba(33, 192, 99, .1);
    color: #c8ffe3;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: border-color .2s, background .2s, color .2s;
}

.pm-profile-link:hover {
    border-color: rgba(33, 192, 99, .58);
    background: rgba(33, 192, 99, .18);
    color: #fff;
    text-decoration: none;
}

.pm-chat-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-height: 0;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.pm-chat-empty h2 {
    margin: 0;
    color: var(--text);
}

.pm-chat-empty p {
    max-width: 360px;
    margin: 0;
}

.pm-chat-empty-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
    color: #21c063;
}

.pm-message-list {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.pm-day-separator,
.pm-empty-line {
    width: fit-content;
    margin: 18px auto;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-size: 0.82rem;
}

.pm-message {
    display: flex;
    margin: 8px 0;
}

.pm-message.is-mine {
    justify-content: flex-end;
}

.pm-message.is-other {
    justify-content: flex-start;
}

.pm-message-bubble {
    max-width: min(620px, 72%);
    padding: 9px 11px 7px;
    border: 1px solid rgba(255, 255, 255, .06);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.pm-message.is-mine .pm-message-bubble {
    background: #0d5f40;
    border-color: rgba(33, 192, 99, .28);
}

.pm-message-body {
    margin: 0;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pm-message-body p {
    margin: 0 0 6px;
}

.pm-message-body p:last-child,
.pm-message-body :last-child {
    margin-bottom: 0;
}

.pm-message-bubble time {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, .62);
    text-align: right;
    font-size: 0.68rem;
}

.pm-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.pm-composer-editor {
    min-width: 0;
    border-radius: 4px;
    overflow: hidden;
}

.pm-composer-toolbar {
    max-height: 94px;
    overflow-y: auto;
    padding: 8px;
}

.pm-composer-toolbar button,
.pm-composer-toolbar select {
    min-height: 28px;
    padding: 5px 8px;
    font-size: .72rem;
}

.pm-composer .pm-message-editor {
    min-height: 44px;
    max-height: 170px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.pm-message-editor:focus-within {
    box-shadow: inset 0 0 0 1px rgba(33, 192, 99, .5);
}

.pm-message-editor .tiptap {
    min-height: 34px;
    outline: none;
}

.pm-message-editor .tiptap p {
    margin: 0 0 6px;
}

.pm-message-editor .tiptap p:last-child {
    margin-bottom: 0;
}

.pm-send-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: #21c063;
    color: #06140c;
    cursor: pointer;
}

.pm-send-button:disabled {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 860px) {
    .messages-main {
        width: min(100%, calc(100vw - 24px));
    }

    .pm-shell {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .pm-sidebar {
        max-height: 300px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .pm-chat-panel {
        min-height: 560px;
    }

    .pm-message-bubble {
        max-width: 86%;
    }

    .pm-composer {
        grid-template-columns: 1fr;
    }

    .pm-send-button {
        width: 100%;
    }
}

/* ============================================================
   APPLICATIONS
   ============================================================ */
.applications-main {
    min-width: 0;
}

.applications-shell {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    background: rgba(20, 24, 29, .94);
    box-shadow: var(--shadow);
}

.application-page-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(15, 19, 24, .72);
    overflow: hidden;
    isolation: isolate;
}

.application-page-heading::before {
    content: "";
    position: absolute;
    inset: -18px;
    z-index: -2;
    background: url("/images/vice-banner.png") center / cover no-repeat;
    filter: blur(12px);
    opacity: .28;
    transform: scale(1.04);
}

.application-page-heading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(15, 19, 24, .94), rgba(15, 19, 24, .70)),
        rgba(0, 0, 0, .28);
}

.application-page-heading > * {
    position: relative;
    z-index: 1;
}

.application-page-heading > div {
    min-width: 0;
}

.application-page-heading [data-application-back] {
    order: 2;
    margin-left: auto;
}

.application-page-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.application-page-heading span,
.application-page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.application-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.application-section {
    display: grid;
    gap: 12px;
}

.application-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: var(--surface);
}

.application-section-heading h3 {
    margin: 0;
    font-size: 1.22rem;
}

.application-section-heading span {
    color: var(--muted);
    font-weight: 900;
}

.application-card {
    display: grid;
    gap: 12px;
    min-height: 240px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    cursor: default;
    transition: border-color .16s, background .16s;
}

.application-card:hover {
    border-color: rgba(229, 169, 58, .35);
    background: var(--surface);
}

.application-card.is-locked {
    cursor: default;
    opacity: .72;
}

.application-card-top,
.application-card-meta,
.application-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.application-card-top span,
.application-card-top strong,
.application-card-meta span {
    font-size: .76rem;
    font-weight: 900;
    color: var(--muted);
}

.application-card-top strong {
    color: var(--red-2);
}

.application-card.is-active .application-card-top strong {
    color: var(--green);
}

.application-card h3 {
    margin: 0;
    font-size: 1.18rem;
}

.application-card p {
    margin: 0;
    color: #c3ccd7;
    line-height: 1.55;
}

.application-toggle-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(229, 169, 58, .28);
    background: rgba(229, 169, 58, .08);
    color: var(--amber);
    font-weight: 900;
}

.application-toggle-button.is-on {
    border-color: rgba(63, 207, 142, .34);
    background: rgba(63, 207, 142, .1);
    color: var(--green);
}

.application-toggle-button.is-danger {
    border-color: rgba(255, 74, 61, .36);
    background: rgba(215, 45, 51, .12);
    color: #ff9fa3;
}

.application-form,
.application-review-sheet,
.application-decision-box,
.application-status-box {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: var(--surface);
}

.application-question {
    display: grid;
    gap: 8px;
}

.application-question span,
.application-decision-box span {
    font-weight: 900;
}

.application-question em {
    color: var(--red-2);
    font-style: normal;
}

.application-question small {
    color: var(--muted);
}

.application-question input,
.application-question textarea,
.application-question select,
.application-decision-box textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .1);
    background: var(--surface);
    color: var(--text);
    padding: 12px;
    outline: none;
    resize: vertical;
}

.application-question input:focus,
.application-question textarea:focus,
.application-question select:focus,
.application-decision-box textarea:focus {
    border-color: rgba(229, 169, 58, .48);
}

.application-form-actions,
.application-decision-box > div {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.application-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    white-space: nowrap;
}

.application-status.pending {
    border-color: rgba(229, 169, 58, .32);
    color: var(--amber);
}

.application-status.accepted {
    border-color: rgba(63, 207, 142, .32);
    color: var(--green);
}

.application-status.rejected {
    border-color: rgba(255, 74, 61, .32);
    color: #ff9fa3;
}

.application-answer-card {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .065);
    background: var(--surface);
}

.application-answer-card h3 {
    margin: 0 0 8px;
    color: var(--amber);
    font-size: .95rem;
}

.application-answer-card p {
    margin: 0;
    color: #dce3ea;
    line-height: 1.65;
    white-space: pre-wrap;
}

.admin-application-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: var(--surface);
}

.admin-application-row div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-application-row small {
    color: var(--muted);
}

@media (max-width: 980px) {
    .application-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .application-card-grid,
    .admin-application-row {
        grid-template-columns: 1fr;
    }

    .application-page-heading,
    .application-form-actions,
    .application-decision-box > div {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Başvuru merkezi: okunaklı kartlar ve uzun formlar için adımlı düzen. */
.applications-shell {
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
}

.application-page-heading {
    min-height: 156px;
    align-items: center;
    padding: 24px 26px;
    border-color: var(--bg-body);
    background: #18191a;
}

.application-page-heading::before {
    filter: blur(4px) saturate(.75);
    opacity: .22;
}

.application-page-heading::after {
    background: linear-gradient(90deg, rgba(10, 10, 10, .96), rgba(10, 10, 10, .8) 62%, rgba(10, 10, 10, .46));
}

.application-heading-copy {
    max-width: 760px;
}

.application-page-heading .eyebrow,
.application-overview-kicker {
    color: #ff9800;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.application-page-heading h2 {
    margin-top: 4px;
    color: var(--text-title);
}

.application-page-heading span {
    display: block;
    max-width: 700px;
    line-height: 1.55;
}

.application-heading-points {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.application-heading-points span {
    margin: 0;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 3px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted-light);
    font-size: .68rem;
    font-weight: 800;
}

.application-heading-stat {
    min-width: 118px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 16px;
    border-left: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
}

.application-heading-stat strong {
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.application-heading-stat span {
    margin-top: 6px;
    color: var(--muted-light);
    font-size: .7rem;
    font-weight: 800;
}

.application-section {
    gap: 0;
    border: 1px solid var(--bg-body);
    background: #18191a;
}

.application-section-heading {
    padding: 14px 17px;
    border: 0;
    border-bottom: 1px solid var(--bg-body);
    background: #242526;
}

.application-section-heading h3 {
    color: var(--text-title);
    font-size: 1rem;
}

.application-section-heading > span {
    padding: 5px 8px;
    border-radius: 3px;
    background: rgba(255, 152, 0, .1);
    color: #ffb74d;
    font-size: .68rem;
}

.application-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--bg-body);
}

.application-card {
    align-content: start;
    min-height: 226px;
    padding: 16px;
    border: 0;
    background: #242526;
    transform: none;
}

.application-card:hover {
    border-color: transparent;
    background: #28292a;
    transform: none;
}

.application-card.is-active {
    box-shadow: inset 3px 0 0 #2ecc71;
}

.application-card.is-closed {
    box-shadow: inset 3px 0 0 #51545a;
}

.application-card-kind,
.application-card-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .05);
}

.application-card-state {
    color: #ff9a9d !important;
    background: rgba(229, 57, 53, .11);
}

.application-card.is-active .application-card-state {
    color: #83e5a2 !important;
    background: rgba(0, 200, 83, .1);
}

.application-card-copy {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.application-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: #18191a;
    color: #ffb74d;
    font-size: .82rem;
    font-weight: 950;
}

.application-card-copy > div {
    min-width: 0;
}

.application-card h3 {
    color: var(--text-title);
    font-size: 1rem;
}

.application-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.5;
}

.application-card-meta {
    padding-top: 10px;
    border-top: 1px solid var(--bg-body);
}

.application-card-actions {
    align-self: end;
    margin-top: auto;
}

.application-card-actions .ghost-button {
    flex: 1;
    min-height: 38px;
}

.application-form-heading {
    min-height: 136px;
}

.application-form-state {
    min-width: max-content;
    padding: 7px 10px;
    border-radius: 3px;
    font-size: .7rem;
    font-weight: 900;
}

.application-form-state.is-open {
    background: rgba(0, 200, 83, .12);
    color: #83e5a2;
}

.application-form-state.is-closed {
    background: rgba(229, 57, 53, .12);
    color: #ff9a9d;
}

.application-form-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 19px;
    border: 1px solid var(--bg-body);
    background: #242526;
}

.application-form-overview h3 {
    margin: 4px 0 0;
    color: var(--text-title);
    font-size: .96rem;
}

.application-form-overview p {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.5;
}

.application-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 7px;
}

.application-overview-stats span {
    display: grid;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 3px;
    background: #18191a;
    color: var(--muted);
    font-size: .66rem;
    text-align: center;
}

.application-overview-stats strong {
    color: var(--text-title);
    font-size: 1rem;
}

.application-form {
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
}

.application-question-section {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bg-body);
    background: #18191a;
}

.application-question-section > legend {
    float: left;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    gap: 4px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--bg-body);
    background: #242526;
}

.application-question-section > legend + * {
    clear: both;
}

.application-question-section > legend > span {
    color: var(--text-title);
    font-size: .9rem;
    font-weight: 900;
}

.application-question-section > legend > small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
}

.application-question-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding-top: 1px;
    background: var(--bg-body);
}

.application-question {
    min-width: 0;
    align-content: start;
    padding: 14px;
    background: #242526;
}

.application-question:has(textarea) {
    grid-column: 1 / -1;
}

.application-question-head {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
}

.application-question-head > b {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: #18191a;
    color: #ffb74d;
    font-size: .68rem;
}

.application-question-head > span {
    color: var(--text-title);
    font-size: .8rem;
    line-height: 1.45;
}

.application-question-head > em {
    padding: 4px 6px;
    border-radius: 3px;
    background: rgba(229, 57, 53, .09);
    color: #ff9a9d;
    font-size: .6rem;
    white-space: nowrap;
}

.application-question:not(:has([required])) .application-question-head > em {
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
}

.application-question input,
.application-question textarea,
.application-question select,
.application-decision-box textarea {
    box-sizing: border-box;
    border-color: var(--control-border);
    border-radius: 3px;
    background: #18191a;
    font: inherit;
    font-size: .8rem;
    line-height: 1.5;
}

.application-question textarea {
    min-height: 104px;
}

.application-question select {
    min-height: 42px;
    color-scheme: dark;
    cursor: pointer;
}

.application-question input:focus,
.application-question textarea:focus,
.application-question select:focus,
.application-decision-box textarea:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, .12);
}

.application-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--bg-body);
    background: rgba(36, 37, 38, .97);
    backdrop-filter: blur(8px);
}

.application-form-actions > span {
    margin-right: auto;
    color: var(--muted);
    font-size: .68rem;
}

.application-status-box {
    border-color: rgba(255, 152, 0, .18);
    background: rgba(255, 152, 0, .06);
}

.application-review-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    gap: 1px;
    border-color: var(--bg-body);
    background: var(--bg-body);
}

.application-answer-card {
    min-width: 0;
    border: 0;
    background: #242526;
}

.application-answer-card h3 {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: var(--text-title);
    font-size: .78rem;
}

.application-answer-card h3 span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: #18191a;
    color: #ffb74d;
    font-size: .64rem;
}

.application-answer-card p {
    padding: 10px 11px;
    background: #18191a;
    color: var(--muted-light);
    font-size: .76rem;
}

@media (max-width: 760px) {
    .application-page-heading,
    .application-form-overview {
        align-items: stretch;
        flex-direction: column;
    }

    .application-heading-stat {
        min-width: 0;
        grid-template-columns: auto auto;
        justify-content: start;
        gap: 8px;
        border-top: 1px solid rgba(255, 255, 255, .1);
        border-left: 0;
        text-align: left;
    }

    .application-heading-stat span {
        margin: 0;
    }

    .application-card-grid,
    .application-question-list,
    .application-review-sheet {
        grid-template-columns: 1fr;
    }

    .application-question:has(textarea) {
        grid-column: auto;
    }

    .application-overview-stats {
        width: 100%;
    }

    .application-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .application-form-actions > span {
        margin: 0;
    }
}

/* ============================================================
   SUPPORT TICKETS
   ============================================================ */
.tickets-main {
    width: calc(100vw - 32px);
    height: calc(100vh - 92px);
    margin: 0 auto;
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
}

.ticket-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    border: 1px solid var(--line);
    background: var(--surface);
}

.ticket-sidebar {
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.ticket-sidebar-header,
.ticket-panel-heading,
.ticket-detail-header {
    min-height: 76px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.ticket-sidebar-header,
.ticket-panel-heading,
.ticket-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ticket-sidebar-header h2,
.ticket-panel-heading h2,
.ticket-detail-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.ticket-sidebar-header p,
.ticket-panel-heading p,
.ticket-detail-header p,
.ticket-detail-kicker {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.ticket-sidebar-actions {
    display: inline-flex;
    gap: 8px;
}

.ticket-filter-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.ticket-filter-tabs button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.ticket-filter-tabs button:hover {
    border-color: rgba(255, 255, 255, .16);
    color: var(--text);
}

.ticket-filter-tabs button.is-active {
    border-color: rgba(229, 169, 58, .45);
    background: rgba(229, 169, 58, .12);
    color: var(--text);
}

.ticket-list {
    min-height: 0;
    overflow-y: auto;
}

.ticket-list-item {
    width: 100%;
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.ticket-list-item:hover,
.ticket-list-item.is-active {
    background: rgba(255, 255, 255, .055);
}

.ticket-list-top,
.ticket-list-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ticket-list-top strong,
.ticket-list-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-list-top strong {
    font-size: 0.9rem;
}

.ticket-list-meta {
    justify-content: flex-start;
    color: var(--muted);
    font-size: 0.76rem;
}

.ticket-list-meta time {
    margin-left: auto;
    white-space: nowrap;
}

.ticket-list-item .mini-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
}

.ticket-list-item small {
    color: var(--muted);
    font-size: 0.78rem;
}

.ticket-list-owner {
    color: #b8c8d9;
    font-size: 0.75rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-panel {
    min-width: 0;
    min-height: 0;
    display: grid;
    background:
        linear-gradient(rgba(14, 17, 20, .9), rgba(14, 17, 20, .94)),
        radial-gradient(circle at 18% 0%, rgba(215, 45, 51, .13), transparent 30%),
        #0e1114;
}

.ticket-create-panel,
.ticket-detail {
    min-height: 0;
    height: 100%;
}

.ticket-form {
    display: grid;
    gap: 13px;
    padding: 18px;
}

.ticket-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ticket-form label small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.ticket-reply-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
}

.ticket-form input,
.ticket-form select {
    height: 42px;
    padding: 0 12px;
}

.ticket-file-picker input {
    padding: 9px 12px;
    height: auto;
}

.ticket-video-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ticket-file-picker small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.ticket-create-attachment-preview {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px dashed rgba(229, 169, 58, .22);
    background: rgba(229, 169, 58, .045);
}

.ticket-create-attachment-preview[hidden] {
    display: none;
}

.ticket-create-attachment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.ticket-create-attachment-head strong {
    color: var(--text);
}

.ticket-create-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.ticket-create-attachment-item {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
}

.ticket-create-attachment-item img,
.ticket-create-attachment-file {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--surface);
}

.ticket-create-attachment-item img {
    object-fit: cover;
}

.ticket-create-attachment-file {
    display: grid;
    place-items: center;
    border: 1px solid rgba(215, 45, 51, .24);
    color: #ffd0d0;
    font-size: 0.86rem;
    font-weight: 950;
}

.ticket-create-attachment-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.78rem;
}

.ticket-create-attachment-item small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.ticket-create-attachment-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    padding: 4px 8px;
    border: 1px solid rgba(215, 45, 51, .42);
    background: rgba(16, 20, 25, .92);
    color: #ffd0d0;
    font-size: 0.68rem;
    font-weight: 950;
}

.ticket-create-attachment-delete:hover {
    border-color: rgba(215, 45, 51, .72);
    background: rgba(215, 45, 51, .22);
    color: #fff;
}

.ticket-form textarea,
.ticket-reply-form textarea {
    padding: 12px 14px;
    resize: vertical;
}

.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus,
.ticket-reply-form textarea:focus {
    border-color: rgba(229, 169, 58, .5);
}

.ticket-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ticket-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    height: 100%;
    min-height: 520px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.ticket-empty h2 {
    margin: 0;
    color: var(--text);
}

.ticket-empty p {
    max-width: 380px;
    margin: 0;
}

.ticket-detail-content {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ticket-detail-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 420px);
}

.ticket-detail-body--solo {
    grid-template-columns: minmax(0, 1fr);
}

.ticket-chat-column {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ticket-admin-aside {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background: rgba(10, 13, 17, .55);
}

.ticket-detail-kicker {
    margin: 0 0 5px;
    color: var(--amber);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ticket-assignee-line {
    margin-top: 5px !important;
}

.ticket-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.ticket-status.open {
    border-color: rgba(33, 192, 99, .35);
    background: rgba(33, 192, 99, .11);
    color: #bfffdc;
}

.ticket-status.investigating {
    border-color: rgba(229, 169, 58, .42);
    background: rgba(229, 169, 58, .12);
    color: #ffe1a5;
}

.ticket-status.waiting_user {
    border-color: rgba(123, 183, 255, .35);
    background: rgba(123, 183, 255, .11);
    color: #cfe4ff;
}

.ticket-status.resolved {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .045);
    color: #aeb6c0;
}

.ticket-staff-panel {
    min-width: 0;
    display: grid;
    gap: 12px;
    padding: 16px 18px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
}

.ticket-staff-panel h3 {
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
}

.ticket-staff-panel p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.ticket-staff-tools {
    grid-template-columns: 1fr;
    align-items: center;
}

.ticket-staff-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.ticket-staff-actions select {
    grid-column: 1 / -1;
}

.ticket-staff-empty {
    padding: 10px 12px;
    border: 1px solid rgba(123, 183, 255, .18);
    background: rgba(123, 183, 255, .06);
    color: #cfe4ff;
    font-size: 0.82rem;
    font-weight: 800;
}

.ticket-staff-actions select,
.ticket-note-form textarea {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
}

.ticket-staff-actions select {
    height: 36px;
    padding: 0 10px;
}

.ticket-admin-aside .ghost-button,
.ticket-admin-aside .primary-action,
.ticket-admin-aside button {
    min-width: 0;
}

.ticket-notes-panel {
    gap: 10px;
}

.ticket-note-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.ticket-note,
.ticket-note-empty {
    padding: 10px 11px;
    border: 1px solid rgba(229, 169, 58, .18);
    background: rgba(229, 169, 58, .06);
}

.ticket-note {
    position: relative;
}

.ticket-note-delete {
    float: right;
    margin-left: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(215, 45, 51, .34);
    background: rgba(215, 45, 51, .12);
    color: #ffd0d0;
    font-size: 0.7rem;
    font-weight: 900;
}

.ticket-note-delete:hover {
    border-color: rgba(215, 45, 51, .62);
    background: rgba(215, 45, 51, .22);
    color: #fff;
}

.ticket-note strong {
    color: #ffe1a5;
    font-size: 0.78rem;
}

.ticket-note time {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.7rem;
}

.ticket-note p,
.ticket-note-empty {
    margin: 5px 0 0;
    color: #d8e0ea;
    line-height: 1.45;
    font-size: 0.82rem;
}

.ticket-note-form {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: end;
}

.ticket-note-form textarea {
    min-height: 92px;
    padding: 10px 12px;
    resize: vertical;
}

.ticket-message-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.ticket-attachments {
    min-width: 0;
    padding: 16px 18px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
}

.ticket-video-panel {
    min-width: 0;
    padding: 16px 18px 16px 16px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(215, 45, 51, .1), rgba(123, 183, 255, .05)),
        rgba(255, 255, 255, .025);
}

.ticket-attachments-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.ticket-attachments-head strong {
    color: var(--text);
}

.ticket-video-list {
    display: grid;
    gap: 8px;
}

.ticket-video-link {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(229, 169, 58, .22);
    background: rgba(10, 13, 17, .58);
    color: var(--text);
    text-decoration: none;
}

.ticket-video-link:hover {
    border-color: rgba(229, 169, 58, .48);
    background: rgba(229, 169, 58, .09);
}

.ticket-video-link strong,
.ticket-video-link small {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-video-link strong {
    font-size: 0.86rem;
}

.ticket-video-link small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.ticket-video-play {
    display: grid;
    width: 42px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(215, 45, 51, .38);
    background: rgba(215, 45, 51, .16);
    color: #ffd0d0;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: .04em;
}

.ticket-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
}

.ticket-admin-aside .ticket-attachment-grid {
    max-height: min(38vh, 330px);
    overflow-y: auto;
    padding-right: 2px;
}

.ticket-attachment-empty {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border: 1px dashed rgba(255, 255, 255, .1);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.ticket-attachment-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: end;
    margin-top: 12px;
}

.ticket-attachment-form .ticket-file-picker {
    display: grid;
    gap: 6px;
}

.ticket-attachment-card {
    position: relative;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--text);
}

.ticket-attachment-card a {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: inherit;
    text-decoration: none;
}

.ticket-attachment-card:hover {
    border-color: rgba(229, 169, 58, .42);
    background: rgba(229, 169, 58, .08);
}

.ticket-attachment-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--surface);
}

.ticket-attachment-card span:not(.ticket-attachment-file-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 900;
}

.ticket-attachment-card small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.ticket-attachment-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    padding: 4px 8px;
    border: 1px solid rgba(215, 45, 51, .42);
    background: rgba(16, 20, 25, .92);
    color: #ffd0d0;
    font-size: 0.68rem;
    font-weight: 950;
}

.ticket-attachment-delete:hover {
    border-color: rgba(215, 45, 51, .72);
    background: rgba(215, 45, 51, .22);
    color: #fff;
}

.ticket-attachment-file-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(215, 45, 51, .35);
    background: rgba(215, 45, 51, .14);
    color: #ffd0d0;
    font-size: 0.75rem;
    font-weight: 950;
}

.ticket-message {
    display: grid;
    gap: 9px;
    width: min(920px, 92%);
    margin: 0 0 12px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .065);
    background: var(--surface);
}

.ticket-message.is-mine {
    margin-left: auto;
    border-color: rgba(33, 192, 99, .18);
    background: var(--surface);
}

.ticket-message.is-staff {
    border-color: rgba(229, 169, 58, .32);
}

.ticket-message-system {
    width: min(920px, 92%);
    margin-inline: auto;
    border-color: rgba(123, 183, 255, .2);
    background: rgba(123, 183, 255, .07);
    color: #dbeafe;
}

.ticket-message-system strong {
    color: #cfe4ff;
    font-size: 0.82rem;
}

.ticket-message-author {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-message-author strong {
    color: var(--text);
}

.ticket-message-author small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.74rem;
}

.ticket-message-body {
    color: #d8e0ea;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ticket-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.ticket-reply-form textarea {
    min-height: 48px;
    max-height: 160px;
}

.ticket-closed-note {
    margin: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

@media (min-width: 861px) {
    body:has(.tickets-main:not([hidden])) {
        overflow: hidden;
    }

    body:has(.tickets-main:not([hidden])) .app-shell {
        padding-bottom: 0;
    }
}

@media (max-width: 860px) {
    .tickets-main {
        width: min(100%, calc(100vw - 24px));
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    .ticket-shell {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .ticket-sidebar {
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .ticket-panel {
        min-height: 560px;
    }

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

    .ticket-admin-aside {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .ticket-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-detail-actions,
    .ticket-form-actions,
    .ticket-reply-form {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .ticket-detail-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ticket-staff-tools,
    .ticket-staff-actions,
    .ticket-note-form,
    .ticket-video-inputs,
    .ticket-attachment-form {
        grid-template-columns: 1fr;
    }

    .ticket-message {
        width: 100%;
    }
}

/* ============================================================
   SUPPORT CENTER — USER FRIENDLY REDESIGN
   ============================================================ */
body:has(.tickets-main:not([hidden])) {
    overflow-y: auto;
}

body:has(.tickets-main:not([hidden])) .app-shell {
    padding-bottom: 44px;
}

.tickets-main {
    width: min(1160px, 100%);
    height: auto;
    margin: 22px auto 40px;
}

.ticket-page-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 28px;
    margin-bottom: 12px;
    padding: 22px 24px 18px;
    overflow: hidden;
    border: 1px solid var(--bg-body);
    border-left: 3px solid var(--accent-red);
    background:
        radial-gradient(circle at 92% 0%, rgba(229, 57, 53, .12), transparent 32%),
        var(--surface);
}

.ticket-page-intro::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-orange));
}

.ticket-page-intro-copy {
    min-width: 0;
}

.ticket-page-eyebrow,
.ticket-panel-kicker,
.ticket-sidebar-kicker,
.ticket-empty-kicker {
    display: block;
    color: var(--accent-orange);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ticket-page-intro h1 {
    margin: 5px 0 6px;
    color: var(--text-title);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.ticket-page-intro p {
    max-width: 760px;
    margin: 0;
    color: var(--text-2);
    font-size: .86rem;
    line-height: 1.55;
}

.ticket-quick-new-button,
.ticket-sidebar-new-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 152, 0, .5);
    background: rgba(255, 152, 0, .13);
    color: #fff3dc;
    font-size: .82rem;
    font-weight: 900;
    transition: background .15s, border-color .15s, transform .15s;
}

.ticket-quick-new-button {
    min-width: 170px;
    min-height: 44px;
    align-self: center;
    padding: 0 18px;
}

.ticket-quick-new-button:hover,
.ticket-sidebar-new-button:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 152, 0, .22);
    transform: translateY(-1px);
}

.ticket-quick-new-button[data-has-active-ticket="1"],
.ticket-sidebar-new-button[data-has-active-ticket="1"] {
    border-color: rgba(52, 152, 219, .42);
    background: rgba(52, 152, 219, .12);
    color: #dbeeff;
}

.ticket-journey {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.ticket-journey-step {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: rgba(0, 0, 0, .16);
}

.ticket-journey-step > strong,
.ticket-form-step-heading > strong {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(229, 57, 53, .42);
    background: rgba(229, 57, 53, .12);
    color: #ffb3b0;
    font-size: .76rem;
    font-weight: 950;
}

.ticket-journey-step span,
.ticket-form-step-heading span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.ticket-journey-step b,
.ticket-form-step-heading b {
    color: var(--text);
    font-size: .8rem;
}

.ticket-journey-step small,
.ticket-form-step-heading small {
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.35;
}

.ticket-shell {
    height: min(740px, calc(100vh - 44px));
    min-height: 640px;
    grid-template-columns: 300px minmax(0, 1fr);
    border: 1px solid var(--bg-body);
    background: var(--surface);
}

.ticket-sidebar {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    border-right-color: var(--bg-body);
}

.ticket-sidebar-header {
    min-height: auto;
    padding: 17px 16px 12px;
    border-bottom: 0;
}

.ticket-sidebar-header h2 {
    margin-top: 3px;
    font-size: 1rem;
}

.ticket-sidebar-header p {
    margin-top: 3px;
    font-size: .74rem;
}

.ticket-refresh-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--control-border);
    background: rgba(255, 255, 255, .035);
    color: var(--muted-light);
}

.ticket-refresh-button:hover {
    border-color: var(--control-border-hover);
    color: #fff;
}

.ticket-sidebar-new-button {
    min-height: 39px;
    margin: 0 12px 10px;
    padding: 0 12px;
}

.ticket-filter-tabs {
    gap: 4px;
    padding: 7px 10px;
    border-top: 1px solid var(--bg-body);
    border-bottom-color: var(--bg-body);
}

.ticket-filter-tabs button {
    min-height: 34px;
    justify-content: space-between;
    padding: 0 9px;
    border-color: transparent;
    background: rgba(255, 255, 255, .025);
    font-size: .75rem;
}

.ticket-filter-tabs button b {
    min-width: 20px;
    padding: 2px 5px;
    background: rgba(0, 0, 0, .2);
    color: var(--muted-light);
    font-size: .66rem;
    text-align: center;
}

.ticket-filter-tabs button.is-active {
    border-color: rgba(255, 152, 0, .32);
    background: rgba(255, 152, 0, .1);
    color: #fff;
}

.ticket-list {
    padding: 6px;
}

.ticket-list-item {
    gap: 6px;
    margin-bottom: 4px;
    padding: 11px 10px;
    border: 1px solid transparent;
    border-bottom-color: var(--bg-body);
    background: rgba(255, 255, 255, .018);
}

.ticket-list-item:hover {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .045);
}

.ticket-list-item.is-active {
    border-color: rgba(255, 152, 0, .3);
    border-left: 2px solid var(--accent-orange);
    background: rgba(255, 152, 0, .075);
}

.ticket-list-identity {
    color: var(--muted);
    font-size: .65rem;
    font-weight: 850;
    text-transform: uppercase;
}

.ticket-list-subject {
    min-width: 0;
    overflow: hidden;
    color: var(--text-title);
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-list-preview {
    color: var(--text-2) !important;
    font-size: .73rem !important;
}

.ticket-list-owner {
    color: #8f9bac;
    font-size: .68rem;
}

.ticket-list-empty {
    display: grid;
    gap: 5px;
    margin: 8px;
    padding: 18px 14px;
    border: 1px dashed rgba(255, 255, 255, .09);
    color: var(--muted);
    text-align: center;
}

.ticket-list-empty strong {
    color: var(--text-2);
    font-size: .8rem;
}

.ticket-list-empty span {
    font-size: .72rem;
    line-height: 1.45;
}

.ticket-list-empty.is-error {
    border-color: rgba(229, 57, 53, .3);
}

.ticket-panel {
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(229, 57, 53, .08), transparent 28%),
        #1d1f20;
}

.ticket-create-panel {
    overflow-y: auto;
}

.ticket-panel-heading,
.ticket-detail-header {
    min-height: 74px;
    padding: 15px 18px;
    border-bottom-color: var(--bg-body);
}

.ticket-panel-heading h2 {
    margin-top: 3px;
    font-size: 1.08rem;
}

.ticket-panel-heading p {
    max-width: 650px;
    font-size: .75rem;
    line-height: 1.45;
}

.ticket-form {
    gap: 0;
    padding: 0;
}

.ticket-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 14px;
    padding: 16px;
}

.ticket-form-fields {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.ticket-form-step,
.ticket-evidence-card,
.ticket-guide-card,
.ticket-privacy-note {
    border: 1px solid var(--bg-body);
    background: var(--surface);
}

.ticket-form-step {
    display: grid;
    gap: 12px;
    padding: 13px 14px;
}

.ticket-form-step-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.ticket-form-step-heading > strong {
    width: 25px;
    height: 25px;
}

.ticket-form label > span,
.ticket-video-picker > span,
.ticket-file-picker > span {
    color: var(--text-2);
    font-size: .73rem;
    font-weight: 850;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.ticket-reply-form textarea {
    border-color: var(--control-border);
    background: #1b1d1f;
}

.ticket-form input:hover,
.ticket-form select:hover,
.ticket-form textarea:hover {
    border-color: var(--control-border-hover);
}

.ticket-evidence-card {
    overflow: hidden;
}

.ticket-evidence-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
}

.ticket-evidence-card summary::-webkit-details-marker {
    display: none;
}

.ticket-evidence-card summary > span {
    display: grid;
    gap: 3px;
}

.ticket-evidence-card summary b {
    color: var(--text);
    font-size: .8rem;
}

.ticket-evidence-card summary small {
    color: var(--muted);
    font-size: .69rem;
}

.ticket-evidence-card summary em {
    flex: 0 0 auto;
    padding: 3px 7px;
    background: rgba(52, 152, 219, .11);
    color: #b9dcf5;
    font-size: .64rem;
    font-style: normal;
    font-weight: 850;
}

.ticket-evidence-body {
    display: grid;
    gap: 12px;
    padding: 13px 14px 14px;
    border-top: 1px solid var(--bg-body);
}

.ticket-video-inputs {
    grid-template-columns: 1fr;
    gap: 6px;
}

.ticket-file-picker input {
    border: 1px dashed var(--control-border);
    background: rgba(255, 255, 255, .025);
}

.ticket-form-guide {
    align-self: start;
    display: grid;
    gap: 10px;
    position: sticky;
    top: 14px;
}

.ticket-guide-card,
.ticket-privacy-note {
    padding: 15px;
}

.ticket-guide-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    background: rgba(0, 200, 83, .1);
    color: #73e49d;
}

.ticket-guide-card h3,
.ticket-privacy-note strong {
    margin: 0;
    color: var(--text-title);
    font-size: .82rem;
}

.ticket-guide-card ul {
    display: grid;
    gap: 9px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.ticket-guide-card li {
    position: relative;
    padding-left: 17px;
    color: var(--text-2);
    font-size: .72rem;
    line-height: 1.4;
}

.ticket-guide-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 950;
}

.ticket-privacy-note {
    border-left: 2px solid var(--accent-blue);
}

.ticket-privacy-note p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.45;
}

.ticket-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 12px 16px;
    border-top: 1px solid var(--bg-body);
    background: rgba(29, 31, 32, .96);
    backdrop-filter: blur(8px);
}

.ticket-form-actions .primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ticket-empty {
    min-height: 100%;
    gap: 8px;
    background:
        radial-gradient(circle at 50% 45%, rgba(229, 57, 53, .07), transparent 32%),
        transparent;
}

.ticket-empty-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border: 1px solid rgba(229, 57, 53, .26);
    background: rgba(229, 57, 53, .08);
    color: #ff7773;
}

.ticket-empty h2 {
    font-size: 1.25rem;
}

.ticket-empty p {
    color: var(--text-2);
    font-size: .82rem;
    line-height: 1.55;
}

.ticket-empty-actions {
    margin-top: 8px;
}

.ticket-empty > small {
    color: var(--muted);
    font-size: .68rem;
}

.ticket-detail-header h2 {
    margin-top: 3px;
}

.ticket-message-list {
    padding: 16px;
    background: rgba(0, 0, 0, .08);
}

.ticket-message {
    width: min(720px, 90%);
    border-color: var(--bg-body);
}

.ticket-reply-form {
    border-top-color: var(--bg-body);
}

.ticket-reply-field {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.ticket-reply-field > span {
    color: var(--text-2);
    font-size: .72rem;
    font-weight: 850;
}

.ticket-reply-field > small {
    color: var(--muted);
    font-size: .66rem;
}

@media (max-width: 980px) {
    .ticket-form-layout {
        grid-template-columns: minmax(0, 1fr) 220px;
    }
}

@media (max-width: 860px) {
    body:has(.tickets-main:not([hidden])) .app-shell {
        padding-bottom: 32px;
    }

    .tickets-main {
        width: min(100%, calc(100vw - 20px));
        margin-top: 14px;
    }

    .ticket-page-intro {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .ticket-quick-new-button {
        width: 100%;
    }

    .ticket-journey {
        grid-template-columns: 1fr;
    }

    .ticket-shell {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .ticket-sidebar {
        max-height: 430px;
    }

    .ticket-panel {
        min-height: 520px;
        overflow: visible;
    }

    .ticket-create-panel,
    .ticket-detail,
    .ticket-detail-content {
        height: auto;
    }

    .ticket-form-layout {
        grid-template-columns: 1fr;
    }

    .ticket-form-guide {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .ticket-detail-body {
        min-height: 560px;
    }
}

@media (max-width: 560px) {
    .ticket-page-intro {
        padding: 16px 14px;
    }

    .ticket-form-layout {
        padding: 10px;
    }

    .ticket-form-guide {
        grid-template-columns: 1fr;
    }

    .ticket-form-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .ticket-form-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Ticket ekleri ve yetkili araçları, konuşmadan bağımsız ekran çekmecesi. */
.ticket-detail-body {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}

.ticket-tools-toggle {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(52, 152, 219, .34);
    background: rgba(52, 152, 219, .1);
    color: #d9efff;
    font-size: .72rem;
    font-weight: 850;
}

.ticket-tools-toggle:hover,
.ticket-tools-toggle[aria-expanded="true"] {
    border-color: rgba(52, 152, 219, .62);
    background: rgba(52, 152, 219, .18);
    color: #fff;
}

.ticket-tools-toggle b {
    min-width: 19px;
    padding: 2px 5px;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font-size: .64rem;
    text-align: center;
}

.ticket-tools-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    border: 0;
    background: rgba(7, 9, 11, .72);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility 0s linear .2s;
}

.ticket-admin-aside {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9010;
    width: min(420px, calc(100vw - 20px));
    max-width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border-top: 0;
    border-left: 1px solid var(--bg-body);
    background: #1d1f20;
    box-shadow: -24px 0 48px rgba(0, 0, 0, .48);
    transform: translate3d(102%, 0, 0);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
}

.ticket-detail-content.is-tools-open .ticket-tools-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.ticket-detail-content.is-tools-open .ticket-admin-aside {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition-delay: 0s;
}

.ticket-tools-header {
    position: sticky;
    top: 0;
    z-index: 3;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--bg-body);
    background: rgba(36, 37, 38, .97);
    backdrop-filter: blur(8px);
}

.ticket-tools-header > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.ticket-tools-header span {
    color: var(--accent-orange);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ticket-tools-header strong {
    color: var(--text-title);
    font-size: .88rem;
}

.ticket-tools-header button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--control-border);
    background: rgba(255, 255, 255, .035);
    color: var(--muted-light);
}

.ticket-tools-header button:hover {
    border-color: var(--control-border-hover);
    color: #fff;
}

.ticket-admin-aside .ticket-attachments,
.ticket-admin-aside .ticket-video-panel,
.ticket-admin-aside .ticket-staff-panel {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border-bottom-color: var(--bg-body);
}

.ticket-admin-aside .ticket-attachment-grid {
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-admin-aside .ticket-note-list {
    max-height: none;
    overflow: visible;
}

.ticket-admin-aside .ticket-file-picker,
.ticket-admin-aside .ticket-file-picker input,
.ticket-admin-aside .ticket-staff-actions,
.ticket-admin-aside .ticket-staff-actions select,
.ticket-admin-aside .ticket-note-form,
.ticket-admin-aside .ticket-note-form textarea {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ticket-admin-aside .ticket-file-picker input[type="file"] {
    display: block;
    width: 100%;
    padding: 9px;
    overflow: hidden;
    border: 1px solid var(--control-border);
    background: var(--surface);
    color: var(--muted-light);
}

.ticket-admin-aside .ticket-file-picker input[type="file"]::file-selector-button {
    margin-right: 9px;
    padding: 7px 9px;
    border: 1px solid var(--control-border);
    background: var(--surface-2);
    color: var(--text-title);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.ticket-admin-aside .ticket-staff-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-admin-aside .ticket-staff-actions select {
    grid-column: 1 / -1;
}

@media (max-width: 700px) {
    .ticket-detail-actions {
        width: 100%;
    }

    .ticket-tools-toggle {
        order: 5;
    }

    .ticket-admin-aside {
        width: min(390px, 100vw);
    }

    .ticket-admin-aside .ticket-attachment-grid {
        grid-template-columns: 1fr;
    }

    .ticket-admin-aside .ticket-staff-actions {
        grid-template-columns: 1fr;
    }

    .ticket-admin-aside .ticket-staff-actions select {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticket-tools-backdrop,
    .ticket-admin-aside {
        transition: none;
    }
}

@media (max-width: 860px) {
    .profile-side-col {
        width: 100%;
    }
    .profile-details-table .detail-row {
        grid-template-columns: 120px 1fr;
    }
}

.profile-avatar {
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    background: var(--surface-2);
    color: var(--amber);
    font-size: 1.7rem;
    font-weight: 800;
    overflow: hidden;
    border-radius: 50%;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-edit-head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

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

.profile-edit-form .form-grid,
.profile-password-form .profile-password-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-edit-form .form-grid label {
    grid-template-rows: 18px 42px minmax(18px, auto);
    align-content: start;
    line-height: 18px;
}

.profile-edit-form .form-grid input,
.profile-edit-form .form-grid select {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
}

.profile-edit-form .form-grid label small {
    line-height: 18px;
}

.profile-edit-form textarea {
    min-height: 96px;
    resize: vertical;
}

.profile-signature-editor-wrapper {
    overflow: hidden;
}

.profile-signature-toolbar {
    gap: 5px;
}

.profile-signature-toolbar .rtc-color-swatch {
    width: 24px;
    height: 24px;
}

.profile-signature-editor {
    min-height: 118px;
    max-height: 260px;
    resize: none;
    cursor: text;
}

.profile-signature-editor:empty:before {
    content: "İmzanı yaz...";
}

.profile-signature-editor > .tiptap,
.profile-signature-editor > .ProseMirror {
    min-height: 118px;
    outline: none;
}

.file-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-picker input {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .065);
    padding: 10px;
    color: var(--text);
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.file-picker input::file-selector-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}

.file-picker input::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notice,
.status-message {
    min-height: 24px;
    color: var(--amber);
    font-size: .86rem;
}

.verify-box {
    display: grid;
    gap: 10px;
}

.admin-panel {
    display: grid;
    gap: 12px;
}

.admin-approval-list {
    display: grid;
    gap: 8px;
}

.approval-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}

.approval-item strong,
.approval-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.approval-item small {
    color: var(--muted);
    font-size: .78rem;
}

.status-message.is-error {
    color: #ff9b9b;
}

.status-message.is-success {
    color: #a8f5cc;
}

.site-toast-stack {
    position: fixed;
    top: 88px;
    right: 22px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.site-toast {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .085);
    background: linear-gradient(180deg, rgba(28, 33, 39, .98), rgba(15, 18, 22, .98));
    box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
    color: var(--text);
    text-align: left;
    cursor: default;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.site-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.site-toast:hover {
    border-color: rgba(229, 169, 58, .42);
}

.site-toast.is-error {
    border-left: 3px solid #e94b55;
}

.site-toast.is-success {
    border-left: 3px solid #4caf50;
}

.site-toast.is-notification {
    border-left: 3px solid var(--amber);
}

.site-toast-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, .075);
    color: var(--amber);
    font-size: .85rem;
    font-weight: 900;
}

.site-toast.is-error .site-toast-icon {
    color: #ff9b9b;
}

.site-toast.is-success .site-toast-icon {
    color: #a8f5cc;
}

.site-toast-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-toast-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.site-toast-copy small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.site-toast-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.status-grid div {
    padding: 12px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}

.status-grid dt {
    color: var(--muted);
    font-size: .75rem;
}

.status-grid dd {
    margin: 6px 0 0;
    font-weight: 800;
}

/* ============================================================
   TOPBAR – üç kolon yardımcıları
   ============================================================ */
.topbar-search {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.topbar-search .search-box {
    width: 100%;
    max-width: 320px;
    margin-top: 0;
}

.topbar-search .search-box input {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .1);
    transition: border-color .2s, box-shadow .2s;
}

.topbar-search .search-box input:focus {
    border-color: rgba(229, 169, 58, .7);
    box-shadow: 0 0 0 3px rgba(229, 169, 58, .12);
}

.topbar-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    position: relative;
}

/* ============================================================
   HEADER PROFILE BUTTON
   ============================================================ */
.topbar-notification-menu {
    position: relative;
}

.header-ticket-button,
.header-application-button {
    min-width: 100px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .11);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    transition: color .2s, border-color .2s, background .2s;
    border-radius: 4px;
}

.header-ticket-button:hover,
.header-application-button:hover {
    color: #fff;
    border-color: rgba(229, 169, 58, .46);
    background: rgba(229, 169, 58, .08);
}

.header-ticket-button[hidden],
.header-application-button[hidden] {
    display: none !important;
}

.header-notification-button {
    position: relative;
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .11);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    transition: color .2s, border-color .2s, background .2s;
    border-radius: 4px;
}

.header-notification-button:hover,
.header-notification-button[aria-expanded="true"] {
    color: var(--text);
    border-color: rgba(229, 169, 58, .46);
    background: rgba(229, 169, 58, .08);
}

.notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    place-items: center;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--red-2);
    color: #fff;
    font-size: .66rem;
    font-weight: 900;
    line-height: 1;
}

.header-profile-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s, background .2s;
    border-radius: 4px;
}

.header-profile-button:hover {
    border-color: rgba(229, 169, 58, .5);
    background: rgba(229, 169, 58, .07);
}

.header-user-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    background: linear-gradient(135deg, rgba(215, 45, 51, .8), rgba(229, 169, 58, .6));
    color: #fff;
    font-size: .65rem;
    font-weight: 900;
    overflow: hidden;
    border-radius: 50%;
}

.header-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-user-copy {
    display: grid;
    gap: 1px;
    text-align: left;
}

.header-user-copy strong {
    display: block;
    font-size: .88rem;
    white-space: nowrap;
}

.header-user-copy small {
    display: block;
    color: var(--muted);
    font-size: .74rem;
    white-space: nowrap;
}

.account-dropdown,
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(20, 24, 29, .98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
    backdrop-filter: blur(16px);
}

.account-dropdown[hidden],
.notification-dropdown[hidden],
.header-notification-button[hidden] {
    display: none !important;
}

.account-dropdown {
    width: 230px;
    padding: 8px;
}

.account-dropdown button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 700;
    transition: background .16s, color .16s;
}

.account-dropdown button:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.account-dropdown button.is-danger {
    color: #ff9b9f;
}

.account-dropdown button.is-danger:hover {
    background: rgba(215, 45, 51, .14);
    color: #fff;
}

.notification-dropdown {
    width: min(380px, calc(100vw - 32px));
    right: -4px;
    overflow: hidden;
}

.dropdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.dropdown-heading strong {
    font-size: .95rem;
}

.dropdown-heading small {
    display: none;
    color: var(--muted);
    font-size: .72rem;
}

.dropdown-clear-button {
    padding: 7px 9px;
    border: 1px solid rgba(229, 169, 58, .32);
    background: rgba(229, 169, 58, .08);
    color: var(--amber);
    font-size: .72rem;
    font-weight: 800;
    transition: background .16s, border-color .16s, color .16s;
}

.dropdown-clear-button:hover {
    border-color: rgba(229, 169, 58, .6);
    background: rgba(229, 169, 58, .14);
    color: #fff;
}

.notification-list {
    display: grid;
    max-height: 390px;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: transparent;
    color: var(--text);
}

.notification-item:hover {
    background: rgba(229, 169, 58, .07);
}

.notification-open {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.notification-read-button {
    justify-self: end;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
}

.notification-read-button:hover {
    border-color: rgba(63, 207, 142, .45);
    background: rgba(63, 207, 142, .10);
    color: var(--green);
}

.notification-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(215, 45, 51, .8), rgba(229, 169, 58, .55));
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-copy strong {
    color: var(--text);
    font-size: .84rem;
    line-height: 1.28;
}

.notification-copy small {
    color: var(--muted);
    font-size: .72rem;
}

.dropdown-empty {
    padding: 18px 14px;
    color: var(--muted);
    text-align: center;
    font-size: .84rem;
}

/* ============================================================
   HOME HERO + LOGIN-AWARE WELCOME
   ============================================================ */
.home-hero {
    width: 100vw;
    margin-top: -18px;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    overflow: hidden;
}

.site-global-hero {
    margin-top: 0;
}

.app-shell:has(.content-split.is-board-view) > .topbar {
    border-bottom: 0;
    box-shadow: none;
}

.home-banner {
    position: relative;
    width: 100%;
    height: 84px;
    overflow: hidden;
    border: 0;
    background: #101213;
}

.home-banner img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 38%;
}

.home-banner-beacon,
.home-banner-light-sweep,
.home-banner-city-glint {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.home-banner-beacon {
    top: 38%;
    width: clamp(18px, 1.8vw, 36px);
    height: clamp(8px, .7vw, 14px);
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(4px);
}

.home-banner-beacon-blue {
    left: 24.2%;
    background: radial-gradient(ellipse, rgba(105, 190, 255, .95) 0%, rgba(36, 116, 255, .62) 38%, transparent 76%);
    animation: banner-blue-beacon 1.15s ease-in-out infinite;
}

.home-banner-beacon-red {
    left: 26.1%;
    background: radial-gradient(ellipse, rgba(255, 125, 112, .95) 0%, rgba(255, 31, 42, .66) 38%, transparent 76%);
    animation: banner-red-beacon 1.15s ease-in-out infinite;
}

.home-banner-light-sweep {
    top: -35%;
    left: -24%;
    width: clamp(150px, 22vw, 320px);
    height: 170%;
    background: linear-gradient(90deg, transparent, rgba(255, 225, 190, .075), transparent);
    filter: blur(8px);
    transform: skewX(-16deg);
    animation: banner-light-sweep 18s ease-in-out infinite;
}

.home-banner-city-glint {
    z-index: 2;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff0cf;
    box-shadow: 0 0 5px 2px rgba(255, 220, 160, .62), 0 0 12px 4px rgba(255, 158, 79, .24);
    animation: banner-city-twinkle 3.6s ease-in-out infinite;
}

.city-glint-1 { left: 42.8%; top: 57%; animation-delay: -.4s; }
.city-glint-2 { left: 46.1%; top: 73%; animation-delay: -2.1s; }
.city-glint-3 { left: 49.4%; top: 46%; animation-delay: -1.2s; }
.city-glint-4 { left: 52.7%; top: 66%; animation-delay: -2.7s; }
.city-glint-5 { left: 57.8%; top: 38%; animation-delay: -1.8s; }
.city-glint-6 { left: 60.6%; top: 22%; animation-delay: -.8s; }
.city-glint-7 { left: 63.3%; top: 48%; animation-delay: -2.4s; }
.city-glint-8 { left: 66.5%; top: 31%; animation-delay: -1.5s; }
.city-glint-9 { left: 69.4%; top: 58%; animation-delay: -.2s; }
.city-glint-10 { left: 73.1%; top: 42%; animation-delay: -3s; }

@keyframes banner-blue-beacon {
    0%, 100% { opacity: .2; transform: scale(.82); }
    42% { opacity: .9; transform: scale(1.22); }
    64% { opacity: .42; transform: scale(1); }
}

@keyframes banner-red-beacon {
    0%, 100% { opacity: .8; transform: scale(1.16); }
    34% { opacity: .22; transform: scale(.84); }
    58% { opacity: .95; transform: scale(1.22); }
}

@keyframes banner-light-sweep {
    0%, 14% { transform: translateX(0) skewX(-16deg); opacity: 0; }
    20% { opacity: .8; }
    54% { transform: translateX(620%) skewX(-16deg); opacity: .65; }
    60%, 100% { transform: translateX(620%) skewX(-16deg); opacity: 0; }
}

@keyframes banner-city-twinkle {
    0%, 100% { opacity: .28; transform: scale(.75); }
    48% { opacity: .95; transform: scale(1.45); }
}

@media (prefers-reduced-motion: reduce) {
    .home-banner-beacon,
    .home-banner-light-sweep,
    .home-banner-city-glint {
        animation: none;
    }

    .home-banner-beacon-blue { opacity: .3; }
    .home-banner-beacon-red { opacity: .3; }
    .home-banner-light-sweep { display: none; }
    .home-banner-city-glint { opacity: .55; }
}

.home-welcome-panel {
    width: 100%;
    border: 0;
    background: #000;
    color: var(--text-2);
}

.home-welcome-inner {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 4px 19px;
}

.home-welcome-panel p {
    max-width: 1180px;
    margin: 0;
    font-size: .88rem;
    line-height: 1.7;
}

.home-welcome-panel strong {
    color: var(--text-title);
    font-weight: 800;
}

.home-welcome-panel button {
    display: inline;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #ff6a60;
    font-weight: 800;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-welcome-panel button:hover {
    border: 0 !important;
    color: #ff8a82;
}

.home-welcome-character-id {
    display: inline-flex;
    margin-left: 3px;
    padding: 1px 6px;
    background: var(--bg-body);
    color: var(--muted-light);
    font-size: .72rem;
    font-weight: 800;
    vertical-align: 1px;
}

/* ============================================================
   HOME LATEST TOPICS SECTION
   ============================================================ */
.home-latest-section {
    width: min(1160px, 100%);
    margin-right: auto;
    margin-bottom: 24px;
    margin-left: auto;
}

/* Ana sayfadaki kategori kutularını diğer forum ekranlarını etkilemeden daralt. */
.is-board-view .forum-board-section {
    width: min(1160px, 100%);
    margin-right: auto;
    margin-left: auto;
}

/* Masaüstünde son ileti bilgisini kutunun sağ kenarına yaklaştır. */
@media (min-width: 1051px) {
    .is-board-view .forum-board-latest {
        width: 260px;
        justify-self: end;
    }
}

.home-section-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 0 12px;
    border-bottom: 2px solid rgba(215, 45, 51, .55);
    margin-bottom: 0;
}

.home-section-heading h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: .01em;
}

.home-section-heading span {
    color: var(--muted);
    font-size: .82rem;
}

.home-latest-list {
    display: grid;
    border: 1px solid rgba(255, 255, 255, .06);
    border-top: 0;
    background: var(--topic-box-bg);
}

/* Topic card */
.home-topic-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 200px;
    gap: 18px;
    align-items: center;
    min-height: 70px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, .055);
    background: var(--topic-box-bg);
    cursor: pointer;
    transition: background .15s;
}

.home-topic-card:nth-child(even) {
    background: var(--topic-box-bg);
}

.home-topic-card:hover {
    background: var(--topic-box-hover);
}

.home-topic-card:first-child {
    border-top: 0;
}

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

.home-topic-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.home-topic-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.home-topic-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #cdd6e0;
    font-size: .96rem;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s;
}

.home-topic-title:hover {
    color: var(--amber);
}

.home-topic-pin-badge {
    flex: 0 0 auto;
    border: 1px solid rgba(229, 169, 58, .45);
    background: rgba(229, 169, 58, .12);
    color: var(--amber);
    padding: 2px 6px;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.home-topic-main small {
    display: block;
    overflow: hidden;
    color: #8a95a2;
    font-size: .78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-topic-stats {
    display: grid;
    gap: 3px;
    text-align: right;
    color: var(--text);
    font-size: .86rem;
}

.home-topic-stats strong {
    font-weight: 800;
}

.home-topic-stats span {
    color: var(--muted);
    font-size: .76rem;
}

.home-topic-last {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.home-topic-last .post-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.home-topic-last div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.home-topic-last strong,
.home-topic-last span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   HOME COMMUNITY STATS
   ============================================================ */
.home-community-section {
    width: min(1160px, 100%);
    display: grid;
    gap: 8px;
    margin: 18px auto 6px;
}

.home-community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.home-rank-panel,
.home-online-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .065);
    background:
        linear-gradient(180deg, rgba(35, 39, 45, .86), rgba(20, 23, 27, .92)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 20px);
}

.home-rank-panel header,
.home-online-panel header {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .045);
    color: #cbd4de;
    font-size: .92rem;
    font-weight: 900;
    text-align: center;
}

.home-online-panel header {
    justify-content: space-between;
    text-align: left;
}

.home-online-panel h3 {
    margin: 0;
    font-size: .92rem;
}

.home-online-panel header span {
    color: var(--muted);
    font-size: .78rem;
}

.home-rank-list {
    display: grid;
    padding: 4px;
    gap: 2px;
}

.home-rank-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 3px 6px;
    background: rgba(255, 255, 255, .025);
}

.home-rank-row:nth-child(even) {
    background: rgba(255, 255, 255, .045);
}

.home-topic-rank-row {
    cursor: pointer;
}

.home-topic-rank-row:hover {
    background: rgba(229, 169, 58, .10);
}

.home-mini-avatar {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: visible;
    border-radius: 50%;
    background: #343b44;
    color: #d7dee8;
    font-size: .68rem;
    font-weight: 900;
}

.home-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-rank-name {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.home-rank-name a {
    overflow: hidden;
    color: #d7dee8;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 800;
}

.home-rank-name a:hover {
    color: var(--amber);
}

.home-rank-name small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .63rem;
    font-weight: 700;
}

.home-rank-row strong {
    color: #cbd4de;
    font-size: .75rem;
    font-weight: 900;
}

.home-rank-empty {
    padding: 10px;
    color: var(--muted);
    font-size: .82rem;
}

.home-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
}

.home-online-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    padding: 4px 7px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .055);
}

.home-online-user .home-mini-avatar {
    width: 20px;
    height: 20px;
}

.home-online-user a {
    overflow: hidden;
    color: #8fdc95;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 800;
}

/* ============================================================
   TOPIC PIN MODAL
   ============================================================ */
.pin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(3, 5, 8, .72);
    backdrop-filter: blur(8px);
}

.pin-modal {
    width: min(440px, 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.pin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .065);
}

.pin-modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 900;
}

.pin-modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.pin-modal-close {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .09);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
}

.pin-modal-close:hover {
    color: var(--text);
    border-color: rgba(229, 169, 58, .45);
}

.pin-modal-actions {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
}

.pin-option {
    display: grid;
    gap: 4px;
    width: 100%;
    min-height: 66px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .075);
    background: var(--surface);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.pin-option strong {
    font-size: .92rem;
    font-weight: 900;
}

.pin-option span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.pin-option:hover,
.pin-option.is-active {
    border-color: rgba(229, 169, 58, .55);
    background: rgba(229, 169, 58, .105);
}

.pin-option.is-active strong {
    color: var(--amber);
}

.pin-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 18px 18px;
}

.home-topic-last strong {
    color: #edf1f5;
    font-size: .8rem;
}

.home-topic-last span {
    color: #6d7987;
    font-size: .74rem;
}

/* ============================================================
   SIDE PANEL – tamamen gizle
   ============================================================ */
.side-panel--hidden {
    display: none !important;
}

/* ============================================================
   AUTH MODAL (login/register overlay)
   ============================================================ */
.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    animation: fadeIn .18s ease;
}

/* Kullanıcı yönetimi gibi iç içe açılan panellerin de daima üstünde kalır. */
.custom-confirm-backdrop {
    z-index: 10100;
    pointer-events: auto;
}

.custom-confirm-backdrop .auth-modal {
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal {
    width: min(460px, calc(100vw - 32px));
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--surface);
    box-shadow: 0 32px 80px rgba(0,0,0,.7);
    animation: slideUp .22s ease;
}

@keyframes slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.auth-modal-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(215, 45, 51, .3));
}

.auth-modal-close {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    background: transparent;
    color: var(--muted);
    font-size: .9rem;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.auth-modal-close:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, .3);
}

.auth-modal-body {
    padding: 22px 20px 24px;
    display: grid;
    gap: 14px;
}

.auth-modal-body .mode-switch {
    margin-bottom: 8px;
}

.auth-modal-body .auth-form {
    display: grid;
    gap: 12px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1050px) {
    .content-split {
        grid-template-columns: 1fr;
    }

    .forum-board-row {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .forum-board-stats,
    .forum-board-latest {
        grid-column: 2;
    }

    .category-topic-table-head {
        display: none;
    }

    .category-topic-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .category-topic-metrics,
    .category-topic-latest {
        grid-column: 2;
        justify-items: start;
    }

    /* Son konular kartı 2 kolonlu mobil */
    .home-topic-card {
        grid-template-columns: minmax(0, 1fr) 110px;
    }

    .home-topic-last {
        display: none;
    }

    .home-community-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .app-shell {
        width: min(100% - 20px, 1320px);
        padding-top: 0;
    }

    .topbar {
        padding: 8px 12px;
        grid-template-columns: 1fr auto 1fr;
        gap: 10px;
    }

    .topbar-search .search-box span {
        display: none;
    }

    .topbar-search .search-box {
        max-width: 100%;
    }

    .brand-logo {
        height: 44px;
    }

    .home-banner {
        height: 64px;
    }

    .home-topic-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px 14px;
    }

    .home-topic-stats,
    .home-topic-last {
        display: none;
    }

    .home-community-grid {
        grid-template-columns: 1fr;
    }

    .home-rank-panel header,
    .home-online-panel header {
        font-size: .95rem;
    }

    .site-toast-stack {
        top: 74px;
        right: 10px;
        width: calc(100vw - 20px);
    }

    .site-toast-copy strong {
        white-space: normal;
    }

    .content-split {
        min-height: auto;
    }

    .forum-band {
        display: grid;
        padding: 20px;
    }

    .band-stats,
    .toolbar {
        grid-template-columns: 1fr;
    }

    .forum-board-heading {
        min-height: 72px;
    }

    .forum-board-heading::after {
        inset: 0 auto 0 58%;
    }

    .forum-board-heading div {
        padding: 18px 14px;
    }

    .forum-board-row {
        gap: 10px 12px;
        padding: 12px;
    }

    .forum-board-main small {
        margin-top: 8px;
    }

    .category-topic-strip {
        display: grid;
        gap: 8px;
    }

    .category-topic-actions {
        justify-content: stretch;
    }

    .category-topic-actions .primary-action {
        width: 100%;
    }

    .category-topic-strip h3 {
        text-align: left;
    }

    .category-topic-hero {
        padding: 14px;
    }

    .category-topic-row {
        gap: 9px 12px;
        padding: 12px;
    }

    .category-topic-title,
    .category-topic-main small,
    .category-topic-latest strong,
    .category-topic-latest span {
        white-space: normal;
    }

    .topic-title-row {
        display: grid;
    }

    .profile-hero,
    .profile-edit-head,
    .form-grid,
    .profile-fields,
    .profile-stats,
    .user-actions {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        display: grid;
    }

    .profile-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-game-stats-head {
        display: grid;
    }

    .profile-game-citizen {
        width: fit-content;
    }

    .profile-tab-button {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .065);
    }

    .profile-tab-button:last-child {
        border-bottom: 0;
    }

    .profile-activity-item,
    .profile-topic-card {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .profile-activity-avatar {
        display: none;
    }

    .profile-topic-metrics,
    .profile-topic-latest {
        display: none;
    }

    .profile-topic-title-line a {
        white-space: normal;
    }

    /* Auth modal mobil */
    .auth-modal {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        animation: slideUpMobile .22s ease;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    /* Post card mobil – tek kolon */
    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card-left {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .065);
    }

    .post-user-card {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px;
        gap: 10px;
        text-align: left;
    }

    .post-user-avatar {
        width: 44px;
        height: 44px;
    }

    .post-user-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    .post-user-stats div {
        border-top: 0;
        padding: 2px 6px;
        border: 1px solid rgba(255, 255, 255, .08);
        gap: 4px;
    }

    .post-thread-title-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================== TOPIC CREATE VIEW ===================== */
.topic-create-main {
    margin-top: 20px;
    margin-bottom: 40px;
}

.topic-create-container {
    background: var(--surface); /* Dark theme background matching design */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 24px;
}

.rich-topic-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rtc-header .rtc-title-input {
    width: 100%;
    background: var(--surface); /* Slightly lighter for input */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1.4rem;
    padding: 16px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.rtc-header .rtc-title-input:focus {
    border-color: rgba(229, 169, 58, .5);
}

.rtc-editor-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: var(--surface);
    overflow: hidden;
}

.rtc-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rtc-btn,
.rtc-select {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.rtc-btn {
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.rtc-btn-text {
    width: auto;
    min-width: 42px;
    padding: 0 10px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.rtc-select {
    min-width: 112px;
    height: 32px;
    padding: 0 9px;
    outline: none;
    font-size: .78rem;
    font-weight: 800;
}

.rtc-select option {
    background: var(--surface);
    color: var(--text);
}

.rtc-font-select {
    min-width: 148px;
}

.rtc-btn:hover,
.rtc-select:hover,
.rtc-select:focus {
    border-color: rgba(229, 169, 58, .42);
    background: rgba(229, 169, 58, .08);
    color: var(--text);
}

.rtc-btn.is-active,
.rtc-select.is-active {
    border-color: rgba(229, 169, 58, .74);
    background: rgba(229, 169, 58, .16);
    color: #fff3d0;
    box-shadow: inset 0 0 0 1px rgba(229, 169, 58, .18);
}

.rtc-btn.is-active:hover {
    border-color: rgba(229, 169, 58, .95);
    background: rgba(229, 169, 58, .24);
}

.rtc-color-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.rtc-color-swatch {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 5px;
    background: var(--swatch-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .24);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.rtc-color-swatch:hover,
.rtc-color-swatch.is-active {
    border-color: rgba(229, 169, 58, .95);
    box-shadow: 0 0 0 2px rgba(229, 169, 58, .22), inset 0 0 0 1px rgba(0, 0, 0, .28);
    transform: translateY(-1px);
}

.rtc-clear-color {
    min-width: 82px;
}

.rtc-btn svg {
    width: 16px;
    height: 16px;
}

.rtc-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

.rtc-spacer {
    flex: 1;
}

.rtc-textarea {
    width: 100%;
    min-height: 300px;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 16px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    overflow-y: auto;
}

.rtc-textarea.tiptap,
.rtc-textarea.ProseMirror,
.rtc-textarea .tiptap,
.rtc-textarea .ProseMirror {
    outline: none;
}

.rtc-textarea p {
    margin: 0 0 .85em;
}

.rtc-textarea h1,
.rtc-textarea h2,
.rtc-textarea h3 {
    margin: .35em 0;
    line-height: 1.18;
}

.rtc-textarea h1 {
    font-size: 1.9rem;
}

.rtc-textarea h2 {
    font-size: 1.5rem;
}

.rtc-textarea h3 {
    font-size: 1.2rem;
}

.rtc-textarea ul,
.rtc-textarea ol {
    margin: .5em 0;
    padding-left: 1.55rem;
}

.rtc-textarea blockquote {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 3px solid rgba(229, 169, 58, .65);
    background: rgba(229, 169, 58, .08);
    color: var(--text);
}

.rtc-textarea code {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .24);
    color: #f5d179;
}

.rtc-textarea pre {
    margin: 12px 0;
    padding: 12px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .28);
}

.rtc-textarea pre code {
    padding: 0;
    background: transparent;
}

.rtc-textarea a {
    color: #00b0ff;
    text-decoration: underline;
}

.rtc-textarea:empty:before,
.rtc-textarea p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    display: block;
}

.rtc-textarea:empty:before {
    content: "Konu içeriğini buraya yaz...";
}

.rtc-textarea p.is-editor-empty:first-child::before {
    float: left;
    height: 0;
}

.rtc-textarea.profile-signature-editor {
    min-height: 150px;
    max-height: none;
    resize: vertical;
    cursor: text;
}

.rtc-textarea.profile-signature-editor > .tiptap,
.rtc-textarea.profile-signature-editor > .ProseMirror {
    min-height: 150px;
    outline: none;
}

.rtc-textarea.profile-signature-editor:empty:before {
    content: "Imzani yaz...";
}

.rtc-attachment-row {
    display: none;
}

.rtc-attach-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e2e8f0;
    color: #1c1e23;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.rtc-attach-btn:hover {
    background: #cbd5e1;
}

.rtc-options-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
}

.rtc-option-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 16px;
}

.rtc-option-row:has(.rtc-checkboxes) {
    display: none;
}

.rtc-option-label {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.rtc-option-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rtc-tags-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 4px;
    outline: none;
    cursor: text;
    opacity: 1;
}

.rtc-help-text {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.rtc-checkboxes {
    flex-direction: row;
    align-items: center;
}

.rtc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: not-allowed;
}

.rtc-checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: not-allowed;
}

.rtc-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
}

.rtc-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #7c3aed; /* Purple button from screenshot */
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.rtc-submit-btn:hover {
    background: #6d28d9;
}

/* Image Resizer Overlay */
.image-resizer {
    position: absolute;
    border: 2px solid #8e5bd9; /* Purple accent matching Vice CNR */
    pointer-events: none;
    z-index: 1000;
    display: none;
}
.image-resizer.is-active {
    display: block;
}
.image-resizer .resizer-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #8e5bd9;
    border: 1px solid #fff;
    pointer-events: auto;
}
/* 4 corners */
.image-resizer .handle-tl { top: -6px; left: -6px; cursor: nwse-resize; }
.image-resizer .handle-tr { top: -6px; right: -6px; cursor: nesw-resize; }
.image-resizer .handle-bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.image-resizer .handle-br { bottom: -6px; right: -6px; cursor: nwse-resize; }


/* ============================================================
   RINA ROLEPLAY CHAMFERED BOX HEADER (Görsel 1, 2, 3)
   ============================================================ */
.forum-board-heading,
.trend-topics-header,
.subforum-box-header,
.forum-box-header {
    position: relative;
    min-height: 52px;
    background: var(--topic-box-bg);
    border: 1px solid #282c34;
    border-bottom: 1px solid #1f2126;
    padding: 14px 20px;
    /* clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%); */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.forum-board-heading::after,
.forum-box-header::after {
    display: none !important;
}

.forum-board-heading div,
.forum-box-header div {
    position: relative;
    z-index: 1;
    padding: 0;
}

.forum-board-heading h3,
.trend-topics-header h3,
.subforum-box-header h3,
.forum-box-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f5f5f5;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.forum-board-heading p,
.forum-box-header p {
    margin: 4px 0 0;
    color: #7a808c;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ============================================================
   FORUM BOARD ROWS (Görsel 1)
   ============================================================ */
.forum-board-list {
    display: grid;
    border: 1px solid var(--bg);
    border-top: 0;
    background: var(--topic-box-bg);
    margin-bottom: 22px;
    box-shadow: none;
}

.forum-board-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 140px minmax(260px, .72fr);
    gap: 16px;
    align-items: center;
    min-height: 74px;
    padding: 13px 20px;
    border-top: 1px solid #23262d;
    background: var(--topic-box-bg);
    cursor: pointer;
    transition: background 0.15s ease;
}

.forum-board-row:first-child {
    border-top: 0;
}

.forum-board-row:nth-child(even) {
    background: var(--topic-box-bg);
}

.forum-board-row:hover {
    background: var(--topic-box-hover);
}

.forum-board-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
}

.forum-board-main {
    min-width: 0;
}

.forum-board-title {
    display: inline-block;
    color: #e2e5ea;
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1.3;
}

.forum-board-title:hover {
    color: var(--amber);
}

.forum-board-main p {
    margin: 3px 0 0;
    color: #7b818d;
    font-size: 0.8rem;
    line-height: 1.35;
    font-weight: 400;
}

.forum-board-main small {
    display: block;
    margin-top: 7px;
    color: #5f6570;
    font-size: 0.74rem;
    font-weight: 600;
}

.forum-board-main small span {
    color: #888e99;
    cursor: pointer;
    transition: color 0.15s;
}

.forum-board-main small span:hover {
    color: var(--amber);
    text-decoration: underline;
}

.forum-board-stats {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 3px;
    font-size: 0.85rem;
}

.forum-board-stats strong {
    color: #dbe0e7;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.2;
}

.forum-board-stats span {
    color: #707682;
    font-weight: 400;
    font-size: 0.78rem;
    line-height: 1.2;
}

.forum-board-latest {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    font-size: 0.84rem;
}

.forum-board-latest span,
.forum-board-latest a,
.forum-board-latest strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-board-latest span.author-line {
    color: #858b96;
    font-size: 0.82rem;
}

.forum-board-latest a.latest-topic {
    color: #9da3ad;
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.15s;
}

.forum-board-latest a.latest-topic:hover {
    color: var(--amber);
}

.forum-board-latest strong.latest-date {
    color: #616773;
    font-size: 0.75rem;
    font-weight: 500;
}


/* ============================================================
   TREND KONULAR (Görsel 2)
   ============================================================ */
.trend-topics-section {
    margin-bottom: 22px;
}

.home-server-breadcrumb {
    min-height: 36px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--accent-red);
}

.home-server-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 35px;
    padding: 0 2px;
    color: #aab3bd;
    font-size: 0.76rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.home-server-breadcrumb a:hover {
    color: var(--text-title);
}

.home-server-breadcrumb svg {
    flex: 0 0 auto;
    color: #d8dce1;
}

.home-development-notice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 66px;
    box-sizing: border-box;
    margin: 0 0 10px;
    overflow: hidden;
    padding: 7px 12px;
    border: 1px solid var(--accent-red);
    border-radius: 4px;
    background: var(--topic-box-bg);
}

.home-development-copy {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 3px 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.home-development-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffad32;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.home-development-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff9d00;
    box-shadow: 0 0 0 4px rgba(255, 157, 0, 0.12), 0 0 12px rgba(255, 157, 0, 0.55);
    animation: home-development-pulse 2.2s ease-in-out infinite;
}

.home-development-copy h2 {
    margin: 0;
    color: var(--text-title);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.home-development-copy p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted-light);
    font-size: 0.72rem;
    line-height: 1.35;
}

.home-development-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #ffad19;
    border-radius: 5px;
    background: linear-gradient(135deg, #ffad19, #ff7900);
    box-shadow: 0 5px 18px rgba(255, 132, 0, 0.2);
    color: #191919;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.home-development-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 132, 0, 0.3);
    filter: brightness(1.06);
}

.home-development-arrow {
    transition: transform 0.16s ease;
}

.home-development-button:hover .home-development-arrow {
    transform: translate(2px, -2px);
}

@keyframes home-development-pulse {
    50% { box-shadow: 0 0 0 6px rgba(255, 157, 0, 0.06), 0 0 16px rgba(255, 157, 0, 0.7); }
}

@media (prefers-reduced-motion: reduce) {
    .home-development-status i { animation: none; }
    .home-development-button,
    .home-development-arrow { transition: none; }
}

.home-server-join {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 66px;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 9px 12px;
    border: 1px solid var(--accent-red);
    border-radius: 4px;
    background: var(--topic-box-bg);
}

.home-server-join-brand,
.home-server-join-action {
    display: flex;
    align-items: center;
}

.home-server-join-brand {
    min-width: 0;
    gap: 12px;
}

.home-server-join-brand img {
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    animation: home-server-logo-breathe 3.2s ease-in-out infinite;
    transform-origin: center;
}

.home-server-join-brand .home-fivem-logo {
    animation: home-fivem-logo-breathe 3.4s ease-in-out infinite;
}

@keyframes home-server-logo-breathe {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 139, 51, 0));
    }
    50% {
        transform: scale(1.045);
        filter: drop-shadow(0 0 5px rgba(255, 139, 51, 0.34));
    }
}

@keyframes home-fivem-logo-breathe {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(123, 232, 78, 0));
    }
    50% {
        transform: scale(1.045);
        filter: drop-shadow(0 0 5px rgba(123, 232, 78, 0.28));
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-server-join-brand img {
        animation: none;
    }

    .home-server-join-brand .home-fivem-logo {
        animation: none;
    }
}

.home-server-join-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.home-server-join-copy strong {
    color: var(--text-title);
    font-size: 0.9rem;
    font-weight: 800;
}

.home-server-join-copy span {
    color: var(--muted-light);
    font-size: 0.76rem;
}

.home-server-join-action {
    flex: 0 0 auto;
    gap: 14px;
}

.home-server-join-action > span {
    color: var(--text-title);
    font-size: 0.88rem;
    font-weight: 800;
}

.home-server-join-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--accent-orange);
    border-radius: 4px;
    background: var(--accent-orange);
    color: #171717;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.home-server-join-button:hover {
    border-color: var(--accent-orange-hover);
    background: var(--accent-orange-hover);
    color: #111;
    transform: translateY(-1px);
}

.home-youtube-videos {
    width: min(1160px, 100%);
    margin: 0 0 14px;
    margin-right: auto;
    margin-left: auto;
    padding: 10px;
    border: 1px solid #262931;
    background: var(--topic-box-bg);
}

.home-youtube-videos-heading,
.admin-youtube-heading,
.admin-youtube-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.home-youtube-videos-heading { margin-bottom: 8px; }
.home-youtube-videos-heading > div { display: grid; gap: 2px; }
.home-youtube-videos-heading > div > span { color: #ff6b61; font-size: .62rem; font-weight: 900; letter-spacing: .1em; }
.home-youtube-videos-heading h3 { margin: 0; color: var(--text-title); font-size: 1rem; }
.home-youtube-videos-heading > a { color: #ff7770; font-size: .75rem; font-weight: 800; text-decoration: none; }
.home-youtube-videos-heading > a:hover { color: #fff; }

.home-youtube-video-grid {
    display: grid;
    grid-auto-columns: calc((100% - 20px) / 3);
    grid-auto-flow: column;
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #45484d transparent;
    scrollbar-width: thin;
}

.home-youtube-video-grid::-webkit-scrollbar { height: 4px; }
.home-youtube-video-grid::-webkit-scrollbar-track { background: transparent; }
.home-youtube-video-grid::-webkit-scrollbar-thumb { border-radius: 4px; background: #45484d; }
.home-youtube-video-grid::-webkit-scrollbar-thumb:hover { background: #ff6b61; }
.home-youtube-video-card { min-width: 0; overflow: hidden; border: 1px solid var(--bg-body); border-radius: 4px; background: #151617; scroll-snap-align: start; }
.home-youtube-video-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d0e0f; }
.home-youtube-video-media > img,
.home-youtube-video-media > iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.home-youtube-play { position: absolute; inset: 50% auto auto 50%; display: grid; width: 54px; height: 38px; place-items: center; padding: 0; border: 0; border-radius: 11px; background: #f00; color: #fff; cursor: pointer; transform: translate(-50%, -50%); transition: transform .15s ease, background .15s ease; }
.home-youtube-play:hover { background: #d90000; transform: translate(-50%, -50%) scale(1.08); }
.home-youtube-video-copy { display: grid; gap: 4px; padding: 10px 11px 11px; }
.home-youtube-video-copy strong { display: -webkit-box; overflow: hidden; color: var(--text-title); font-size: .8rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-youtube-video-copy span { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 620px) {
    .home-development-notice {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        min-height: 0;
        padding: 13px 12px;
    }

    .home-development-copy { grid-template-columns: 1fr; gap: 5px; }
    .home-development-copy p { grid-column: auto; font-size: 0.76rem; }
    .home-development-button { width: 100%; }

    .home-server-join {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 10px;
    }

    .home-server-join-action {
        width: 100%;
        justify-content: space-between;
    }

    .home-youtube-videos { padding: 8px; }
    .home-youtube-video-grid { grid-auto-columns: 100%; }
    .admin-youtube-heading { flex-direction: column; }
    .admin-youtube-add-form { grid-template-columns: 1fr; }
    .admin-youtube-add-controls { flex-wrap: wrap; }
    .admin-youtube-add-controls input { flex-basis: 100%; }
    .admin-youtube-channel-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .admin-youtube-channel-meta { grid-column: 2 / -1; }
    .admin-youtube-remove-button { grid-column: 3; grid-row: 1; }
}

@media (min-width: 621px) and (max-width: 900px) {
    .home-youtube-video-grid { grid-auto-columns: calc((100% - 10px) / 2); }
}

@media (max-width: 390px) {
    .home-server-join-copy span {
        font-size: 0.7rem;
    }

    .home-server-join-action > span {
        font-size: 0.8rem;
    }

    .home-server-join-button {
        padding-inline: 9px;
    }
}

.trend-topics-header {
    min-height: 34px;
    overflow: hidden;
    padding: 7px 12px;
    border: 0;
    background: transparent;
}

.trend-topics-header::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(520px, 50%);
    background: var(--topic-box-bg);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 100%, 0 100%);
    content: '';
}

.trend-topics-header > div {
    position: relative;
    z-index: 1;
}

.trend-topics-header h3 {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
}

.trend-topics-table {
    border: 1px solid #262931;
    border-top: 1px solid #262931;
    background: var(--topic-box-bg);
    box-shadow: none;
}

.trend-topics-head {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 180px 140px 160px;
    gap: 12px;
    align-items: center;
    min-height: 27px;
    padding: 5px 8px;
    background: var(--topic-box-bg);
    border-bottom: 1px solid #262931;
    color: #808692;
    font-size: 0.76rem;
    font-weight: 700;
}

.trend-topics-head .col-stats,
.trend-topics-head .col-author {
    text-align: center;
}

.trend-topics-head .col-last {
    text-align: right;
}

.trend-topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 180px 140px 160px;
    gap: 12px;
    align-items: center;
    min-height: 32px;
    padding: 6px 8px;
    border-top: 1px solid #23262d;
    background: var(--topic-box-bg);
    transition: background 0.15s;
    position: relative;
    border-left: 0;
}

.trend-topic-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 0;
    background: transparent;
}

.trend-topic-row:first-child {
    border-top: 0;
}

.trend-topic-row:nth-child(even) {
    background: var(--topic-box-bg);
}

.trend-topic-row:hover {
    background: var(--topic-box-hover);
}

.trend-topic-row.accent-orange {
    border-left: 0;
}

.trend-topic-row.accent-orange::before {
    background: #ff9800;
}

.trend-topic-row.accent-red {
    border-left: 0;
}

.trend-topic-row.accent-red::before {
    background: #e74c3c;
}

.trend-topic-row.accent-green {
    border-left: 0;
}

.trend-topic-row.accent-green::before {
    background: #00c853;
}

.trend-topic-row.accent-blue {
    border-left: 0;
}

.trend-topic-row.accent-blue::before {
    background: #3498db;
}

.trend-topic-title {
    color: #e2e5ea;
    font-weight: 700;
    font-size: 0.78rem;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.trend-topic-title:hover {
    color: var(--amber);
}

.trend-topic-stats {
    color: #727883;
    font-size: 0.76rem;
    text-align: center;
    white-space: nowrap;
}

.trend-topic-stats strong {
    color: #fff;
    font-weight: 700;
}

.trend-topic-author {
    font-size: 0.76rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-topic-last {
    color: #858b96;
    font-size: 0.76rem;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-topic-last strong {
    color: #fff;
    font-weight: 600;
}

/* ============================================================
   ALT BÖLÜMLER & CATEGORY TOPIC TABLE (Görsel 3)
   ============================================================ */
.subforum-section {
    margin-bottom: 22px;
}

.subforum-list {
    display: grid;
    border: 1px solid #262931;
    border-top: 0;
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.subforum-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 140px minmax(260px, .72fr);
    gap: 16px;
    align-items: center;
    min-height: 64px;
    padding: 12px 20px;
    border-top: 1px solid #23262d;
    background: var(--surface);
    cursor: pointer;
    transition: background 0.15s;
}

.subforum-row:first-child {
    border-top: 0;
}

.subforum-row:nth-child(even) {
    background: var(--surface);
}

.subforum-row:hover {
    background: var(--surface);
}

.subforum-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid #323742;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #7b8290;
    font-weight: 900;
    font-size: 1.1rem;
    user-select: none;
}

.subforum-badge-icon::after {
    content: '0';
    position: absolute;
    top: -4px;
    right: -4px;
    background: #383e4a;
    color: #b0b7c4;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #484f5e;
}

.category-topic-view {
    display: grid;
    gap: 0;
}

.category-topic-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-topic-brand h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.category-topic-brand small {
    color: var(--muted);
    font-size: 0.82rem;
    display: block;
    margin-top: 2px;
}

.category-topic-table {
    display: grid;
    border: 1px solid #262931;
    border-top: 0;
    background: var(--topic-box-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.category-topic-table-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px minmax(260px, .55fr);
    gap: 16px;
    align-items: center;
    padding: 10px 18px 10px 62px;
    background: var(--topic-box-bg);
    border-bottom: 1px solid #262931;
    color: #808692;
    font-size: 0.84rem;
    font-weight: 700;
}

.category-topic-list {
    display: grid;
}

.category-topic-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 140px minmax(260px, .55fr) 36px;
    gap: 14px;
    align-items: center;
    min-height: 64px;
    padding: 10px 18px;
    border-top: 1px solid #23262d;
    background: var(--topic-box-bg);
    transition: background 0.15s;
    position: relative;
    border-left: 3px solid transparent;
}

.category-topic-row:first-child {
    border-top: 0;
}

.category-topic-row:nth-child(even) {
    background: var(--topic-box-bg);
}

.category-topic-row:hover {
    background: var(--topic-box-hover);
}

.category-topic-row.is-pinned {
    border-left: 3px solid #ff9800;
}

.category-topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #7b818d;
}

.category-topic-row.is-pinned .category-topic-icon {
    color: var(--amber);
}

.category-topic-main {
    min-width: 0;
}

.category-topic-title {
    display: block;
    overflow: hidden;
    color: #e2e5ea;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.category-topic-row.is-pinned .category-topic-title {
    color: #fff;
}

.category-topic-title:hover {
    color: var(--amber);
}

.category-topic-main small {
    display: block;
    margin-top: 3px;
    color: #707682;
    font-size: 0.78rem;
    font-weight: 500;
}

.category-topic-metrics {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 2px;
    font-size: 0.85rem;
}

.category-topic-metrics strong {
    color: #dbe0e7;
    font-weight: 700;
    font-size: 0.86rem;
}

.category-topic-metrics span {
    color: #707682;
    font-weight: 400;
    font-size: 0.78rem;
}

.category-topic-latest {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.category-topic-latest .post-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid #2e333d;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    color: var(--amber);
    font-weight: 800;
}

.category-topic-latest .post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.category-topic-latest div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.category-topic-latest strong {
    color: #616773;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-topic-latest span {
    color: #858b96;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Role Colors */
.user-role-admin,
a[data-user-role="admin"],
.role-admin {
    color: #e53935 !important;
    font-weight: 700;
}

.user-role-moderator,
a[data-user-role="moderator"],
.role-mod {
    color: #00c853 !important;
    font-weight: 700;
}

.user-role-helper,
a[data-user-role="helper"],
.role-helper {
    color: #00b0ff !important;
    font-weight: 700;
}

.user-role-vip,
a[data-user-role="vip"],
.role-vip {
    color: #ff9800 !important;
    font-weight: 700;
}

.profile-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s;
}

.profile-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* Post Cards in Topic Detail */
.post-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    border: 1px solid #282c35;
    background: var(--topic-box-bg);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    margin-bottom: 14px;
}

.post-card-left {
    background: var(--topic-box-bg);
    border-right: 1px solid #242730;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.post-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #2e333d;
    background: var(--surface);
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff9800;
    text-decoration: none;
    transition: border-color .2s;
}

.post-user-avatar:hover {
    border-color: rgba(229, 169, 58, .6);
}

.post-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-card-right {
    display: flex;
    flex-direction: column;
    background: var(--topic-box-bg);
}

.post-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: var(--topic-box-bg);
    border-bottom: 1px solid #242730;
    font-size: 0.8rem;
    color: #7b818d;
}

.post-card-body {
    padding: 20px;
    font-size: 0.94rem;
    line-height: 1.65;
    color: #dde1e7;
    flex: 1;
}

.post-quote {
    background: var(--surface);
    border: 1px solid #262931;
    border-left: 3px solid #ff9800;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 2px;
    font-style: italic;
    color: #b0b7c4;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: var(--topic-box-bg);
    border-top: 1px solid #242730;
}

/* Modals */
.auth-modal {
    background: var(--surface);
    border: 1px solid #2e333d;
    border-radius: 6px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.auth-modal-header {
    background: var(--surface);
    border-bottom: 1px solid #282c35;
}

.image-upload-modal-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.image-upload-picker {
    display: grid;
    min-height: 150px;
    padding: 24px;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 2px dashed rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    color: var(--muted-light);
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s, color .15s;
}

.image-upload-picker:hover,
.image-upload-picker:focus-within {
    border-color: var(--control-border-hover) !important;
    background: var(--control-bg-hover);
    color: var(--text-title);
}

.image-upload-picker strong {
    color: var(--text-title);
    font-size: 1rem;
}

.image-upload-picker span {
    color: var(--muted);
    font-size: .8rem;
}

.image-upload-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.image-upload-status {
    padding: 10px 12px;
    border-radius: 5px;
    background: rgba(123, 183, 255, .1);
    color: #cbe2ff;
    font-size: .84rem;
    line-height: 1.45;
    text-align: center;
}

.image-upload-status[data-state="success"] {
    background: rgba(56, 239, 125, .1);
    color: #83f0ad;
}

.image-upload-status[data-state="error"] {
    background: rgba(255, 92, 92, .1);
    color: #ff9f9f;
}

.image-upload-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
}

.image-upload-divider::before,
.image-upload-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bg-body);
}

.image-upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* Primary buttons */
.primary-action,
.rtc-submit-btn,
.pm-send-button {
    background: linear-gradient(180deg, #ff9800 0%, #e67e22 100%);
    color: #fff;
    border: 1px solid #d35400;
    border-radius: 3px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
    transition: filter 0.15s, transform 0.15s;
}

.primary-action:hover,
.rtc-submit-btn:hover,
.pm-send-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ghost-button,
.header-ticket-button,
.header-application-button {
    background: var(--surface);
    color: #c9d0d8;
    border: 1px solid #2e333d;
    border-radius: 3px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ghost-button:hover,
.header-ticket-button:hover,
.header-application-button:hover {
    background: var(--surface);
    color: #fff;
    border-color: #3e4452;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea {
    background: var(--surface);
    border: 1px solid #2c313a;
    color: #e4e7eb;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 0.88rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
    outline: none;
}
/* Security-header friendly social hover styles (no inline event handlers). */
.topbar-social-link {
    color: var(--muted);
    transition: color 0.2s;
}

.topbar-social-link.is-instagram:hover { color: #e1306c; }
.topbar-social-link.is-youtube:hover { color: #f00; }
.topbar-social-link.is-tiktok:hover { color: #25f4ee; filter: drop-shadow(1px 0 #fe2c55); }
.topbar-social-link.is-discord:hover { color: #5865f2; }

/* Global two-tone theme. Keep photos, logos and status text readable. */
.auth-panel,
.quick-panel,
.forum-band,
.home-rank-panel,
.home-online-panel,
.profile-game-stats,
.profile-activity-item,
.profile-activity-item.is-clickable:hover,
.profile-topic-card,
.profile-topic-card:hover,
.status-item,
.pm-chat-panel,
.ticket-panel,
.ticket-video-panel,
.applications-shell,
.site-toast,
.account-dropdown,
.notification-dropdown {
    background: var(--surface);
}

.auth-modal,
.admin-card,
.admin-user-item {
    background: var(--surface) !important;
}

#adminMain [style*="background: rgba("],
#adminMain [style*="background: #"] {
    background: var(--surface) !important;
}

#adminMain input[style*="background"],
#adminMain select[style*="background"],
#adminUserSearch,
#reportReason {
    background: var(--bg-body) !important;
}

.btn-primary {
    background: var(--bg-body) !important;
    color: var(--text-title) !important;
}

.brand-mark,
.header-user-avatar,
.notification-avatar {
    background: var(--surface);
}

.profile-hero-banner {
    background: var(--bg-body);
}

.profile-game-stat-icon,
.pm-message.is-mine .pm-message-bubble,
.rtc-attach-btn,
.rtc-attach-btn:hover,
.rtc-textarea [data-resize-handle],
.image-resizer .resizer-handle,
.subforum-badge-icon::after {
    background: var(--bg-body);
    color: var(--text-title);
}

.rtc-textarea [data-resize-handle],
.image-resizer .resizer-handle {
    background: var(--muted-light);
}

.primary-action,
.rtc-submit-btn,
.pm-send-button,
.primary-action:hover,
.rtc-submit-btn:hover,
.pm-send-button:hover {
    background: var(--bg-body);
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea,
.rich-editor,
.rtc-textarea,
.post-composer-editor {
    background: var(--bg-body);
}

*,
*::before,
*::after {
    border-color: var(--bg) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Controls need a visible edge even though content-box borders match the page. */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
[role="button"],
.btn,
.ghost-button,
.primary-action,
.rtc-select {
    border-color: var(--control-border) !important;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
[role="button"]:hover,
.btn:hover,
.ghost-button:hover,
.primary-action:hover,
.rtc-select:hover,
.rtc-select:focus {
    border-color: var(--control-border-hover) !important;
}

/* Badges stay flat and borderless across the site. */
.server-pill,
.tag,
.topic-tag-pill,
.post-thread-category,
.post-user-role,
.profile-hero-role,
.role-admin,
.role-mod,
.role-member,
.role-helper,
.role-vip,
.application-status,
.ticket-status,
.notification-badge,
.home-topic-pin-badge,
.subforum-badge-icon,
.subforum-badge-icon::after {
    border: 0 !important;
}

/* Keep every home category title bar aligned to the category list below it. */
.forum-board-section .forum-board-heading {
    width: clamp(380px, 52%, 680px);
    max-width: 100%;
    box-sizing: border-box;
    clip-path: polygon(0 0, calc(100% - 80px) 0, 100% 100%, 0 100%);
}

.forum-board-section .forum-board-heading h3 {
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 800;
}

.forum-board-section .forum-board-heading p {
    margin-top: 4px;
    color: #f1f1f1;
    font-weight: 700;
}

@media (max-width: 760px) {
    .forum-board-section .forum-board-heading {
        width: calc(100% - 16px);
        max-width: none;
        margin-inline: 8px;
        clip-path: polygon(0 0, calc(100% - 48px) 0, 100% 100%, 0 100%);
    }
}

/* Rich login/register presentation. Scoped so other site modals stay unchanged. */
#authModalBackdrop {
    background: rgba(10, 11, 12, .82);
    backdrop-filter: blur(10px);
}

#authModalBackdrop > .auth-modal {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(500px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    overflow: hidden;
    border: 1px solid var(--bg) !important;
    border-radius: 8px;
    background: var(--surface) !important;
}

#authModalBackdrop > .auth-modal::before {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: 3px;
    background: linear-gradient(90deg, #ff4a3d 0 24%, #3a3d42 24% 100%);
    content: "";
}

#authModalBackdrop .auth-modal-header {
    position: relative;
    min-height: 76px;
    padding: 14px 20px;
    overflow: hidden;
    border-bottom: 1px solid var(--bg) !important;
    background: var(--bg) !important;
}

#authModalBackdrop .auth-modal-header::after {
    position: absolute;
    top: -58px;
    right: 58px;
    width: 180px;
    height: 130px;
    background: var(--surface);
    clip-path: polygon(36% 0, 100% 0, 64% 100%, 0 100%);
    content: "";
    opacity: .72;
}

#authModalBackdrop .auth-modal-logo,
#authModalBackdrop .auth-modal-close {
    position: relative;
    z-index: 1;
}

#authModalBackdrop .auth-modal-logo {
    height: 50px;
}

#authModalBackdrop .auth-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--control-border) !important;
    border-radius: 50%;
    background: var(--surface);
    color: #b8bdc5;
}

#authModalBackdrop .auth-modal-close:hover {
    border-color: var(--control-border-hover) !important;
    color: #fff;
}

#authModalBackdrop .auth-modal-body {
    gap: 18px;
    padding: 26px 28px 30px;
    overflow-y: auto;
}

.auth-modal-intro {
    display: grid;
    gap: 5px;
    text-align: center;
}

.auth-modal-kicker {
    color: #ff6a60;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .18em;
}

.auth-modal-intro h2 {
    margin: 0;
    color: #f5f5f5;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.auth-modal-intro p {
    margin: 0;
    color: var(--text-2);
    font-size: .83rem;
}

#authModalBackdrop .mode-switch {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0 0 2px;
    padding: 4px;
    border: 1px solid var(--bg) !important;
    border-radius: 5px;
    background: var(--bg);
}

#authModalBackdrop .mode-switch button {
    position: relative;
    min-height: 42px;
    border: 0 !important;
    border-radius: 3px;
    background: transparent;
    color: #858b94;
    font-size: .82rem;
    font-weight: 800;
    transition: background .18s, color .18s;
}

#authModalBackdrop .mode-switch button::after {
    position: absolute;
    right: 28%;
    bottom: 5px;
    left: 28%;
    height: 2px;
    background: transparent;
    content: "";
}

#authModalBackdrop .mode-switch button.is-active {
    background: var(--surface);
    color: #fff;
}

#authModalBackdrop .mode-switch button.is-active::after {
    background: #ff4a3d;
}

#authModalBackdrop .auth-form {
    gap: 15px;
}

#authModalBackdrop .auth-field {
    gap: 7px;
}

#authModalBackdrop .auth-field-label {
    color: #b8bdc5;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .025em;
}

#authModalBackdrop .auth-input-shell {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--control-border) !important;
    border-radius: 4px;
    background: var(--bg);
    transition: border-color .18s, background .18s;
}

#authModalBackdrop .auth-input-shell:focus-within {
    border-color: #626871 !important;
    background: #1b1c1d;
}

#authModalBackdrop .auth-input-shell svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-left: 15px;
    fill: none;
    stroke: #767d87;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

#authModalBackdrop .auth-input-shell:focus-within svg {
    stroke: #f0f2f5;
}

#authModalBackdrop .auth-input-shell input {
    min-width: 0;
    min-height: 48px;
    padding: 0 14px 0 12px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: #f1f3f5;
}

#authModalBackdrop .auth-input-shell input:focus {
    outline: 0;
}

#authModalBackdrop .auth-input-shell input::placeholder {
    color: #60666f;
}

#authModalBackdrop .status-message:empty {
    display: none;
}

#authModalBackdrop .auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    margin-top: 2px;
    padding: 0 10px 0 18px;
    border: 1px solid var(--control-border-hover) !important;
    border-radius: 4px;
    background: var(--bg) !important;
    color: #fff;
    font-size: .86rem;
    font-weight: 800;
}

#authModalBackdrop .auth-submit span:last-child {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 3px;
    background: var(--surface);
    color: #ff6a60;
    font-size: 1.05rem;
}

#authModalBackdrop .auth-submit:hover {
    border-color: #737984 !important;
    background: #1b1c1d !important;
}

@media (max-width: 760px) {
    #authModalBackdrop > .auth-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 8px 8px 0 0;
    }

    #authModalBackdrop .auth-modal-body {
        padding: 22px 18px 24px;
    }

    #authModalBackdrop .auth-modal-header {
        min-height: 68px;
        padding: 10px 16px;
    }

    #authModalBackdrop .auth-modal-logo {
        height: 44px;
    }
}

/* Profil oyun istatistikleri: vice-scoreboard görünümü */
.profile-game-stats {
    background: var(--surface) !important;
    border: 1px solid var(--bg-body) !important;
    box-shadow: none !important;
    padding: 20px;
}

.profile-game-stats::before {
    display: none;
}

.profile-game-stats-head,
.profile-game-meta,
.profile-game-xp,
.profile-game-stat-groups,
.profile-game-stat-empty {
    position: relative;
    z-index: 1;
}

.profile-game-citizen {
    border-color: var(--bg-body) !important;
    background: var(--bg-body) !important;
    color: var(--text-title) !important;
}

.profile-game-xp {
    margin: 0 0 20px;
    padding: 12px 14px;
    background: var(--bg-body);
    border: 1px solid var(--bg-body);
}

.profile-game-xp-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    color: var(--muted-light);
    font-size: .78rem;
    font-weight: 700;
}

.profile-game-xp-copy strong {
    color: var(--text-title);
    font-size: .78rem;
}

.profile-game-xp-track {
    height: 7px;
    overflow: hidden;
    background: #242526;
}

.profile-game-xp-track > span {
    display: block;
    width: 0;
    height: 100%;
    margin: 0;
    background: #ff6a60;
    transition: width .25s ease;
}

.profile-game-stat-groups {
    display: grid;
    gap: 20px;
}

.profile-game-stat-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    color: var(--text-title);
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.profile-game-stat-group h4 svg {
    width: 17px;
    height: 17px;
    color: var(--muted-light);
}

.profile-game-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    grid-auto-flow: dense;
    gap: 8px;
}

.profile-game-stat-card {
    min-width: 0;
    min-height: 74px;
    background: var(--bg-body) !important;
    border: 1px solid var(--bg-body) !important;
    box-shadow: none !important;
    padding: 11px;
}

.profile-game-stat-card.is-wide {
    grid-column: span 2;
}

.profile-game-stat-card > .profile-game-stat-icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: 0 !important;
    background: var(--surface) !important;
    border: 1px solid var(--surface) !important;
    color: #bfc5ce !important;
}

.profile-game-stat-card > .profile-game-stat-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

.profile-game-stat-card > div {
    min-width: 0;
}

.profile-game-stat-card > div > strong {
    overflow-wrap: anywhere;
    color: var(--text-title);
    font-size: 1rem;
}

.profile-game-stat-card > div > span {
    display: block;
    margin-top: 4px;
    color: var(--muted-light);
    font-size: .73rem;
    font-weight: 650;
}

.profile-game-stat-icon-rank,
.profile-game-stat-icon-bolt,
.profile-game-stat-icon-trophy,
.profile-game-stat-icon-crown,
.profile-game-stat-group-overview h4 svg {
    color: #f2c15b !important;
}

.profile-game-stat-icon-crosshair,
.profile-game-stat-icon-skull,
.profile-game-stat-icon-target,
.profile-game-stat-icon-clock,
.profile-game-stat-group-combat h4 svg {
    color: #ff6a60 !important;
}

.profile-game-stat-icon-handcuffs,
.profile-game-stat-icon-cuffed,
.profile-game-stat-icon-arrest,
.profile-game-stat-icon-shield,
.profile-game-stat-group-law h4 svg {
    color: #72a7ff !important;
}

.profile-game-stat-icon-gang,
.profile-game-stat-icon-gang-rank,
.profile-game-stat-group-gang h4 svg {
    color: #bb8cff !important;
}

@media (max-width: 620px) {
    .profile-game-stats {
        padding: 15px;
    }

    .profile-game-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .profile-game-stat-card {
        align-items: flex-start;
        min-height: 86px;
        padding: 10px;
    }

    .profile-game-stat-card > .profile-game-stat-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .profile-game-xp-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 390px) {
    .profile-game-stat-grid {
        grid-template-columns: 1fr;
    }

    .profile-game-stat-card.is-wide {
        grid-column: span 1;
    }
}

:focus-visible {
    outline: 2px solid var(--muted-light) !important;
    outline-offset: 2px;
}

.brand-logo,
.brand:hover .brand-logo,
.auth-modal-logo {
    filter: none;
}

/* ============================================================
   PROFILE BADGE PROGRESS — COMPACT HORIZONTAL TRACK
   ============================================================ */
.badge-timeline-widget {
    min-width: 0;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--bg);
}

.badge-timeline-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.badge-timeline-heading h3 {
    margin: 0;
    color: var(--text-title);
    font-size: 1.08rem;
    font-weight: 800;
}

.badge-timeline-heading p {
    margin: 4px 0 0;
    color: var(--muted-light);
    font-size: .76rem;
}

.badge-timeline-heading > strong {
    flex: 0 0 auto;
    padding: 7px 10px;
    background: var(--bg);
    color: var(--text-title);
    font-size: .78rem;
    font-weight: 900;
}

.badge-timeline {
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 4px 2px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-color: #45484d var(--bg);
    scrollbar-width: thin;
}

.badge-timeline::-webkit-scrollbar {
    height: 6px;
}

.badge-timeline::-webkit-scrollbar-track {
    background: var(--bg);
}

.badge-timeline::-webkit-scrollbar-thumb {
    background: #45484d;
}

.badge-timeline-item {
    position: relative;
    flex: 0 0 142px;
    min-height: 112px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 12px 10px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--bg);
    background: var(--surface);
    text-align: center;
}

.badge-timeline-item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--badge-color);
    opacity: 0;
}

.badge-timeline-item.is-current::before {
    opacity: 1;
}

.badge-timeline-item.is-current {
    background: color-mix(in srgb, var(--surface) 90%, var(--badge-color));
}

.badge-timeline-item.is-locked {
    opacity: .42;
}

.badge-timeline-item.is-locked .badge-timeline-icon {
    filter: grayscale(1);
}

.badge-timeline-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    background: var(--bg);
    border-radius: 50%;
}

.badge-timeline-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.badge-timeline-copy strong {
    overflow: hidden;
    color: var(--text-title);
    font-size: .76rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-timeline-copy span {
    color: var(--muted-light);
    font-size: .68rem;
    font-weight: 750;
}

@media (max-width: 620px) {
    .badge-timeline-widget {
        margin-top: 18px;
        padding-top: 14px;
    }

    .badge-timeline-heading {
        align-items: flex-start;
    }

    .badge-timeline-heading p {
        max-width: 230px;
    }

    .badge-timeline-item {
        flex-basis: 126px;
        min-height: 104px;
        padding: 10px 8px;
    }
}

/* ============================================================
   ADMIN CENTER — ROLE FOUNDATION & USER MANAGEMENT
   ============================================================ */
.admin-main {
    width: 100%;
    padding: 28px clamp(16px, 3vw, 38px) 52px;
}

.admin-shell {
    width: min(1380px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.admin-dashboard-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 132px;
    padding: 26px 28px 26px 34px;
    overflow: hidden;
    background: linear-gradient(105deg, rgba(255, 152, 0, .11), transparent 42%), var(--surface);
    border: 1px solid var(--bg-body);
}

.admin-dashboard-header::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #ff4d4d, #ff9800);
}

.admin-eyebrow,
.admin-card-kicker {
    display: block;
    color: #ff9f1a;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.admin-dashboard-header h2 {
    margin: 5px 0 3px;
    color: var(--text-title);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.admin-dashboard-header p,
.admin-users-heading p {
    margin: 0;
    color: var(--muted-light);
    font-size: .86rem;
}

.admin-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-refresh-button,
.admin-save-button,
.admin-manage-user-button,
.admin-danger-button,
.admin-success-button {
    min-height: 38px;
    border: 1px solid var(--control-border);
    border-radius: 4px;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.admin-refresh-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: var(--text-title);
    background: #18191a;
}

.admin-refresh-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-refresh-button:hover,
.admin-manage-user-button:hover {
    border-color: #ff9800;
    background: #202124;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-summary-card {
    position: relative;
    min-height: 118px;
    padding: 18px 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--bg-body);
}

.admin-summary-card::after {
    content: '';
    position: absolute;
    right: -18px;
    bottom: -28px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: currentColor;
    opacity: .045;
}

.admin-summary-card > span,
.admin-summary-card > small { display: block; }
.admin-summary-card > span { color: var(--muted-light); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.admin-summary-card > strong { display: block; margin: 7px 0 3px; color: var(--text-title); font-size: 1.7rem; line-height: 1; }
.admin-summary-card > small { color: var(--muted); font-size: .72rem; }
.admin-summary-card.is-members { color: #51a8ff; }
.admin-summary-card.is-pending { color: #ffad33; }
.admin-summary-card.is-reports { color: #ff5b62; }
.admin-summary-card.is-staff { color: #56d982; }

.admin-role-overview,
.admin-card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--bg-body);
}

.admin-card-heading,
.admin-users-heading,
.admin-user-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.admin-card-heading { margin-bottom: 16px; }
.admin-card-heading h3,
.admin-users-heading h3,
.admin-user-editor-head h3,
.admin-ban-panel h4 { margin: 3px 0 0; color: var(--text-title); font-size: 1rem; }
.admin-card-heading > small { max-width: 480px; color: var(--muted); font-size: .76rem; text-align: right; }

.admin-role-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.staff-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 4px 9px;
    border: 0 !important;
    border-radius: 3px;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-trial-guide { color: #9be9ff !important; background: rgba(31, 181, 219, .14) !important; }
.role-guide { color: #71b7ff !important; background: rgba(52, 152, 219, .15) !important; }
.role-moderator,
.role-mod { color: #71df95 !important; background: rgba(0, 200, 83, .14) !important; }
.role-admin { color: #ff7b80 !important; background: rgba(229, 57, 53, .15) !important; }
.role-manager { color: #c799ff !important; background: rgba(155, 89, 182, .18) !important; }
.role-founder { color: #ffd36a !important; background: rgba(255, 152, 0, .17) !important; }
.role-member { color: #a9adb5 !important; background: rgba(255, 255, 255, .06) !important; }

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-dashboard-grid > .admin-card { min-height: 230px; }
.admin-dashboard-grid .admin-approval-list,
.admin-dashboard-grid .admin-reports-list,
.admin-dashboard-grid .admin-applications-list { max-height: 360px; overflow: auto; scrollbar-width: thin; }

.admin-approvals-card {
    grid-column: 1 / -1;
    min-height: 0 !important;
}

.admin-dashboard-grid .admin-approvals-card .admin-approval-list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9px;
    overflow: visible;
}

.admin-approvals-card .empty-state {
    grid-column: 1 / -1;
}

.admin-approvals-card .approval-item {
    min-width: 0;
    min-height: 76px;
    box-sizing: border-box;
    padding: 12px 13px;
}

.approval-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.approval-user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 50%;
    background: #343b44;
    color: #d7dee8;
    font-size: .72rem;
    font-weight: 900;
}

.approval-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.approval-user-copy {
    min-width: 0;
}

.admin-dashboard-grid .admin-applications-card .admin-applications-list {
    max-height: 372px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding-right: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.admin-applications-card .admin-application-row {
    min-height: 68px;
    box-sizing: border-box;
}

.admin-reports-card {
    grid-column: 1 / -1;
    min-height: 0 !important;
}

.admin-reports-card .admin-card-heading {
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bg-body);
}

.admin-reports-card .admin-card-heading p {
    max-width: 620px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
}

.admin-dashboard-grid .admin-reports-card .admin-reports-list {
    max-height: none;
    display: grid;
    gap: 12px;
    overflow: visible;
}

.admin-report-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--bg-body);
    border-radius: 4px;
    background: #1d1f20;
}

.admin-report-item.is-missing {
    opacity: .82;
}

.admin-report-head,
.admin-report-meta,
.admin-report-content-head,
.admin-report-footer {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-report-head {
    padding: 12px 14px;
    background: #242526;
    border-bottom: 1px solid var(--bg-body);
}

.admin-report-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-report-identity strong {
    overflow: hidden;
    color: var(--text-title);
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-report-order,
.admin-report-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: .65rem;
    font-weight: 900;
    white-space: nowrap;
}

.admin-report-order {
    color: #ffb74d;
    background: rgba(255, 152, 0, .12);
}

.admin-report-state {
    color: #ff858a;
    background: rgba(229, 57, 53, .13);
}

.admin-report-meta {
    justify-content: flex-start;
    padding: 13px 14px;
    border-bottom: 1px solid var(--bg-body);
}

.admin-report-meta-block {
    min-width: 180px;
    display: grid;
    gap: 6px;
}

.admin-report-meta-block + .admin-report-meta-block {
    padding-left: 16px;
    border-left: 1px solid var(--bg-body);
}

.admin-report-label {
    display: block;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.admin-report-person {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-title);
    font-size: .8rem;
    font-weight: 850;
}

.admin-report-person .home-mini-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.admin-report-person a {
    overflow: hidden;
    color: var(--text-title);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-report-meta time {
    color: var(--muted-light);
    font-size: .76rem;
    font-weight: 750;
}

.admin-report-reason,
.admin-report-content {
    min-width: 0;
    margin: 12px 14px 0;
    padding: 13px 14px;
    border-radius: 3px;
}

.admin-report-reason {
    border-left: 3px solid #e53935;
    background: rgba(229, 57, 53, .075);
}

.admin-report-reason .admin-report-label {
    color: #ff858a;
}

.admin-report-reason p {
    margin: 6px 0 0;
    color: var(--text-title);
    font-size: .85rem;
    font-weight: 750;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.admin-report-content {
    background: #242526;
}

.admin-report-content-head {
    align-items: flex-start;
    margin-bottom: 10px;
}

.admin-report-content-head > div:first-child {
    display: grid;
    gap: 4px;
}

.admin-report-content-head strong {
    color: var(--text-title);
    font-size: .82rem;
}

.admin-report-author {
    min-width: 0;
    display: grid;
    justify-items: end;
    gap: 4px;
}

.admin-report-content blockquote {
    margin: 0;
    padding: 11px 12px;
    border: 0;
    border-left: 2px solid rgba(255, 255, 255, .1);
    background: #18191a;
    color: var(--muted-light);
    font-size: .8rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.admin-report-missing-label {
    color: #ff9a9d;
    font-size: .72rem;
    font-weight: 800;
}

.admin-report-footer {
    align-items: center;
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, .12);
    border-top: 1px solid var(--bg-body);
}

.admin-report-footer > p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.45;
}

.admin-report-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.admin-report-open-link,
.admin-report-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid var(--control-border);
    border-radius: 3px;
    font: inherit;
    font-size: .72rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.admin-report-open-link {
    color: #b9ddff;
    background: rgba(52, 152, 219, .1);
    border-color: rgba(52, 152, 219, .3);
}

.admin-report-action.is-danger {
    color: #ff9a9d;
    background: rgba(229, 57, 53, .1);
    border-color: rgba(229, 57, 53, .3);
}

.admin-report-action.is-resolve {
    color: #83e5a2;
    background: rgba(0, 200, 83, .09);
    border-color: rgba(0, 200, 83, .28);
}

.admin-report-open-link:hover,
.admin-report-action:hover {
    filter: brightness(1.2);
    color: #fff;
}

@media (max-width: 700px) {
    .admin-dashboard-grid .admin-approvals-card .admin-approval-list {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-grid .admin-applications-card .admin-applications-list {
        max-height: 520px;
    }

    .admin-report-head,
    .admin-report-meta,
    .admin-report-content-head,
    .admin-report-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-report-head {
        gap: 8px;
    }

    .admin-report-state {
        align-self: flex-start;
    }

    .admin-report-meta-block {
        min-width: 0;
    }

    .admin-report-meta-block + .admin-report-meta-block {
        padding-top: 11px;
        padding-left: 0;
        border-top: 1px solid var(--bg-body);
        border-left: 0;
    }

    .admin-report-author {
        justify-items: start;
    }

    .admin-report-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
}

.admin-count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    min-height: 25px;
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    color: #ffb74d;
    background: rgba(255, 152, 0, .12);
    font-size: .72rem;
    font-weight: 900;
}

.admin-count-badge.is-danger { color: #ff858a; background: rgba(229, 57, 53, .13); }

.admin-users-card { padding: 0; overflow: hidden; }

.admin-youtube-panel {
    margin: 14px 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 46, 46, .28);
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(92, 24, 24, .14), transparent 48%), var(--surface);
}

.admin-youtube-panel[hidden] { display: none; }
.admin-youtube-heading { align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--bg-body); }
.admin-youtube-heading-copy { min-width: 0; }
.admin-youtube-heading-copy h3 { margin: 3px 0 5px; color: var(--text-title); font-size: 1.1rem; }
.admin-youtube-heading-copy p { margin: 0; color: var(--muted); font-size: .78rem; }
.admin-youtube-heading-copy code { padding: 2px 5px; border-radius: 3px; background: rgba(255, 255, 255, .06); color: #ff9a91; }
.admin-youtube-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(86, 217, 130, .2); border-radius: 4px; background: rgba(86, 217, 130, .07); color: #88d9a2; font-size: .7rem; font-weight: 700; }
.admin-youtube-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #56d982; box-shadow: 0 0 8px rgba(86, 217, 130, .6); }
.admin-youtube-add-form { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr); align-items: end; gap: 14px; padding: 16px 0; }
.admin-youtube-add-form > label { display: grid; gap: 5px; }
.admin-youtube-add-form > label > span { color: var(--text-title); font-size: .78rem; font-weight: 800; }
.admin-youtube-add-form > label > small { color: var(--muted); font-size: .68rem; line-height: 1.45; }
.admin-youtube-add-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-youtube-add-controls input { min-width: 0; flex: 1 1 auto; height: 40px; }
.admin-youtube-add-button,
.admin-youtube-sync-button,
.admin-youtube-remove-button { min-height: 38px; padding: 0 13px; border: 1px solid #41444a; border-radius: 4px; color: var(--text-title); font-size: .74rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.admin-youtube-add-button { border-color: #d9232e; background: #d9232e; color: #fff; }
.admin-youtube-add-button:hover { border-color: #f13d47; background: #f13d47; }
.admin-youtube-sync-button { background: rgba(255, 255, 255, .04); }
.admin-youtube-sync-button:hover { border-color: #657183; background: rgba(255, 255, 255, .08); }
.admin-youtube-add-button:disabled,
.admin-youtube-sync-button:disabled,
.admin-youtube-remove-button:disabled { opacity: .55; cursor: wait; }
.admin-youtube-list-heading { margin: 0 0 8px; padding-top: 14px; border-top: 1px solid var(--bg-body); }
.admin-youtube-list-heading strong { color: var(--text-title); font-size: .8rem; }
.admin-youtube-list-heading > span { color: var(--muted); font-size: .7rem; }
.admin-youtube-channel-list { display: grid; gap: 7px; }
.admin-youtube-channel-row { display: grid; grid-template-columns: 36px minmax(130px, 1fr) minmax(180px, .9fr) auto; align-items: center; gap: 11px; min-width: 0; padding: 10px 11px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 4px; background: rgba(0, 0, 0, .12); }
.admin-youtube-channel-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 4px; background: rgba(255, 0, 0, .12); color: #ff5757; }
.admin-youtube-channel-copy { display: grid; min-width: 0; gap: 3px; }
.admin-youtube-channel-copy strong { overflow: hidden; color: var(--text-title); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-youtube-channel-copy a { overflow: hidden; color: var(--muted); font-size: .66rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.admin-youtube-channel-copy a:hover { color: #ff8a80; }
.admin-youtube-channel-meta { display: grid; min-width: 0; gap: 3px; }
.admin-youtube-channel-meta strong { color: #e5e7eb; font-size: .7rem; }
.admin-youtube-channel-meta span { overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-youtube-remove-button { min-height: 31px; padding: 0 10px; border-color: rgba(255, 91, 98, .25); background: rgba(255, 91, 98, .08); color: #ff8589; font-size: .68rem; }
.admin-youtube-remove-button:hover { border-color: rgba(255, 91, 98, .55); background: rgba(255, 91, 98, .16); }
.admin-youtube-empty { display: grid; gap: 4px; padding: 18px; border: 1px dashed rgba(255, 255, 255, .1); border-radius: 4px; text-align: center; }
.admin-youtube-empty strong { color: var(--text-title); font-size: .78rem; }
.admin-youtube-empty span { color: var(--muted); font-size: .7rem; }
.admin-users-heading { align-items: center; padding: 20px; background: color-mix(in srgb, var(--surface) 95%, white); }

.admin-user-filters {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) minmax(135px, .7fr) minmax(125px, .6fr);
    gap: 8px;
    width: min(670px, 62%);
}

.admin-user-filters input,
.admin-user-filters select,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-ban-panel input,
.admin-ban-panel select,
.admin-ban-panel textarea {
    width: 100%;
    border: 1px solid var(--control-border) !important;
    border-radius: 3px;
    outline: 0;
    background: #18191a !important;
    color: var(--text-title);
    font: inherit;
}

.admin-user-filters input,
.admin-user-filters select { height: 38px; padding: 0 11px; font-size: .76rem; }
.admin-user-filters input:focus,
.admin-user-filters select:focus,
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus,
.admin-ban-panel input:focus,
.admin-ban-panel select:focus,
.admin-ban-panel textarea:focus { border-color: #ff9800 !important; }

.admin-user-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 420px;
}

.admin-user-workspace.has-editor { grid-template-columns: minmax(380px, 1fr) minmax(400px, 520px); }

.admin-users-list {
    display: grid;
    align-content: start;
    max-height: 720px;
    overflow: auto;
    scrollbar-width: thin;
}

.admin-user-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 12px 16px;
    border-top: 1px solid var(--bg-body);
    transition: background .16s ease;
}

.admin-user-row:first-child { border-top: 0; }
.admin-user-row:hover,
.admin-user-row.is-selected { background: rgba(255, 255, 255, .025); }
.admin-user-row.is-manageable { cursor: pointer; }
.admin-user-row.is-manageable:focus-visible {
    outline: 1px solid #ff9800;
    outline-offset: -2px;
    background: rgba(255, 152, 0, .045);
}
.admin-user-row.is-selected::before { content: ''; position: absolute; inset: 12px auto 12px 0; width: 3px; background: #ff9800; }

.admin-user-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.admin-user-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #18191a;
    color: var(--text-title);
    font-size: .72rem;
    font-weight: 900;
}

.admin-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-user-identity strong,
.admin-user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity strong { color: var(--text-title); font-size: .86rem; }
.admin-user-identity small { margin-top: 3px; color: var(--muted); font-size: .7rem; }

.admin-user-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-meta > small { color: var(--muted); font-size: .7rem; }
.admin-account-state { position: relative; padding-left: 12px; color: var(--muted-light); font-size: .7rem; font-weight: 800; }
.admin-account-state::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #00c853; transform: translateY(-50%); }
.admin-account-state.is-banned { color: #ff8b8f; }
.admin-account-state.is-banned::before { background: #e53935; }

.admin-manage-user-button { min-width: 68px; padding: 0 12px; color: var(--text-title); background: #18191a; }

.admin-user-editor {
    border-left: 1px solid var(--bg-body);
    background: #202122;
}

.admin-user-editor[hidden] { display: none !important; }
.admin-user-editor-head { align-items: center; padding: 18px 20px; background: #242526; border-bottom: 1px solid var(--bg-body); }

.admin-editor-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--control-border);
    border-radius: 3px;
    background: #18191a;
    color: var(--muted-light);
    font-size: 1.25rem;
    cursor: pointer;
}

.admin-user-edit-form { padding: 20px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-form-grid label { display: grid; align-content: start; gap: 6px; color: var(--muted-light); font-size: .69rem; font-weight: 800; }
.admin-form-grid label.is-wide { grid-column: 1 / -1; }
.admin-form-grid input,
.admin-form-grid select { height: 37px; padding: 0 10px; font-size: .78rem; }
.admin-form-grid textarea,
.admin-ban-panel textarea { min-height: 70px; padding: 9px 10px; resize: vertical; font-size: .78rem; }

.admin-switch-field { grid-template-columns: 18px minmax(0, 1fr) !important; align-items: center !important; gap: 8px !important; min-height: 32px; }
.admin-switch-field input { width: 16px; height: 16px; accent-color: #ff9800; }

.admin-save-button { width: 100%; margin-top: 14px; color: #171717; background: #ff9800; border-color: #ff9800; }
.admin-save-button:hover { background: #ffab2e; }

.admin-password-panel {
    display: grid;
    gap: 12px;
    margin: 0 20px 20px;
    padding: 16px;
    background: #1d1e1f;
    border: 1px solid var(--bg-body);
}

.admin-password-form {
    display: grid;
    gap: 10px;
}

.admin-password-form label {
    display: grid;
    gap: 6px;
    color: var(--muted-light);
    font-size: .72rem;
    font-weight: 750;
}

.admin-password-panel input,
.admin-password-form input {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid var(--bg-body);
    background: #242526;
    color: var(--text-title);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.admin-password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-password-actions .ghost-button,
.admin-password-actions .admin-danger-button {
    width: auto;
    min-height: 38px;
    margin: 0;
}

.admin-ban-panel {
    display: grid;
    gap: 11px;
    margin: 0 20px 20px;
    padding: 16px;
    background: rgba(229, 57, 53, .055);
    border: 1px solid rgba(229, 57, 53, .2);
}

.admin-ban-panel p { margin: 0; color: var(--muted-light); font-size: .75rem; line-height: 1.5; }
.admin-ban-controls { display: grid; grid-template-columns: 72px 92px minmax(130px, 1fr); gap: 8px; }
.admin-ban-controls input,
.admin-ban-controls select { min-height: 37px; padding: 0 8px; }
.admin-danger-button,
.admin-success-button { padding: 0 12px; }
.admin-danger-button { color: #ff9a9d; background: rgba(229, 57, 53, .12); border-color: rgba(229, 57, 53, .38); }
.admin-success-button { color: #83e5a2; background: rgba(0, 200, 83, .1); border-color: rgba(0, 200, 83, .32); }

.admin-main .approval-item,
.admin-main .admin-application-row,
.admin-main .admin-user-item {
    border-color: var(--bg-body) !important;
    background: rgba(0, 0, 0, .09) !important;
}

@media (max-width: 1050px) {
    .admin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-user-workspace.has-editor { grid-template-columns: 1fr; }
    .admin-user-editor { border-left: 0; border-top: 1px solid var(--bg-body); }
}

@media (max-width: 760px) {
    .admin-main { padding: 16px 10px 36px; }
    .admin-dashboard-header,
    .admin-users-heading { align-items: stretch; flex-direction: column; }
    .admin-dashboard-actions { justify-content: space-between; }
    .admin-summary-grid,
    .admin-dashboard-grid { grid-template-columns: 1fr; }
    .admin-user-filters { width: 100%; grid-template-columns: 1fr; }
    .admin-user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
    .admin-user-meta { grid-column: 1 / -1; justify-content: flex-start; padding-left: 53px; }
    .admin-manage-user-button { grid-column: 2; grid-row: 1; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-form-grid label.is-wide { grid-column: auto; }
    .admin-ban-controls { grid-template-columns: 1fr 1fr; }
    .admin-ban-controls button { grid-column: 1 / -1; }
}

/* Kullanıcı düzenleme ekranı: sayfayı bölmez, bağımsız modal olarak açılır. */
body.admin-user-modal-open { overflow: hidden; }

.admin-user-workspace.has-editor { grid-template-columns: minmax(0, 1fr); }

.admin-user-editor {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 34px);
    overflow: auto;
    border: 0;
    background: rgba(9, 10, 11, .86);
    backdrop-filter: blur(5px);
}

.admin-user-editor-dialog {
    width: min(940px, 100%);
    max-height: calc(100vh - clamp(28px, 6vw, 68px));
    overflow: auto;
    background: #202122;
    border: 1px solid #34363a;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
    scrollbar-width: thin;
}

.admin-user-editor .admin-user-editor-head {
    position: sticky;
    top: 0;
    z-index: 2;
}

.admin-user-editor .admin-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-user-editor .admin-form-grid label.is-wide {
    grid-column: span 3;
}

.admin-user-editor .admin-ban-panel {
    margin-top: 2px;
}

.admin-game-panel {
    margin: 2px 20px 20px;
    padding: 18px;
    background: #1d1e1f;
    border: 1px solid var(--bg-body);
}

.admin-game-panel-head,
.admin-game-block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-game-panel-head h4,
.admin-game-block-title strong {
    margin: 2px 0 0;
    color: var(--text-title);
}

.admin-game-account-meta,
.admin-game-block-title small {
    color: var(--muted);
    font-size: .72rem;
}

.admin-game-account-meta {
    margin: 8px 0 16px;
}

.admin-game-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
}

.admin-game-status.is-ready { color: #67d391; background: rgba(55, 180, 105, .12); }
.admin-game-status.is-error { color: #ff7777; background: rgba(255, 72, 72, .12); }

.admin-game-block,
.admin-game-actions-log {
    display: grid;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--bg-body);
}

.admin-game-block label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .72rem;
}

.admin-game-block input,
.admin-game-block select {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    background: #242526;
    border: 1px solid var(--bg-body);
    color: var(--text-title);
}

.admin-game-fields {
    display: grid;
    gap: 10px;
}

.admin-game-fields.is-two-column,
.admin-game-fields.is-jail-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-game-fields.is-money-row { grid-template-columns: .8fr .9fr 1.3fr; }
.admin-game-block .admin-save-button,
.admin-game-block .admin-danger-button { justify-self: start; }
.admin-game-block.is-danger-zone { background: rgba(255, 72, 72, .025); }

.admin-game-actions-list {
    display: grid;
    gap: 7px;
}

.admin-game-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    padding: 9px 10px;
    background: #242526;
}

.admin-game-action-row strong { color: var(--text-title); font-size: .73rem; }
.admin-game-action-row small { color: var(--muted); font-size: .66rem; }
.admin-game-action-state { font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.admin-game-action-state.is-completed { color: #67d391; }
.admin-game-action-state.is-failed { color: #ff7777; }
.admin-game-action-state.is-pending,
.admin-game-action-state.is-processing { color: #f0b44d; }

@media (max-width: 780px) {
    .profile-password-heading { flex-direction: column; }
    .profile-edit-form .form-grid,
    .profile-password-form .profile-password-grid { grid-template-columns: 1fr; }

    .admin-user-editor {
        place-items: start center;
        padding: 10px;
    }

    .admin-user-editor-dialog {
        max-height: calc(100vh - 20px);
    }

    .admin-user-editor .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-editor .admin-form-grid label.is-wide {
        grid-column: auto;
    }

    .admin-game-fields.is-two-column,
    .admin-game-fields.is-jail-row,
    .admin-game-fields.is-money-row { grid-template-columns: 1fr; }
}

/* ============================================================
   SHARED TOOL / CONFIRM MODALS
   ============================================================ */
#cropModalBackdrop,
#modalLinkInsertBackdrop,
#modalImageInsertBackdrop,
#badgeModalBackdrop,
#reportModalBackdrop,
#customConfirmBackdrop {
    background: rgba(7, 8, 9, .84);
    backdrop-filter: blur(9px);
}

.tool-modal {
    position: relative;
    width: min(500px, calc(100vw - 28px));
    max-height: calc(100vh - 32px);
    overflow: hidden auto;
    border: 1px solid #34373d !important;
    border-radius: 8px;
    background: var(--surface) !important;
}

.tool-modal--compact { width: min(440px, calc(100vw - 28px)); }
.tool-modal--medium { width: min(540px, calc(100vw - 28px)); }
.tool-modal--wide { width: min(820px, calc(100vw - 28px)); }

.tool-modal::before {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    height: 3px;
    background: linear-gradient(90deg, #ff4a3d 0 34%, #ff9800 34% 58%, #34373d 58% 100%);
    content: "";
}

.tool-modal > .auth-modal-header {
    min-height: 66px;
    padding: 17px 20px 15px;
    border-bottom: 1px solid var(--bg-body) !important;
    background: #202122;
}

.tool-modal > .auth-modal-header h3 {
    margin: 0;
    color: var(--text-title);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.015em;
}

.tool-modal > .auth-modal-header .auth-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--control-border) !important;
    border-radius: 4px;
    background: #18191a;
    color: #9ba1ad;
    font-size: 1rem;
    font-weight: 700;
}

.tool-modal > .auth-modal-header .auth-modal-close:hover {
    border-color: #ff675f !important;
    background: rgba(229, 57, 53, .12);
    color: #ff837d;
}

.tool-modal-body,
.tool-modal > .auth-modal-body {
    gap: 18px;
    padding: 20px;
}

.tool-modal .auth-form {
    gap: 16px;
}

.tool-modal .input-group {
    display: grid;
    gap: 7px;
}

.tool-modal .input-group > label {
    color: #aeb4bd;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .035em;
}

.tool-modal .input-group input,
.tool-modal .input-group select,
.tool-modal .input-group textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--control-border) !important;
    border-radius: 4px;
    background: #18191a !important;
    color: var(--text-title);
    caret-color: #ff9800;
}

.tool-modal .input-group textarea {
    min-height: 112px;
    resize: vertical;
}

.tool-modal .input-group input::placeholder,
.tool-modal .input-group textarea::placeholder {
    color: #646a73;
}

.tool-modal .input-group input:focus,
.tool-modal .input-group select:focus,
.tool-modal .input-group textarea:focus {
    border-color: #ff9800 !important;
    outline: 2px solid rgba(255, 152, 0, .16) !important;
    outline-offset: 0;
}

.tool-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 4px;
}

.tool-modal .btn,
.tool-modal .ghost-button,
.tool-modal .primary-action {
    display: inline-flex;
    min-width: 92px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--control-border) !important;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.tool-modal .btn-secondary,
.tool-modal .ghost-button {
    background: #18191a !important;
    color: #c7ccd3 !important;
}

.tool-modal .btn-secondary:hover,
.tool-modal .ghost-button:hover {
    border-color: #5a6069 !important;
    background: #2a2c2f !important;
    color: #fff !important;
}

.tool-modal .btn-primary,
.tool-modal .primary-action {
    border-color: #ff9800 !important;
    background: #ff9800 !important;
    color: #171717 !important;
}

.tool-modal .btn-primary:hover,
.tool-modal .primary-action:hover {
    border-color: #ffad33 !important;
    background: #ffad33 !important;
    color: #111 !important;
    transform: translateY(-1px);
}

.tool-modal .btn:disabled,
.tool-modal .ghost-button:disabled,
.tool-modal .primary-action:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

.tool-confirm-message {
    padding: 14px 15px;
    border-left: 3px solid #ff9800 !important;
    background: #1d1e1f;
    color: #d7dbe1;
    font-size: .9rem;
    font-weight: 550;
    line-height: 1.6;
}

.tool-confirm-modal #customConfirmAcceptBtn,
#reportModalBackdrop .btn-primary {
    border-color: #e53935 !important;
    background: #e53935 !important;
    color: #fff !important;
}

.tool-confirm-modal #customConfirmAcceptBtn:hover,
#reportModalBackdrop .btn-primary:hover {
    border-color: #ff5d57 !important;
    background: #ff4a43 !important;
    color: #fff !important;
}

.crop-preview-shell {
    max-height: 60vh;
    margin-bottom: 2px;
    overflow: hidden;
    border: 1px solid var(--bg-body) !important;
    border-radius: 5px;
    background: #0b0c0d;
}

.tool-modal .image-upload-picker {
    border-color: var(--control-border) !important;
    border-radius: 5px;
    background: #1d1e1f;
}

.tool-modal .image-upload-picker:hover,
.tool-modal .image-upload-picker:focus-within {
    border-color: #ff9800 !important;
    background: rgba(255, 152, 0, .045);
}

@media (max-width: 520px) {
    .tool-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .tool-modal > .auth-modal-header,
    .tool-modal-body,
    .tool-modal > .auth-modal-body {
        padding-right: 15px;
        padding-left: 15px;
    }

    .tool-modal-actions > * {
        flex: 1 1 120px;
    }
}

/* ============================================================
   MOBILE LAYOUT PASS — shared safeguards and compact topic rows
   ============================================================ */
@media (max-width: 760px) {
    .app-shell,
    .forum-grid,
    .forum-main,
    .topic-panel,
    .applications-main,
    .tickets-main,
    .messages-main,
    .admin-main,
    .profile-layout {
        min-width: 0;
        max-width: 100%;
    }

    .forum-grid {
        gap: 12px;
        margin-top: 12px;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 7px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .topbar-socials {
        min-width: 0;
        gap: 9px !important;
    }

    .topbar-social-link svg {
        width: 18px;
        height: 18px;
    }

    .topbar-account {
        min-width: 0;
        gap: 5px;
    }

    .header-ticket-button,
    .header-application-button {
        min-width: 0;
        max-width: 92px;
        padding: 0 7px;
        font-size: .7rem;
        white-space: normal;
    }

    .header-profile-button {
        max-width: 112px;
        gap: 5px;
        padding-right: 6px;
    }

    .header-user-copy {
        min-width: 0;
        max-width: 68px;
    }

    .header-user-copy strong {
        overflow: hidden;
        font-size: .74rem;
        text-overflow: ellipsis;
    }

    .header-user-copy small { display: none; }

    .trend-topics-head { display: none; }

    .trend-topic-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 5px 10px;
        min-height: 0;
        padding: 9px 10px;
    }

    .trend-topic-row .col-topic {
        grid-column: 1 / -1;
    }

    .trend-topic-title {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.4;
    }

    .trend-topic-stats {
        min-width: 0;
        grid-column: 1;
        justify-self: start;
        text-align: left;
        white-space: normal;
        font-size: .69rem;
    }

    .trend-topic-author {
        min-width: 0;
        grid-column: 2;
        justify-self: end;
        font-size: .7rem;
    }

    .trend-topic-last {
        grid-column: 1 / -1;
        text-align: left;
        white-space: normal;
        font-size: .69rem;
    }

    .topic-detail-actions,
    .post-card-footer,
    .post-card-actions-left,
    .post-card-actions-right,
    .profile-hero-actions,
    .admin-dashboard-actions {
        flex-wrap: wrap;
    }

    .post-card-footer {
        align-items: flex-start;
        gap: 8px;
    }

    .post-card-actions-left,
    .post-card-actions-right {
        max-width: 100%;
    }

    .post-composer-footer > button,
    .post-composer-submit {
        width: 100%;
        justify-content: center;
    }

    .profile-details-table .detail-row {
        grid-template-columns: minmax(92px, .7fr) minmax(0, 1fr);
        gap: 8px;
    }

    .profile-details-table .detail-row strong {
        overflow-wrap: anywhere;
    }

    .admin-card,
    .admin-role-overview,
    .admin-user-editor-dialog,
    .applications-shell,
    .topic-create-container {
        min-width: 0;
    }

    .application-question textarea,
    .application-question input,
    .application-question select,
    .admin-form-grid input,
    .admin-form-grid select,
    .admin-form-grid textarea {
        min-width: 0;
        max-width: 100%;
    }

    .ticket-detail-header,
    .ticket-page-intro,
    .application-page-heading,
    .admin-dashboard-header,
    .admin-card-heading,
    .admin-users-heading {
        min-width: 0;
    }

    .ticket-detail-title,
    .ticket-detail-header h2,
    .application-heading-copy,
    .admin-dashboard-header > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .topic-detail-body img,
    .post-card-content img,
    .rich-content img,
    .rich-content video {
        max-width: 100%;
        height: auto;
    }

    .rich-content iframe { max-width: 100%; }
}

@media (max-width: 520px) {
    .app-shell {
        width: calc(100% - 12px);
    }

    .topbar {
        gap: 5px;
        padding-right: 6px;
        padding-left: 6px;
    }

    .topbar-socials {
        gap: 6px !important;
    }

    .topbar-social-link svg {
        width: 16px;
        height: 16px;
    }

    .brand-logo { height: 38px; }

    .header-profile-button { max-width: 92px; }
    .header-user-copy { max-width: 50px; }

    .ticket-detail-header,
    .ticket-sidebar-header,
    .ticket-panel-heading {
        gap: 9px;
        padding: 12px;
    }

    .ticket-detail-actions > *,
    .ticket-tools-toggle {
        max-width: 100%;
    }

    .pm-chat-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px;
    }

    .pm-message-list { padding: 12px; }
    .pm-message-bubble { max-width: 94%; }

    .admin-main { padding-right: 7px; padding-left: 7px; }
    .admin-role-overview,
    .admin-card { padding: 13px; }

    .profile-password-form,
    .profile-edit-form { padding: 12px; }

    .topic-create-container { padding: 12px; }
    .rtc-header .rtc-title-input { padding: 12px; font-size: 1.05rem; }
}

/* Forum and category lists: purpose-built phone cards (override legacy grids above). */
@media (max-width: 760px) {
    .forum-board-section + .forum-board-section { margin-top: 14px; }

    .forum-board-heading {
        min-height: 0;
        border-radius: 4px 4px 0 0;
    }

    .forum-board-heading::after {
        inset: 0 0 0 auto;
        width: 90px;
        opacity: .55;
    }

    .forum-board-heading div { padding: 15px 14px; }
    .forum-board-section .forum-board-heading h3 { font-size: 1.15rem; }
    .forum-board-heading p { max-width: 100%; line-height: 1.45; overflow-wrap: anywhere; }

    .forum-board-list {
        gap: 7px;
        padding: 7px;
        border: 1px solid rgba(255, 255, 255, .06);
        border-top: 0;
        background: transparent;
    }

    .forum-board-row {
        grid-template-columns: 36px minmax(0, 1fr);
        grid-template-areas:
            "icon main"
            "icon stats"
            "icon latest";
        gap: 7px 10px;
        align-items: start;
        min-height: 0;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, .065);
        border-radius: 4px;
        background: var(--surface);
    }

    .forum-board-icon { grid-area: icon; width: 34px; height: 34px; }
    .forum-board-icon img { width: 28px; height: 28px; object-fit: contain; }
    .forum-board-main { grid-area: main; }
    .forum-board-title { display: block; line-height: 1.35; overflow-wrap: anywhere; }
    .forum-board-main p { margin-top: 4px; line-height: 1.45; }
    .forum-board-main small {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 7px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .forum-board-stats {
        grid-area: stats;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        font-size: .72rem;
    }

    .forum-board-stats strong,
    .forum-board-stats span {
        width: max-content;
        max-width: 100%;
        flex: 0 0 auto;
        padding: 4px 7px;
        border: 1px solid rgba(255, 255, 255, .07);
        border-radius: 3px;
        background: rgba(0, 0, 0, .14);
        color: var(--muted-light);
        font-size: .7rem;
        font-weight: 750;
    }

    .forum-board-stats strong { color: #e5e9ef; }

    .forum-board-latest {
        grid-area: latest;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 8px;
        padding-top: 7px;
        border-top: 1px solid rgba(255, 255, 255, .06);
        font-size: .72rem;
    }

    .forum-board-latest .author-line { grid-column: 1 / -1; }
    .forum-board-latest a.latest-topic { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
    .forum-board-latest strong.latest-date { align-self: start; text-align: right; white-space: normal; }

    .category-topic-view { gap: 10px; }
    .forum-breadcrumb { min-height: 32px; padding: 7px 9px; font-size: .72rem; }

    .category-topic-strip {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
        border-radius: 4px;
    }

    .category-topic-brand { align-items: flex-start; }
    .category-topic-brand h2 { font-size: 1.08rem; line-height: 1.3; overflow-wrap: anywhere; }
    .category-topic-brand small { line-height: 1.45; }
    .category-topic-actions { justify-content: stretch; gap: 7px; }
    .category-topic-actions > * { flex: 1 1 130px; }
    .category-topic-actions .primary-action { width: 100%; }

    .category-topic-hero { padding: 12px; border-radius: 4px; }
    .category-topic-hero h2 { font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; }
    .category-topic-hero p { font-size: .82rem; line-height: 1.5; }
    .category-topic-hero small { line-height: 1.45; }

    .category-topic-table {
        gap: 7px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .category-topic-table-head { display: none !important; }
    .category-topic-list { gap: 7px; }

    .category-topic-row {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        grid-template-areas:
            "icon main actions"
            "icon metrics metrics"
            "icon latest latest";
        gap: 8px 9px;
        align-items: start;
        min-height: 0;
        padding: 11px 10px;
        border: 1px solid rgba(255, 255, 255, .07);
        border-left: 3px solid transparent;
        border-radius: 4px;
        background: var(--surface);
    }

    .category-topic-row.is-pinned { border-left-color: var(--amber); }
    .category-topic-icon { grid-area: icon; width: 28px; height: 28px; }
    .category-topic-main { grid-area: main; }
    .category-topic-title {
        display: -webkit-box;
        overflow: hidden;
        font-size: .88rem;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .category-topic-main small {
        margin-top: 4px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .category-topic-main .topic-tag-list { margin-top: 6px; }
    .category-topic-admin-actions { grid-area: actions; justify-self: end; }
    .category-topic-admin-actions:empty { display: none; }

    .category-topic-metrics {
        grid-area: metrics;
        display: flex;
        flex-wrap: wrap;
        justify-items: start;
        gap: 6px;
        font-size: .7rem;
    }

    .category-topic-metrics strong,
    .category-topic-metrics span {
        width: max-content;
        max-width: 100%;
        flex: 0 0 auto;
        padding: 4px 7px;
        border: 1px solid rgba(255, 255, 255, .07);
        border-radius: 3px;
        background: rgba(0, 0, 0, .14);
        font-size: .68rem;
    }

    .category-topic-metrics { justify-content: flex-start; text-align: left; }

    .category-topic-latest {
        grid-area: latest;
        min-width: 0;
        gap: 7px;
        padding-top: 7px;
        border-top: 1px solid rgba(255, 255, 255, .06);
    }

    .category-topic-latest .post-avatar { width: 30px; height: 30px; flex-basis: 30px; }
    .category-topic-latest div { gap: 3px; }
    .category-topic-latest strong,
    .category-topic-latest span { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
    .category-topic-latest strong { font-size: .68rem; }
    .category-topic-latest span { font-size: .7rem; }
}

@media (max-width: 390px) {
    .forum-board-row { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; padding: 10px; }
    .forum-board-icon { width: 30px; height: 30px; }
    .forum-board-icon img { width: 25px; height: 25px; }
    .forum-board-latest { grid-template-columns: minmax(0, 1fr); }
    .forum-board-latest strong.latest-date { text-align: left; }
    .category-topic-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 7px; padding: 10px 8px; }
    .category-topic-icon { width: 24px; height: 24px; }
}

/* Focused mobile layouts: home actions, YouTube management, and topic posts. */
@media (max-width: 760px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand account"
            "socials socials";
        row-gap: 5px;
        min-height: 0;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .topbar-socials { grid-area: socials; justify-content: center; }
    .brand { grid-area: brand; justify-self: start; }
    .brand-logo { max-width: min(42vw, 150px); height: 36px; object-fit: contain; }
    .topbar-account { grid-area: account; justify-content: flex-end; flex-wrap: wrap; }

    .header-ticket-button,
    .header-application-button {
        width: auto;
        max-width: 82px;
        min-height: 32px;
        padding: 4px 7px;
        font-size: .66rem;
        line-height: 1.15;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .home-development-notice,
    .home-server-join,
    .home-youtube-videos { width: 100%; min-width: 0; }

    .home-youtube-videos { padding: 9px; }
    .home-youtube-videos-heading { align-items: flex-start; }
    .home-youtube-videos-heading > a { flex: 0 0 auto; padding: 5px 7px; }
    .home-youtube-video-grid {
        grid-template-columns: none;
        grid-template-rows: minmax(0, 1fr);
        grid-auto-columns: calc(100% - 16px);
        grid-auto-flow: column;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 5px;
        scroll-snap-type: x mandatory;
    }

    .home-youtube-video-card { width: 100%; }
    .home-youtube-video-copy { padding: 9px; }
    .home-youtube-video-copy strong { font-size: .78rem; }

    .admin-main { min-width: 0; }
    .admin-dashboard-grid { gap: 10px; }
    .admin-dashboard-grid > .admin-card,
    .admin-youtube-panel { min-width: 0; padding: 12px; }
    .admin-card-heading { gap: 9px; }
    .admin-card-heading h3 { overflow-wrap: anywhere; }
    .admin-youtube-heading { align-items: flex-start; gap: 9px; }
    .admin-youtube-heading-copy p { line-height: 1.5; overflow-wrap: anywhere; }
    .admin-youtube-status { max-width: 100%; white-space: normal; }
    .admin-youtube-add-form { gap: 10px; }
    .admin-youtube-add-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .admin-youtube-add-controls input { grid-column: 1 / -1; width: 100%; }
    .admin-youtube-add-controls button { width: 100%; min-width: 0; padding-inline: 7px; white-space: normal; }
    .admin-youtube-list-heading { align-items: flex-start; flex-wrap: wrap; }
    .admin-youtube-channel-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; }
    .admin-youtube-channel-meta { grid-column: 2 / -1; }

    /* Topic detail cards read top-to-bottom instead of squeezing the author sidebar. */
    .post-thread { min-width: 0; gap: 8px; }
    .post-thread-title-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 9px;
        margin: 0;
        padding: 12px;
    }
    .post-thread-category { grid-column: 1 / -1; justify-self: start; }
    .post-thread-title { min-width: 0; font-size: 1rem; line-height: 1.35; }
    .post-thread-meta { grid-column: 1 / -1; flex-wrap: wrap; gap: 6px 12px; font-size: .7rem; }
    .post-thread-tags { grid-column: 1 / -1; min-width: 0; }

    .post-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        margin: 0;
        border: 1px solid rgba(255, 255, 255, .075);
        border-radius: 4px;
    }
    .post-card-left {
        display: block;
        min-width: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }
    .post-user-card {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        grid-template-areas:
            "avatar name presence"
            "avatar role role"
            "stats stats stats";
        align-items: center;
        gap: 4px 9px;
        width: 100%;
        box-sizing: border-box;
        padding: 9px 11px;
        text-align: left;
    }
    .post-user-avatar { grid-area: avatar; width: 38px; height: 38px; font-size: .9rem; }
    .post-user-name { grid-area: name; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }
    .post-user-role { grid-area: role; justify-self: start; padding: 2px 6px; font-size: .58rem; }
    .post-user-presence { grid-area: presence; justify-self: end; font-size: .64rem; white-space: nowrap; }
    .post-user-stats {
        grid-area: stats;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 3px 0 0;
    }
    .post-user-stats div {
        justify-content: flex-start;
        gap: 4px;
        padding: 3px 6px;
        border: 1px solid rgba(255, 255, 255, .06);
        border-radius: 3px;
        background: rgba(0, 0, 0, .12);
    }
    .post-user-stats dt,
    .post-user-stats dd { font-size: .62rem; }
    .post-user-stats dd { max-width: 110px; }
    .post-card-right { min-width: 0; min-height: 0; }
    .post-card-top { justify-content: flex-start; padding: 7px 11px; }
    .post-card-date { font-size: .67rem; overflow-wrap: anywhere; }
    .post-card-content { min-width: 0; padding: 12px; font-size: .86rem; line-height: 1.6; }
    .post-card-content .post-body-text { overflow-wrap: anywhere; }
    .post-card-footer { padding: 8px 10px; }
    .post-card-actions-left,
    .post-card-actions-right { gap: 5px; }
    .post-action-btn,
    .post-like-btn,
    .post-reply-btn { min-height: 32px; padding: 5px 8px; font-size: .68rem; }
    .post-comments-section { gap: 8px; }
    .post-no-comments { margin: 0; padding: 14px 12px; }
    .post-composer { min-width: 0; }
    .post-composer-toolbar { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
    .post-composer-toolbar .rtc-btn { flex: 0 0 auto; }
    .post-composer-body,
    .post-composer-footer { min-width: 0; }
    .rich-content pre,
    .rich-content table { max-width: 100%; overflow-x: auto; }
    .rich-content pre { white-space: pre; }
    .rich-content table { display: block; }
}

@media (max-width: 520px) {
    .topbar { grid-template-columns: minmax(0, 1fr) auto; }
    .topbar-account { gap: 4px; }
    .header-ticket-button,
    .header-application-button { max-width: 72px; min-height: 30px; padding-inline: 5px; font-size: .61rem; }
    .header-profile-button { max-width: 82px; }
    .home-youtube-videos-heading h3 { font-size: .92rem; }
    .admin-dashboard-header { gap: 10px; }
    .admin-dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .admin-dashboard-actions > * { min-width: 0; width: 100%; }
    .admin-youtube-panel { padding: 10px; }
    .admin-youtube-add-controls { grid-template-columns: 1fr; }
    .admin-youtube-add-controls input { grid-column: auto; }
    .admin-youtube-channel-row { grid-template-columns: 30px minmax(0, 1fr); }
    .admin-youtube-remove-button { grid-column: 2; grid-row: auto; justify-self: start; }

    .post-thread-title-bar { grid-template-columns: minmax(0, 1fr); }
    .post-thread-title,
    .post-thread-meta,
    .post-thread-tags { grid-column: 1; }
    .post-card-footer { align-items: stretch; flex-direction: column; }
    .post-card-actions-left,
    .post-card-actions-right { width: 100%; flex-wrap: wrap; }
    .post-card-actions-right { justify-content: flex-end; }
    .post-action-btn,
    .post-like-btn,
    .post-reply-btn { min-height: 34px; }
}

@media (max-width: 360px) {
    .topbar-account .header-ticket-button,
    .topbar-account .header-application-button { max-width: 64px; font-size: .57rem; }
    .post-user-card { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 7px; padding: 8px; }
    .post-user-avatar { width: 34px; height: 34px; }
    .post-card-content { padding: 10px; }
}

