/* --- Self-hosted Inter font family ---
 * Loaded locally so we don't depend on fonts.googleapis.com, which under certain
 * User-Agents returned relative woff2 URLs that resolved against this origin and
 * produced repeated 404s for /assets/fonts/Inter-*.woff2.
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/Inter-ExtraBold.woff2') format('woff2');
}

:root {
    --bg-base: #0e0e12;
    --bg-surface: #141419;
    --bg-surface-glass: rgba(20, 20, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a3a6aa;
    --accent-cyan: #00e5ff;
    --accent-purple: #9d00ff;
    --accent-red: #eb455f;
    --accent-blue: #5865F2;
    --font-primary: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-base);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ── Utilities ── */
.text-cyan {
    color: var(--accent-cyan);
}

.text-purple {
    color: var(--accent-purple);
}

.text-red {
    color: var(--accent-red);
}

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

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

.hidden {
    display: none !important;
}

/* ── Background & Animations ── */
.security-ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(14, 14, 18, 0.8) 0%, var(--bg-base) 100%);
}

#security-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

/* ── Layout ── */
.dashboard-layout {
    display: flex;
    width: 100%;
    position: relative;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 40px;
    padding-left: 10px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin: 14px 0 6px;
    padding-left: 10px;
    letter-spacing: 1.2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(235, 69, 95, 0.12);
    color: var(--accent-red);
    box-shadow: inset 3px 0 0 var(--accent-red);
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* ── Top Header ── */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Server Select ── */
.server-select-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.input-dark {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-dark:focus {
    border-color: var(--accent-red);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ── Stat Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stats-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

.stats-grid-center {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stats-grid-center .stat-card {
    flex: 1;
    max-width: 380px;
    min-width: 250px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 14px;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 8px 25px rgba(235, 69, 95, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cyan-glow {
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
}

.purple-glow {
    background: rgba(157, 0, 255, 0.12);
    color: var(--accent-purple);
}

.red-glow {
    background: rgba(235, 69, 95, 0.12);
    color: var(--accent-red);
}

.stat-data h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    margin-top: 4px;
}

.stat-status {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 4px;
}

.stat-status.enabled {
    color: #2ecc71;
}

.stat-status.disabled {
    color: #a3a6aa;
}

.stat-status.active {
    color: #eb455f;
}

.stat-status.inactive {
    color: #2ecc71;
}

/* ── Quick Actions ── */
.quick-actions-card {
    padding: 28px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: rgba(235, 69, 95, 0.06);
    border: 1px solid rgba(235, 69, 95, 0.2);
    border-radius: 14px;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.qa-btn:hover {
    background: rgba(235, 69, 95, 0.14);
    border-color: rgba(235, 69, 95, 0.5);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(235, 69, 95, 0.25);
}

.qa-btn i {
    font-size: 1.8rem;
    color: var(--accent-red);
    margin-bottom: 4px;
}

.qa-btn span {
    font-weight: 700;
    font-size: 1rem;
}

.qa-btn small {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* ── Filters Bar ── */
.filters-bar {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 20px 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.search-group {
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input-wrapper input {
    width: 100%;
    padding-left: 38px;
}

/* ── Buttons ── */
.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #4752C4;
    transform: translateY(-1px);
}

.btn-red {
    background: var(--accent-red);
}

.btn-red:hover {
    background: #c92a42;
}

.btn-green {
    background: #2ecc71;
    color: #000;
}

.btn-green:hover {
    background: #27ae60;
}

/* ── Table ── */
.table-responsive {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.logs-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.logs-table tr:last-child td {
    border-bottom: none;
}

.logs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-ban {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
}

.badge-kick {
    background: rgba(240, 192, 64, 0.15);
    color: #f0c040;
}

.badge-warn {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
}

.badge-unban {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.badge-mute {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
}

.badge-active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.badge-expired {
    background: rgba(180, 180, 180, 0.1);
    color: #b4b4b4;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.page-btn.active {
    background: rgba(235, 69, 95, 0.2);
    color: var(--accent-red);
    border-color: var(--accent-red);
}

/* ── Section header row ── */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* ── Escalation Levels ── */
.escalation-levels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.escalation-level {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s;
}

.escalation-level:hover {
    border-color: rgba(235, 69, 95, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.escalation-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 220px;
    flex-shrink: 0;
}

.escalation-badge.highlight {
    box-shadow: 0 0 20px currentColor;
    transform: scale(1.02);
}

.escalation-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 800;
    font-size: 1.1rem;
}

.escalation-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

/* ── Live Security Feed ── */
.chrome-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ff3b30;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    background: rgba(255, 59, 48, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #ff3b30;
    border-radius: 50%;
    animation: livePulse 1.2s infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 5px rgba(255, 59, 48, 0);
    }
}

.live-feed-event {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(30, 31, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 16px;
    position: relative;
    overflow: hidden;
    animation: slideInFadeOut 6s forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.live-feed-event-left-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 8px 0 0 8px;
}

.live-feed-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

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

.live-feed-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 2px;
}

.live-feed-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.live-feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

@keyframes slideInFadeOut {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }

    5% {
        transform: translateX(0);
        opacity: 1;
    }

    90% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(20px);
        opacity: 0;
    }
}

/* ── Event Log Cards ── */
.event-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-log-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s;
}

.event-log-card:hover {
    border-color: rgba(235, 69, 95, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.event-log-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.event-log-body {
    flex: 1;
    min-width: 0;
}

.event-log-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.event-log-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.event-log-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Config Row ── */
.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.config-label {
    font-weight: 600;
    font-size: 0.88rem;
}

.config-value {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Config Cards ── */
.config-card {
    margin-top: 20px;
}

.cfg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.cfg-card-title {
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--accent-red), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.collapse-arrow {
    display: inline-block !important;
    color: var(--accent-red) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    transition: transform 0.3s ease;
}

.cfg-card-body {
    margin-top: 15px;
    display: block;
}

.cfg-card-body.collapsed {
    display: none !important;
}

.cfg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.cfg-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfg-field .help-text {
    font-size: 0.72rem;
    color: #6b6e73;
    margin-bottom: 6px;
    text-transform: none;
    font-weight: normal;
    letter-spacing: 0;
}

.config-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
    transition: border-color 0.3s;
}

.config-switch-wrapper:hover {
    border-color: rgba(235, 69, 95, 0.3);
}

.cfg-label {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 500;
}

.cfg-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* Modern switches */
.modern-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}

.modern-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1e1f22;
    border: 1px solid #313338;
    border-radius: 24px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #80848e;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-switch input:checked+.slider {
    background-color: rgba(235, 69, 95, 0.12);
    border-color: var(--accent-red);
}

.modern-switch input:checked+.slider:before {
    transform: translateX(22px);
    background-color: var(--accent-red);
}

/* Escalation Selector */
.escalation-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.esc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 90px;
    flex: 1;
}

.esc-btn span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
    font-size: 1rem;
}

.esc-btn:hover {
    border-color: rgba(235, 69, 95, 0.35);
    background: rgba(235, 69, 95, 0.04);
    color: #fff;
}

.esc-btn.active {
    background: rgba(235, 69, 95, 0.12);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.esc-btn.active span {
    background: var(--accent-red);
    color: #fff;
}

/* ── Event Type Badge ── */
.badge-event {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-antinuke {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
}

.event-antiraid {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
}

.event-antispam {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
}

/* ── Spinner ── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: #2b2d31;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f4147;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 750px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--bg-surface);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        padding: 70px 16px 30px 16px;
    }

    .stats-grid,
    .stats-grid-6 {
        grid-template-columns: 1fr;
    }

    .stats-grid-center {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid-center .stat-card {
        max-width: none;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .top-header {
        flex-direction: column;
        gap: 15px;
    }

    .filters-bar {
        padding: 16px;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .search-group {
        width: 100%;
    }
}

/* ===== MOBILE HAMBURGER BUTTON ===== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(17, 17, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent-red);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: rgba(235, 69, 95, 0.1);
    border-color: var(--accent-red);
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 49;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* ===== SECURITY SAVE CONFIG BUTTON ===== */
#btnSaveConfig {
    padding: 14px 36px;
    font-size: 1.05rem;
    max-width: 450px !important;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-purple) 100%);
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(235, 69, 95, 0.3);
    margin: 0 auto;
    justify-content: center;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#btnSaveConfig:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(235, 69, 95, 0.5), 0 0 15px rgba(157, 0, 255, 0.3);
}

#btnSaveConfig:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.view-toggle-btn {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
}

/* ===== WARNINGS GRID ===== */
.warnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.warn-user-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.35s ease forwards;
    opacity: 0;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.warn-user-card:hover {
    border-color: rgba(240, 192, 64, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(240, 192, 64, 0.08);
}

.warn-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f0c040, var(--accent-red));
    opacity: 0;
    transition: opacity 0.3s;
}

.warn-user-card:hover::before {
    opacity: 1;
}

.warn-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s, transform 0.3s;
    background: rgba(255, 255, 255, 0.04);
}

.warn-user-card:hover .warn-user-avatar {
    border-color: rgba(240, 192, 64, 0.4);
    transform: scale(1.08);
}

.warn-user-display-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warn-user-username {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: -6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warn-user-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 4px;
}

.warn-user-count-badge.warn-low {
    background: rgba(240, 192, 64, 0.12);
    color: #f0c040;
    border: 1px solid rgba(240, 192, 64, 0.25);
}

.warn-user-count-badge.warn-medium {
    background: rgba(255, 165, 0, 0.12);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.25);
}

.warn-user-count-badge.warn-high {
    background: rgba(235, 69, 95, 0.12);
    color: #eb455f;
    border: 1px solid rgba(235, 69, 95, 0.25);
}

.warn-user-latest {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ===== PLAYER CARDS (Spieler Grid) ===== */
.player-card {
    cursor: pointer;
}

.player-card::before {
    background: linear-gradient(90deg, #5865F2, #00e5ff) !important;
}

.player-card:hover {
    border-color: rgba(88, 101, 242, 0.35) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(88, 101, 242, 0.08) !important;
}

.player-card:hover .warn-user-avatar {
    border-color: rgba(88, 101, 242, 0.4) !important;
}

.player-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.player-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.player-count-badge.badge-warn {
    background: rgba(255, 165, 0, 0.12);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.player-count-badge.badge-kick {
    background: rgba(240, 192, 64, 0.12);
    color: #f0c040;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.player-count-badge.badge-ban {
    background: rgba(235, 69, 95, 0.12);
    color: #eb455f;
    border: 1px solid rgba(235, 69, 95, 0.2);
}

/* Total actions badge colors (extends warn-user-count-badge) */
.warn-user-count-badge.player-low {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

.warn-user-count-badge.player-medium {
    background: rgba(240, 192, 64, 0.12);
    color: #f0c040;
    border: 1px solid rgba(240, 192, 64, 0.25);
}

.warn-user-count-badge.player-high {
    background: rgba(235, 69, 95, 0.12);
    color: #eb455f;
    border: 1px solid rgba(235, 69, 95, 0.25);
}

/* Grid empty state */
.warnings-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.warnings-grid-empty i {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

/* ===== USER DETAIL MODAL ===== */
.user-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

.user-detail-modal-overlay.visible {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.user-detail-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== CONFIRM MODAL ===== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

.confirm-modal-overlay.visible {
    display: flex;
}

.confirm-modal {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.confirm-modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm-modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    z-index: 2;
}

.modal-close-btn:hover {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
    border-color: rgba(235, 69, 95, 0.3);
}

.user-detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(240, 192, 64, 0.04) 0%, transparent 100%);
}

.user-detail-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(240, 192, 64, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.user-detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-detail-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.user-detail-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-detail-id {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace, inherit;
}

.user-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(240, 192, 64, 0.12);
    color: #f0c040;
    border: 1px solid rgba(240, 192, 64, 0.2);
    width: fit-content;
    margin-top: 2px;
}

.user-detail-warnings {
    padding: 20px 28px 28px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-warning-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s;
    animation: cardFadeIn 0.3s ease forwards;
    opacity: 0;
}

.user-warning-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.user-warning-item .warning-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.user-warning-item .warning-reason {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}

.user-warning-item .warning-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.user-warning-item .warning-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-warning-item .warning-delete-btn {
    padding: 4px 10px;
    background: rgba(235, 69, 95, 0.1);
    border: 1px solid rgba(235, 69, 95, 0.2);
    color: var(--accent-red);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.72rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.user-warning-item .warning-delete-btn:hover {
    background: rgba(235, 69, 95, 0.2);
    border-color: rgba(235, 69, 95, 0.4);
}

/* ===== ENHANCED STAT CARDS ===== */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===== ENHANCED QUICK ACTIONS ===== */
.qa-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.qa-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

/* ===== IMPROVED TABLE ROWS ===== */
.logs-table tbody tr {
    transition: background 0.15s ease;
}

.logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.logs-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.logs-table tbody tr:nth-child(even):hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SECTION TRANSITIONS ===== */
section:not(.hidden) {
    animation: sectionFadeIn 0.35s ease;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOCKDOWN PROGRESS BAR ===== */
.lockdown-progress-wrapper {
    animation: sectionFadeIn 0.4s ease;
}

.lockdown-progress-container {
    position: relative;
    width: 100%;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.lockdown-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #eb455f, #f0486a, #eb455f);
    background-size: 200% 100%;
    animation: progressPulse 2s ease-in-out infinite;
    border-radius: 13px;
    transition: width 1s linear;
}

@keyframes progressPulse {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.lockdown-progress-fill.unlimited {
    animation: progressPulseUnlimited 1.5s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes progressPulseUnlimited {

    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0.7;
    }

    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

.lockdown-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.lockdown-progress-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.lockdown-progress-status i {
    color: var(--accent-red);
    animation: spin 2s linear infinite;
}

/* ===== RESPONSIVE GRID ===== */
@media (max-width: 768px) {
    .warnings-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .warn-user-card {
        padding: 18px 14px;
    }

    .warn-user-avatar {
        width: 48px;
        height: 48px;
    }

    .user-detail-modal {
        width: 95%;
        max-height: 90vh;
    }

    .user-detail-header {
        padding: 20px;
    }

    .user-detail-warnings {
        padding: 16px;
    }

    .view-toggle {
        margin-left: 0 !important;
    }
}

/* --- SCROLL ANIMATIONS --- */
[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-animate="fade-up"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- TEXT GRADIENTS --- */
.gradient-text {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ----- COMPREHENSIVE MOBILE OPTIMIZATIONS ----- */
@media (max-width: 768px) {

    body {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Touch Targets — real class names used by this dashboard */
    .btn-modern,
    .btn-primary,
    .submit-btn,
    .modal-close-btn,
    .custom-select-trigger,
    .input-dark,
    .input-modern,
    .nav-item,
    .filter-btn {
        min-height: 44px !important;
    }

    .nav-item,
    .sidebar-nav-item,
    .sidebar-footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .mobile-menu-btn {
        top: max(12px, env(safe-area-inset-top, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        width: 44px;
        height: 44px;
    }

    .input-dark,
    .input-modern {
        font-size: 16px !important;
    }

    /* Layout Overrides */
    .input-grid,
    .card-grid,
    .cat-input-grid,
    .dashboard-grid,
    .stats-grid,
    .quick-actions-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modals → phone-friendly */
    .modal-content,
    .edit-song-modal-card,
    .confirm-modal,
    .user-detail-modal {
        width: 95% !important;
        max-width: none !important;
        margin: 10px auto !important;
        padding: 15px !important;
        max-height: 90dvh !important;
        overflow-y: auto !important;
    }

    /* Padding Reductions */
    .main-content,
    .dashboard-main-content {
        padding: 60px 10px 80px 10px !important;
        padding-bottom: max(80px, calc(60px + env(safe-area-inset-bottom, 0px))) !important;
        overscroll-behavior: contain;
    }

    .settings-card,
    .glass-card {
        padding: 15px 10px !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Table responsive override */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .logs-table td,
    .table-responsive td {
        overflow-wrap: anywhere;
        min-width: 0;
    }

    /* Floating save bar full-width on phone */
    .save-changes-bar {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(120%);
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0;
        padding: 14px 16px;
        padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }

    .save-changes-bar.visible {
        transform: translateY(0) !important;
    }

    .save-changes-bar-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .save-changes-bar .btn-save-large,
    .save-changes-bar button {
        width: 100%;
        min-height: 48px;
        white-space: normal;
    }

    #particle-canvas,
    .ambient-sphere {
        display: none !important;
    }
}

/* Custom Dropdown Styling */
.custom-dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13.5px;
    color: #dbdee1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s, color 0.15s;
}
.custom-dropdown-option:hover {
    background: rgba(88, 101, 242, 0.12);
    color: #fff;
}
.custom-dropdown-option.selected {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-cyan);
    font-weight: 600;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 13px;
}
.custom-dropdown-option.selected:hover {
    background: rgba(0, 229, 255, 0.15);
}
.custom-dropdown-trigger:hover {
    border-color: rgba(0, 229, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

/* Liquid Glass Menu Card */
.custom-dropdown-menu.liquid-glass {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(14, 14, 18, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    animation: dropdownOpen 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
}

@keyframes dropdownOpen {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animated Role Pill */
.team-role-pill.animate-pop {
    animation: pillScaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pillScaleIn {
    from {
        opacity: 0;
        transform: scale(0.93) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-card {
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.custom-modal-overlay.open .custom-modal-card {
    transform: scale(1) translateY(0);
}

.custom-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 24px;
    background: rgba(235, 69, 95, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(235, 69, 95, 0.25);
    box-shadow: 0 0 15px rgba(235, 69, 95, 0.1);
}

.custom-modal-icon.success {
    background: rgba(46, 204, 113, 0.1) !important;
    color: #2ecc71 !important;
    border-color: rgba(46, 204, 113, 0.25) !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.1) !important;
}

.custom-modal-icon.info {
    background: rgba(0, 229, 255, 0.1) !important;
    color: var(--accent-cyan) !important;
    border-color: rgba(0, 229, 255, 0.25) !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1) !important;
}

.custom-modal-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.custom-modal-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-modal-actions button {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.custom-modal-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.custom-modal-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.custom-modal-actions .btn-primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(235, 69, 95, 0.2);
}

.custom-modal-actions .btn-primary:hover {
    background: #ff5a73;
    box-shadow: 0 4px 16px rgba(235, 69, 95, 0.35);
}

.custom-modal-actions .btn-primary.green {
    background: #2ecc71 !important;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2) !important;
}

.custom-modal-actions .btn-primary.green:hover {
    background: #27ae60 !important;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.35) !important;
}

/* --- SAVE CONFIG BUTTON & BAR --- */
#btnSaveConfig {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px 40px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background: linear-gradient(90deg, #eb455f, #9d00ff) !important;
    box-shadow: 0 4px 15px rgba(157, 0, 255, 0.3) !important;
    max-width: 450px !important;
    width: 100%;
    border: none !important;
    color: #fff !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
}

#btnSaveConfig:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(157, 0, 255, 0.5) !important;
    filter: brightness(1.1);
}

#btnSaveConfig:active {
    transform: translateY(0);
}

/* Floating Save Changes Bar */
.save-changes-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 28px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(157, 0, 255, 0.15);
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    width: max-content;
    max-width: 90%;
}

.save-changes-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.save-changes-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.save-changes-text {
    color: #dbdee1;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-changes-text i {
    color: #f0c040;
    font-size: 1.1rem;
}

.btn-save-large {
    background: linear-gradient(90deg, #eb455f, #9d00ff) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 28px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(235, 69, 95, 0.25) !important;
    font-family: inherit;
    white-space: nowrap;
}

.btn-save-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 0, 255, 0.45) !important;
    filter: brightness(1.1);
}

.btn-save-large:active {
    transform: translateY(0);
}