:root {
    --bg: #171914;
    --bg-soft: #24281f;
    --surface: rgba(44, 48, 38, 0.94);
    --surface-alt: rgba(58, 63, 49, 0.96);
    --surface-soft: rgba(34, 37, 30, 0.9);
    --border: #555b46;
    --border-strong: #777f63;
    --text: #e5e0c8;
    --muted-text: #b1ae9b;
    --primary: #b69b4a;
    --primary-dark: #856f33;
    --primary-soft: rgba(182, 155, 74, 0.18);
    --success-bg: #243222;
    --success-border: #4e7750;
    --warning-bg: #3c321f;
    --warning-border: #9a8041;
    --danger-bg: #442729;
    --danger-border: #8b5053;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    font-family: Tahoma, Verdana, sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 34px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 0, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 34px),
        linear-gradient(180deg, #181a15 0%, #1f221c 52%, #141611 100%);
    color: var(--text);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

body::before {
    background:
        linear-gradient(180deg, rgba(182, 155, 74, 0.1) 0%, rgba(182, 155, 74, 0) 180px);
}

body::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 18%);
    opacity: 0.24;
}

a {
    color: #e0c46d;
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: #f0d789;
    text-decoration: underline;
}

.page-shell {
    min-height: 100vh;
}

.admin-shell {
    display: flex;
    flex-direction: column;
}

.admin-layout {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: calc(100% - 24px);
    max-width: none;
    margin: 22px 12px;
}

.admin-sidebar {
    width: 280px;
    flex: 0 0 280px;
    padding: 18px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.07),
        inset -1px -1px 0 rgba(0, 0, 0, 0.28),
        0 8px 18px rgba(0, 0, 0, 0.22);
    position: sticky;
    top: 18px;
}

.admin-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.admin-sidebar-subtitle {
    color: var(--muted-text);
    font-size: 12px;
    margin-bottom: 14px;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(74, 78, 63, 0.94) 0%, rgba(44, 48, 39, 0.94) 100%);
    color: #e3dfcb;
    font-size: 14px;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-sidebar-link:hover {
    text-decoration: none;
    color: #ffffff;
    border-color: var(--border-strong);
    background: linear-gradient(180deg, rgba(88, 92, 74, 0.96) 0%, rgba(49, 53, 42, 0.96) 100%);
}

.admin-sidebar-link.active {
    background: linear-gradient(180deg, rgba(144, 123, 62, 0.96) 0%, rgba(96, 80, 37, 0.96) 100%);
    border-color: #ad9750;
    color: #11120e;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-content {
    width: 100%;
    margin: 0 0 16px;
}

.page-slide-down {
    animation: adminPanelSlideDown 0.34s ease;
}

@keyframes adminPanelSlideDown {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 14px 20px;
    background: linear-gradient(180deg, rgba(62, 67, 52, 0.98) 0%, rgba(36, 39, 31, 0.98) 100%);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.25);
}

.admin-topbar {
    width: calc(100% - 24px);
    max-width: none;
    margin: 0 12px;
}

.brand-block {
    min-width: 260px;
}

.brand {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.brand-signature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-tag-link,
.brand-home-link,
.footer-brand-link,
.hero-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-tag-link:hover,
.brand-home-link:hover,
.footer-brand-link:hover,
.hero-logo-link:hover {
    text-decoration: none;
}

.brand-tag,
.brand-name {
    color: #ffffff;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1;
}

.brand-tag {
    font-size: 18px;
}

.brand-tag-link:hover .brand-tag,
.footer-brand-link:hover {
    color: #ffffff;
}

.brand-home-link {
    gap: 8px;
}

.brand-by {
    color: #8f949a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.brand-name {
    font-size: 15px;
}

.brand-name-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border: 1px solid #776533;
    border-radius: 2px;
    background: linear-gradient(180deg, #cfb45c 0%, #8b7335 100%);
    color: #181910;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: #b0ad99;
    font-size: 13px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(74, 78, 63, 0.94) 0%, rgba(44, 48, 39, 0.94) 100%);
    color: #e3dfcb;
    font-size: 14px;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link:hover {
    text-decoration: none;
    color: #ffffff;
    border-color: var(--border-strong);
    background: linear-gradient(180deg, rgba(88, 92, 74, 0.96) 0%, rgba(49, 53, 42, 0.96) 100%);
}

.nav-link.active {
    background: linear-gradient(180deg, rgba(144, 123, 62, 0.96) 0%, rgba(96, 80, 37, 0.96) 100%);
    border-color: #ad9750;
    color: #11120e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-badge,
.badge {
    display: inline-block;
    min-width: 22px;
    padding: 2px 7px;
    border: 1px solid #6f5f2e;
    border-radius: 2px;
    background: #b79c4d;
    color: #16170f;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #ddd8c4;
    margin-left: auto;
    min-width: 0;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(58, 62, 50, 0.94) 0%, rgba(31, 34, 27, 0.94) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    object-fit: cover;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.96) 0%, rgba(11, 11, 11, 0.96) 100%);
    flex: 0 0 auto;
}

.user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #f3ebcf;
}

.user-box-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-box-name {
    font-size: 13px;
    font-weight: 700;
    color: #f0ebd7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-box-meta {
    font-size: 11px;
    color: var(--muted-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-box-actions {
    flex-wrap: nowrap;
}

.sidebar-toggle {
    display: none;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(79, 84, 68, 0.98) 0%, rgba(44, 48, 38, 0.98) 100%);
    color: #ece7d1;
    font: inherit;
    cursor: pointer;
}

.content {
    width: calc(100% - 24px);
    max-width: none;
    margin: 22px 12px;
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-title-row h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    color: #ffffff;
}

.page-title-row h1::before,
.login-panel h1::before,
.panel h2::before,
.table-toolbar strong::before {
    content: "";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border: 1px solid #2b6a44;
    border-radius: 1px;
    background: linear-gradient(180deg, #4cb06e 0%, #2e7d4f 100%);
    box-shadow: none;
    flex: 0 0 auto;
}

.page-title-row p {
    margin: 6px 0 0;
    color: var(--muted-text);
}

.panel,
.table-panel,
.login-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.07),
        inset -1px -1px 0 rgba(0, 0, 0, 0.28),
        0 8px 18px rgba(0, 0, 0, 0.22);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.panel:hover,
.table-panel:hover,
.login-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.panel,
.login-panel {
    padding: 18px;
    margin-bottom: 16px;
}

.table-panel {
    overflow: hidden;
    margin-bottom: 16px;
}

.table-toolbar {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.96) 0%, rgba(20, 20, 20, 0.96) 100%);
}

.pagination-bar {
    border-top: 1px solid #26303a;
    border-bottom: 0;
}

.table-toolbar strong,
.login-panel h1,
.panel h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-toolbar form,
.filter-form,
.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-box {
    padding: 16px;
    background: linear-gradient(180deg, rgba(66, 71, 57, 0.96) 0%, rgba(37, 40, 32, 0.96) 100%);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 16px rgba(0, 0, 0, 0.18);
}

.stats-label {
    display: block;
    color: #c1bb9c;
    font-size: 13px;
    margin-bottom: 6px;
}

.stats-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

.stats-help {
    margin-top: 6px;
    color: var(--muted-text);
    font-size: 12px;
}

.hero-panel {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    padding: 22px;
    margin-bottom: 16px;
    background:
        linear-gradient(180deg, rgba(70, 75, 60, 0.98) 0%, rgba(38, 42, 33, 0.98) 100%);
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.hero-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.hero-logo-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-logo-link {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-logo-link:hover {
    color: #ffffff;
}

.hero-logo-sep {
    color: #8f949a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.hero-logo-text-brand {
    color: #ebe6d1;
}

.hero-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border: 1px solid #766432;
    border-radius: 2px;
    background: linear-gradient(180deg, #d1b85d 0%, var(--primary-dark) 100%);
    color: #171810;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-panel h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.15;
    color: #ffffff;
}

.hero-panel p {
    margin: 0;
    max-width: 760px;
    color: #d2ccb5;
    font-size: 15px;
    line-height: 1.6;
}

.hero-side {
    display: flex;
    align-items: stretch;
}

.hero-panel-single {
    grid-template-columns: 1fr;
}

.hero-note {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 2px;
}

.hero-note strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
}

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

.feature-list,
.feature-list-block {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li,
.feature-list-block div {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #b6bbbf;
    line-height: 1.5;
}

.feature-list li:last-child,
.feature-list-block div:last-child {
    border-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

tbody tr td {
    background: rgba(55, 59, 48, 0.72);
    transition: background 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    color: #e7e2cb;
}

th {
    background: linear-gradient(180deg, rgba(91, 96, 78, 0.98) 0%, rgba(56, 60, 46, 0.98) 100%);
    color: #f4f0df;
}

tr:nth-child(even) td {
    background: rgba(48, 51, 42, 0.8);
}

tbody tr:hover td {
    background: rgba(67, 71, 57, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 rgba(182, 155, 74, 0.95);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    border: 1px solid #39444f;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 700;
}

.status-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: #7e8b97;
    box-shadow: none;
    flex: 0 0 auto;
}

.status-pill.accepted,
.status-pill.completed,
.status-pill.solved,
.status-pill.removed {
    color: #8ff0b4;
    background: var(--success-bg);
    border-color: var(--success-border);
}

.status-pill.accepted::before,
.status-pill.completed::before,
.status-pill.solved::before,
.status-pill.removed::before {
    background: #44d17f;
    box-shadow: none;
}

.status-pill.open,
.status-pill.in_review,
.status-pill.pending {
    color: #ffd27a;
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.status-pill.open::before,
.status-pill.in_review::before,
.status-pill.pending::before {
    background: #e8b14e;
    box-shadow: none;
}

.status-pill.active,
.status-pill.failed,
.status-pill.rejected {
    color: #ff9dac;
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.status-pill.active::before,
.status-pill.failed::before,
.status-pill.rejected::before {
    background: #ff6074;
    box-shadow: none;
}

.status-pill.expired {
    color: #c7d0d8;
    background: rgba(255, 255, 255, 0.05);
    border-color: #46525e;
}

.status-pill.expired::before {
    background: #95a2af;
    box-shadow: none;
}

.status-pill.admin-enabled {
    color: #8ff0b4;
    background: var(--success-bg);
    border-color: var(--success-border);
}

.status-pill.admin-enabled::before {
    background: #44d17f;
    box-shadow: none;
}

.status-pill.admin-disabled {
    color: #c7d0d8;
    background: rgba(255, 255, 255, 0.05);
    border-color: #46525e;
}

.status-pill.admin-disabled::before {
    background: #95a2af;
    box-shadow: none;
}

label {
    display: block;
    font-size: 13px;
    color: #aaafb5;
    margin-bottom: 5px;
}

.label-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    color: #ffd27a;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
}

.label-tip-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: 260px;
    padding: 10px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    background: rgba(10, 11, 13, 0.96);
    color: #d7dbe0;
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease;
    z-index: 20;
}

.label-tip-popup::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: rgba(10, 11, 13, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.label-tip:hover .label-tip-popup {
    opacity: 1;
    visibility: visible;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.96) 0%, rgba(11, 11, 11, 0.96) 100%);
    color: #eef3f8;
    font: inherit;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(183, 42, 52, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(183, 42, 52, 0.25);
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(13, 13, 13, 0.98) 100%);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(180deg, rgba(20, 20, 20, 0.96) 0%, rgba(11, 11, 11, 0.96) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d8cb96' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, calc(100% - 13px) 50%;
    background-size: 100% 100%, 11px 7px;
}

select option,
select optgroup {
    color: #181910;
    background: #d8cb96;
}

input[type="checkbox"] {
    width: auto;
    accent-color: #b69b4a;
}

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

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.button {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid rgba(132, 113, 52, 0.9);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(184, 158, 80, 0.98) 0%, rgba(123, 103, 46, 0.98) 100%);
    color: #13140f;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.button:hover {
    text-decoration: none;
    background: linear-gradient(180deg, rgba(201, 174, 92, 0.98) 0%, rgba(135, 113, 52, 0.98) 100%);
    border-color: rgba(154, 132, 61, 0.98);
}

.button-light {
    border-color: var(--border);
    background: linear-gradient(180deg, rgba(79, 84, 68, 0.98) 0%, rgba(44, 48, 38, 0.98) 100%);
    color: #ece7d1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.button-light:hover {
    background: linear-gradient(180deg, rgba(92, 97, 79, 0.98) 0%, rgba(50, 54, 43, 0.98) 100%);
    border-color: var(--border-strong);
}

.button-danger {
    border-color: rgba(132, 73, 79, 0.95);
    background: linear-gradient(180deg, rgba(131, 72, 79, 0.96) 0%, rgba(85, 38, 42, 0.96) 100%);
    color: #f2e7e7;
}

.button-success {
    border-color: rgba(73, 106, 61, 0.95);
    background: linear-gradient(180deg, rgba(74, 111, 61, 0.96) 0%, rgba(39, 60, 33, 0.96) 100%);
    color: #f0f5ea;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.button-success:hover {
    background: linear-gradient(180deg, rgba(87, 126, 72, 0.98) 0%, rgba(44, 67, 36, 0.98) 100%);
    border-color: rgba(91, 131, 75, 0.98);
}

.button-small {
    padding: 6px 10px;
    font-size: 12px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.025);
    color: #dde1e5;
}

.flash {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.flash-success {
    background: #123021;
    border-color: #1d6541;
    color: #96e4b6;
}

.flash-error {
    background: #38161b;
    border-color: #8c2b39;
    color: #ffadb8;
}

.flash-info {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.11);
    color: #c0ccd7;
}

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

.footer {
    padding: 18px 22px 30px;
    color: #7d8288;
    font-size: 13px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(9, 9, 9, 0.55);
}

.admin-main .footer {
    margin-top: 0;
}

.theme-switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(280px, 100%);
    margin: 0 auto 18px;
}

.theme-label {
    margin: 0;
    color: #9ea697;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.theme-select {
    max-width: 280px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-brand-tag,
.footer-brand-name {
    color: #f1f3f5;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.footer-brand-link {
    color: #f1f3f5;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.footer-brand-by {
    color: #82888e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.footer-brand-mark {
    color: #ff445b;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
}

.login-panel {
    width: min(460px, calc(100% - 24px));
}

.login-panel h1 {
    margin: 0 0 8px;
}

.auth-panel {
    width: 100%;
}

.auth-panel-compact {
    position: relative;
    overflow: hidden;
}

.auth-panel-compact::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(183, 42, 52, 0.08) 0%, rgba(183, 42, 52, 0) 120px);
    pointer-events: none;
}

.empty-state {
    padding: 22px;
    color: #a7acb1;
    background: rgba(255, 255, 255, 0.02);
}

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

.detail-item {
    min-width: 0;
}

.detail-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #8f9ead;
    text-transform: uppercase;
}

.profile-panel {
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar-shell {
    flex: 0 0 auto;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    object-fit: cover;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.96) 0%, rgba(11, 11, 11, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 16px rgba(0, 0, 0, 0.18);
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #f3ebcf;
    letter-spacing: 0.08em;
}

.profile-summary {
    min-width: 0;
    flex: 1 1 auto;
}

.profile-summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-meta-grid {
    align-items: start;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    color: #d8d3bb;
}

.checkbox-row input[type="checkbox"] {
    margin: 0;
}

.reply-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply-entry {
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: rgba(18, 19, 16, 0.48);
}

.reply-entry-player,
.reply-entry-site_user {
    border-left: 3px solid #b69b4a;
}

.reply-entry-admin {
    border-left: 3px solid #4da66d;
    background: rgba(18, 27, 20, 0.48);
}

.reply-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.reply-entry-author {
    color: #ffffff;
    font-weight: 700;
}

.reply-entry-type {
    color: #d6ae4b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.reply-entry-date {
    color: var(--muted-text);
}

.reply-entry-body {
    color: var(--text);
    line-height: 1.7;
    white-space: normal;
}

.evidence-preview {
    display: block;
    max-width: min(100%, 620px);
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.22);
}

.server-log-accent {
    color: #ffd27a;
}

.server-log-text {
    color: #e5ebf0;
}

.log-response {
    max-width: 360px;
    font-family: Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #d9dfc9;
    white-space: pre-wrap;
    word-break: break-word;
}

.mono {
    font-family: Consolas, monospace;
}

body[data-theme="oldschool"] {
    background:
        radial-gradient(circle at 12% 16%, rgba(198, 174, 98, 0.07), transparent 20%),
        radial-gradient(circle at 84% 12%, rgba(92, 104, 70, 0.12), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 34px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 34px),
        linear-gradient(180deg, #181a15 0%, #1f221c 52%, #141611 100%);
}

body[data-theme="oldschool"]::before {
    background:
        linear-gradient(180deg, rgba(182, 155, 74, 0.1) 0%, rgba(182, 155, 74, 0.02) 120px, rgba(182, 155, 74, 0) 220px),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.025), transparent 46%);
    opacity: 0.75;
}

body[data-theme="oldschool"]::after {
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.008) 0 10px,
            rgba(0, 0, 0, 0.02) 10px 20px
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 18%);
    opacity: 0.28;
}

body[data-theme="oldschool"] .table-toolbar {
    position: relative;
    overflow: hidden;
    border-bottom-color: #666d55;
    background:
        radial-gradient(circle at 14% 28%, rgba(198, 174, 98, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(68, 73, 58, 0.96) 0%, rgba(33, 36, 29, 0.97) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

body[data-theme="oldschool"] .table-toolbar::before,
body[data-theme="oldschool"] .table-toolbar::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body[data-theme="oldschool"] .table-toolbar::before {
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.012) 0 10px,
            rgba(0, 0, 0, 0.024) 10px 20px
        );
    opacity: 0.45;
}

body[data-theme="oldschool"] .table-toolbar::after {
    background:
        linear-gradient(90deg, rgba(182, 155, 74, 0.12) 0%, rgba(182, 155, 74, 0) 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 48%);
    opacity: 0.85;
}

body[data-theme="oldschool"] .table-toolbar > * {
    position: relative;
    z-index: 1;
}

body[data-theme="modern"] {
    --bg: #0f1218;
    --bg-soft: #191d25;
    --surface: rgba(20, 25, 33, 0.86);
    --surface-alt: rgba(28, 34, 44, 0.92);
    --surface-soft: rgba(12, 15, 20, 0.82);
    --border: #2d3541;
    --border-strong: #475364;
    --text: #edf2f8;
    --muted-text: #9ca8ba;
    --primary: #ff6b2b;
    --primary-dark: #c94a18;
    --primary-soft: rgba(255, 107, 43, 0.18);
    --success-bg: rgba(21, 56, 38, 0.84);
    --success-border: #2c8b5a;
    --warning-bg: rgba(73, 49, 17, 0.84);
    --warning-border: #b37c2d;
    --danger-bg: rgba(81, 24, 31, 0.84);
    --danger-border: #bf4356;
    font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 44px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.016) 0, rgba(255, 255, 255, 0.016) 1px, transparent 1px, transparent 44px),
        linear-gradient(180deg, #0b0d12 0%, #11161d 48%, #0b0e13 100%);
}

body[data-theme="modern"]::before {
    background:
        linear-gradient(180deg, rgba(255, 107, 43, 0.16) 0%, rgba(255, 107, 43, 0) 220px),
        radial-gradient(circle at top right, rgba(112, 152, 218, 0.12), transparent 30%);
}

body[data-theme="modern"]::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 20%);
    opacity: 0.34;
}

body[data-theme="modern"] a {
    color: #ff8e5d;
}

body[data-theme="modern"] a:hover {
    color: #ffaf89;
}

body[data-theme="modern"] .topbar {
    background: linear-gradient(180deg, rgba(22, 27, 35, 0.96) 0%, rgba(13, 16, 21, 0.96) 100%);
    border-bottom-color: #3b4553;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 26px rgba(0, 0, 0, 0.28);
}

body[data-theme="modern"] .admin-sidebar {
    background: rgba(18, 22, 29, 0.82);
    border-color: rgba(83, 95, 113, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 16px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="modern"] .admin-sidebar-link {
    border-color: #36404f;
    background: linear-gradient(180deg, rgba(35, 43, 55, 0.92) 0%, rgba(20, 25, 33, 0.92) 100%);
    color: #dae3ee;
}

body[data-theme="modern"] .admin-sidebar-link:hover {
    border-color: #4e5a6d;
    background: linear-gradient(180deg, rgba(45, 54, 68, 0.94) 0%, rgba(24, 29, 38, 0.94) 100%);
}

body[data-theme="modern"] .admin-sidebar-link.active {
    background: linear-gradient(180deg, rgba(255, 107, 43, 0.96) 0%, rgba(191, 72, 22, 0.96) 100%);
    border-color: #ff7b46;
    color: #ffffff;
}

body[data-theme="modern"] .sidebar-toggle {
    border-color: #37414f;
    background: linear-gradient(180deg, rgba(41, 49, 61, 0.96) 0%, rgba(22, 27, 35, 0.96) 100%);
    color: #e6ecf5;
}

body[data-theme="modern"] .brand-subtitle,
body[data-theme="modern"] .hero-logo-sep,
body[data-theme="modern"] .footer-brand-by,
body[data-theme="modern"] .theme-label {
    color: #8d97a7;
}

body[data-theme="modern"] .brand-name-mark,
body[data-theme="modern"] .hero-logo-mark {
    border-color: #9b431f;
    background: linear-gradient(180deg, #ff8448 0%, #d2511d 100%);
    color: #ffffff;
}

body[data-theme="modern"] .nav-link {
    border-color: #36404f;
    background: linear-gradient(180deg, rgba(35, 43, 55, 0.92) 0%, rgba(20, 25, 33, 0.92) 100%);
    color: #dae3ee;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="modern"] .nav-link:hover {
    border-color: #4e5a6d;
    background: linear-gradient(180deg, rgba(45, 54, 68, 0.94) 0%, rgba(24, 29, 38, 0.94) 100%);
}

body[data-theme="modern"] .nav-link.active {
    background: linear-gradient(180deg, rgba(255, 107, 43, 0.96) 0%, rgba(191, 72, 22, 0.96) 100%);
    border-color: #ff7b46;
    color: #ffffff;
}

body[data-theme="modern"] .nav-badge,
body[data-theme="modern"] .badge {
    border-color: #b45429;
    background: #ff7439;
    color: #ffffff;
}

body[data-theme="modern"] .page-title-row h1::before,
body[data-theme="modern"] .login-panel h1::before,
body[data-theme="modern"] .panel h2::before,
body[data-theme="modern"] .table-toolbar strong::before {
    border-color: #9c411e;
    background: linear-gradient(180deg, #ff8750 0%, #d5531f 100%);
}

body[data-theme="modern"] .panel,
body[data-theme="modern"] .table-panel,
body[data-theme="modern"] .login-panel {
    background: rgba(18, 22, 29, 0.82);
    border-color: rgba(83, 95, 113, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 16px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="modern"] .table-toolbar {
    background: linear-gradient(180deg, rgba(19, 23, 30, 0.96) 0%, rgba(12, 15, 20, 0.96) 100%);
    border-bottom-color: #313b48;
}

body[data-theme="modern"] .stats-box {
    background: linear-gradient(180deg, rgba(30, 36, 46, 0.94) 0%, rgba(16, 20, 27, 0.94) 100%);
    border-color: #3c4656;
}

body[data-theme="modern"] .stats-label,
body[data-theme="modern"] .hint,
body[data-theme="modern"] .muted,
body[data-theme="modern"] label {
    color: #a5b0bf;
}

body[data-theme="modern"] .hero-panel {
    background: linear-gradient(180deg, rgba(28, 34, 44, 0.96) 0%, rgba(13, 16, 21, 0.96) 100%);
    border-color: #485365;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="modern"] .hero-note,
body[data-theme="modern"] .empty-state,
body[data-theme="modern"] .checkbox-row {
    background: rgba(255, 255, 255, 0.02);
    border-color: #313a47;
}

body[data-theme="modern"] th {
    background: linear-gradient(180deg, rgba(39, 47, 60, 0.96) 0%, rgba(25, 31, 40, 0.96) 100%);
    color: #f4f7fb;
}

body[data-theme="modern"] tbody tr td {
    background: rgba(24, 29, 38, 0.74);
}

body[data-theme="modern"] tr:nth-child(even) td {
    background: rgba(19, 24, 31, 0.82);
}

body[data-theme="modern"] tbody tr:hover td {
    background: rgba(31, 37, 48, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="modern"] tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 rgba(255, 107, 43, 0.96);
}

body[data-theme="modern"] input[type="text"],
body[data-theme="modern"] input[type="password"],
body[data-theme="modern"] input[type="number"],
body[data-theme="modern"] input[type="url"],
body[data-theme="modern"] input[type="email"],
body[data-theme="modern"] input[type="file"],
body[data-theme="modern"] select,
body[data-theme="modern"] textarea {
    border-color: #374250;
    background-image:
        linear-gradient(180deg, rgba(16, 20, 27, 0.96) 0%, rgba(10, 12, 17, 0.96) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff8f62' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
    color: #eef3f9;
}

body[data-theme="modern"] input[type="text"]:focus,
body[data-theme="modern"] input[type="password"]:focus,
body[data-theme="modern"] input[type="number"]:focus,
body[data-theme="modern"] input[type="url"]:focus,
body[data-theme="modern"] input[type="email"]:focus,
body[data-theme="modern"] input[type="file"]:focus,
body[data-theme="modern"] select:focus,
body[data-theme="modern"] textarea:focus {
    border-color: rgba(255, 107, 43, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(255, 107, 43, 0.22);
    background-image:
        linear-gradient(180deg, rgba(19, 24, 31, 0.98) 0%, rgba(12, 15, 21, 0.98) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff8f62' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
}

body[data-theme="modern"] select option,
body[data-theme="modern"] select optgroup {
    color: #151922;
    background: #e8edf4;
}

body[data-theme="modern"] .button {
    border-color: #c14a1b;
    background: linear-gradient(180deg, rgba(255, 114, 57, 0.98) 0%, rgba(202, 75, 26, 0.98) 100%);
    color: #ffffff;
}

body[data-theme="modern"] .button:hover {
    background: linear-gradient(180deg, rgba(255, 130, 78, 0.98) 0%, rgba(212, 84, 34, 0.98) 100%);
    border-color: #d95922;
}

body[data-theme="modern"] .button-light {
    border-color: #37414f;
    background: linear-gradient(180deg, rgba(41, 49, 61, 0.96) 0%, rgba(22, 27, 35, 0.96) 100%);
    color: #e6ecf5;
}

body[data-theme="modern"] .button-light:hover {
    border-color: #4d5869;
    background: linear-gradient(180deg, rgba(48, 58, 72, 0.98) 0%, rgba(26, 32, 41, 0.98) 100%);
}

body[data-theme="modern"] .button-success {
    border-color: #2c8b5a;
    background: linear-gradient(180deg, rgba(47, 146, 94, 0.96) 0%, rgba(26, 95, 58, 0.96) 100%);
}

body[data-theme="modern"] .button-danger {
    border-color: #b74053;
    background: linear-gradient(180deg, rgba(190, 69, 88, 0.96) 0%, rgba(132, 36, 52, 0.96) 100%);
}

body[data-theme="modern"] .flash-success {
    background: rgba(17, 59, 39, 0.84);
    border-color: #2a8c59;
    color: #96e1b5;
}

body[data-theme="modern"] .flash-error {
    background: rgba(65, 18, 26, 0.88);
    border-color: #c34255;
    color: #ffb1bf;
}

body[data-theme="modern"] .flash-info {
    background: rgba(34, 42, 53, 0.86);
    border-color: #445163;
    color: #d1daea;
}

body[data-theme="modern"] .footer {
    border-top-color: rgba(255, 255, 255, 0.04);
    background: rgba(8, 10, 14, 0.68);
    color: #8e98a9;
}

body[data-theme="modern"] .footer-brand-link,
body[data-theme="modern"] .footer-brand-name {
    color: #f0f3f8;
}

body[data-theme="modern"] .footer-brand-mark {
    color: #ff7a47;
}

body[data-theme="modern"] .reply-entry {
    background: rgba(17, 21, 28, 0.82);
}

body[data-theme="modern"] .reply-entry-admin {
    background: rgba(15, 33, 22, 0.82);
}

body[data-theme="arena2026"] {
    --bg: #060709;
    --bg-soft: #0d1014;
    --surface: rgba(10, 12, 16, 0.78);
    --surface-alt: rgba(16, 18, 24, 0.88);
    --surface-soft: rgba(7, 9, 12, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 70, 70, 0.34);
    --text: #f5f7fa;
    --muted-text: #98a0ac;
    --primary: #ff3434;
    --primary-dark: #ba1717;
    --primary-soft: rgba(255, 52, 52, 0.16);
    --success-bg: rgba(9, 61, 35, 0.72);
    --success-border: #1fc36b;
    --warning-bg: rgba(85, 53, 11, 0.74);
    --warning-border: #d9a132;
    --danger-bg: rgba(91, 17, 23, 0.78);
    --danger-border: #ff4b5d;
    font-family: "Segoe UI Variable", "Segoe UI", "Bahnschrift", Tahoma, sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 45, 45, 0.12), transparent 24%),
        radial-gradient(circle at 82% 14%, rgba(255, 90, 90, 0.08), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(54, 68, 92, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 56px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 56px),
        linear-gradient(135deg, #040506 0%, #0a0c10 35%, #07080b 100%);
}

body[data-theme="arena2026"]::before {
    background:
        linear-gradient(180deg, rgba(255, 46, 46, 0.22) 0%, rgba(255, 46, 46, 0.03) 120px, rgba(0, 0, 0, 0) 280px),
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.05), transparent 34%);
    opacity: 0.92;
    animation: arenaPulse 10s ease-in-out infinite;
}

body[data-theme="arena2026"]::after {
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 53, 53, 0.06) 50%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 18%);
    opacity: 0.48;
}

@keyframes arenaPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.03);
        opacity: 1;
    }
}

body[data-theme="arena2026"] a {
    color: #ff7b7b;
}

body[data-theme="arena2026"] a:hover {
    color: #ffb0b0;
}

body[data-theme="arena2026"] .topbar {
    background:
        linear-gradient(180deg, rgba(18, 20, 27, 0.94) 0%, rgba(7, 8, 11, 0.96) 100%);
    border-bottom-color: rgba(255, 63, 63, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -1px 0 rgba(255, 55, 55, 0.08),
        0 16px 42px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
    justify-content: flex-start;
    gap: 14px;
    padding: 10px 16px;
}

body[data-theme="arena2026"] .admin-topbar {
    width: calc(100% - 24px);
    margin: 0 12px;
}

body[data-theme="arena2026"] .admin-layout {
    width: calc(100% - 24px);
    margin: 14px 12px 20px 12px;
    gap: 14px;
}

body[data-theme="arena2026"] .content {
    width: calc(100% - 24px);
    max-width: none;
    margin: 16px 12px 22px 12px;
}

body[data-theme="arena2026"] .brand-block {
    min-width: 280px;
    max-width: 340px;
}

body[data-theme="arena2026"] .main-nav {
    margin-left: 10px;
    margin-right: auto;
    gap: 8px;
}

body[data-theme="arena2026"] .user-box {
    margin-left: auto;
    gap: 8px;
}

body[data-theme="arena2026"] .admin-sidebar,
body[data-theme="arena2026"] .panel,
body[data-theme="arena2026"] .table-panel,
body[data-theme="arena2026"] .login-panel,
body[data-theme="arena2026"] .stats-box,
body[data-theme="arena2026"] .hero-panel {
    background:
        linear-gradient(180deg, rgba(19, 21, 29, 0.88) 0%, rgba(8, 10, 14, 0.82) 100%);
    border-color: rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 22px 48px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 53, 53, 0.05);
    backdrop-filter: blur(18px);
}

body[data-theme="arena2026"] .admin-sidebar {
    padding: 14px 14px 16px;
}

body[data-theme="arena2026"] .admin-sidebar::before,
body[data-theme="arena2026"] .panel::before,
body[data-theme="arena2026"] .table-panel::before,
body[data-theme="arena2026"] .login-panel::before,
body[data-theme="arena2026"] .hero-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 61, 61, 0) 0%, rgba(255, 61, 61, 0.55) 48%, rgba(255, 61, 61, 0) 100%);
    pointer-events: none;
}

body[data-theme="arena2026"] .panel,
body[data-theme="arena2026"] .table-panel,
body[data-theme="arena2026"] .login-panel,
body[data-theme="arena2026"] .hero-panel,
body[data-theme="arena2026"] .admin-sidebar {
    position: relative;
    overflow: hidden;
}

body[data-theme="arena2026"] .admin-sidebar::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 63, 63, 0) 0%, rgba(255, 63, 63, 0.48) 14%, rgba(255, 63, 63, 0.22) 50%, rgba(255, 63, 63, 0.48) 86%, rgba(255, 63, 63, 0) 100%);
    box-shadow: 0 0 16px rgba(255, 58, 58, 0.2);
}

body[data-theme="arena2026"] .admin-sidebar-title,
body[data-theme="arena2026"] .page-title-row h1,
body[data-theme="arena2026"] .login-panel h1,
body[data-theme="arena2026"] .panel h2,
body[data-theme="arena2026"] .table-toolbar strong,
body[data-theme="arena2026"] .stats-value {
    color: #ffffff;
    letter-spacing: 0.02em;
}

body[data-theme="arena2026"] .brand-subtitle,
body[data-theme="arena2026"] .hero-logo-sep,
body[data-theme="arena2026"] .footer-brand-by,
body[data-theme="arena2026"] .theme-label,
body[data-theme="arena2026"] .stats-label,
body[data-theme="arena2026"] .hint,
body[data-theme="arena2026"] .muted,
body[data-theme="arena2026"] label,
body[data-theme="arena2026"] .admin-sidebar-subtitle {
    color: #949ca9;
}

body[data-theme="arena2026"] .brand-tag,
body[data-theme="arena2026"] .brand-name,
body[data-theme="arena2026"] .footer-brand-link,
body[data-theme="arena2026"] .footer-brand-name,
body[data-theme="arena2026"] .hero-logo-link,
body[data-theme="arena2026"] .hero-logo-text {
    color: #ffffff;
    text-shadow:
        0 0 18px rgba(255, 63, 63, 0.16),
        0 2px 12px rgba(0, 0, 0, 0.34);
}

body[data-theme="arena2026"] .brand-name-mark,
body[data-theme="arena2026"] .hero-logo-mark,
body[data-theme="arena2026"] .footer-brand-mark {
    border-color: rgba(255, 73, 73, 0.7);
    background: linear-gradient(180deg, #ff5050 0%, #b90f17 100%);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 48, 48, 0.22);
}

body[data-theme="arena2026"] .brand-signature,
body[data-theme="arena2026"] .hero-logo,
body[data-theme="arena2026"] .footer-brand {
    position: relative;
    gap: 10px;
}

body[data-theme="arena2026"] .brand-home-link,
body[data-theme="arena2026"] .hero-logo-link,
body[data-theme="arena2026"] .footer-brand-link {
    position: relative;
    z-index: 1;
}

body[data-theme="arena2026"] .brand-home-link {
    gap: 10px;
    padding: 4px 0;
}

body[data-theme="arena2026"] .brand-tag {
    font-size: 17px;
    letter-spacing: 0.22em;
}

body[data-theme="arena2026"] .brand-name,
body[data-theme="arena2026"] .hero-logo-text-brand,
body[data-theme="arena2026"] .footer-brand-name {
    font-size: 17px;
    letter-spacing: 0.34em;
    font-weight: 800;
}

body[data-theme="arena2026"] .hero-logo {
    margin-bottom: 10px;
}

body[data-theme="arena2026"] .hero-logo-link {
    font-size: 21px;
    letter-spacing: 0.3em;
}

body[data-theme="arena2026"] .hero-logo-mark,
body[data-theme="arena2026"] .brand-name-mark,
body[data-theme="arena2026"] .footer-brand-mark {
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

body[data-theme="arena2026"] .brand-signature::after,
body[data-theme="arena2026"] .hero-logo::after,
body[data-theme="arena2026"] .footer-brand::after {
    content: "";
    position: absolute;
    left: 0;
    right: auto;
    bottom: -6px;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 63, 63, 0.78) 0%, rgba(255, 63, 63, 0.12) 72%, rgba(255, 63, 63, 0) 100%);
    box-shadow: 0 0 18px rgba(255, 58, 58, 0.22);
}

body[data-theme="arena2026"] .nav-link,
body[data-theme="arena2026"] .admin-sidebar-link,
body[data-theme="arena2026"] .sidebar-toggle,
body[data-theme="arena2026"] .button-light {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(28, 31, 40, 0.92) 0%, rgba(12, 14, 19, 0.9) 100%);
    color: #edf1f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="arena2026"] .nav-link,
body[data-theme="arena2026"] .sidebar-toggle {
    padding: 7px 10px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body[data-theme="arena2026"] .nav-link:hover,
body[data-theme="arena2026"] .admin-sidebar-link:hover,
body[data-theme="arena2026"] .sidebar-toggle:hover,
body[data-theme="arena2026"] .button-light:hover {
    text-decoration: none;
    border-color: rgba(255, 73, 73, 0.34);
    background:
        linear-gradient(180deg, rgba(35, 38, 49, 0.96) 0%, rgba(15, 17, 23, 0.94) 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

body[data-theme="arena2026"] .admin-sidebar-nav {
    gap: 10px;
}

body[data-theme="arena2026"] .admin-sidebar-link {
    position: relative;
    padding: 11px 12px 11px 14px;
}

body[data-theme="arena2026"] .admin-sidebar-link::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: -6px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 58, 58, 0) 0%, rgba(255, 58, 58, 0.3) 26%, rgba(255, 58, 58, 0.12) 74%, rgba(255, 58, 58, 0) 100%);
}

body[data-theme="arena2026"] .admin-sidebar-link:first-child::before {
    display: none;
}

body[data-theme="arena2026"] .admin-sidebar-link::after {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 61, 61, 0) 0%, rgba(255, 61, 61, 0.42) 50%, rgba(255, 61, 61, 0) 100%);
    opacity: 0.85;
}

body[data-theme="arena2026"] .nav-link.active,
body[data-theme="arena2026"] .admin-sidebar-link.active {
    border-color: rgba(255, 75, 75, 0.62);
    background:
        linear-gradient(135deg, rgba(255, 60, 60, 0.96) 0%, rgba(145, 15, 23, 0.98) 100%);
    color: #ffffff;
    box-shadow:
        0 12px 26px rgba(141, 14, 21, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="arena2026"] .admin-sidebar-link.active::after {
    background: linear-gradient(180deg, rgba(255, 164, 164, 0) 0%, rgba(255, 255, 255, 0.84) 50%, rgba(255, 164, 164, 0) 100%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

body[data-theme="arena2026"] .nav-badge,
body[data-theme="arena2026"] .badge {
    border-color: rgba(255, 77, 77, 0.55);
    border-radius: 999px;
    background: linear-gradient(180deg, #ff5353 0%, #c31820 100%);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(255, 69, 69, 0.18);
}

body[data-theme="arena2026"] .page-title-row h1::before,
body[data-theme="arena2026"] .login-panel h1::before,
body[data-theme="arena2026"] .panel h2::before,
body[data-theme="arena2026"] .table-toolbar strong::before {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff6262 0%, #c01018 100%);
    box-shadow: 0 0 14px rgba(255, 64, 64, 0.45);
}

body[data-theme="arena2026"] .table-toolbar {
    background:
        linear-gradient(180deg, rgba(34, 9, 12, 0.96) 0%, rgba(18, 11, 15, 0.96) 18%, rgba(10, 11, 15, 0.98) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    padding: 10px 16px 11px;
    border-top: 1px solid rgba(255, 88, 88, 0.28);
}

body[data-theme="arena2026"] .table-toolbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 67, 67, 0.16) 0%, rgba(255, 67, 67, 0.04) 36%, rgba(255, 67, 67, 0) 72%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 10px, rgba(255, 255, 255, 0.005) 10px 20px);
    pointer-events: none;
}

body[data-theme="arena2026"] .table-toolbar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(255, 71, 71, 0.16) 0%, rgba(255, 71, 71, 0.88) 50%, rgba(255, 71, 71, 0.16) 100%);
    box-shadow: 0 0 18px rgba(255, 61, 61, 0.28);
}

body[data-theme="arena2026"] th {
    background:
        linear-gradient(180deg, rgba(37, 14, 18, 0.98) 0%, rgba(24, 18, 23, 0.98) 10%, rgba(18, 20, 27, 0.98) 100%);
    color: #f7f9fb;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}

body[data-theme="arena2026"] tbody tr td {
    background: rgba(13, 15, 20, 0.72);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body[data-theme="arena2026"] tr:nth-child(even) td {
    background: rgba(16, 18, 25, 0.82);
}

body[data-theme="arena2026"] tbody tr:hover td {
    background:
        linear-gradient(90deg, rgba(62, 15, 20, 0.34) 0%, rgba(31, 18, 24, 0.92) 18%, rgba(20, 22, 28, 0.96) 100%);
    border-bottom-color: rgba(255, 82, 82, 0.16);
}

body[data-theme="arena2026"] tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 rgba(255, 69, 69, 0.96);
}

body[data-theme="arena2026"] .table-panel {
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="arena2026"] .table-panel table {
    border-collapse: separate;
    border-spacing: 0;
}

body[data-theme="arena2026"] .table-panel thead th:first-child {
    border-top-left-radius: 10px;
}

body[data-theme="arena2026"] .table-panel thead th:last-child {
    border-top-right-radius: 10px;
}

body[data-theme="arena2026"] .table-panel tbody td {
    position: relative;
}

body[data-theme="arena2026"] .table-panel tbody tr td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255, 62, 62, 0) 0%, rgba(255, 62, 62, 0.34) 50%, rgba(255, 62, 62, 0) 100%);
    opacity: 0.6;
}

body[data-theme="arena2026"] .table-toolbar strong {
    position: relative;
    z-index: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

body[data-theme="arena2026"] .table-toolbar strong::before {
    margin-right: 2px;
}

body[data-theme="arena2026"] .stats-box::after,
body[data-theme="arena2026"] .hero-panel::after,
body[data-theme="arena2026"] .table-panel::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 71, 71, 0) 0%, rgba(255, 71, 71, 0.3) 50%, rgba(255, 71, 71, 0) 100%);
    pointer-events: none;
}

body[data-theme="arena2026"] input[type="text"],
body[data-theme="arena2026"] input[type="password"],
body[data-theme="arena2026"] input[type="number"],
body[data-theme="arena2026"] input[type="url"],
body[data-theme="arena2026"] input[type="email"],
body[data-theme="arena2026"] input[type="file"],
body[data-theme="arena2026"] select,
body[data-theme="arena2026"] textarea,
body[data-theme="arena2026"] .theme-select {
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background-image:
        linear-gradient(180deg, rgba(15, 17, 22, 0.98) 0%, rgba(9, 10, 13, 0.98) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff6262' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
    color: #f2f5f9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="arena2026"] input[type="text"]:focus,
body[data-theme="arena2026"] input[type="password"]:focus,
body[data-theme="arena2026"] input[type="number"]:focus,
body[data-theme="arena2026"] input[type="url"]:focus,
body[data-theme="arena2026"] input[type="email"]:focus,
body[data-theme="arena2026"] input[type="file"]:focus,
body[data-theme="arena2026"] select:focus,
body[data-theme="arena2026"] textarea:focus,
body[data-theme="arena2026"] .theme-select:focus {
    border-color: rgba(255, 77, 77, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(255, 68, 68, 0.22),
        0 0 18px rgba(255, 53, 53, 0.12);
}

body[data-theme="arena2026"] select option,
body[data-theme="arena2026"] select optgroup {
    color: #f6f8fb;
    background: #14171d;
}

body[data-theme="arena2026"] .button {
    border-color: rgba(255, 74, 74, 0.76);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 66, 66, 0.98) 0%, rgba(163, 13, 21, 0.98) 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(135, 14, 20, 0.24);
}

body[data-theme="arena2026"] .button:hover {
    background: linear-gradient(135deg, rgba(255, 86, 86, 0.98) 0%, rgba(179, 18, 28, 0.98) 100%);
    border-color: rgba(255, 97, 97, 0.86);
}

body[data-theme="arena2026"] .button-success {
    border-color: rgba(56, 214, 123, 0.64);
    background: linear-gradient(135deg, rgba(35, 199, 108, 0.98) 0%, rgba(13, 102, 56, 0.98) 100%);
}

body[data-theme="arena2026"] .button-danger {
    border-color: rgba(255, 86, 105, 0.78);
    background: linear-gradient(135deg, rgba(255, 77, 100, 0.98) 0%, rgba(142, 19, 40, 0.98) 100%);
}

body[data-theme="arena2026"] .flash-success {
    background: rgba(8, 63, 35, 0.8);
    border-color: rgba(48, 205, 118, 0.58);
    color: #9cf0c0;
}

body[data-theme="arena2026"] .flash-error {
    background: rgba(82, 14, 23, 0.84);
    border-color: rgba(255, 83, 103, 0.62);
    color: #ffb6c2;
}

body[data-theme="arena2026"] .flash-info {
    background: rgba(28, 33, 43, 0.84);
    border-color: rgba(255, 255, 255, 0.08);
    color: #d5dce7;
}

body[data-theme="arena2026"] .empty-state,
body[data-theme="arena2026"] .checkbox-row,
body[data-theme="arena2026"] .hero-note {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

body[data-theme="arena2026"] .reply-entry {
    border-radius: 12px;
    background: rgba(11, 13, 18, 0.84);
    border-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="arena2026"] .reply-entry-admin {
    background: rgba(41, 16, 21, 0.82);
    border-color: rgba(255, 77, 77, 0.12);
}

body[data-theme="arena2026"] .footer {
    border-top-color: rgba(255, 255, 255, 0.04);
    background: rgba(5, 6, 9, 0.72);
    color: #9198a4;
    backdrop-filter: blur(12px);
}

body[data-theme="arena2026"] .footer-brand-mark {
    box-shadow: 0 0 16px rgba(255, 58, 58, 0.2);
}

@media (max-width: 920px) {
    .topbar,
    .page-title-row {
        flex-direction: column;
        align-items: start;
    }

    .admin-topbar,
    .admin-layout {
        width: calc(100% - 16px);
    }

    .admin-layout {
        flex-direction: column;
        margin-top: 14px;
    }

    .sidebar-toggle {
        display: inline-block;
    }

    .admin-sidebar {
        width: 100%;
        flex: 1 1 auto;
        position: static;
        max-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        opacity: 0;
        transition: max-height 0.28s ease, opacity 0.24s ease, padding 0.24s ease, border-width 0.24s ease;
    }

    body.sidebar-open .admin-sidebar {
        max-height: 1200px;
        padding-top: 18px;
        padding-bottom: 18px;
        border-width: 1px;
        opacity: 1;
    }

    .hero-panel,
    .feature-grid,
    .grid-4,
    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .content {
        width: calc(100% - 16px);
    }

    .admin-content {
        width: 100%;
    }

    .table-panel {
        overflow-x: auto;
    }

    .login-wrap {
        min-height: auto;
    }

    .theme-switcher {
        width: 100%;
    }
}
