:root {
    --bg: #050806;
    --bg-elevated: #0d1210;
    --panel: #111814;
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #edf3ee;
    --muted: #8ea093;
    --primary: #35d07f;
    --primary-dark: #1fa862;
    --accent: #ffb347;
    --danger: #ff6b6b;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top, #102018 0%, var(--bg) 45%);
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.92em;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid var(--panel-border);
    background: rgba(8, 12, 10, 0.92);
    backdrop-filter: blur(12px);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #1f8f57);
    color: #04140b;
}

.brand strong,
.brand div strong {
    display: block;
    font-size: 1rem;
}

.brand span,
.brand div span,
.brand p {
    color: var(--muted);
    font-size: 0.85rem;
}

.sidebar-nav,
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--panel-border);
}

.sidebar-footer .nav-discord {
    background: rgba(88, 101, 242, 0.14);
    color: #dfe1ff;
}

.sidebar-footer .nav-discord:hover {
    background: rgba(88, 101, 242, 0.24);
    color: #fff;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    color: var(--muted);
    transition: 0.2s ease;
}

.nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(53, 208, 127, 0.12);
    color: var(--text);
}

.nav-item.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.user-menu {
    position: relative;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.7rem 0.65rem 0.75rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.user-menu:hover .user-chip,
.user-menu.open .user-chip {
    border-color: rgba(53, 208, 127, 0.35);
    background: linear-gradient(180deg, rgba(53, 208, 127, 0.12), rgba(53, 208, 127, 0.05));
    box-shadow: 0 0 0 1px rgba(53, 208, 127, 0.08);
}

.user-menu.active .user-chip {
    border-color: rgba(53, 208, 127, 0.45);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #04140b;
    background: linear-gradient(135deg, var(--primary), #1f8f57);
    box-shadow: 0 4px 12px rgba(53, 208, 127, 0.25);
}

.user-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-menu-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.user-menu-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1;
}

.user-menu-status .dot {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.12);
}

.user-menu-toggle {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #c5d4ca;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.2s ease;
}

.user-menu-toggle:hover,
.user-menu.open .user-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text);
}

.user-menu-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.5rem);
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem;
    border-radius: 14px;
    background: rgba(10, 15, 12, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(53, 208, 127, 0.06);
    backdrop-filter: blur(14px);
    z-index: 20;
}

.user-menu.open .user-menu-dropdown {
    display: flex;
    animation: userMenuIn 0.16s ease;
}

@keyframes userMenuIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: #c8d5cc;
    font-size: 0.88rem;
    font-weight: 500;
    transition: 0.2s ease;
}

.user-menu-icon,
.user-menu-item .discord-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}

.user-menu-item span {
    flex: 1;
}

.user-menu-item:hover,
.user-menu-item.active {
    background: rgba(53, 208, 127, 0.14);
    color: var(--text);
}

.user-menu-discord:hover {
    background: rgba(88, 101, 242, 0.22);
    color: #fff;
}

.user-menu-logout {
    color: #d4a0a0;
}

.user-menu-logout:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #ffb4b4;
}

.user-menu-divider {
    height: 1px;
    margin: 0.15rem 0.35rem;
    background: rgba(255, 255, 255, 0.08);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.dot.online {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.15);
}

.main-content {
    padding: 1.5rem;
}

.page-header,
.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.page-header h1,
.panel-header h2 {
    margin: 0.2rem 0;
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.subtitle,
.panel-meta {
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.overview-panel {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.overview-general {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.mini-stat span {
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.mini-stat strong {
    font-size: 1rem;
    line-height: 1;
}

.item-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: stretch;
}

.item-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem 0.35rem 0.4rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.1), rgba(53, 208, 127, 0.06));
    border: 1px solid rgba(255, 179, 71, 0.16);
    min-width: 0;
}

.item-stat-pill-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px;
    flex-shrink: 0;
}

.item-stat-pill-label {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-stat-pill strong {
    font-size: 1.05rem;
    color: var(--accent);
    line-height: 1;
    margin-left: auto;
    padding-left: 0.15rem;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.stat-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.6rem;
}

.stat-card.accent strong {
    color: var(--accent);
}

.item-stats {
    margin-top: 0;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stat-card.item-stat {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08), rgba(53, 208, 127, 0.05));
    border-color: rgba(255, 179, 71, 0.18);
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px;
    flex-shrink: 0;
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.stat-card-body span {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.stat-card-body strong {
    margin-top: 0;
    font-size: 1.5rem;
    line-height: 1.1;
}

.item-stats .stat-card span {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.filter-chip-img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px;
    flex-shrink: 0;
}

.filter-chip.filter-chip-with-icon span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.tag.with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tag-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: contain;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: calc(var(--radius) + 2px);
    padding: 1.2rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.filter-panel {
    overflow: hidden;
    padding: 0.85rem 1rem 1rem;
}

.filter-panel-header {
    margin-bottom: 0.65rem;
    align-items: center;
}

.filter-panel-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.filter-compact {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: flex-end;
}

.filter-row-main {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-row-bottom {
    align-items: flex-end;
    gap: 0.55rem;
}

.filter-grow {
    flex: 1 1 180px;
    min-width: 160px;
}

.filter-narrow {
    flex: 0 1 90px;
    min-width: 72px;
}

.filter-v4 {
    flex: 0 1 130px;
    min-width: 110px;
}

.filter-item-select {
    flex: 1 1 140px;
    min-width: 120px;
}

.filter-sort {
    flex: 0 1 120px;
    min-width: 100px;
}

.filter-field.filter-grow input,
.filter-field.filter-grow select,
.filter-field.filter-item-select select {
    width: 100%;
}

.filter-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.filter-section {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.filter-section-title {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ef0c0;
}

.filter-v4-box {
    border-color: rgba(255, 179, 71, 0.28);
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08), rgba(53, 208, 127, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.filter-grid.compact-grid {
    margin-top: 0.85rem;
}

.filter-grid.v4-grid {
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.filter-field.span-2 {
    grid-column: span 2;
}

.filter-field > span {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1 1 100%;
    min-width: 0;
    align-items: center;
}

.filter-chip-compact span {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.filter-chip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-chip span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    transition: 0.2s ease;
}

.filter-chip input:checked + span {
    border-color: rgba(53, 208, 127, 0.55);
    background: rgba(53, 208, 127, 0.14);
    color: #d7ffe8;
    box-shadow: 0 0 0 1px rgba(53, 208, 127, 0.15);
}

.filter-v4-box .filter-chip input:checked + span {
    border-color: rgba(255, 179, 71, 0.55);
    background: rgba(255, 179, 71, 0.14);
    color: #ffe6c2;
}

.btn-filter-submit {
    width: auto;
    min-height: 38px;
    min-width: 72px;
    padding: 0.45rem 1.1rem;
    flex-shrink: 0;
    align-self: flex-end;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    min-height: auto;
}

.race-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 110px;
}

.race-cell strong {
    font-size: 0.88rem;
}

.race-v4-badge,
.race-v3-badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.race-v4-badge {
    background: rgba(255, 179, 71, 0.16);
    color: #ffd59a;
}

.race-v3-badge {
    background: rgba(53, 208, 127, 0.12);
    color: #9ef0c0;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--muted);
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    border: 1px solid var(--panel-border);
    background: #0a100d;
    color: var(--text);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

input:focus,
select:focus {
    outline: 2px solid rgba(53, 208, 127, 0.35);
    border-color: rgba(53, 208, 127, 0.45);
}

.checkbox-field {
    flex-direction: row;
    align-items: center;
    padding-top: 1.6rem;
}

.checkbox-field input {
    width: auto;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #04140b;
}

.btn-secondary,
.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: #ffb4b4;
}

.btn:hover {
    transform: translateY(-1px);
}

.table-wrap {
    overflow: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

.data-table th,
.data-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.player-cell strong {
    display: block;
}

.player-cell span {
    color: var(--muted);
    font-size: 0.82rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    background: rgba(53, 208, 127, 0.12);
    color: #9ef0c0;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.75rem;
}

.tag.mythical {
    background: rgba(255, 179, 71, 0.15);
    color: #ffd59a;
}

.empty-row {
    text-align: center;
    color: var(--muted);
    padding: 2rem !important;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.page-btn {
    min-width: 40px;
}

.page-btn.active {
    background: rgba(53, 208, 127, 0.18);
    color: var(--text);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.profile-info-card {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
}

.profile-info-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.profile-info-card strong {
    display: block;
    font-size: 1rem;
    word-break: break-all;
    margin-bottom: 0.65rem;
}

.btn-small {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
}

.script-panel {
    border-color: rgba(53, 208, 127, 0.25);
    background: linear-gradient(180deg, rgba(53, 208, 127, 0.08), rgba(255, 255, 255, 0.02));
}

.script-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin: 1rem 0;
}

.step-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
}

.step-card span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(53, 208, 127, 0.18);
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.step-card p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.script-note-input {
    width: 100%;
    margin-bottom: 0.85rem;
    border: 1px solid var(--panel-border);
    background: #0a100d;
    color: var(--text);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

.script-note-hint {
    margin-top: 0.65rem;
}

.script-label {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.copy-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.copy-row.compact {
    margin-top: 0.75rem;
}

.script-box {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid var(--panel-border);
    background: #070b09;
    color: #b8f5d1;
    border-radius: 12px;
    padding: 0.85rem;
    font-family: Consolas, monospace;
    font-size: 0.88rem;
}

.script-details {
    margin-top: 1rem;
    color: var(--muted);
}

.script-details summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
}

.lan-hint code {
    word-break: break-all;
}

.api-panel .code-block {
    overflow: auto;
    background: #070b09;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 1rem;
    color: #b8d6c4;
}

.online-text {
    color: #5dffb0;
}

.offline-text {
    color: #ff9d9d;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-online {
    background: rgba(53, 208, 127, 0.15);
    color: #9ef0c0;
}

.status-online::before {
    background: #35d07f;
    box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.18);
}

.status-offline {
    background: rgba(255, 107, 107, 0.12);
    color: #ffc2c2;
}

.status-offline::before {
    background: #ff6b6b;
}

.executor-badge {
    display: inline-block;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b8c7ff;
    background: rgba(120, 150, 255, 0.12);
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
}

.melee-tag {
    max-width: 8.5rem;
}

.panel-header .header-actions {
    flex-wrap: wrap;
}

.selection-actions {
    align-items: center;
    gap: 0.65rem;
}

.selection-count {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
}

.select-col {
    width: 42px;
    text-align: center;
}

.select-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.data-table tr.row-selected {
    background: rgba(53, 208, 127, 0.06);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.auth-card {
    width: min(420px, calc(100% - 2rem));
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: calc(var(--radius) + 4px);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.auth-hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.alert-error {
    background: rgba(255, 107, 107, 0.12);
    color: #ffc2c2;
}

.alert-success {
    background: rgba(82, 196, 120, 0.12);
    color: #b8f0c8;
}

.auth-card-wide {
    width: min(520px, calc(100% - 2rem));
}

.setup-steps {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.setup-steps li + li {
    margin-top: 0.45rem;
}

.setup-steps code {
    display: inline-block;
    margin-top: 0.25rem;
    word-break: break-all;
}

.label-optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.g_id_signin {
    display: flex;
    justify-content: center;
}

.auth-social {
    margin-top: 1rem;
}

.auth-social-hint {
    margin: 0.65rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: center;
}

.auth-social-hint code {
    font-size: 0.75rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: #fff;
    color: #1f1f1f;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-google-pending {
    opacity: 0.92;
}

.google-icon {
    flex-shrink: 0;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 50;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.modal-card {
    position: relative;
    width: min(720px, calc(100% - 2rem));
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.85rem;
}

.detail-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-item strong {
    display: block;
    margin-top: 0.35rem;
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--panel-border);
    }

    .page-header,
    .panel-header {
        flex-direction: column;
    }

    .filter-field.span-2 {
        grid-column: span 1;
    }

    .overview-general {
        gap: 0.4rem;
    }

    .mini-stat {
        flex: 1 1 calc(50% - 0.4rem);
        justify-content: space-between;
    }

    .item-stat-pill-label {
        display: none;
    }

    .filter-row-main .filter-field {
        flex: 1 1 calc(50% - 0.55rem);
    }

    .filter-row-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row-bottom .btn-filter-submit {
        width: 100%;
    }
}

body.entry-gated .app-shell {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

.entry-gate-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    place-items: center;
    padding: 1rem;
}

.entry-gate-modal.is-open {
    display: grid;
}

.entry-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.entry-gate-card {
    position: relative;
    width: min(480px, 100%);
    background: var(--panel);
    border: 1px solid rgba(255, 179, 71, 0.35);
    border-radius: 20px;
    padding: 1.5rem 1.35rem 1.35rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.entry-gate-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1208;
    background: linear-gradient(135deg, #ffb347, #ffcc70);
    box-shadow: 0 8px 24px rgba(255, 179, 71, 0.25);
}

.entry-gate-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
}

.entry-gate-list {
    text-align: left;
    margin: 0 0 1.25rem;
    padding-left: 1.15rem;
    color: var(--muted);
    line-height: 1.55;
}

.entry-gate-list li + li {
    margin-top: 0.45rem;
}

.entry-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.entry-gate-actions .btn {
    width: 100%;
    justify-content: center;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #5865f2;
    color: #fff;
    border: 1px solid #4752c4;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

.btn-discord:hover {
    background: #4752c4;
    color: #fff;
}

.nav-discord {
    color: #b8bcff;
}

.nav-discord:hover {
    color: #dfe1ff;
    background: rgba(88, 101, 242, 0.12);
}

.nav-discord .discord-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.discord-icon {
    flex-shrink: 0;
}
