:root {
    --bg: #020a14;
    --bg-2: #040f1e;
    --panel: #071628;
    --panel-2: #0c1f36;
    --panel-3: #112d50;
    --border: rgba(80, 200, 255, .16);
    --text: #f0f8ff;
    --muted: #90b8e0;
    --blue: #2d7fff;
    --blue-2: #6eb4ff;
    --cyan: #00e5ff;
    --green: #00e5a0;
    --orange: #ff9f3a;
    --purple: #8c5fff;
    --rose: #ff5585;
    --gold: #ffcf40;
    --shadow: 0 24px 72px rgba(0,0,0,.52), 0 0 48px rgba(0, 229, 255, .06);
    --radius: 22px;
    --accent: #00e5ff;
    --accent-2: #2d7fff;
}

[hidden] {
    display: none !important;
}

@font-face {
    font-family: 'Lalezar';
    src: url('fonts/lalezar.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('fonts/vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 8% 4%, rgba(79, 140, 255, .20), transparent 26%),
        radial-gradient(circle at 92% 10%, rgba(56, 215, 255, .14), transparent 24%),
        radial-gradient(circle at 72% 86%, rgba(255, 180, 95, .10), transparent 26%),
        radial-gradient(circle at 18% 78%, rgba(155, 124, 255, .11), transparent 24%),
        linear-gradient(180deg, #030713 0%, #071225 48%, #050a16 100%);
    color: var(--text);
    direction: rtl;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.main-content,
.app-shell,
.nav,
.modal,
.modal-body,
.ticket-messages,
.quick-replies-strip,
.keyword-preview-box {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    line-height: 1;
    vertical-align: middle;
    flex: 0 0 auto;
}

.icon-svg svg,
.icon-svg img {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-svg svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-svg.is-fill svg {
    fill: currentColor;
    stroke: none;
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav a .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.nav a .nav-icon .icon-svg {
    width: 18px;
    height: 18px;
}

.nav a .nav-icon .icon-svg svg * {
    vector-effect: non-scaling-stroke;
}

.nav a .nav-icon .icon-svg svg [fill]:not([fill="none"]) {
    fill: rgba(255,255,255,.72) !important;
}

.nav a .nav-icon .icon-svg svg [stroke]:not([stroke="none"]) {
    stroke: rgba(255,255,255,.72) !important;
}

.nav-home-mobile {
    display: none !important;
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    color: rgba(146, 199, 255, 0.96);
}

.empty-icon .icon-svg {
    width: 100%;
    height: 100%;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

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

h2 {
    font-family: 'Lalezar', sans-serif;
    font-weight: normal;
    line-height: 1.35;
}

p, button, a:hover, a.btn, input, label, span, select, div {
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.app-shell {
    min-height: 100vh;
    padding: 24px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.topbar {
    position: relative;
    isolation: isolate;
    max-width: 1400px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    z-index: 1100;
}

::selection {
    background: transparent;
    color: #00ffff;
}

::-moz-selection {
    background: transparent;
    color: #00ffff;
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1004;
	margin-left: -10px;
}

.brand-mark {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg,var(--blue),var(--cyan));
    box-shadow: 0 0 24px rgba(47,118,255,.52);
    flex: 0 0 auto;
	margin-left: -15px;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
	margin-left: -10px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
	margin-left: -10px;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 1102;
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(5, 10, 18, .38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
    z-index: 1188;
    -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid rgba(99,160,255,.25);
    background: linear-gradient(135deg, rgba(47,118,255,.18), rgba(50,185,255,.12));
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 18px rgba(47,118,255,.18);
    transition: all .25s ease;
}

.nav-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(47,118,255,.35);
    background: linear-gradient(135deg, rgba(47,118,255,.28), rgba(50,185,255,.22));
}

.nav-toggle span {
    position: absolute;
    left: 50%;
    transform: translateX(-80%);
    width: 26px;
    height: 3px;
    background: linear-gradient(90deg,#fff,#63a0ff);
    border-radius: 2px;
    transition: all .3s ease;
}

.nav-toggle span:nth-child(1) {
    top: 14px;
}

.nav-toggle span:nth-child(2) {
    top: 20px;
    width: 22px;
}

.nav-toggle span:nth-child(3) {
    top: 26px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateX(-50%) rotate(45deg);
    top: 20px;
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateX(-50%) rotate(-45deg);
    top: 20px;
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 1005;
}

.nav-primary-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-admin-mobile,
.nav-mobile-actions {
    display: none !important;
}

.nav-more {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(13,19,33,.62);
    color: #edf5ff;
    cursor: pointer;
    transition: .18s ease;
    line-height: 1.3;
}

.nav-more-toggle:hover,
.nav-more-toggle.active,
.nav-more:focus-within .nav-more-toggle {
    background: linear-gradient(135deg, rgba(47,118,255,.22), rgba(50,185,255,.18)) !important;
    border-color: rgba(99,160,255,.45) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47,118,255,.3);
    color: #fff !important;
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    min-width: 242px;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(18,28,46,.98), rgba(9,15,26,.98));
    border: 1px solid rgba(99,160,255,.16);
    box-shadow: 0 22px 56px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(.98);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 1308;
}

.nav-more:hover .nav-more-menu,
.nav-more:focus-within .nav-more-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.nav-more-menu a {
    width: 100%;
    justify-content: flex-start;
    margin: 0 !important;
    white-space: nowrap;
}

.nav-more-menu .nav-logout {
    background: linear-gradient(135deg, rgba(255,38,64,.18), rgba(126,0,24,.16)) !important;
    border-color: rgba(255,62,86,.36) !important;
    color: #ffdede !important;
}

.nav-more-menu .nav-logout:hover {
    background: linear-gradient(135deg, rgba(255,38,64,.34), rgba(126,0,24,.26)) !important;
    border-color: rgba(255,72,96,.62) !important;
    box-shadow: 0 14px 32px rgba(255,34,62,.20) !important;
}


.nav-logout,
.nav-action-logout {
    color: #fff0f0 !important;
}

.nav-logout .nav-icon,
.nav-action-logout .nav-icon {
    color: #ff2f4b !important;
}

.nav-logout .nav-icon .icon-svg svg [fill]:not([fill="none"]),
.nav-action-logout .nav-icon .icon-svg svg [fill]:not([fill="none"]) {
    fill: #ff2f4b !important;
}

.nav-logout .nav-icon .icon-svg svg [stroke]:not([stroke="none"]),
.nav-action-logout .nav-icon .icon-svg svg [stroke]:not([stroke="none"]) {
    stroke: #ff2f4b !important;
}

.nav.active {
    display: flex !important;
}

.nav a, .chip {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.06);
}

.btn {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.09);
}

.nav a {
    padding: 12px 16px;
    background: rgba(13,19,33,.62);
    color: #edf5ff;
    transition: .18s ease;
    line-height: 1.3;
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, rgba(47,118,255,.22), rgba(50,185,255,.18)) !important;
    border-color: rgba(99,160,255,.45) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47,118,255,.3);
    color: #fff !important;
}

.nav a > span,
.nav a .nav-icon,
.nav a .nav-icon .icon-svg {
    position: relative;
    z-index: 1;
}

.nav a:last-child {
    margin-bottom: 0 !important;
}

.flash {
    max-width: 1400px;
    margin: 0 auto 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(18,27,44,.96);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow);
    line-height: 1.5;
    animation: flashSlideIn .75s cubic-bezier(.22,.9,.24,1) 1s both;
}

@keyframes flashSlideIn {
    from { opacity: 0; transform: translateY(-10px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.flash.success {
    border-color: rgba(42,157,107,.45);
}

.flash.error {
    border-color: rgba(255,138,61,.5);
}

.flash.info {
    border-color: rgba(47,118,255,.42);
}

.surface {
    background: rgba(18,25,39,.94);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 30px;
}

.panel {
    background: linear-gradient(180deg, rgba(23,34,54,.95), rgba(13,18,29,.97));
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.panel-inner {
    padding: 24px;
}

.btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    box-shadow: 0 12px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
    outline: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,0));
    opacity: .72;
    pointer-events: none;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(0,0,0,.22), 0 0 0 3px rgba(99,160,255,.08), inset 0 1px 0 rgba(255,255,255,.12);
}

.btn:active {
    transform: translateY(0) scale(.985);
}

.btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(99,160,255,.18), 0 18px 38px rgba(0,0,0,.22);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg,#2f76ff 0%, #55a4ff 52%, #38d7ff 100%);
    border-color: rgba(115,190,255,.38);
}

.btn.secondary {
    color: #eef5ff;
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(62,91,139,.16)), linear-gradient(135deg,#14243a 0%, #1b3859 100%);
    border-color: rgba(160,200,255,.16);
}

.btn.ghost {
    color: #eef5ff;
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.1);
}

.btn.danger {
    color: #fff;
    background: linear-gradient(135deg,#ff4d5f 0%, #ff8a5e 100%);
    border-color: rgba(255,156,126,.32);
}

.btn.warn {
    color: #fff;
    background: linear-gradient(135deg,#ff5050 0%, #ff8b8b 100%);
    border-color: rgba(255,150,150,.32);
}

.btn.success {
    color: #f2fff7;
    background: linear-gradient(135deg,#1f8b61 0%, #35c686 100%);
    border-color: rgba(87,225,165,.28);
}

.btn.block {
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 18%, rgba(50,185,255,.18), transparent 18%),
        radial-gradient(circle at 82% 14%, rgba(47,118,255,.20), transparent 20%),
        radial-gradient(circle at 70% 85%, rgba(42,157,107,.09), transparent 22%),
        linear-gradient(120deg, rgba(10,24,42,.98) 0%, rgba(12,26,49,.96) 38%, rgba(9,18,33,.98) 100%);
    background-size: 200% 200%;
    border: 1px solid rgba(99,160,255,.16);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 28px;
    animation: heroFlow 14s ease-in-out infinite;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: -25%;
    pointer-events: none;
    z-index: 0;
}

.hero::before {
    background:
        radial-gradient(circle at 20% 25%, rgba(99,160,255,.18), transparent 20%),
        radial-gradient(circle at 55% 30%, rgba(50,185,255,.16), transparent 16%),
        radial-gradient(circle at 80% 65%, rgba(47,118,255,.12), transparent 18%),
        radial-gradient(circle at 35% 80%, rgba(42,157,107,.08), transparent 22%);
    filter: blur(18px);
    opacity: .9;
    transform: translate3d(0,0,0);
    animation: waveDrift 10s ease-in-out infinite alternate;
}

.hero::after {
    background:
        linear-gradient(115deg, transparent 0%, rgba(50,185,255,.10) 18%, transparent 36%, rgba(47,118,255,.08) 54%, transparent 72%, rgba(50,185,255,.10) 88%, transparent 100%);
    background-size: 240% 240%;
    mix-blend-mode: screen;
    opacity: .45;
    animation: waveSweep 16s linear infinite;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: stretch;
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.35;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.52;
    font-size: 15px;
}

.hero-list {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}

.hero-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(19,30,48,.92);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    color: #eef5ff;
    line-height: 1.4;
}

.auth-wrap {
    min-height: calc(100vh - 88px);
    display: grid;
    place-items: center;
    padding: 12px 0;
}

.auth-card {
    width: min(1180px,100%);
    overflow: hidden;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 680px;
}

.auth-side {
    padding: 34px;
    background:
        radial-gradient(circle at top, rgba(47,118,255,.16), transparent 35%),
        linear-gradient(180deg, rgba(18,29,47,.96), rgba(12,17,28,.96));
    border-left: 1px solid rgba(255,255,255,.05);
}

.auth-side h2 {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.35;
}

.auth-side p {
    margin: 0;
    color: var(--muted);
    line-height: 1.52;
}

.auth-side .hero-list {
    margin-top: 24px;
}

.auth-form {
    padding: 34px;
    background: linear-gradient(180deg, rgba(21,34,53,.96), rgba(12,17,26,.97));
}

.form-head {
    margin-bottom: 8px;
}

.form-title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.35;
}

.form-subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.52;
}

.form {
    display: grid;
    gap: 14px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 8px;
}

label, .label {
    font-size: 14px;
    color: #d8e6ff;
    line-height: 1.35;
}

input, select, textarea {
    width: 100%;
    border: 1px solid rgba(99,160,255,.14);
    border-radius: 16px;
    background: rgba(8,12,20,.94);
    color: var(--text);
    padding: 15px 16px;
    outline: none;
    transition: .16s ease;
    line-height: 1.35;
}

textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.5;
}

input:focus, select:focus, textarea:focus {
    border-color: rgba(99,160,255,.52);
    box-shadow: 0 0 0 4px rgba(47,118,255,.10);
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.two {
    grid-template-columns: 1fr 380px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    margin: 18px 0;
}

.stat {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(21,34,54,.96), rgba(12,18,28,.97));
    border: 1px solid rgba(255,255,255,.05);
}

.stat .n {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat .t {
    color: var(--muted);
    line-height: 1.45;
}

.card {
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(21,33,52,.96), rgba(12,17,26,.97));
    border: 1px solid rgba(255,255,255,.05);
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.section-title h1, .section-title h2, .section-title h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
}

.section-title span {
    color: var(--muted);
    line-height: 1.45;
}

.helper {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    color: var(--muted);
    line-height: 1.52;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.14);
    backdrop-filter: blur(10px);
}

.badge.low {
    background: linear-gradient(135deg, rgba(148, 163, 184, .16), rgba(203, 213, 225, .08));
    border-color: rgba(203, 213, 225, .18);
    color: #eef2ff;
}

.badge.medium {
    background: linear-gradient(135deg, rgba(79, 140, 255, .24), rgba(56, 215, 255, .12));
    border-color: rgba(134, 188, 255, .28);
    color: #eaf4ff;
}

.badge.high {
    background: linear-gradient(135deg, rgba(255, 180, 95, .25), rgba(255, 122, 154, .12));
    border-color: rgba(255, 180, 95, .30);
    color: #fff3df;
}

.badge.waiting {
    background: linear-gradient(135deg, rgba(255, 180, 95, .26), rgba(255, 138, 61, .17));
    border-color: rgba(255, 190, 115, .35);
    color: #fff3df;
}

.badge.answered {
    background: linear-gradient(135deg, rgba(52, 211, 153, .24), rgba(56, 215, 255, .10));
    border-color: rgba(52, 211, 153, .30);
    color: #eafff7;
}

.badge.closed {
    background: linear-gradient(135deg, rgba(148, 163, 184, .13), rgba(255,255,255,.05));
    border-color: rgba(226, 232, 240, .13);
    color: #e8eefb;
}

.badge.admin {
    background: linear-gradient(135deg, rgba(255, 122, 154, .28), rgba(255, 180, 95, .13));
    border-color: rgba(255, 122, 154, .32);
    color: #fff1f5;
}

.badge.user {
    background: linear-gradient(135deg, rgba(155, 124, 255, .18), rgba(79, 140, 255, .10));
    border-color: rgba(155, 124, 255, .24);
    color: #f5f0ff;
}

.badge.game-mode-badge {
    border: 1px solid transparent;
}

.badge.game-mode-roleplay {
    background: linear-gradient(135deg, rgba(79, 140, 255, .24), rgba(56, 215, 255, .12));
    border-color: rgba(134, 188, 255, .34);
    color: #e5f2ff;
}

.badge.game-mode-bedwars {
    background: linear-gradient(135deg, rgba(255, 180, 95, .25), rgba(255, 122, 66, .14));
    border-color: rgba(255, 190, 115, .34);
    color: #fff0dc;
}

.badge.game-mode-default {
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
    border-color: rgba(255,255,255,.12);
    color: #f4edff;
}

.ticket-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-topic-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(115deg, rgba(255,255,255,.035), transparent 32%, rgba(56, 215, 255, .035) 66%, transparent),
        radial-gradient(circle at 50% -10%, rgba(134, 188, 255, .12), transparent 38%);
}

.card,
.panel,
.ticket-page,
.ticket-details,
.ticket-sidebar,
.admin-feature-card,
.stat-card,
.proof-card,
.proof-public-card,
.form-card,
.auth-card,
.profile-card {
    background-image: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
    border-color: rgba(135, 188, 255, .13);
}

.ticket-row {
    background: linear-gradient(135deg, rgba(17, 31, 53, .94), rgba(13, 23, 41, .90));
    border-color: rgba(135, 188, 255, .10);
    box-shadow: 0 18px 42px rgba(0,0,0,.20);
}

.ticket-row:hover {
    border-color: rgba(56, 215, 255, .26);
    box-shadow: 0 22px 48px rgba(0,0,0,.24), 0 0 26px rgba(56, 215, 255, .07);
}

.btn.primary,
button.primary,
.primary-btn {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 38px rgba(56, 215, 255, .16);
}

.btn.primary:hover,
button.primary:hover,
.primary-btn:hover {
    box-shadow: 0 22px 44px rgba(56, 215, 255, .22);
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, rgba(79, 140, 255, .18), rgba(56, 215, 255, .10));
    border-color: rgba(134, 188, 255, .22);
}

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

.list-pagination-wrap {
    margin-top: 18px;
}

.pagination-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(14, 24, 40, .82);
    border: 1px solid rgba(255,255,255,.06);
}

.pagination-summary,
.section-meta-inline {
    color: rgba(236, 242, 255, .76);
    font-size: 13px;
    line-height: 1.5;
}

.section-meta-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

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

.pagination-link,
.pagination-ellipsis {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: #eef5ff;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.pagination-link:hover {
    transform: translate3d(0,-2px,0);
    border-color: rgba(99,160,255,.38);
    background: linear-gradient(135deg, rgba(47,118,255,.18), rgba(50,185,255,.14));
    box-shadow: 0 14px 26px rgba(47,118,255,.16);
}

.pagination-link.is-current {
    background: linear-gradient(135deg, rgba(47,118,255,.34), rgba(50,185,255,.24));
    border-color: rgba(122, 215, 255, .42);
    box-shadow: 0 16px 30px rgba(47,118,255,.18);
}

.pagination-ellipsis {
    background: transparent;
    border-style: dashed;
    color: rgba(236, 242, 255, .52);
}
.ticket-row {
    display: grid;
    grid-template-columns: 1.65fr .7fr .7fr .7fr;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: rgba(19,30,48,.92);
    border: 1px solid rgba(255,255,255,.05);
    transition: .18s ease;
}

.ticket-row:hover {
    border-color: rgba(99,160,255,.20);
    transform: translate3d(0,-1px,0);
}

.ticket-row.fx-card-enter {
    animation: ticketCardEnter var(--site-insert-duration, 760ms) cubic-bezier(.2,.9,.18,1) both;
}

.ticket-row.fx-card-enter .ticket-title,
.ticket-row.fx-card-enter .ticket-meta,
.ticket-row.fx-card-enter .badge {
    animation: ticketContentEnter calc(var(--site-insert-duration, 760ms) - 90ms) cubic-bezier(.2,.9,.18,1) both;
}

.ticket-row.fx-card-refresh {
    animation: ticketCardRefresh var(--site-refresh-duration, 460ms) cubic-bezier(.22,.9,.2,1) both;
}

.ticket-row.fx-card-refresh .ticket-title,
.ticket-row.fx-card-refresh .ticket-meta,
.ticket-row.fx-card-refresh .badge {
    animation: ticketContentRefresh var(--site-refresh-duration, 460ms) cubic-bezier(.22,.9,.2,1) both;
}

@keyframes ticketCardEnter {
    0% {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        box-shadow: 0 12px 30px rgba(14, 25, 42, .08);
    }
}

@keyframes ticketCardRefresh {
    0% {
        transform: translate3d(0, 0, 0);
        border-color: rgba(99,160,255,.10);
        box-shadow: 0 0 0 rgba(47,118,255,0);
    }
    38% {
        transform: translate3d(0, -2px, 0);
        border-color: rgba(122, 215, 255, .42);
        box-shadow: 0 16px 28px rgba(47,118,255,.16);
    }
    100% {
        transform: translate3d(0, 0, 0);
        border-color: rgba(255,255,255,.05);
        box-shadow: 0 0 0 rgba(47,118,255,0);
    }
}

@keyframes ticketContentEnter {
    0% {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes ticketContentRefresh {
    0% {
        opacity: .38;
        transform: translate3d(0, 3px, 0);
    }
    58% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.ticket-row > div {
    min-width: 0;
}

.ticket-row .badge {
    justify-self: start;
}

.ticket-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.35;
}

.ticket-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.ticket-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px;
    background: rgba(18, 25, 39, .94);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.ticket-subject {
    font-size: 1.05em;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}

.status-bar {
    display: flex;
    gap: 12px;
}

.ticket-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    margin-top: 24px;
}

.messages-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    background: rgba(19, 30, 48, .92);
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .05);
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.empty-messages {
    text-align: center;
    padding: 34px 20px;
    color: var(--muted);
    background: rgba(19, 30, 48, .92);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .05);
}


.messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 64vh;
    overflow-y: auto;
    padding-right: 6px;
}

.message-card {
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .05);
    transition: all .2s ease;
    animation: slideInUp .3s ease;
}

.message-card.admin-message {
    background: rgba(15, 22, 36, .98);
    border-left: 4px solid var(--blue);
}

.message-card.user-message {
    background: rgba(19, 30, 48, .92);
    border-left: 4px solid var(--cyan);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.message-author {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.35;
}

.message-text {
    color: var(--text);
    line-height: 1.42;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
}

.message-time {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.3;
}

.reply-section {
    margin-top: 16px;
}

.reply-form .form-field {
    margin-bottom: 12px;
}

.reply-form textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-actions {
    margin-top: 8px;
}

.ticket-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.ticket-details h4,
.close-section h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text);
    line-height: 1.4;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

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

.detail-label {
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

.detail-value {
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.detail-divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 16px 0;
}

.status-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(42, 157, 107, .15);
    border: 1px solid rgba(42, 157, 107, .25);
    color: var(--text);
    line-height: 1.5;
}

.status-alert.closed {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .15);
}

.close-section {
    padding: 18px;
    background: rgba(255, 59, 59, .08);
    border: 1px solid rgba(255, 59, 59, .2);
    border-radius: 20px;
}

.btn.warn.block.full {
    width: 100%;
    padding: 15px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 16px;
    margin-top: 12px;
    line-height: 1.2;
}

.btn.warn.block.full:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(255, 59, 59, .3);
}

.messages-list::-webkit-scrollbar {
    width: 4px;
}

.messages-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,.03);
    border-radius: 2px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: rgba(99,160,255,.4);
    border-radius: 2px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: rgba(99,160,255,.6);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes waveDrift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
        opacity: .72;
    }
    50% {
        transform: translate3d(2%, 1%, 0) scale(1.05);
        opacity: .95;
    }
    100% {
        transform: translate3d(-1%, 2%, 0) scale(1.02);
        opacity: .8;
    }
}

@keyframes waveSweep {
    0% {
        background-position: 0% 50%;
        transform: translateX(-2%);
    }
    100% {
        background-position: 100% 50%;
        transform: translateX(2%);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1100px) {
    .hero-grid,
    .auth-grid,
    .grid.two,
    .profile-grid,
    .reply-grid,
    .stats,
    .ticket-row {
        grid-template-columns: 1fr;
    }

    .auth-form {
        border-right: 0;
        border-top: 1px solid rgba(255,255,255,.05);
    }

    .auth-side {
        border-left: 0;
        border-bottom: 1px solid rgba(255,255,255,.05);
    }

    .ticket-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ticket-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .app-shell {
        padding: 18px 14px;
    }

    .topbar {
        padding: 0 16px;
        z-index: 1201;
    }

    .container,
    .topbar,
    .flash {
        width: 100%;
        max-width: 100%;
    }

    .surface,
    .panel,
    .card,
    .ticket-page {
        border-radius: 22px;
    }

    .hero,
    .card,
    .panel-inner,
    .ticket-page,
    .auth-side,
    .auth-form {
        padding: 20px;
    }

    .hero {
        border-radius: 24px;
        animation: none;
        background:
            radial-gradient(circle at 18% 18%, rgba(50,185,255,.12), transparent 18%),
            radial-gradient(circle at 82% 14%, rgba(47,118,255,.14), transparent 20%),
            linear-gradient(120deg, rgba(10,24,42,.98) 0%, rgba(12,26,49,.96) 38%, rgba(9,18,33,.98) 100%);
        background-size: 100% 100%;
        box-shadow: 0 14px 38px rgba(0,0,0,.34);
    }

    .hero::before {
        animation: none;
        opacity: .45;
        filter: blur(12px);
    }

    .hero::after {
        animation: none;
        opacity: .12;
    }

    .hero-copy h1 {
        font-size: 26px;
        line-height: 1.4;
    }

    .hero-copy p {
        font-size: 14px;
        line-height: 1.48;
    }

    .hero-list {
        margin-top: 18px;
        gap: 10px;
    }

    .hero-item {
        padding: 13px 14px;
        border-radius: 16px;
        font-size: 14px;
        line-height: 1.4;
    }

    .brand-title {
        font-size: 16px;
    }

    .brand-subtitle {
        font-size: 12px;
    }

    .topbar,
    .section-title,
    .ticket-top {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
    }

    .toolbar {
        display: grid;
    }

    .topbar {
        position: relative;
        z-index: 1300;
    }

    .brand {
        position: relative;
        z-index: 1310;
    }

    .nav-container {
        position: relative;
        z-index: 1305;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px !important;
        height: 28px !important;
        padding: 6px !important;
        z-index: 1305;
        transition: opacity .18s ease, visibility .18s ease;
    }

    .nav-toggle span {
        width: 12px !important;
        height: 1.2px !important;
        right: 6px !important;
    }

    .nav-backdrop {
        display: block;
        z-index: 1290;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        background: linear-gradient(180deg, rgba(20, 30, 46, .995) 0%, rgba(14, 22, 36, .992) 56%, rgba(10, 16, 28, .99) 100%);
        flex-direction: column !important;
        padding: 70px 16px 24px !important;
        margin: 0 !important;
        border-left: 1px solid rgba(255,255,255,.12) !important;
        box-shadow: -18px 0 52px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        filter: none !important;
        z-index: 1300;
        transform: translate3d(100%, 0, 0);
        opacity: 0;
        visibility: hidden;
        transition: transform .34s cubic-bezier(0.22, 1, 0.36, 1), opacity .22s ease, visibility .22s ease;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex !important;
        align-items: stretch !important;
        pointer-events: none;
        touch-action: pan-y manipulation;
        will-change: transform, opacity;
        -webkit-overflow-scrolling: touch;
    }

    .nav.active {
        transform: translate3d(0, 0, 0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto;
    }

    body.menu-open .nav-toggle {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .nav-home-mobile {
        display: flex !important;
        order: -10;
    }

    .nav a {
        width: 100% !important;
        position: relative;
        z-index: 1;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 12px 16px !important;
        margin-bottom: 8px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        text-align: right !important;
        box-shadow: 0 3px 12px rgba(0,0,0,.15);
        border: 1px solid rgba(255,255,255,.08) !important;
        background: rgba(255,255,255,.04) !important;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        flex-direction: row-reverse !important;
        direction: rtl;
        min-height: 52px !important;
        line-height: 1.3;
    }

    .nav a .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 14px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.05);
        flex: 0 0 40px;
    }

    .nav a .nav-icon .icon-svg {
        width: 22px;
        height: 22px;
    }

    .nav a > span {
        margin-left: auto;
    }

    .nav a:hover {
        transform: translateX(-3px) !important;
        background: linear-gradient(135deg, rgba(47,118,255,.2), rgba(50,185,255,.18)) !important;
        box-shadow: 0 8px 24px rgba(47,118,255,.3) !important;
        border-color: rgba(99,160,255,.3) !important;
    }

    .nav-primary-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-admin-mobile {
        display: inline-flex !important;
    }

    .nav-more {
        display: none !important;
    }

    .nav-mobile-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: auto;
        margin-bottom: 52px;
        padding-top: 14px;
    }

    .nav .nav-mobile-actions .nav-action-card {
        width: 100% !important;
        min-height: 94px !important;
        margin: 0 !important;
        padding: 14px 10px !important;
        border-radius: 22px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
        box-shadow: 0 14px 32px rgba(0,0,0,.28) !important;
    }

    .nav .nav-mobile-actions .nav-action-card > span {
        margin: 0 !important;
        font-size: 12px;
        line-height: 1.45;
    }

    .nav .nav-mobile-actions .nav-action-card .nav-icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        border-radius: 16px;
    }

    .nav-action-home {
        background: linear-gradient(145deg, rgba(255,184,74,.18), rgba(47,118,255,.08)) !important;
        border-color: rgba(255,198,88,.28) !important;
    }

    .nav-action-home .nav-icon {
        color: #ffd166 !important;
        background: rgba(255,198,88,.12) !important;
        border-color: rgba(255,198,88,.20) !important;
    }

    .nav-action-logout {
        color: #fff3f3 !important;
        background: linear-gradient(145deg, rgba(255,30,56,.42), rgba(118,0,18,.42)) !important;
        border-color: rgba(255,74,96,.62) !important;
        box-shadow: 0 16px 34px rgba(255,30,56,.20) !important;
    }

    .nav-action-logout .nav-icon {
        color: #fff !important;
        background: linear-gradient(145deg, rgba(255,45,68,.52), rgba(154,8,31,.48)) !important;
        border-color: rgba(255,93,112,.48) !important;
    }

    .pagination-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-links {
        justify-content: center;
    }

    .section-meta-inline {
        width: 100%;
    }

    .field-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form {
        gap: 12px;
    }

    input, select, textarea {
        padding: 14px 14px;
        border-radius: 14px;
        font-size: 15px;
        line-height: 1.35;
    }

    textarea {
        min-height: 180px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 14px 0;
    }

    .stat {
        padding: 12px 10px;
        border-radius: 18px;
    }

    .stat .n {
        font-size: 20px;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .stat .t {
        font-size: 12px;
        line-height: 1.5;
    }

    .ticket-page {
        padding: 16px 12px;
        border-radius: 20px;
        margin: 8px;
        max-width: calc(100vw - 24px);
    }

    .section-title {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .section-title h2 {
        font-size: 22px !important;
        margin: 0;
        line-height: 1.4;
    }

    .status-bar {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ticket-content {
        gap: 16px;
    }

    .section-header {
        padding: 13px 14px;
        border-radius: 16px;
        text-align: center;
    }

    .section-header h3 {
        font-size: 16px;
        justify-content: center;
        gap: 8px;
        margin: 0;
        line-height: 1.4;
    }

    .count {
        font-size: 13px;
        line-height: 1.4;
    }

    .empty-messages {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .empty-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }

    .empty-messages p {
        font-size: 14px;
        margin: 0;
        line-height: 1.5;
    }

    .messages-list {
        max-height: 34vh;
        gap: 8px;
        padding: 0 4px;
    }

    .message-card {
        padding: 11px 12px;
        border-radius: 14px;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 8px;
    }

    .message-meta {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
    }

    .message-author {
        font-size: 13px;
        font-weight: 700;
        line-height: 1.35;
    }

    .message-time {
        font-size: 11px;
        text-align: right;
        flex-shrink: 0;
        line-height: 1.3;
    }

    .message-text {
        color: var(--text);
        line-height: 1.5;
        white-space: pre-wrap;
        word-break: break-word;
        font-size: 12px;
    }

    .reply-section {
        margin-top: 12px;
        padding: 14px;
        background: rgba(19,30,48,.92);
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,.08);
    }

    .reply-form .form-field {
        margin-bottom: 12px;
    }

    .reply-form textarea {
        min-height: 78px;
        font-size: 14px;
        padding: 12px;
        line-height: 1.45;
    }

    .form-actions .btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
        line-height: 1.2;
    }

    .ticket-sidebar {
        gap: 16px;
    }

    .ticket-details,
    .close-section {
        padding: 16px;
        background: rgba(19,30,48,.92);
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,.08);
    }

    .ticket-details h4,
    .close-section h4 {
        font-size: 15px;
        text-align: center;
        margin-bottom: 14px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        line-height: 1.4;
    }

    .detail-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        font-size: 13px;
    }

    .detail-label {
        font-size: 12px;
        color: var(--muted);
        min-width: 60px;
        text-align: right;
        line-height: 1.4;
    }

    .detail-value {
        font-size: 13px;
        text-align: left;
        font-weight: 600;
        line-height: 1.4;
    }

    .status-alert {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px;
    }

    .status-alert .icon {
        font-size: 1.5em;
    }

    .close-section .btn {
        min-height: 44px;
        padding: 12px;
        font-size: 14px;
        border-radius: 12px;
        line-height: 1.2;
    }

    .ticket-row {
        gap: 10px;
        padding: 14px;
        border-radius: 18px;
    }

    .ticket-title {
        font-size: 15px;
        line-height: 1.45;
    }

    .ticket-meta {
        font-size: 12px;
        line-height: 1.42;
    }

    .helper,
    .side-box,
    .flash {
        font-size: 13px;
        line-height: 1.42;
    }

    .reply-grid {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 14px;
    }

    .footer-space {
        height: 20px;
    }
}

@media (max-width: 480px) {
    .nav-backdrop {
        background: rgba(5, 10, 18, .3);
    }

    .app-shell {
        padding: 14px 10px;
    }

    .nav {
        width: 240px;
        padding: 60px 14px 16px;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 35px !important;
        z-index: 1305;
    }

    .nav-toggle span {
        width: 20px !important;
        height: 1px !important;
        right: 9px !important;
        transform: translateY(-3px);
    }

    .nav a {
        padding: 10px 14px !important;
        font-size: 13px !important;
        min-height: 40px !important;
        margin-bottom: 6px !important;
        line-height: 1.3;
    }

    .pagination-link,
    .pagination-ellipsis {
        min-width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .hero,
    .card,
    .panel-inner,
    .ticket-page,
    .auth-form {
        padding: 16px;
    }

    .hero-copy h1 {
        font-size: 23px;
        line-height: 1.35;
    }

    .hero-copy p {
        font-size: 14px;
        line-height: 1.45;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat .n {
        font-size: 18px;
    }

    .stat .t {
        font-size: 11px;
        line-height: 1.45;
    }

    .ticket-page {
        padding: 12px 8px;
        margin: 8px;
    }

    .messages-list {
        max-height: 30vh;
    }

    .section-header h3 {
        font-size: 15px;
        line-height: 1.35;
    }

    .message-card {
        padding: 10px 11px;
    }

    .message-author {
        font-size: 12px;
        line-height: 1.35;
    }

    .message-text {
        font-size: 11px;
        line-height: 1.45;
    }

    .message-time {
        font-size: 10px;
        line-height: 1.3;
    }

    .reply-form textarea {
        min-height: 70px;
        padding: 10px;
        font-size: 13px;
        line-height: 1.45;
    }

    .detail-row {
        font-size: 12px;
        padding: 6px 0;
    }

    .detail-label {
        font-size: 11px;
        min-width: 55px;
    }

    .detail-value {
        font-size: 12px;
    }

    .ticket-details h4,
    .close-section h4 {
        font-size: 14px;
        line-height: 1.35;
    }

    .badge {
        min-width: 70px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .status-bar {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
}
.loading-line {
    display: inline-block;       
    height: 16px;                
    width: 50px;                 
    background-color: rgba(17, 27, 43, 0.92);
    border-radius: 8px;          
    position: relative;
    overflow: hidden;
}

.loading-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% { left: -50%; }
    100% { left: 100%; }
}
@media (max-width: 360px) {
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .detail-label {
        min-width: auto;
        font-size: 12px;
    }

    .status-bar {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero,
    .hero::before,
    .hero::after,
    .btn {
        animation: none !important;
        transition: none !important;
    }
}

.nav-rank-chip {
    min-width: 88px;
    align-self: center;
}

.permission-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text);
    line-height: 1.3;
}

.permission-pill.static {
    cursor: default;
}

.permission-pill.static.muted-pill {
    opacity: .65;
}

.section-space {
    margin-top: 28px;
}

.proof-ban {
    background: rgba(255, 93, 93, .18);
    color: #ffeaea;
}

.proof-jail {
    background: rgba(255, 184, 76, .18);
    color: #fff4df;
}

.proof-mute {
    background: rgba(83, 196, 255, .18);
    color: #e8f8ff;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}


.file-picker-shell {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    border: 1px dashed rgba(99,160,255,.24);
    background:
        radial-gradient(circle at top right, rgba(99,160,255,.12), transparent 28%),
        linear-gradient(180deg, rgba(8,13,23,.96), rgba(11,18,30,.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.file-picker-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(47,118,255,.08), rgba(50,185,255,0));
    opacity: .55;
    pointer-events: none;
}

.file-picker-shell:hover,
.file-picker-shell.is-active {
    border-color: rgba(122,215,255,.42);
    box-shadow: 0 16px 34px rgba(47,118,255,.14), inset 0 1px 0 rgba(255,255,255,.05);
    transform: translateY(-1px);
}

.file-picker-shell.is-dragover {
    border-color: rgba(122,215,255,.72);
    background:
        radial-gradient(circle at top right, rgba(99,160,255,.18), transparent 28%),
        linear-gradient(180deg, rgba(10,18,31,.98), rgba(12,20,35,.99));
    box-shadow: 0 18px 38px rgba(47,118,255,.2), inset 0 0 0 1px rgba(122,215,255,.24);
}

.file-picker-shell.is-disabled {
    opacity: .62;
    filter: grayscale(.08);
}

.file-picker-input {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer;
    z-index: 3;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border: 0 !important;
}

.file-picker-input:disabled {
    cursor: not-allowed;
}

.file-picker-input::file-selector-button,
.file-picker-input::-webkit-file-upload-button {
    display: none;
}

.file-picker-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.file-picker-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(47,118,255,.18), rgba(66,194,255,.12));
    border: 1px solid rgba(99,160,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.file-picker-badge::before {
    display: none;
}

.file-picker-badge svg {
    width: 23px;
    height: 23px;
    color: rgba(236,244,255,.94);
    filter: drop-shadow(0 0 10px rgba(122,215,255,.38));
}

.message-text a,
.ticket-smart-link {
    color: #8fe7ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(143,231,255,.38);
    transition: color .18s ease, border-color .18s ease, text-shadow .18s ease;
}

.message-text a:hover,
.ticket-smart-link:hover,
.message-text a:focus-visible,
.ticket-smart-link:focus-visible {
    color: #ffffff;
    border-color: rgba(255,255,255,.72);
    text-shadow: 0 0 16px rgba(80,208,255,.34);
}

.site-nav-transition {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(50,185,255,.20), transparent 24%),
        radial-gradient(circle at 50% 58%, rgba(47,118,255,.18), transparent 32%),
        rgba(5, 8, 20, .92);
    backdrop-filter: blur(10px);
    transform: translate3d(0, 8px, 0) scale(1.01);
    transition: opacity .22s cubic-bezier(.22,1,.36,1), transform .22s cubic-bezier(.22,1,.36,1);
}

.site-nav-transition[hidden] {
    display: none;
}

.site-nav-transition.is-active,
.site-nav-transition.is-entering {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.site-nav-transition-card {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 24px;
    border: 1px solid rgba(122, 198, 255, .24);
    background:
        linear-gradient(145deg, rgba(14, 27, 50, .94), rgba(8, 16, 31, .86)),
        rgba(9, 18, 34, .88);
    box-shadow: 0 22px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08);
    transform: translate3d(0, 8px, 0) scale(.96);
    transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .22s ease;
}

.site-nav-transition.is-active .site-nav-transition-card,
.site-nav-transition.is-entering .site-nav-transition-card {
    transform: translate3d(0, 0, 0) scale(1);
}

.site-nav-transition-card span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 3px solid rgba(125, 205, 255, .16);
    border-top-color: rgba(125, 205, 255, .95);
    border-left-color: rgba(99, 160, 255, .62);
    box-shadow: 0 0 20px rgba(50,185,255,.22);
    animation: siteNavSpin .58s linear infinite;
}

@keyframes siteNavSpin {
    to { transform: rotate(360deg); }
}

body.page-soft-enter .main-content {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.994);
    transition: opacity .22s cubic-bezier(.22,1,.36,1), transform .22s cubic-bezier(.22,1,.36,1);
    will-change: opacity, transform;
}

body.page-soft-exit .main-content {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(.994);
    transition: opacity .14s ease, transform .14s cubic-bezier(.22,1,.36,1);
    will-change: opacity, transform;
}

@media (max-width: 680px) {
    .site-nav-transition {
        background: radial-gradient(circle at 50% 42%, rgba(47,118,255,.16), rgba(5,8,20,.94) 70%);
    }

    .site-nav-transition-card {
        width: 58px;
        height: 58px;
        border-radius: 20px;
        box-shadow: 0 16px 42px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.08);
    }

    .site-nav-transition-card span {
        width: 26px;
        height: 26px;
    }

    body.page-soft-enter .main-content {
        transform: translate3d(0, 7px, 0);
        transition-duration: .18s;
    }

    body.page-soft-exit .main-content {
        transform: translate3d(0, -5px, 0);
        transition-duration: .12s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav-transition,
    .site-nav-transition-card,
    .site-nav-transition-card span,
    body.page-soft-enter .main-content,
    body.page-soft-exit .main-content {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
}

@media (min-width: 781px) {
    .proof-feature .permission-grid {
        gap: 12px;
    }

    .proof-feature .permission-pill.static {
        min-width: 118px;
        justify-content: center;
        padding-inline: 18px;
    }
}

.file-picker-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.file-picker-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.file-picker-title {
    font-size: 14px;
    font-weight: 800;
    color: #edf5ff;
    line-height: 1.45;
}

.file-picker-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 14px;
    border: 1px solid rgba(99,160,255,.24);
    background: linear-gradient(135deg, rgba(47,118,255,.2), rgba(50,185,255,.16));
    color: #eef6ff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 10px 22px rgba(47,118,255,.14);
}

.file-picker-summary {
    color: rgba(220,233,255,.82);
    font-size: 12px;
    line-height: 1.52;
}

.file-picker-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-picker-list:empty {
    display: none;
}

.file-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
    color: #ebf4ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.file-picker-chip::before {
    display: none;
}

.file-picker-chip-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.5;
}

.file-picker-shell.is-disabled .file-picker-button {
    opacity: .72;
}

@media (max-width: 860px) {
    .file-picker-shell {
        padding: 12px;
        border-radius: 20px;
    }

    .file-picker-body {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .file-picker-badge {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        margin-inline: auto;
    }

    .file-picker-badge::before {
        width: 20px;
        height: 20px;
    }

    .file-picker-copy {
        text-align: center;
    }

    .file-picker-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .file-picker-button {
        width: 100%;
    }

    .file-picker-summary,
    .file-picker-list {
        justify-content: center;
    }
}

code {
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    color: #d8e6ff;
    font-family: Consolas, Monaco, monospace;
    direction: ltr;
}

.proof-filter-bar {
    display: grid;
    grid-template-columns: 1.3fr .8fr auto;
    gap: 14px;
    align-items: end;
}

.proof-filter-actions {
    align-self: end;
}

.proof-admin-list,
.proof-card-grid,
.proof-public-grid,
.rank-access-list {
    display: grid;
    gap: 18px;
}

.proof-admin-row,
.proof-public-card,
.proof-manage-card,
.rank-access-card {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(15,24,39,.92);
    overflow: hidden;
}

.proof-admin-row {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 18px;
    padding: 18px;
    align-items: center;
}

.proof-admin-thumb img,
.proof-public-media img,
.proof-manage-media img,
.proof-view-cover img,
.proof-media-preview img,
.proof-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proof-admin-thumb {
    height: 140px;
    border-radius: 18px;
    overflow: hidden;
}

.proof-admin-main p,
.proof-public-body p,
.proof-manage-body p {
    color: var(--muted);
    line-height: 1.52;
    margin: 0;
}

.proof-admin-top,
.proof-public-head,
.proof-manage-head,
.rank-access-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.proof-admin-actions {
    display: grid;
    gap: 12px;
    justify-items: start;
}

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

.proof-public-card {
    display: grid;
    min-height: 100%;
}

.proof-public-media {
    display: block;
    height: 230px;
}

.proof-manage-media {
    display: block;
}

.proof-public-body,
.proof-manage-body {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.proof-public-body h2,
.proof-manage-body h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.35;
}

.proof-public-meta,
.proof-manage-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.proof-manage-card {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.proof-manage-media {
    min-height: 100%;
}

.admin-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.admin-feature-card {
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(19,31,50,.96), rgba(11,17,27,.97));
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
}

.admin-feature-card.disabled {
    opacity: .7;
}

.admin-feature-head h2 {
    margin: 0;
}

.proof-create-layout,
.owner-access-grid {
    display: grid;
    gap: 18px;
}

.proof-create-layout {
    grid-template-columns: 380px 1fr;
}

.proof-create-intro {
    overflow: hidden;
}

.proof-create-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(50,185,255,.14);
    border: 1px solid rgba(50,185,255,.22);
}

.proof-limit-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.proof-limit-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.proof-create-form textarea {
    min-height: 180px;
}

.proof-create-actions {
    margin-top: 16px;
}

.proof-view-hero {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 22px;
    margin-bottom: 18px;
}

.proof-view-cover {
    min-height: 100%;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--shadow);
    background: rgba(15,24,39,.92);
}

.proof-view-summary {
    padding: 28px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(18,30,49,.96), rgba(11,17,27,.98));
    box-shadow: var(--shadow);
}

.proof-view-summary h1 {
    margin: 14px 0 10px;
    font-size: 38px;
    line-height: 1.25;
}

.proof-view-reason {
    color: var(--muted);
    line-height: 1.56;
    margin: 0 0 20px;
}

.proof-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.proof-fact-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.06);
    display: grid;
    gap: 8px;
}

.proof-fact-card span {
    color: var(--muted);
    font-size: 13px;
}

.proof-fact-card strong {
    font-size: 17px;
}

.proof-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.proof-media-card {
    border-radius: 24px;
    overflow: hidden;
    background: rgba(15,24,39,.92);
    border: 1px solid rgba(255,255,255,.06);
}

.proof-media-preview {
    position: relative;
    height: 280px;
    background: rgba(8,12,20,.94);
    border: 0;
    padding: 0;
    width: 100%;
    cursor: pointer;
}

.proof-media-preview video {
    height: 100%;
}

.proof-media-open-hint,
.proof-cover-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(7,12,22,.72);
    border: 1px solid rgba(255,255,255,.1);
    color: #f4f8ff;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.proof-cover-badge {
    bottom: 18px;
}

.proof-view-cover {
    position: relative;
    cursor: pointer;
    padding: 0;
}

.proof-view-cover:focus-visible,
.proof-media-preview:focus-visible {
    outline: 2px solid rgba(99,160,255,.65);
    outline-offset: 3px;
}

.proof-media-modal[hidden] {
    display: none;
}

.proof-media-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.proof-media-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2,6,14,.84);
    backdrop-filter: blur(10px);
}

.proof-media-dialog {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 18px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(16,28,45,.96), rgba(8,14,23,.98));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 34px 80px rgba(0,0,0,.45);
    display: grid;
    gap: 14px;
}

.proof-media-stage {
    display: grid;
    place-items: center;
    min-height: 280px;
    max-height: calc(100vh - 180px);
    overflow: auto;
    border-radius: 24px;
    background: rgba(4,8,15,.9);
}

.proof-media-stage img,
.proof-media-stage video {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    display: block;
}

.proof-media-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.proof-media-caption {
    display: grid;
    gap: 6px;
    padding: 4px 2px 2px;
}

.proof-media-caption strong {
    font-size: 18px;
}

.proof-media-caption span {
    color: var(--muted);
}

.proof-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inline-action-form {
    display: inline-flex;
}

.upload-progress-card {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(47,118,255,.12), rgba(255,255,255,.03));
    border: 1px solid rgba(99,160,255,.16);
}

.upload-progress-card.hidden {
    display: none;
}

.upload-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.upload-progress-head span {
    color: #dbe9ff;
}

.upload-progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}

.upload-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #2f76ff 0%, #63a0ff 100%);
    transition: width .18s ease;
}

.upload-progress-text {
    color: var(--muted);
    font-size: 13px;
}

.upload-progress-card.is-error {
    background: linear-gradient(180deg, rgba(255,71,87,.14), rgba(255,255,255,.03));
    border-color: rgba(255,99,110,.32);
}

.upload-progress-card.is-error .upload-progress-fill {
    background: linear-gradient(135deg, #ff4757 0%, #ff7686 100%);
}

.upload-progress-card.is-error .upload-progress-text {
    color: #ffb3ba;
}

.proof-current-thumb {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.proof-current-thumb-card {
    height: 240px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(15,24,39,.92);
}

.proof-current-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proof-edit-files {
    margin-top: 18px;
    display: grid;
    gap: 16px;
}

.proof-edit-file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.proof-edit-file-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
}

.proof-edit-file-preview {
    height: 210px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(8,12,20,.94);
}

.proof-edit-file-preview img,
.proof-edit-file-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proof-edit-file-meta {
    display: grid;
    gap: 6px;
}

.proof-edit-file-meta span,
.proof-edit-file-check span {
    color: var(--muted);
    font-size: 13px;
}

.proof-edit-file-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.proof-media-open {
    overflow: hidden;
}

.proof-media-meta {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.rank-access-card {
    padding: 20px;
    display: grid;
    gap: 18px;
}

.rank-access-block {
    display: grid;
    gap: 12px;
}

.rank-access-block h3 {
    margin: 0;
    font-size: 17px;
}

.proof-type-stack {
    display: grid;
    gap: 12px;
}

.proof-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

.compact-ticket-list .ticket-row {
    grid-template-columns: 1.2fr .8fr 1fr .8fr;
}

@media (max-width: 1100px) {
    .proof-public-grid,
    .admin-feature-grid,
    .proof-manage-card,
    .proof-view-hero,
    .proof-create-layout,
    .owner-access-grid {
        grid-template-columns: 1fr;
    }

    .proof-filter-bar {
        grid-template-columns: 1fr;
    }

    .proof-admin-row {
        grid-template-columns: 1fr;
    }

    .proof-admin-thumb {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .proof-public-grid,
    .proof-gallery-grid,
    .proof-fact-grid {
        grid-template-columns: 1fr;
    }

    .proof-public-media {
        height: 210px;
    }

    .proof-view-summary {
        padding: 20px;
    }

    .proof-view-summary h1 {
        font-size: 28px;
    }

    .proof-media-preview {
        height: 220px;
    }

    .proof-edit-file-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .proof-admin-row,
    .proof-public-body,
    .proof-manage-body,
    .rank-access-card,
    .admin-feature-card {
        padding: 16px;
    }

    .proof-admin-thumb,
    .proof-public-media,
    .proof-media-preview {
        height: 180px;
    }

    .proof-public-body h2,
    .proof-manage-body h2 {
        font-size: 20px;
    }
}

@media (max-width: 560px) {
    .proof-media-dialog {
        width: calc(100vw - 20px);
        margin: 10px auto;
        padding: 12px;
        border-radius: 22px;
    }

    .proof-media-stage {
        max-height: calc(100vh - 160px);
    }

    .proof-cover-badge,
    .proof-media-open-hint {
        left: 10px;
        bottom: 10px;
    }
}
body {
    line-height: 1.38;
}

p,
li,
.field-help,
.proof-view-reason,
.docs-content,
.doc-content,
.create-hero-copy p,
.quick-reply-text,
.owner-quick-reply-text {
    line-height: 1.32 !important;
}

.message-text,
.ticket-keyword-preview,
.reply-form textarea,
textarea {
    line-height: 1.24 !important;
}



.proof-media-modal[hidden] {
    display: none !important;
}

.proof-media-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: clamp(10px, 2vw, 24px);
}

.proof-media-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(80, 130, 255, .16), transparent 36%), rgba(1, 5, 12, .86);
    backdrop-filter: blur(14px);
    cursor: zoom-out;
}

.proof-media-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: calc(100vh - 24px);
    margin: 0;
    padding: clamp(10px, 1.6vw, 18px);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(18, 30, 50, .97), rgba(7, 12, 22, .99));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 34px 90px rgba(0, 0, 0, .52);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
}

.proof-media-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    direction: rtl;
}

.proof-media-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: #f3f7ff;
    background: rgba(255, 255, 255, .075);
    border: 1px solid rgba(255, 255, 255, .1);
    font-weight: 800;
    font-size: 13px;
}

.proof-media-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.proof-media-action,
.proof-media-close {
    position: static;
    width: auto;
    height: 44px;
    min-width: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
    z-index: 3;
    line-height: 1;
}

.proof-media-action {
    background: rgba(255, 255, 255, .08);
}

.proof-media-close {
    background: linear-gradient(135deg, rgba(255, 84, 112, .95), rgba(255, 129, 94, .95));
    box-shadow: 0 14px 32px rgba(255, 84, 112, .2);
}

.proof-media-action:hover,
.proof-media-close:hover,
.proof-media-action:focus-visible,
.proof-media-close:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .26);
    outline: none;
}

.proof-media-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(62vh, 620px);
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding: clamp(10px, 2vw, 20px);
    border-radius: 24px;
    background: radial-gradient(circle at center, rgba(106, 154, 255, .1), transparent 44%), rgba(2, 7, 15, .92);
    border: 1px solid rgba(255, 255, 255, .06);
}

.proof-media-stage img,
.proof-media-stage video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 240px);
    object-fit: contain;
    display: block;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .36);
}

.proof-media-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
    margin: 0;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .07);
    direction: rtl;
}

.proof-media-caption strong {
    color: #f7fbff;
    font-size: 15px;
}

.proof-media-caption span {
    color: rgba(226, 234, 245, .72);
    font-size: 12px;
}

.ticket-attachment-card,
.proof-media-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 32, 52, .94), rgba(10, 16, 28, .98));
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ticket-attachment-card:hover,
.proof-media-card:hover {
    transform: translateY(-2px);
    border-color: rgba(119, 169, 255, .36);
    box-shadow: 0 20px 52px rgba(0, 0, 0, .3);
}

.ticket-attachment-preview,
.proof-media-preview {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(92, 139, 255, .12), transparent 44%), rgba(4, 8, 15, .96);
}

.ticket-attachment-preview img,
.ticket-attachment-preview video,
.proof-media-preview img,
.proof-media-preview video {
    transition: transform .24s ease, filter .24s ease;
}

.ticket-attachment-card:hover .ticket-attachment-preview img,
.ticket-attachment-card:hover .ticket-attachment-preview video,
.proof-media-card:hover .proof-media-preview img,
.proof-media-card:hover .proof-media-preview video {
    transform: scale(1.025);
    filter: saturate(1.05);
}

.ticket-attachment-preview::after,
.proof-media-preview::after {
    content: 'نمایش';
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(5, 10, 18, .72);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
    pointer-events: none;
}

@media (max-width: 640px) {
    .proof-media-modal {
        padding: 8px;
    }

    .proof-media-dialog {
        max-height: calc(100vh - 16px);
        border-radius: 24px;
        gap: 10px;
    }

    .proof-media-toolbar {
        align-items: stretch;
    }

    .proof-media-kicker {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 40px;
    }

    .proof-media-actions {
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .proof-media-action,
    .proof-media-close {
        width: 100%;
        min-width: 0;
        height: 46px;
    }

    .proof-media-stage {
        min-height: 46vh;
        max-height: calc(100vh - 210px);
        border-radius: 20px;
    }

    .proof-media-stage img,
    .proof-media-stage video {
        max-height: calc(100vh - 260px);
        border-radius: 14px;
    }

    .proof-media-caption {
        display: grid;
        gap: 6px;
    }
}


.site-footer-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65em;
    height: 1.65em;
    margin: 0 .18em;
    color: #fb7185;
    vertical-align: -.16em;
    line-height: 1;
    white-space: nowrap;
}
.site-footer-heart .icon-heart {
    width: 1.65em;
    height: 1.65em;
}
.site-footer-copy {
    line-height: 1.85 !important;
}

/* ═══════════════════════════════════════════
   MODERN ANIMATION SYSTEM — 2026
   GPU-safe, mobile-aware, prefers-reduced aware
   ═══════════════════════════════════════════ */

/* ── Shared easing tokens ── */
:root {
    --ease-spring: cubic-bezier(.2, .9, .18, 1);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.45, 0, .55, 1);
    --dur-fast: 140ms;
    --dur-base: 200ms;
    --dur-slow: 320ms;
    --dur-enter: 480ms;
}

/* ── Upgrade btn transitions (GPU only) ── */
.btn {
    transition:
        transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-base) ease,
        border-color var(--dur-fast) ease,
        background var(--dur-base) ease;
    will-change: transform;
}

.btn:hover  { transform: translateY(-2px) scale(1.008); }
.btn:active { transform: translateY(0)    scale(.978); }

/* ── Nav links ── */
.nav a,
.site-header nav a {
    transition:
        color var(--dur-fast) ease,
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease;
}

/* ── Card hover: lift + glow ── */
.ticket-row,
.message-card,
.pagination-link {
    transition:
        transform var(--dur-base) var(--ease-out),
        border-color var(--dur-base) ease,
        box-shadow var(--dur-base) ease,
        background var(--dur-base) ease;
    will-change: transform;
}

.ticket-row:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 16px 36px rgba(0,0,0,.22), 0 0 0 1px rgba(99,160,255,.14);
    border-color: rgba(99,160,255,.22);
}

.message-card:hover {
    border-color: rgba(99,160,255,.16);
    background: rgba(255,255,255,.05);
}

/* ── Badge subtle pop ── */
.badge {
    transition:
        transform var(--dur-fast) var(--ease-spring),
        opacity var(--dur-fast) ease;
}

/* ── Ticket back link ── */
.ticket-back-link {
    transition:
        color var(--dur-fast) ease,
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        transform var(--dur-fast) var(--ease-out);
}

.ticket-back-link:hover {
    transform: translate3d(-2px, 0, 0);
}

/* ── Page enter animation ── */
@keyframes cgFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes cgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes cgScaleIn {
    from {
        opacity: 0;
        transform: scale(.96) translate3d(0, 8px, 0);
    }
    to {
        opacity: 1;
        transform: scale(1) translate3d(0, 0, 0);
    }
}

.ticket-page,
.ticket-content > .messages-section {
    animation: cgFadeUp var(--dur-enter) var(--ease-spring) both;
}

.ticket-content > .ticket-sidebar {
    animation: cgFadeUp var(--dur-enter) var(--ease-spring) 60ms both;
}

.section-title {
    animation: cgFadeIn var(--dur-base) ease both;
}

/* ── Flash/alert enter ── */
.flash-message,
.status-alert {
    animation: cgScaleIn var(--dur-slow) var(--ease-spring) both;
}

/* ── Sidebar details rows ── */
.detail-row {
    transition:
        background var(--dur-fast) ease,
        opacity var(--dur-fast) ease;
}

/* ── Input focus glow ── */
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select {
    transition:
        border-color var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease,
        background var(--dur-fast) ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus {
    outline: none;
    border-color: rgba(99,160,255,.46) !important;
    box-shadow: 0 0 0 3px rgba(99,160,255,.12), 0 2px 8px rgba(0,0,0,.18);
}

/* ── Pagination hover lift ── */
.pagination-link:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 14px 28px rgba(47,118,255,.18);
}

/* ══ MOBILE: strip will-change + heavy effects ══ */
@media (pointer: coarse), (max-width: 700px) {
    :root {
        --dur-fast: 120ms;
        --dur-base: 160ms;
        --dur-slow: 240ms;
        --dur-enter: 320ms;
    }

    .btn,
    .ticket-row,
    .message-card,
    .pagination-link,
    .badge,
    .ticket-back-link {
        will-change: auto;
    }

    .ticket-row:hover,
    .message-card:hover,
    .pagination-link:hover,
    .btn:hover {
        transform: none;
        box-shadow: none;
    }

    .ticket-page,
    .ticket-content > .messages-section,
    .ticket-content > .ticket-sidebar {
        animation: cgFadeIn var(--dur-base) ease both;
    }
}

/* ══ Reduced motion: kill everything ══ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   نوار تعمیر و نگهداری + کلیدهای ظاهری پنل مالک
   ============================================================ */
.site-maintenance-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 196, 0, .32);
    background: linear-gradient(135deg, rgba(255, 180, 0, .14), rgba(255, 120, 0, .08));
    color: #ffd98a;
    font-weight: 800;
    font-size: 13.5px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.site-maintenance-banner .site-maintenance-ico {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 196, 0, .16);
    color: #ffce5c;
    flex: 0 0 auto;
}

/* خاموش‌کردن افکت‌های هاور از پنل مالک */
html.fx-hover-off .card:hover,
html.fx-hover-off .messages-section:hover,
html.fx-hover-off .ticket-details:hover,
html.fx-hover-off .admin-feature-card:hover,
html.fx-hover-off .proof-public-card:hover,
html.fx-hover-off .proof-manage-card:hover,
html.fx-hover-off .ticket-row:hover,
html.fx-hover-off .message-card:hover,
html.fx-hover-off .owner-glass-card:hover,
html.fx-hover-off .owner-metric-card:hover,
html.fx-hover-off .owner-toggle-row:hover,
html.fx-hover-off .karzar-card:hover,
html.fx-hover-off .utility-feature-card:hover,
html.fx-hover-off .utility-mini-card:hover,
html.fx-hover-off .owner-tab:hover {
    transform: none !important;
    box-shadow: inherit !important;
}

/* خاموش‌کردن افکت‌های پس‌زمینه */
html.fx-bg-off .app-shell::before,
html.fx-bg-off .app-shell::after {
    display: none !important;
    animation: none !important;
}

.btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.3);
    pointer-events: none;
}

/* ── Task 5: Custom inline link syntax [link]TEXT[URL] ── */
.cg-custom-link {
    color: var(--blue-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .15s ease;
}
.cg-custom-link:hover {
    color: var(--cyan);
}

/* ── Task 6: Line height fix — compact and readable across panel pages ── */
html, body {
    line-height: 1.6;
}
.message-text,
.ticket-body,
.panel p,
.surface p,
.modal p,
.flash,
.form-hint,
.form-label,
.ticket-messages .message-card,
textarea {
    line-height: 1.6;
}
/* Reduce overly large line-heights in specific widgets */
.ann-body,
.cg-ann-body,
.owner-glass-card p,
.owner-card-head p {
    line-height: 1.6;
}
